/* ==========================================================================
   The Pattern Break — maenovak.com brand system
   Locked palette: charcoal, ivory, gold
   Typography: Playfair Display (display) + Inter (body/UI)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Brand palette — locked */
  --charcoal:       #0E100E;
  --charcoal-soft:  #16181A;
  --charcoal-elev:  #1C1F22;
  --ivory:          #EFECE4;
  --ivory-muted:    #B9B2A0;
  --ivory-faint:    #6E6A5E;
  --gold:           #C9A961;
  --gold-muted:     #9F8447;
  --gold-hover:     #D8B975;
  --hairline:       rgba(201, 169, 97, 0.35);
  --hairline-faint: rgba(201, 169, 97, 0.18);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  --text-xs:   clamp(0.75rem, 0.72rem + 0.15vw, 0.85rem);
  --text-sm:   clamp(0.875rem, 0.85rem + 0.15vw, 0.95rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --text-xl:   clamp(1.5rem, 1.3rem + 1vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.7rem + 1.5vw, 3rem);
  --text-3xl:  clamp(2.5rem, 2rem + 2.5vw, 4rem);
  --text-hero: clamp(3rem, 2rem + 5vw, 6rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-narrow: 720px;
  --container-base:   1120px;
  --container-wide:   1360px;
  --gutter:           clamp(1.25rem, 4vw, 2.5rem);
  --section-y:        clamp(4rem, 10vw, 8rem);

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  font-weight: 400;
  color: var(--ivory);
  background: var(--charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

::selection { background: var(--gold); color: var(--charcoal); }

/* Typography defaults */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ivory);
}
h1 { font-size: var(--text-hero); font-weight: 500; }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
p  { font-size: var(--text-base); line-height: 1.65; color: var(--ivory); }

.serif { font-family: var(--font-display); }
.sans  { font-family: var(--font-body); }
.gold  { color: var(--gold); }
.muted { color: var(--ivory-muted); }
.faint { color: var(--ivory-faint); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-muted);
  font-weight: 500;
}

/* Layout */
.container { width: 100%; max-width: var(--container-base); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
.container--wide { max-width: var(--container-wide); }
.section { padding: var(--section-y) 0; }
.section--dense { padding: calc(var(--section-y) * 0.6) 0; }

.hairline { border: 0; border-top: 1px solid var(--hairline); width: 60px; margin: var(--space-6) auto; }
.hairline--wide { width: 100%; border-top: 1px solid var(--hairline-faint); margin: 0; }
.hairline--left { margin-left: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s var(--ease-out);
  cursor: pointer;
  border: 1px solid transparent;
}
.btn--primary { background: var(--gold); color: var(--charcoal); }
.btn--primary:hover { background: var(--gold-hover); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ivory); border-color: var(--hairline); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn--link {
  padding: 0;
  background: none;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-muted);
  padding-bottom: 4px;
  border-radius: 0;
}
.btn--link:hover { color: var(--gold-hover); border-color: var(--gold-hover); }

.btn__arrow { transition: transform 0.3s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Navigation */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-4) 0;
  transition: all 0.35s var(--ease-out);
  background: transparent;
}
.nav--scrolled {
  background: rgba(14, 16, 14, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--hairline-faint);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}
.nav__brand {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ivory);
  letter-spacing: -0.01em;
}
.nav__brand em { color: var(--gold); font-style: normal; }
.nav__links {
  display: flex;
  gap: var(--space-8);
  list-style: none;
  align-items: center;
}
.nav__links a {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--ivory-muted);
  transition: color 0.25s var(--ease-out);
  position: relative;
}
.nav__links a:hover { color: var(--gold); }
.nav__cta {
  padding: 0.55rem 1.1rem;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--gold);
  color: var(--gold);
  transition: all 0.25s var(--ease-out);
}
.nav__cta:hover { background: var(--gold); color: var(--charcoal); }

.nav__toggle { display: none; }

@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__toggle {
    display: block;
    width: 32px; height: 32px;
    position: relative;
  }
  .nav__toggle::before, .nav__toggle::after {
    content: '';
    position: absolute;
    left: 4px; right: 4px;
    height: 1px;
    background: var(--ivory);
    transition: transform 0.3s var(--ease-out);
  }
  .nav__toggle::before { top: 12px; }
  .nav__toggle::after  { top: 20px; }
  .nav--open .nav__toggle::before { transform: translateY(4px) rotate(45deg); }
  .nav--open .nav__toggle::after  { transform: translateY(-4px) rotate(-45deg); }
  .nav--open .nav__links {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--charcoal);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--space-6);
    padding-top: 60px;
  }
  .nav--open .nav__links a { font-size: var(--text-lg); color: var(--ivory); }
}

/* Footer */
.footer {
  padding: var(--space-16) 0 var(--space-8);
  border-top: 1px solid var(--hairline-faint);
  background: var(--charcoal);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--ivory);
  margin-bottom: var(--space-3);
}
.footer__brand em { color: var(--gold); font-style: normal; }
.footer__tag {
  font-size: var(--text-sm);
  color: var(--ivory-muted);
  max-width: 320px;
  line-height: 1.5;
}
.footer__col h5 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-muted);
  margin-bottom: var(--space-4);
}
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: var(--space-3); }
.footer__col a {
  font-size: var(--text-sm);
  color: var(--ivory-muted);
  transition: color 0.2s var(--ease-out);
}
.footer__col a:hover { color: var(--gold); }
.footer__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid var(--hairline-faint);
  font-size: var(--text-xs);
  color: var(--ivory-faint);
  letter-spacing: 0.08em;
}
.footer__meta a { color: var(--ivory-faint); }
.footer__meta a:hover { color: var(--gold); }

@media (max-width: 780px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
  .footer__brand { grid-column: 1 / -1; }
  .footer__meta { flex-direction: column; gap: var(--space-3); text-align: center; }
}

/* Utility */
.text-center { text-align: center; }
.gold-hairline { display: block; width: 44px; height: 2px; background: var(--gold); margin: 0 auto var(--space-6); }
.gold-hairline--left { margin-left: 0; }

/* Fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Accessibility */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Founding group promo */
.nav__links a.nav__founding { color: var(--gold); }
.founding-callout { display:flex; flex-direction:column; gap:0.4rem; margin-top: var(--space-8); padding: var(--space-6); border:1px solid var(--hairline); background: rgba(201,169,97,0.07); border-radius: 4px; text-decoration:none; transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out); }
.founding-callout:hover { background: rgba(201,169,97,0.13); border-color: var(--gold); }
.founding-callout__label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.founding-callout__text { color: var(--ivory); font-size: var(--text-sm); line-height:1.55; }
.founding-callout__text strong { color: var(--gold); font-weight:600; }
.founding-callout__cta { color: var(--gold); font-weight:500; font-size: var(--text-sm); }
.nav__brand, .nav__links a { white-space: nowrap; }
.nav__links { gap: clamp(1rem, 1.8vw, 2rem); }
.nav__cta { display: inline-block; white-space: nowrap; line-height: 1.2; }

.free-line { font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); line-height: 1.35; color: var(--ivory); margin: var(--space-4, 1rem) 0 var(--space-6, 1.5rem); }
.free-line em { color: var(--gold); font-style: italic; }
