/* ═══════════════════════════════════════════════════════════
   RESET
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { min-height: 100dvh; display: flex; flex-direction: column; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }
a { color: inherit; text-decoration: none; }
input { font: inherit; }
ul { list-style: none; }

/* ═══════════════════════════════════════════════════════════
   THEME — DARK (default)
   ═══════════════════════════════════════════════════════════ */
:root,
[data-theme="dark"] {
  --bg:           #0A0A0A;
  --bg-alt:       #1C1C1C;
  --bg-card:      #2F343A;
  --text:         #F5F5F2;
  --text-muted:   rgba(245, 245, 242, 0.44);
  --text-subtle:  rgba(245, 245, 242, 0.22);
  --accent:       #D4AF37;
  --accent-hover: #E8C84A;
  --accent-dim:   rgba(212, 175, 55, 0.11);
  --border:       rgba(245, 245, 242, 0.07);
  --border-mid:   rgba(245, 245, 242, 0.13);
  --border-focus: rgba(212, 175, 55, 0.5);
  --nav-bg:       rgba(20, 20, 20, 0.92);
  --nav-border:   rgba(245, 245, 242, 0.07);
  --input-bg:     #1C1C1C;
  --input-border: rgba(245, 245, 242, 0.1);
  --btn-text:     #0A0A0A;
  color-scheme: dark;
}

/* ═══════════════════════════════════════════════════════════
   THEME — LIGHT
   ═══════════════════════════════════════════════════════════ */
[data-theme="light"] {
  --bg:           #F6F6F6;   /* Snow white — cool neutral, no warmth  */
  --bg-alt:       #ECECEC;   /* Subtle surface separation             */
  --bg-card:      #FFFFFF;
  --text:         #0A0A0A;
  --text-muted:   rgba(10, 10, 10, 0.46);
  --text-subtle:  rgba(10, 10, 10, 0.24);
  --accent:       #D4AF37;
  --accent-hover: #C09B28;
  --accent-dim:   rgba(212, 175, 55, 0.12);
  --border:       rgba(10, 10, 10, 0.08);
  --border-mid:   rgba(10, 10, 10, 0.14);
  --border-focus: rgba(212, 175, 55, 0.55);
  --nav-bg:       rgba(246, 246, 246, 0.93);
  --nav-border:   rgba(10, 10, 10, 0.08);
  --input-bg:     #FFFFFF;
  --input-border: rgba(10, 10, 10, 0.13);
  --btn-text:     #0A0A0A;
  color-scheme: light;
}

/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════ */
:root {
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --nav-h: 60px;
}

body {
  font-family: var(--font);
  font-size: 16px;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.28s ease, color 0.28s ease;
}

.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;
}

/* ═══════════════════════════════════════════════════════════
   LOGO SWITCHING (dark / light PNG)
   ═══════════════════════════════════════════════════════════ */

/* Default: light logos hidden (dark is the default theme) */
.nav__logo--light,
.hero__logo--light { display: none; }

/* Dark mode: white logos visible, black logos hidden */
[data-theme="dark"] .nav__logo--dark,
[data-theme="dark"] .hero__logo--dark  { display: block; }
[data-theme="dark"] .nav__logo--light,
[data-theme="dark"] .hero__logo--light { display: none; }

/* Light mode: black logos visible, white logos hidden */
[data-theme="light"] .nav__logo--dark,
[data-theme="light"] .hero__logo--dark  { display: none; }
[data-theme="light"] .nav__logo--light,
[data-theme="light"] .hero__logo--light { display: block; }

/* ═══════════════════════════════════════════════════════════
   NAV
   ═══════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background 0.28s ease, border-color 0.28s ease;
}

/*
  flex-wrap trick:
  - Mobile: brand (flex:1) + controls sit on one row;
    nav__links has order:10 + flex-basis:100% so it wraps
    to a second row and collapses via max-height.
  - Desktop: flex-wrap:nowrap → brand | links | controls inline.
*/
.nav__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-height: var(--nav-h);
}

/* ── Brand ── */
.nav__brand {
  flex: 1;                  /* pushes controls to the right on mobile */
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  height: var(--nav-h);
  text-decoration: none;
  transition: opacity 0.2s;
  min-width: 0;
}
.nav__brand:hover { opacity: 0.65; }

.nav__logo {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  object-fit: contain;
}

.nav__name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Links (mobile: collapsed second row; desktop: inline) ── */
.nav__links {
  order: 10;
  flex-basis: 100%;         /* full width = sits below brand+controls */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, border-color 0.28s ease;
  border-top: 0px solid var(--nav-border);
}
.nav__links.is-open {
  max-height: 360px;
  border-top-width: 1px;
}

.nav__list {
  padding: 0.6rem 0 0.9rem;
  display: flex;
  flex-direction: column;
}

.nav__link {
  display: block;
  padding: 0.55rem 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav__link:hover { color: var(--accent); }

/* ── Controls ── */
.nav__controls {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  height: var(--nav-h);
}

/* ── Theme toggle ── */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  transition: color 0.2s, background 0.2s;
}
.theme-toggle:hover { color: var(--text); background: var(--border); }

[data-theme="dark"]  .theme-toggle__icon--dark  { display: none; }
[data-theme="dark"]  .theme-toggle__icon--light { display: inline; }
[data-theme="light"] .theme-toggle__icon--dark  { display: inline; }
[data-theme="light"] .theme-toggle__icon--light { display: none; }

/* ── Hamburger ── */
.hamburger {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text);
  transition: background 0.2s;
}
.hamburger:hover { background: var(--border); }

.hamburger__line {
  display: block;
  width: 18px;
  height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.24s ease, opacity 0.2s ease;
}
.hamburger.is-open .hamburger__line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.is-open .hamburger__line:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open .hamburger__line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   NAV — DESKTOP (≥ 768px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
  .nav__inner {
    flex-wrap: nowrap;    /* everything on one row */
    align-items: center;
    height: var(--nav-h);
    min-height: var(--nav-h);
    gap: 1rem;
  }

  .nav__brand {
    flex: none;           /* don't grow; fixed width */
    height: auto;
  }

  .nav__links {
    order: 0;             /* inline between brand and controls */
    flex: 1;              /* fill available middle space */
    flex-basis: auto;
    max-height: none !important;
    overflow: visible;
    border-top: none !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
  }

  .nav__list {
    flex-direction: row;
    padding: 0;
    align-items: center;
    gap: 0;
  }

  .nav__link {
    padding: 0.3rem 0.85rem;
  }

  .nav__controls { height: auto; }
  .hamburger { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════ */
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + 48px) 1.25rem 64px;
  min-height: 100dvh;
}

.hero__inner {
  max-width: 600px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.25rem;
}

/* ── Crest ── */
.hero__crest {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__logo {
  width: clamp(140px, 38vw, 210px);
  height: auto;
  object-fit: contain;
}

/* ── Copy ── */
.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

.hero__eyebrow {
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__headline {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.06;
  color: var(--text);
  text-transform: uppercase;
}

.hero__divider {
  width: 32px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.hero__sub {
  font-size: clamp(0.88rem, 1.8vw, 1rem);
  font-weight: 300;
  color: var(--text-muted);
  max-width: 400px;
  line-height: 1.8;
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════════════
   SUBSCRIBE FORM
   ═══════════════════════════════════════════════════════════ */
.subscribe { width: 100%; max-width: 460px; }

.subscribe__label {
  font-size: 0.78rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
  line-height: 1.6;
}

.hp-field {
  position: absolute; left: -9999px;
  opacity: 0; pointer-events: none;
}

.subscribe__row {
  display: flex;
  gap: 0.45rem;
}

.subscribe__input {
  flex: 1;
  min-width: 0;
  padding: 0.82rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 400;
  outline: none;
  transition: border-color 0.22s, box-shadow 0.22s, background 0.28s;
}
.subscribe__input::placeholder {
  color: var(--text-subtle);
  font-weight: 300;
}
.subscribe__input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.subscribe__btn {
  position: relative;
  padding: 0.82rem 1.35rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--btn-text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  min-width: 105px;
  transition: background 0.2s, transform 0.12s, opacity 0.2s;
}
.subscribe__btn:hover:not(:disabled) { background: var(--accent-hover); }
.subscribe__btn:active:not(:disabled) { transform: scale(0.97); }
.subscribe__btn:disabled { opacity: 0.55; cursor: not-allowed; }

.subscribe__btn-text { transition: opacity 0.15s; }
.subscribe__btn.is-loading .subscribe__btn-text { opacity: 0; }

.subscribe__btn-spinner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.15s;
}
.subscribe__btn.is-loading .subscribe__btn-spinner { opacity: 1; }
.subscribe__btn-spinner::after {
  content: '';
  width: 15px; height: 15px;
  border: 2px solid rgba(10,10,10,0.2);
  border-top-color: #0A0A0A;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.subscribe__feedback {
  margin-top: 0.7rem;
  font-size: 0.82rem;
  font-weight: 400;
  min-height: 1.2em;
}
.subscribe__feedback.is-success { color: #5CB87A; }
.subscribe__feedback.is-error   { color: #D96060; }

/* Stack on small phones */
@media (max-width: 440px) {
  .subscribe__row { flex-direction: column; }
  .subscribe__btn { width: 100%; min-width: unset; }
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════ */

/* iPhone Pro / large phones (430px+) */
@media (min-width: 430px) {
  .hero__logo { width: clamp(160px, 35vw, 210px); }
}

/* Tablets (768px+) */
@media (min-width: 768px) {
  .hero { padding-top: calc(var(--nav-h) + 72px); }
  .hero__inner { gap: 2.75rem; }
  .hero__headline { letter-spacing: -0.025em; }
  .subscribe { max-width: 480px; }
}

/* MacBook Air / desktop (1024px+) */
@media (min-width: 1024px) {
  .hero__logo { width: 210px; }
  .hero__inner { gap: 3rem; }
  .hero__sub { max-width: 440px; }
}

/* Wide desktop (1280px+) */
@media (min-width: 1280px) {
  .nav__inner { padding: 0 2rem; }
  .hero { padding-left: 2rem; padding-right: 2rem; }
}

/* ═══════════════════════════════════════════════════════════
   FLASH MESSAGES
   ═══════════════════════════════════════════════════════════ */
.flash {
  padding: 0.85rem 1.5rem;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
  border-bottom: 1px solid transparent;
}
.flash--success { background: rgba(92,184,122,0.1); border-color: rgba(92,184,122,0.2); color: #5CB87A; }
.flash--error   { background: rgba(217,96,96,0.1);  border-color: rgba(217,96,96,0.2);  color: #D96060; }
.flash--info    { background: var(--accent-dim); border-color: rgba(212,175,55,0.2); color: var(--accent); }

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  transition: border-color 0.28s ease;
}
.footer__copy {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
