/* =============================================================
   FESTRUM Club — refined system (v2)
   Old-money contemporary · quiet luxury · editorial premium
   ============================================================= */

@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,600,700&f[]=general-sans@300,400,500,600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500;1,600&family=Italianno&display=swap');

:root {
  /* Neutrals */
  --off-white: #F2F0EB;
  --warm-ivory: #ECE6DA;
  --soft-white: #FAF8F4;
  --paper:      #F4F1E9;
  --paper-2:    #EDE7D7;
  --deep-graphite: #1E1E1C;
  --soft-charcoal: #2A2A28;
  --night:      #15140F;

  /* Accents */
  --champagne:  #D6C6A5;
  --champagne-deep: #B8A077;
  --champagne-soft: #E5D7B6;
  --warm-gray:  #B8B6B0;
  --stone:      #8A867D;
  --moss:       #556B57;
  --olive:      #7A8268;
  --ember:      #B8642A;

  /* Type stacks */
  --sans:   "General Sans", "Satoshi", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --display:"General Sans", "Satoshi", -apple-system, sans-serif;
  --serif:  "Cormorant Garamond", "Playfair Display", Georgia, serif;
  --script: "Italianno", cursive;

  /* Lines */
  --line: 1px solid rgba(30,30,28,0.10);
  --line-soft: 1px solid rgba(30,30,28,0.06);
  --line-dark: 1px solid rgba(214,198,165,0.16);

  --gutter: clamp(20px, 4vw, 72px);
  --max: 1440px;

  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
html { scroll-behavior: auto; }
body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--deep-graphite);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01","ss02";
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- Type ---------- */
.serif  { font-family: var(--serif); font-weight: 400; font-style: italic; }
.script { font-family: var(--script); font-weight: 400; font-style: normal; }

/* ALL display titles use sans + italic-serif accents */
h1,h2,h3,h4 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.02;
  margin: 0;
  color: var(--deep-graphite);
}
h1 {
  font-size: clamp(48px, 6.4vw, 96px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
h2 {
  font-size: clamp(34px, 4.6vw, 68px);
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-weight: 500;
}
h3 {
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-weight: 500;
}

/* The signature: editorial italic serif accent inside sans titles */
.it, .italic-script {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--deep-graphite);
  position: relative;
  padding: 0 0.04em;
}
.dark .it, .dark .italic-script,
.section.dark .it, .section.dark .italic-script,
.cta-content .it, .cta-content .italic-script {
  color: var(--champagne);
}

/* Eyebrows */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 500;
}
.eyebrow.gold { color: var(--champagne-deep); }
.eyebrow.dark-bg { color: var(--champagne); }

/* Body text refinements */
p { margin: 0 0 1em; text-wrap: pretty; }
.lede {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.7;
  color: var(--soft-charcoal);
  max-width: 56ch;
  font-weight: 400;
}
.dark .lede { color: rgba(242,240,235,0.78); }

/* ---------- Layout ---------- */
.shell      { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.shell-wide { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 16px; left: 0; right: 0;
  z-index: 100;
  color: var(--deep-graphite);
  background: transparent;
  border-bottom: 1px solid transparent;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  transition:
    opacity .55s var(--ease-out),
    transform .55s var(--ease-out),
    color .35s var(--ease),
    filter .35s var(--ease);
  text-shadow:
    0 1px 18px rgba(244,241,233,0.92),
    0 1px 2px rgba(244,241,233,0.72);
}
.site-header.on-dark,
.site-header.dark {
  color: var(--off-white);
  text-shadow:
    0 1px 18px rgba(15,14,10,0.9),
    0 1px 2px rgba(15,14,10,0.8);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 54px;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}
.brand-logo {
  height: 42px;
  width: auto;
  filter:
    brightness(0) saturate(100%)
    drop-shadow(0 1px 16px rgba(244,241,233,0.82));
  transition: filter .35s var(--ease), opacity .35s var(--ease);
}
.site-header.on-dark .brand-logo,
.site-header.dark .brand-logo,
.site-header.scrolled.on-dark .brand-logo {
  filter:
    brightness(0) invert(1)
    drop-shadow(0 1px 18px rgba(15,14,10,0.72));
}
.footer-logo {
  height: 56px;
  width: auto;
  filter: brightness(1.05);
  margin-bottom: 18px;
}
.brand-stack { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.brand-stack .word-mark {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.brand-stack .script-mark {
  font-family: var(--script);
  font-size: 22px;
  color: var(--champagne-deep);
  margin-top: -3px;
  margin-left: 35%;
  line-height: 0.9;
}

.site-nav { display: flex; gap: 38px; margin-left: auto; }
.site-nav a {
  position: relative;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 4px 0;
  opacity: 0.82;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.site-nav a::after {
  content:""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .55s var(--ease-out);
}
.site-nav a:hover { opacity: 1; transform: translateY(-1px); }
.site-nav a:hover::after, .site-nav a.is-current::after { transform: scaleX(1); }
.site-nav a.is-current { opacity: 1; }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  border: 0;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  font-weight: 500;
  border-radius: 0;
  opacity: 0.9;
  transition: color .35s var(--ease), opacity .35s var(--ease), transform .35s var(--ease);
}
.header-cta:hover { color: var(--moss); opacity: 1; transform: translateY(-1px); }
.site-header.on-dark .header-cta:hover,
.site-header.dark .header-cta:hover { color: var(--champagne); }
.header-cta .cta-arr { width:14px; height:1px; background: currentColor; position: relative; transition: width .4s var(--ease); }
.header-cta .cta-arr::after { content:""; position:absolute; right:0; top:50%; width:5px; height:5px; border-top:1px solid currentColor; border-right:1px solid currentColor; transform: translateY(-50%) rotate(45deg); }
.header-cta:hover .cta-arr { width: 22px; }

.menu-toggle { display: none; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: var(--deep-graphite);
  z-index: 200;
  padding: 90px 32px 40px;
  transform: translateX(100%);
  transition: transform .55s var(--ease-out);
  display: flex;
  flex-direction: column;
}
.mobile-drawer.open { transform: translateX(0); }
.mobile-drawer .md-close {
  position: absolute;
  top: 22px; right: 22px;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(214,198,165,0.4);
  color: var(--champagne);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.mobile-drawer nav { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; }
.mobile-drawer nav a {
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: -0.02em;
  font-weight: 500;
  color: var(--off-white);
  padding: 14px 0;
  border-bottom: 1px solid rgba(214,198,165,0.1);
}
.mobile-drawer .md-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 12px;
  padding: 18px 24px;
  background: var(--champagne);
  color: var(--deep-graphite);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 17px 28px;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}
.btn .arr {
  position: relative;
  width: 22px; height: 1px;
  background: currentColor;
  transition: width .45s var(--ease);
}
.btn .arr::after {
  content:""; position: absolute; right: 0; top: 50%;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}
.btn:hover .arr { width: 32px; }

.btn-primary { background: var(--deep-graphite); color: var(--off-white); border-color: var(--deep-graphite); }
.btn-primary:hover { background: var(--ember); border-color: var(--ember); }

.btn-ghost { background: transparent; color: var(--deep-graphite); border-color: rgba(30,30,28,0.35); }
.btn-ghost:hover { background: var(--deep-graphite); color: var(--off-white); border-color: var(--deep-graphite); }

.btn-on-dark { background: transparent; color: var(--off-white); border-color: rgba(214,198,165,0.5); }
.btn-on-dark:hover { background: var(--champagne); color: var(--deep-graphite); border-color: var(--champagne); }

.btn-gold { background: var(--champagne); color: var(--deep-graphite); border-color: var(--champagne); }
.btn-gold:hover { background: var(--champagne-deep); color: var(--off-white); border-color: var(--champagne-deep); }

/* ---------- Sections ---------- */
.section { padding: clamp(80px, 11vw, 180px) 0; position: relative; }
.section.tight { padding: clamp(60px, 7vw, 110px) 0; }
.section.dark  { background: var(--deep-graphite); color: var(--off-white); }
.section.dark h1, .section.dark h2, .section.dark h3 { color: var(--off-white); }
.section.ivory { background: var(--warm-ivory); }
.section.paper { background: var(--paper); }
.section.paper-2 { background: var(--paper-2); }

.section-eyebrow { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.section-eyebrow::before { content:""; width: 28px; height: 1px; background: currentColor; opacity: 0.5; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }
.reveal-delay-4 { transition-delay: .32s; }
.reveal-delay-5 { transition-delay: .4s; }
.reveal-delay-6 { transition-delay: .48s; }

.mask-reveal { position: relative; overflow: hidden; }
.mask-reveal::after {
  content:""; position: absolute; inset: 0;
  background: var(--off-white);
  transform-origin: right center;
  transform: scaleX(1);
  transition: transform 1.5s var(--ease-out);
}
.mask-reveal.in::after { transform: scaleX(0); }
.mask-reveal img { transform: scale(1.08); transition: transform 2.2s var(--ease-out); }
.mask-reveal.in img { transform: scale(1); }
.mask-reveal.dark::after { background: var(--deep-graphite); }
.mask-reveal.paper::after { background: var(--paper); }

.line-reveal { display: block; overflow: hidden; padding-bottom: 0.04em; }
.line-reveal > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
}
.line-reveal.in > span { transform: translateY(0); }
.line-reveal.delay-1 > span { transition-delay: .08s; }
.line-reveal.delay-2 > span { transition-delay: .18s; }
.line-reveal.delay-3 > span { transition-delay: .28s; }
.line-reveal.delay-4 > span { transition-delay: .38s; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep-graphite);
  color: var(--warm-gray);
  padding: 110px 0 32px;
  position: relative;
}
.site-footer::before {
  content:""; position: absolute; left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214,198,165,0.4), transparent);
}
.site-footer h4 {
  color: var(--off-white);
  font-family: var(--sans);
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  margin: 0 0 22px;
  font-weight: 600;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 80px;
  border-bottom: 1px solid rgba(214,198,165,0.12);
}
.footer-brand .word-mark { color: var(--off-white); font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: 0.16em; }
.footer-brand .script-mark { color: var(--champagne); font-size: 32px; }
.footer-brand p { font-size: 13.5px; opacity: 0.7; margin-top: 24px; max-width: 340px; line-height: 1.7; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 12px; }
.footer-grid a { font-size: 13px; opacity: 0.6; transition: opacity .3s, color .3s; }
.footer-grid a:hover { opacity: 1; color: var(--champagne); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 30px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.5;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Page intro for sub-pages ---------- */
.page-intro {
  padding-top: calc(78px + clamp(70px, 9vw, 140px));
  padding-bottom: clamp(60px, 7vw, 110px);
  background: var(--paper);
  position: relative;
  overflow: hidden;
  border-bottom: var(--line);
}
.page-intro h1 { font-size: clamp(48px, 6.5vw, 104px); line-height: 0.98; }
.page-intro .lede { margin-top: 36px; font-size: clamp(15px, 1.2vw, 18px); }

/* ---------- Curtain ---------- */
.page-curtain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--deep-graphite);
  pointer-events: none;
  transform: translateY(0);
  transition: transform 1.1s var(--ease-out);
}
.page-curtain.lift { transform: translateY(-101%); }
.page-curtain .curtain-mark {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 22px;
  opacity: 1;
  transition: opacity .5s var(--ease);
}
.page-curtain .curtain-logo {
  height: 88px;
  width: auto;
  filter:
    brightness(0) invert(1)
    drop-shadow(0 2px 24px rgba(214,198,165,0.45));
  opacity: 0;
  transform: translateY(10px);
  animation: curtain-logo-in 1.1s var(--ease-out) 0.15s forwards;
}
.page-curtain .curtain-rule {
  display: block;
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--champagne), transparent);
  animation: curtain-rule-in 1s var(--ease-out) 0.55s forwards;
}
@keyframes curtain-logo-in {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes curtain-rule-in {
  to { width: 120px; }
}
.page-curtain.lift .curtain-mark { opacity: 0; }

.page-out {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--deep-graphite);
  pointer-events: none;
  transform: translateY(101%);
  transition: transform .8s var(--ease-out);
}
.page-out.cover { transform: translateY(0); }

/* ---------- Metric ---------- */
.metric { display: flex; flex-direction: column; gap: 6px; }
.metric .num {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(40px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.metric .label {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  font-weight: 500;
}
.dark .metric .label { color: var(--warm-gray); opacity: 0.7; }

/* ---------- Grain ---------- */
.grain { position: relative; isolation: isolate; }
.grain::before {
  content:""; position: absolute; inset: 0;
  pointer-events: none; z-index: 1;
  opacity: 0.06; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.7'/></svg>");
}
.grain > * { position: relative; z-index: 2; }

/* ---------- Mobile ---------- */
@media (max-width: 980px) {
  .site-nav { display: none; }
  .header-cta { display: none; }
  .site-header {
    top: 10px;
    text-shadow: 0 1px 18px rgba(244,241,233,0.92);
  }
  body[data-page="home"] .site-header {
    color: var(--deep-graphite);
    text-shadow:
      0 1px 18px rgba(244,241,233,0.92),
      0 1px 2px rgba(244,241,233,0.72);
  }
  body[data-page="home"] .site-header .brand-logo {
    filter:
      brightness(0) saturate(100%)
      drop-shadow(0 1px 16px rgba(244,241,233,0.82));
  }
  body[data-page="home"] .site-header.on-dark {
    color: var(--off-white);
    text-shadow:
      0 1px 18px rgba(15,14,10,0.9),
      0 1px 2px rgba(15,14,10,0.82);
  }
  body[data-page="home"] .site-header.scrolled {
    opacity: 0.82;
  }
  body[data-page="home"] .site-header.on-dark .brand-logo {
    filter:
      brightness(0) invert(1)
      drop-shadow(0 1px 18px rgba(15,14,10,0.72));
  }
  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
    border: 1px solid rgba(30,30,28,0.18);
    border-radius: 999px;
    flex-direction: column;
    gap: 4px;
  }
  .site-header.on-dark .menu-toggle {
    border-color: rgba(242,240,235,0.34);
  }
  .menu-toggle span,
  .menu-toggle::before,
  .menu-toggle::after { content:""; width: 14px; height: 1px; background: currentColor; display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  body { font-size: 15px; }
  .header-inner { height: 68px; gap: 16px; }
  .brand-logo { height: 38px; }
  .brand-stack .word-mark { font-size: 16px; }
  .brand-stack .script-mark { font-size: 19px; }
}
@media (max-width: 600px) {
  :root { --gutter: 22px; }
  h1 { font-size: clamp(38px, 11vw, 54px); }
  h2 { font-size: clamp(30px, 9vw, 44px); }
  .section { padding: clamp(68px, 18vw, 96px) 0; }
  .btn {
    min-height: 50px;
    padding: 14px 18px;
    font-size: 10px;
    letter-spacing: 0.18em;
  }
  .site-header { top: 8px; }
  .header-inner { height: 56px; }
  .brand-logo { height: 34px; }
  .mobile-drawer {
    padding: 82px 24px 30px;
  }
  .mobile-drawer nav a {
    font-size: clamp(25px, 8vw, 34px);
    padding: 12px 0;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-bottom: 56px; }
  .footer-logo { height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .line-reveal > span, .mask-reveal::after, .mask-reveal img,
  .page-curtain, .page-out, * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .line-reveal > span { transform: none; }
  .mask-reveal::after { display: none; }
  .mask-reveal img { transform: none; }
}
