/* ============================================================
   Associazione Italiana Maître d'Hôtel — shared stylesheet
   Aesthetic: refined / luxury editorial
   Palette: deep bordeaux, warm ivory, antique gold, charcoal
   ============================================================ */

:root {
  --bordeaux: #5a1a22;
  --bordeaux-deep: #3d0f16;
  --ivory: #f6f1e7;
  --ivory-warm: #efe7d6;
  --gold: #b08d46;
  --gold-soft: #c9a866;
  --charcoal: #221c1a;
  --charcoal-soft: #4a3f3b;
  --line: rgba(176, 141, 70, 0.28);
  --shadow: 0 18px 50px -20px rgba(61, 15, 22, 0.45);

  --display: "Cormorant Garamond", Georgia, serif;
  --serif: "EB Garamond", Georgia, serif;
  --sans: "Jost", "Helvetica Neue", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--ivory);
  color: var(--charcoal);
  line-height: 1.7;
  font-size: 18px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.1; letter-spacing: 0.01em; }
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
a { color: inherit; text-decoration: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 2rem; position: relative; z-index: 2; }
.narrow { max-width: 820px; }

/* ---------- Header / nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem 2.5rem;
  transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}
.site-header.scrolled {
  background: var(--ivory);
  padding: 0.55rem 2.5rem;
  box-shadow: 0 1px 0 var(--line);
}
/* centered logo (full wordmark) */
.brand { display: flex; align-items: center; justify-content: center; gap: 0.85rem; }
.brand .logo-img { width: 300px; height: auto; display: block; transition: width .4s ease, opacity .3s ease; }
.brand .logo-ivory { display: block; }
.brand .logo-red { display: none; }
/* when header is scrolled (light bg) -> show red logo */
.site-header.scrolled .brand .logo-ivory { display: none; }
.site-header.scrolled .brand .logo-red { display: block; }
.site-header.scrolled .brand .logo-img { width: 230px; }
/* burger pinned to the right while logo stays centered */
.menu-toggle { position: absolute; right: 2.5rem; top: 50%; transform: translateY(-50%); }

.nav {
  position: fixed; top: 0; right: 0; bottom: 0; width: 25vw; min-width: 320px; z-index: 56;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1.05rem;
  background:
    radial-gradient(circle at 75% 22%, rgba(176,141,70,0.18), transparent 55%),
    var(--bordeaux-deep);
  box-shadow: -16px 0 50px -20px rgba(0,0,0,0.55);
  transform: translateX(100%); transition: transform .45s cubic-bezier(.6,.05,.2,1);
  overflow-y: auto;
}
.nav.open { transform: none; }
/* dimmed backdrop behind the panel; click to close */
.nav-backdrop {
  position: fixed; inset: 0; z-index: 54; background: rgba(40,10,16,0.45);
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s ease;
}
.nav-backdrop.open { opacity: 1; visibility: visible; }
/* decorative monogram in the panel */
.nav::before {
  content: "M"; position: absolute; right: -22%; bottom: -6%;
  font-family: var(--display); font-size: 20rem; line-height: 1;
  color: rgba(176,141,70,0.07); pointer-events: none;
}
.nav a {
  font-family: var(--sans); font-size: 0.95rem; letter-spacing: 0.2em;
  text-transform: uppercase; position: relative; padding: 0.2rem 0; text-align: center;
  color: var(--ivory);
  opacity: 0; transform: translateY(14px); z-index: 2;
  transition: color .3s;
}
.nav.open a { animation: navItemIn .5s forwards; }
.nav.open a:nth-child(1) { animation-delay: .06s; }
.nav.open a:nth-child(2) { animation-delay: .10s; }
.nav.open a:nth-child(3) { animation-delay: .14s; }
.nav.open a:nth-child(4) { animation-delay: .18s; }
.nav.open a:nth-child(5) { animation-delay: .22s; }
.nav.open a:nth-child(6) { animation-delay: .26s; }
.nav.open a:nth-child(7) { animation-delay: .30s; }
.nav.open a:nth-child(8) { animation-delay: .34s; }
.nav.open a:nth-child(9) { animation-delay: .38s; }
.nav.open a:nth-child(10) { animation-delay: .42s; }
.nav.open a:nth-child(11) { animation-delay: .46s; }
.nav a::after { display: none; }
.nav a:hover { color: var(--gold); }
.nav .btn-nav {
  border: 1px solid var(--gold); padding: 0.75rem 1.8rem; border-radius: 2px; margin-top: .6rem;
}
.nav .btn-nav:hover { background: var(--gold); color: var(--ivory); }
/* keep brand + toggle above the overlay */
.site-header .brand { z-index: 60; }
body.nav-locked { overflow: hidden; }

.menu-toggle { display: flex; background: none; border: none; cursor: pointer; flex-direction: column; gap: 6px; z-index: 60; width: 30px; height: 22px; justify-content: center; }
.menu-toggle span { display: block; width: 28px; height: 2px; background: var(--charcoal); transition: transform .35s ease, opacity .25s ease, background .3s ease; transform-origin: center; }
.site-header.on-dark:not(.scrolled) .menu-toggle span { background: var(--ivory); }
/* when menu open, the toggle sits over the dark overlay -> always light, and forms an X */
.menu-toggle.is-open span { background: var(--ivory); }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--sans); font-size: 0.78rem;
  letter-spacing: 0.2em; text-transform: uppercase; padding: 1rem 2.4rem;
  border-radius: 2px; cursor: pointer; transition: all 0.35s ease; border: 1px solid transparent;
}
.btn-gold { background: var(--gold); color: var(--ivory); }
.btn-gold:hover { background: var(--bordeaux); color: var(--ivory); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-outline { border-color: var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--ivory); }
.btn-ghost-light { border-color: rgba(246,241,231,.6); color: var(--ivory); }
.btn-ghost-light:hover { background: var(--ivory); color: var(--bordeaux); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background:
    linear-gradient(100deg, rgba(40,10,16,0.78) 0%, rgba(40,10,16,0.42) 45%, rgba(40,10,16,0.12) 100%),
    url("../assets/hero-bg.jpg") center/cover no-repeat,
    #2c0a10;
  color: var(--ivory);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: 0.35;
  background-image:
    repeating-linear-gradient(45deg, transparent 0 22px, rgba(176,141,70,0.05) 22px 23px);
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  box-shadow: inset 0 0 220px rgba(0,0,0,0.6);
  pointer-events: none;
}
.hero-inner { max-width: 880px; position: relative; z-index: 2; }
/* oversized decorative monogram */
.hero-inner::after {
  content: "M"; position: absolute; right: -10%; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-size: 34rem; line-height: 1; color: rgba(176,141,70,0.04);
  pointer-events: none; z-index: -1;
}
.hero .eyebrow { color: var(--gold-soft); }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.5rem); margin: 1.2rem 0; font-weight: 500; }
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero p { font-size: 1.25rem; max-width: 560px; color: rgba(246,241,231,0.88); margin-bottom: 2.4rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }

/* fade/stagger entrance */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .12s; } .d2 { transition-delay: .24s; }
.d3 { transition-delay: .36s; } .d4 { transition-delay: .48s; }

/* ---------- Sections ---------- */
section { padding: 6.5rem 0; position: relative; }
.section-head { max-width: 640px; margin-bottom: 3.5rem; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); margin: 0.8rem 0; }
.section-head p { color: var(--charcoal-soft); font-size: 1.1rem; }
.rule { width: 56px; height: 2px; background: var(--gold); margin: 1.4rem 0; }
.section-head.center .rule { margin-inline: auto; }

.bg-bordeaux { background: var(--bordeaux-deep); color: var(--ivory); }
.bg-bordeaux .section-head p, .bg-bordeaux p { color: rgba(246,241,231,0.82); }
.bg-bordeaux h2, .bg-bordeaux h3 { color: var(--ivory); }
.bg-warm { background: var(--ivory-warm); }

/* ---------- Cards grid ---------- */
.grid { display: grid; gap: 1.8rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--ivory); border: 1px solid var(--line); padding: 2.4rem 2rem;
  border-radius: 3px; transition: transform .4s ease, box-shadow .4s ease, border-color .4s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .45s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.card:hover::before { transform: scaleX(1); }
.card .num { font-family: var(--display); font-size: 2.4rem; color: var(--gold); line-height: 1; }
.card h3 { font-size: 1.5rem; margin: 0.9rem 0 0.6rem; }
.card p { color: var(--charcoal-soft); font-size: 1rem; }
.card .icon { font-size: 1.8rem; color: var(--gold); margin-bottom: 0.6rem; display: block; }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split img { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; min-height: 420px; box-shadow: var(--shadow); }
.split.rev .split-media { order: 2; }

/* CSS decorative panel (replaces external photos, dependency-free) */
.plate {
  position: relative; min-height: 440px; border-radius: 3px; box-shadow: var(--shadow);
  background:
    radial-gradient(circle at 30% 25%, rgba(176,141,70,0.28), transparent 50%),
    linear-gradient(135deg, #4a141c, #5a1a22 55%, #2c0a10);
  display: grid; place-items: center; overflow: hidden;
}
.plate::before {
  content: ""; position: absolute; inset: 18px; border: 1px solid rgba(176,141,70,0.4); border-radius: 2px;
}
.plate::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: repeating-linear-gradient(45deg, transparent 0 20px, rgba(176,141,70,0.05) 20px 21px);
}
.plate .glyph { font-family: var(--display); font-size: 8rem; color: rgba(246,241,231,0.9); position: relative; z-index: 2; line-height: 1; }
.plate .glyph-sub { position: relative; z-index: 2; font-family: var(--sans); font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--gold-soft); margin-top: .6rem; }
.plate.tall { aspect-ratio: 3/4; min-height: 0; }
.plate.alt { background: radial-gradient(circle at 70% 75%, rgba(176,141,70,0.26), transparent 50%), linear-gradient(160deg, #3d0f16, #4a141c 60%, #2c0a10); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; text-align: center; }
.stat .figure { font-family: var(--display); font-size: clamp(2.6rem, 5vw, 3.8rem); color: var(--gold-soft); }
.stat .label { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(246,241,231,0.7); }

/* ---------- Quote ---------- */
.quote { text-align: center; max-width: 860px; margin: 0 auto; }
.quote blockquote { font-family: var(--display); font-style: italic; font-size: clamp(1.6rem, 3.6vw, 2.6rem); line-height: 1.3; }
.quote .mark { font-size: 4rem; color: var(--gold); line-height: 0; display: block; height: 2rem; }
.quote cite { font-family: var(--sans); font-style: normal; font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); display: block; margin-top: 1.8rem; }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 760px; margin: 0 auto; }
.timeline::before { content: ""; position: absolute; left: 120px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl-item { display: grid; grid-template-columns: 120px 1fr; gap: 2.4rem; padding-bottom: 2.8rem; position: relative; }
.tl-item .year { font-family: var(--display); font-size: 1.7rem; color: var(--gold); text-align: right; }
.tl-item .tl-body h3 { font-size: 1.35rem; margin-bottom: .3rem; }
.tl-item .tl-body p { color: var(--charcoal-soft); font-size: 1rem; }
.tl-item::after { content: ""; position: absolute; left: 115px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: var(--ivory); border: 2px solid var(--gold); }
.bg-bordeaux .tl-item::after { background: var(--bordeaux-deep); }
.bg-bordeaux .tl-item .tl-body p { color: rgba(246,241,231,.8); }

/* ---------- Team ---------- */
.member { text-align: center; }
.member .portrait {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 3px;
  filter: grayscale(100%) sepia(12%); transition: filter .5s ease, transform .5s ease;
}
.member:hover .portrait { filter: none; transform: translateY(-4px); }
.member h3 { font-size: 1.4rem; margin-top: 1rem; }
.member .role { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--charcoal-soft); }
.field input, .field select, .field textarea {
  font-family: var(--serif); font-size: 1rem; padding: 0.9rem 1rem;
  border: 1px solid var(--line); background: var(--ivory); border-radius: 2px; color: var(--charcoal);
  transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,141,70,0.12);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-family: var(--sans); font-size: 0.75rem; color: var(--charcoal-soft); letter-spacing: .04em; }
.form-success { background: var(--bordeaux); color: var(--ivory); padding: 1rem 1.4rem; border-radius: 2px; margin-top: 1.2rem; display: none; font-family: var(--sans); font-size: .85rem; letter-spacing: .05em; }
.form-success.show { display: block; }

/* ---------- Page banner (interior pages) ---------- */
.page-banner {
  min-height: 56vh; display: flex; align-items: flex-end; color: var(--ivory);
  padding-bottom: 3.5rem; position: relative;
}
.page-banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(40,10,16,.55), rgba(40,10,16,.8)); }
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.page-banner .crumbs { font-family: var(--sans); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); margin-bottom: .8rem; }
.page-banner::before { content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(45deg, transparent 0 22px, rgba(176,141,70,0.05) 22px 23px); opacity:.6; }
.banner-about { background: radial-gradient(circle at 80% 20%, rgba(176,141,70,0.2), transparent 45%), linear-gradient(135deg, #3d0f16, #5a1a22 60%, #2c0a10); }
.banner-services { background: radial-gradient(circle at 20% 30%, rgba(176,141,70,0.2), transparent 45%), linear-gradient(120deg, #2c0a10, #5a1a22 55%, #3d0f16); }
.banner-members { background: radial-gradient(circle at 70% 70%, rgba(176,141,70,0.22), transparent 50%), linear-gradient(160deg, #3d0f16, #4a141c 50%, #2c0a10); }
.banner-contact { background: radial-gradient(circle at 30% 80%, rgba(176,141,70,0.18), transparent 48%), linear-gradient(135deg, #2c0a10, #5a1a22 60%, #3d0f16); }

/* ---------- Membership tiers ---------- */
.tier { background: var(--ivory); border: 1px solid var(--line); border-radius: 3px; padding: 2.6rem 2rem; text-align: center; transition: .4s; position: relative; }
.tier.featured { background: var(--bordeaux-deep); color: var(--ivory); transform: scale(1.04); }
.tier.featured h3, .tier.featured .price { color: var(--ivory); }
.tier .tier-name { font-family: var(--sans); letter-spacing: .22em; text-transform: uppercase; font-size: .76rem; color: var(--gold); }
.tier .price { font-family: var(--display); font-size: 3rem; margin: 1rem 0 .2rem; }
.tier .price small { font-size: .9rem; color: var(--charcoal-soft); }
.tier.featured .price small { color: rgba(246,241,231,.7); }
.tier ul { list-style: none; margin: 1.6rem 0; text-align: left; }
.tier li { padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.tier.featured li { border-color: rgba(246,241,231,.16); }
.tier li::before { content: "✦"; color: var(--gold); margin-right: .6rem; }
.badge-pop { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--gold); color: var(--ivory); font-family: var(--sans); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; padding: .35rem 1rem; border-radius: 2px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--charcoal); color: rgba(246,241,231,0.7); padding: 4.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2.5rem; margin-bottom: 3rem; }
.site-footer h4 { font-family: var(--sans); font-size: .74rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.2rem; }
.site-footer .f-brand { font-family: var(--display); font-size: 1.6rem; color: var(--ivory); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .6rem; font-size: .95rem; }
.site-footer a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(246,241,231,0.12); padding-top: 1.6rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; font-family: var(--sans); font-size: .72rem; letter-spacing: .08em; color: rgba(246,241,231,0.5); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2,1fr); gap: 2.4rem; }
}
@keyframes navItemIn { to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .brand .logo-img { width: 210px; }
  .site-header.scrolled .brand .logo-img { width: 180px; }
  .nav { width: 78vw; min-width: 0; }
  .grid-2, .grid-3, .grid-4, .split, .form-grid, .footer-grid { grid-template-columns: 1fr; }
  .split.rev .split-media { order: 0; }
  .hero { background-attachment: scroll; }
  .timeline::before { left: 60px; }
  .tl-item { grid-template-columns: 60px 1fr; gap: 1.2rem; }
  .tl-item .year { font-size: 1.2rem; }
  .tl-item::after { left: 55px; }
  .tier.featured { transform: none; }
  .stats { grid-template-columns: 1fr 1fr; }
}

/* ---------- Sponsor grid ---------- */
.sponsor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.sponsor-card {
  background: var(--ivory); border: 1px solid var(--line); border-radius: 3px;
  min-height: 170px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 1.8rem 1.4rem; transition: transform .4s ease, box-shadow .4s ease, border-color .4s;
}
.sponsor-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--gold); }
.sponsor-name { font-family: var(--display); font-size: 1.55rem; color: var(--bordeaux); line-height: 1.15; }
.sponsor-sub { font-family: var(--sans); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-top: .55rem; }

/* ---------- Gallery grid ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.gallery-tile .plate { min-height: 240px; }
.gallery-tile .plate::before { inset: 12px; }
.gallery-label { position: relative; z-index: 2; font-family: var(--sans); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); padding: 0 1rem; text-align: center; }

@media (max-width: 760px) {
  .sponsor-grid, .gallery-grid { grid-template-columns: 1fr 1fr; }
}
