/*
 * ============================================================
 *  SNH HOMEPAGE V2 — DESIGN SYSTEM
 *  Six-Nine of Hearts · sixnineofhearts.com
 *  See: styles/homepage-v2-notes.md for full design rationale
 * ============================================================
 */

/* ============================================================
   0. CUSTOM PROPERTIES — DESIGN TOKENS
   ============================================================ */
:root {
  /* --- Colors --- */
  --c-bg-deep:     #070d18;
  --c-bg-base:     #0d1626;
  --c-bg-surface:  #121e35;
  --c-bg-elevated: #1a2847;
  --c-navy:        #1C2B4A;

  --c-gold:        #D4AF37;
  --c-gold-bright: #F6C453;
  --c-gold-muted:  rgba(212, 175, 55, 0.18);
  --c-gold-border: rgba(212, 175, 55, 0.28);

  --c-white:  #F8FAFC;
  --c-muted:  #94A3B8;
  --c-faint:  #475569;

  /* --- Typography --- */
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-sans:  "Inter", system-ui, -apple-system, sans-serif;

  --t-hero:     clamp(3rem,   7vw,   5.2rem);
  --t-display:  clamp(2.2rem, 4.5vw, 3.6rem);
  --t-heading:  clamp(1.4rem, 2.5vw, 2rem);
  --t-subhead:  clamp(1rem,   1.6vw, 1.2rem);
  --t-body:     1rem;
  --t-small:    0.875rem;
  --t-caption:  0.75rem;

  /* --- Spacing --- */
  --sp-xs:  8px;
  --sp-sm:  16px;
  --sp-md:  24px;
  --sp-lg:  40px;
  --sp-xl:  64px;
  --sp-2xl: 96px;
  --sp-3xl: 128px;
  --section-py: clamp(80px, 10vw, 140px);

  /* --- Radius --- */
  --r-sm:  8px;
  --r-md:  16px;
  --r-lg:  24px;
  --r-xl:  32px;
  --r-pill: 9999px;

  /* --- Motion --- */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);

  /* --- Shadows --- */
  --shadow-gold: 0 0 24px rgba(212, 175, 55, 0.22);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-deep: 0 12px 48px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   1. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.7;
  color: var(--c-white);
  background-color: var(--c-bg-deep);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

img, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: var(--f-sans);
  cursor: pointer;
  border: none;
  background: none;
}

/* ============================================================
   2. TYPOGRAPHY UTILITIES
   ============================================================ */

.t-hero {
  font-family: var(--f-serif);
  font-size: var(--t-hero);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.01em;
  color: var(--c-white);
}

.t-display {
  font-family: var(--f-serif);
  font-size: var(--t-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.t-heading {
  font-family: var(--f-serif);
  font-size: var(--t-heading);
  font-weight: 700;
  line-height: 1.25;
}

.t-mantra {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  color: var(--c-gold-bright);
  line-height: 1.3;
}

.t-body {
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.75;
  color: var(--c-muted);
}

.t-label {
  font-family: var(--f-sans);
  font-size: var(--t-caption);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-gold);
}

.t-quote {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.6;
  color: var(--c-white);
}

/* Gold gradient text */
.gold-text {
  background: linear-gradient(135deg, var(--c-gold-bright) 0%, var(--c-gold) 60%, #B8892A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Text glow for hero */
.text-glow {
  text-shadow:
    0 0 20px rgba(212, 175, 55, 0.4),
    0 0 40px rgba(212, 175, 55, 0.2);
}

/* ============================================================
   3. LAYOUT UTILITIES
   ============================================================ */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

.container--narrow {
  max-width: 820px;
}

.container--wide {
  max-width: 1400px;
}

.section {
  padding-block: var(--section-py);
}

.section--alt {
  background-color: var(--c-bg-base);
}

.section--surface {
  background-color: var(--c-bg-surface);
}

/* Section header pattern */
.section-header {
  text-align: center;
  margin-bottom: clamp(48px, 7vw, 80px);
}

.section-header__eyebrow {
  display: inline-block;
  font-family: var(--f-sans);
  font-size: var(--t-caption);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-sm);
}

.section-header__title {
  font-family: var(--f-serif);
  font-size: var(--t-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-white);
  margin-bottom: var(--sp-md);
}

.section-header__body {
  font-size: var(--t-subhead);
  color: var(--c-muted);
  max-width: 620px;
  margin-inline: auto;
  line-height: 1.75;
}

/* Divider ornament */
.gold-divider {
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-gold), transparent);
  margin-inline: auto;
  margin-block: var(--sp-md);
}

/* ============================================================
   4. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xs);
  padding: 0.85rem 1.9rem;
  border-radius: var(--r-pill);
  font-family: var(--f-sans);
  font-size: var(--t-small);
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform 0.2s var(--ease-out-expo),
              box-shadow 0.2s var(--ease-out-expo),
              filter 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Primary: gold filled */
.btn--primary {
  background: linear-gradient(180deg, var(--c-gold-bright) 0%, #C9A22B 100%);
  color: #0d1626;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.22);
}

.btn--primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 10px 28px rgba(212, 175, 55, 0.34);
}

/* Secondary: ghost/outline */
.btn--secondary {
  background: rgba(248, 250, 252, 0.08);
  color: var(--c-white);
  border: 1px solid rgba(248, 250, 252, 0.22);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn--secondary:hover {
  background: rgba(248, 250, 252, 0.14);
  border-color: rgba(248, 250, 252, 0.4);
}

/* Ghost gold outline */
.btn--ghost-gold {
  background: transparent;
  color: var(--c-gold-bright);
  border: 1px solid var(--c-gold-border);
}

.btn--ghost-gold:hover {
  background: var(--c-gold-muted);
  border-color: var(--c-gold);
  box-shadow: var(--shadow-gold);
}

/* Small variant */
.btn--sm {
  padding: 0.55rem 1.2rem;
  font-size: var(--t-caption);
}

/* Large variant */
.btn--lg {
  padding: 1.05rem 2.4rem;
  font-size: var(--t-body);
}

/* ============================================================
   5. NAVIGATION
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 13, 24, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(212, 175, 55, 0.10);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--sp-md);
}

/* Logo group */
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

.nav__logo-img {
  height: 52px;
  width: 52px;
  object-fit: contain;
  transition: transform 0.3s var(--ease-out-expo);
}

.nav__logo:hover .nav__logo-img {
  transform: scale(1.04);
}

.nav__logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.nav__logo-name {
  font-family: var(--f-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--c-white);
  line-height: 1;
  white-space: nowrap;
}

.nav__logo-tagline {
  font-family: var(--f-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-gold);
}

/* Desktop nav links */
.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 32px);
  list-style: none;
}

.nav__link {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--c-muted);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--c-white);
}

.nav__link--gold {
  color: var(--c-gold);
}

.nav__link--gold:hover {
  color: var(--c-gold-bright);
}

/* Nav right cluster */
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  flex-shrink: 0;
}

/* Language selector styling */
.lang-selector {
  position: relative;
  display: inline-block;
}

.lang-select {
  background: rgba(18, 30, 53, 0.65);
  border: 1px solid var(--c-gold-border);
  color: var(--c-white);
  padding: 0.45rem 1.8rem 0.45rem 0.8rem;
  border-radius: var(--r-pill);
  font-family: var(--f-sans);
  font-size: var(--t-caption);
  font-weight: 700;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s var(--ease-out-expo),
              background-color 0.2s var(--ease-out-expo),
              box-shadow 0.2s var(--ease-out-expo);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 11px;
}

.lang-select:hover {
  border-color: var(--c-gold);
  background-color: var(--c-gold-muted);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.15);
}

.lang-select:focus {
  border-color: var(--c-gold-bright);
}

.lang-select option {
  background-color: var(--c-bg-elevated);
  color: var(--c-white);
}

.lang-selector--mobile .lang-select {
  width: 100%;
  max-width: 320px;
  text-align: center;
  padding: 12px 24px;
  background-position: right 1.25rem center;
  background-size: 14px;
  border-radius: var(--r-md);
  font-size: var(--t-small);
}

/* Auth buttons */
.nav__btn-login {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--c-muted);
  transition: color 0.2s;
}

.nav__btn-login:hover {
  color: var(--c-white);
}

/* User info (logged in) */
.nav__user {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.nav__user-email {
  font-size: var(--t-small);
  color: var(--c-muted);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--c-gold-border);
  transition: background 0.2s, border-color 0.2s;
  z-index: 110;
}

.nav__hamburger:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: var(--c-gold);
}

.nav__hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-gold);
  border-radius: 2px;
  transition: transform 0.3s var(--ease-in-out), opacity 0.3s;
}

.nav__hamburger-bar + .nav__hamburger-bar {
  margin-top: 5px;
}

.nav__hamburger.is-open .nav__hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__hamburger.is-open .nav__hamburger-bar:nth-child(2) {
  opacity: 0;
}

.nav__hamburger.is-open .nav__hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 105;
  background: rgba(7, 13, 24, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  padding: 80px var(--sp-md) var(--sp-xl);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.is-active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu__link {
  display: block;
  width: 100%;
  max-width: 320px;
  text-align: center;
  padding: 14px 24px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-muted);
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.mobile-menu__link:hover {
  color: var(--c-gold-bright);
  background: var(--c-gold-muted);
  border-color: var(--c-gold-border);
}

.mobile-menu__divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-gold-border), transparent);
  margin-block: var(--sp-xs);
}

/* Responsive nav breakpoints */
@media (max-width: 1023px) {
  .nav__links, .nav__actions {
    display: none !important;
  }

  .nav__hamburger {
    display: flex;
  }

  .mobile-menu {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .nav__hamburger {
    display: none !important;
  }

  .mobile-menu {
    display: none !important;
  }
}

/* ============================================================
   6. HERO SECTION
   ============================================================ */

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Overlay: dark gradient over video */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to bottom,
      rgba(7, 13, 24, 0.35) 0%,
      rgba(7, 13, 24, 0.55) 60%,
      rgba(7, 13, 24, 0.85) 100%
    );
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  padding: clamp(16px, 4vh, 48px) clamp(20px, 5vw, 40px);
}

/* Animated title lines */
.hero__title {
  font-family: var(--f-serif);
  font-size: var(--t-hero);
  font-weight: 700;
  line-height: 1.08;
  color: var(--c-white);
  text-shadow:
    0 2px 20px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(80, 140, 255, 0.15);
  margin-bottom: clamp(16px, 3vh, 28px);
}

.hero__title-line {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 900ms var(--ease-out-expo),
              transform 900ms var(--ease-out-expo);
  will-change: opacity, transform;
}

.hero__title-line.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mantra lines */
.hero__mantras {
  margin-bottom: clamp(16px, 2.5vh, 24px);
}

.hero__mantra {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--c-gold-bright);
  line-height: 1.4;
  margin-bottom: 4px;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 800ms var(--ease-out-expo),
              transform 800ms var(--ease-out-expo);
  will-change: opacity, transform;
  text-shadow:
    0 0 12px rgba(246, 196, 83, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero__mantra.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Thoughts */
.hero__thought {
  font-family: var(--f-sans);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: rgba(248, 250, 252, 0.82);
  line-height: 1.75;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: clamp(8px, 1.5vh, 14px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 800ms var(--ease-out-expo),
              transform 800ms var(--ease-out-expo);
  will-change: opacity, transform;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero__thought.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* CTAs */
.hero__ctas {
  display: flex;
  gap: var(--sp-sm);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: clamp(24px, 3.5vh, 36px);
  opacity: 0;
  transform: translateY(10px) scale(0.97);
  transition: opacity 700ms var(--ease-out-expo),
              transform 700ms var(--ease-out-expo);
  will-change: opacity, transform;
}

.hero__ctas.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Whisper line */
.hero__whisper {
  display: block;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--c-gold-bright);
  margin-top: clamp(16px, 2.5vh, 24px);
  opacity: 0;
  transition: opacity 800ms var(--ease-out-expo);
  text-shadow: 0 0 16px rgba(246, 196, 83, 0.4);
}

.hero__whisper.is-visible {
  opacity: 1;
}

/* Short-viewport adjustments */
@media (max-height: 700px) {
  .hero {
    min-height: calc(100vh - 72px);
  }

  .hero__title {
    font-size: clamp(2rem, 5vh, 3.2rem);
  }

  .hero__mantra {
    font-size: clamp(1.1rem, 2.5vh, 1.6rem);
    margin-bottom: 2px;
  }

  .hero__thought {
    font-size: 0.88rem;
    margin-bottom: 6px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero__title-line,
  .hero__mantra,
  .hero__thought,
  .hero__ctas,
  .hero__whisper {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   7. THE PREMISE SECTION
   ============================================================ */

.premise {
  padding-block: var(--section-py);
  background: var(--c-bg-base);
}

.premise__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
  align-items: start;
}

@media (min-width: 768px) {
  .premise__layout {
    grid-template-columns: 1fr 1fr;
    gap: clamp(48px, 7vw, 96px);
  }
}

.premise__intro {
  max-width: 540px;
}

.premise__lead {
  font-family: var(--f-serif);
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-white);
  margin-bottom: var(--sp-md);
}

.premise__body {
  font-size: var(--t-body);
  color: var(--c-muted);
  line-height: 1.8;
}

.premise__body + .premise__body {
  margin-top: var(--sp-md);
}

.premise__text {
  margin-bottom: var(--sp-xl);
}

.premise__manifesto {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
  margin-top: var(--sp-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: var(--sp-xl);
}

@media (min-width: 480px) {
  .premise__manifesto {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-xl);
  }
}

.premise__manifesto-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.premise__manifesto-item {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  color: var(--c-white);
  line-height: 1.4;
  opacity: 0.9;
  position: relative;
  padding-left: 1.25rem;
}

.premise__manifesto-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  background: var(--c-gold);
  border-radius: 50%;
}

/* Audience card - refined editorial layout */
.premise__audience {
  background: rgba(10, 16, 28, 0.6);
  border: 1px solid rgba(212, 175, 55, 0.15);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.premise__audience-title {
  font-family: var(--f-serif);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--c-gold-bright);
  margin-bottom: var(--sp-sm);
}

.premise__audience-intro {
  font-family: var(--f-serif);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 500;
  line-height: 1.5;
  color: var(--c-white);
  margin-bottom: var(--sp-lg);
  opacity: 0.95;
}

.premise__audience-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: var(--sp-lg);
}

.premise__audience-item {
  display: flex;
  align-items: baseline;
  gap: var(--sp-sm);
  font-size: 0.925rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.55;
}

.premise__audience-num {
  font-family: var(--f-serif);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--c-gold);
  width: 1.85rem;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.premise__audience-quote {
  margin-top: var(--sp-lg);
  font-style: italic;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--c-muted);
  border-top: 1px solid rgba(212, 175, 55, 0.15);
  padding-top: var(--sp-md);
}

/* ============================================================
   8. THE ORIGIN SECTION
   ============================================================ */

.origin {
  padding-block: var(--section-py);
  background: var(--c-bg-deep);
  position: relative;
  overflow: hidden;
}

/* Subtle ambient glow behind text */
.origin::before {
  content: '';
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, 90vw);
  height: 400px;
  background: radial-gradient(ellipse, rgba(28, 43, 74, 0.5) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.origin__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-inline: auto;
  text-align: center;
}

.origin__pull-quote {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--c-white);
  margin-bottom: var(--sp-xl);
  position: relative;
  padding-inline: clamp(20px, 5vw, 60px);
}

.origin__pull-quote::before {
  content: '"';
  position: absolute;
  top: -0.3em;
  left: clamp(0px, 2vw, 24px);
  font-size: 5rem;
  line-height: 1;
  color: rgba(212, 175, 55, 0.18);
  font-family: Georgia, serif;
  pointer-events: none;
}

.origin__pull-quote--inline {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  line-height: 1.45;
  color: var(--c-gold-bright);
  text-align: center;
  margin-block: var(--sp-lg);
  padding-block: var(--sp-sm);
  border-block: 1px solid rgba(212, 175, 55, 0.12);
  position: relative;
  z-index: 1;
}

.origin__story {
  text-align: left;
  max-width: 660px;
  margin-inline: auto;
}

.origin__paragraph {
  font-size: var(--t-body);
  line-height: 1.9;
  color: var(--c-muted);
  margin-bottom: var(--sp-md);
}

.origin__paragraph--emphasis {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--c-white);
  font-style: italic;
}

.origin__signature {
  text-align: center;
  margin-top: var(--sp-xl);
  font-family: var(--f-serif);
  font-size: 1.1rem;
  color: var(--c-gold);
  font-style: italic;
}

/* ============================================================
   9. THE WRITINGS SECTION
   ============================================================ */

.writings {
  padding-block: var(--section-py);
  background: var(--c-bg-base);
}

.writings__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
  max-width: 900px;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .writings__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .writings__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Writing card */
.writing-card {
  background: var(--c-bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.writing-card:hover {
  border-color: var(--c-gold-border);
  box-shadow: var(--shadow-gold);
  transform: translateY(-3px);
}

/* Available card — slightly highlighted */
.writing-card--available {
  border-color: var(--c-gold-border);
  cursor: pointer;
}

/* Dim/muted card for upcoming */
.writing-card--upcoming {
  opacity: 0.5;
  pointer-events: none;
}

.writing-card__label {
  font-size: var(--t-caption);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-sm);
}

.writing-card--upcoming .writing-card__label {
  color: var(--c-faint);
}

.writing-card__cover {
  width: 90px;
  height: auto;
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--sp-md);
}

.writing-card__cover-placeholder {
  width: 90px;
  height: 120px;
  border-radius: var(--r-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.3;
  margin-bottom: var(--sp-md);
}

.writing-card__title {
  font-family: var(--f-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.25;
  margin-bottom: var(--sp-xs);
}

.writing-card__desc {
  font-size: var(--t-small);
  color: var(--c-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: var(--sp-md);
}

.writing-card__badge {
  display: inline-block;
  font-size: var(--t-caption);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  margin-bottom: var(--sp-md);
}

.writing-card__badge--available {
  background: rgba(212, 175, 55, 0.15);
  color: var(--c-gold-bright);
}

.writing-card__badge--progress {
  background: rgba(255, 255, 255, 0.06);
  color: var(--c-faint);
}

/* Essays (blog-derived) within Writings */
.writings__essays {
  margin-top: var(--sp-2xl);
}

.writings__essays-title {
  font-family: var(--f-serif);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: var(--sp-lg);
}

.essay-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  padding-block: var(--sp-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.2s;
}

.essay-item:last-child {
  border-bottom: none;
}

.essay-item:hover {
  border-color: var(--c-gold-border);
}

.essay-item__thumb {
  flex-shrink: 0;
  width: 80px;
  height: 56px;
  border-radius: var(--r-sm);
  object-fit: cover;
}

.essay-item__body {
  flex: 1;
  min-width: 0;
}

.essay-item__tag {
  font-size: var(--t-caption);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-gold);
  display: block;
  margin-bottom: 4px;
}

.essay-item__title {
  font-family: var(--f-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.3;
  margin-bottom: 4px;
  transition: color 0.2s;
}

.essay-item:hover .essay-item__title {
  color: var(--c-gold-bright);
}

.essay-item__excerpt {
  font-size: var(--t-caption);
  color: var(--c-muted);
  line-height: 1.5;
}

/* ============================================================
   10. THE INSIGNIA SECTION
   ============================================================ */

.insignia {
  padding-block: var(--section-py);
  background: var(--c-bg-deep);
}

.insignia__lead {
  max-width: 600px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--sp-2xl);
}

.insignia__philosophy {
  font-size: var(--t-body);
  color: var(--c-muted);
  line-height: 1.8;
  margin-top: var(--sp-md);
  max-width: 520px;
  margin-inline: auto;
}

/* Product grid */
.insignia__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
  max-width: 820px;
  margin-inline: auto;
}

@media (min-width: 640px) {
  .insignia__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Cinematic product card (Store V3) */
.insignia-card {
  position: relative;
  background: linear-gradient(180deg, var(--c-bg-surface) 0%, #0c1628 100%);
  border: 1px solid var(--c-gold-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: perspective(1600px) rotateX(0deg) rotateY(0deg) translateY(0);
  transform-style: preserve-3d;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.5s ease,
    box-shadow 0.5s ease;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  will-change: transform;
}

/* Gallery focus: lift + glow the active card */
.insignia-card.is-active {
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(212, 175, 55, 0.2),
    0 18px 70px -10px rgba(212, 175, 55, 0.3);
}

/* Dim the siblings while one card is focused */
.insignia__grid.has-active .insignia-card:not(.is-active) {
  opacity: 0.55;
  filter: saturate(0.85);
}
.insignia__grid .insignia-card {
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.5s ease,
    box-shadow 0.5s ease,
    opacity 0.5s ease,
    filter 0.5s ease;
}

/* Floating cinematic stage */
.insignia-card__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #060c18;
}

.insignia-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.insignia-card.is-active .insignia-card__video {
  transform: scale(1.06);
}

/* Bottom gradient so the stage melts into the card */
.insignia-card__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(6, 12, 24, 0) 55%,
    rgba(12, 22, 40, 0.55) 80%,
    #0c1628 100%
  );
}

/* Slow gold light sweep across the glass */
.insignia-card__sweep {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(246, 196, 83, 0.12) 48%,
    rgba(246, 196, 83, 0.04) 54%,
    transparent 62%
  );
  transform: translateX(-120%);
  opacity: 0;
}
.insignia-card.is-active .insignia-card__sweep {
  animation: insigniaSweep 4.5s ease-in-out 0.3s infinite;
}

@keyframes insigniaSweep {
  0%   { transform: translateX(-120%); opacity: 0; }
  15%  { opacity: 1; }
  55%  { opacity: 1; }
  70%  { transform: translateX(120%); opacity: 0; }
  100% { transform: translateX(120%); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .insignia-card,
  .insignia-card__video { transition: none; transform: none; }
  .insignia-card.is-active .insignia-card__video { transform: none; }
  .insignia-card__sweep { display: none; }
}

.insignia-card__body {
  padding: var(--sp-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.insignia-card__title {
  font-family: var(--f-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: var(--sp-xs);
}

.insignia-card__desc {
  font-size: var(--t-small);
  color: var(--c-muted);
  margin-bottom: var(--sp-lg);
  flex: 1;
}

.insignia__footnote {
  text-align: center;
  margin-top: var(--sp-xl);
  font-size: var(--t-caption);
  color: var(--c-faint);
  font-style: italic;
}

/* ============================================================
   11. THE PRACTICE SECTION
   ============================================================ */

.practice {
  padding-block: var(--section-py);
  background: var(--c-bg-base);
}

/* Tool cards row */
.practice__tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
  margin-bottom: var(--sp-2xl);
}

@media (min-width: 580px) {
  .practice__tools {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .practice__tools {
    grid-template-columns: repeat(4, 1fr);
  }
}

.practice-tool {
  background: var(--c-bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-md);
  padding: var(--sp-lg) var(--sp-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-sm);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.practice-tool:hover {
  border-color: var(--c-gold-border);
  box-shadow: var(--shadow-gold);
  transform: translateY(-3px);
}

.practice-tool__icon {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.practice-tool__name {
  font-family: var(--f-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-gold-bright);
  line-height: 1.2;
}

.practice-tool__desc {
  font-size: var(--t-caption);
  color: var(--c-muted);
  line-height: 1.5;
  flex: 1;
}

/* Quote of the Day sub-panel */
.practice__qotd {
  background: var(--c-bg-surface);
  border: 1px solid var(--c-gold-border);
  border-radius: var(--r-lg);
  padding: var(--sp-xl) clamp(var(--sp-md), 5vw, var(--sp-2xl));
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  position: relative;
  overflow: hidden;
}

/* Ambient gold glow */
.practice__qotd::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.06) 0%, transparent 65%);
  pointer-events: none;
}

.qotd__label {
  font-size: var(--t-caption);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-md);
}

.qotd__icon {
  font-size: 2rem;
  margin-bottom: var(--sp-md);
  display: block;
}

.qotd__text {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--c-white);
  line-height: 1.5;
  margin-bottom: var(--sp-sm);
  position: relative;
}

.qotd__author {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--c-gold);
  margin-bottom: var(--sp-lg);
}

.qotd__author::before {
  content: '— ';
}

.qotd__meaning {
  font-size: var(--t-small);
  color: var(--c-muted);
  line-height: 1.7;
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: var(--sp-lg);
}

.qotd__progress {
  margin-top: var(--sp-md);
}

.qotd__progress-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  margin-bottom: var(--sp-xs);
}

.qotd__progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c-gold-bright), var(--c-gold));
  transition: width 0.5s ease;
}

.qotd__progress-text {
  font-size: var(--t-caption);
  color: var(--c-faint);
}

/* Quote Modal Transition */
.quote-changing #v2-quote-modal-text,
.quote-changing #v2-quote-modal-author,
.quote-changing #v2-quote-modal-meaning {
  opacity: 0;
  transition: opacity 0.2s ease;
}

#v2-quote-modal-text,
#v2-quote-modal-author,
#v2-quote-modal-meaning {
  opacity: 1;
  transition: opacity 0.2s ease;
}

/* ============================================================
   12. CHRONICLES SECTION
   ============================================================ */

.chronicles {
  padding-block: var(--section-py);
  background: var(--c-bg-surface);
}

/* Temple Rule banner */
.chronicles__rule {
  background: rgba(212, 175, 55, 0.06);
  border: 1px solid var(--c-gold-border);
  border-radius: var(--r-md);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-2xl);
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
}

.chronicles__rule-title {
  font-family: var(--f-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-gold-bright);
  margin-bottom: var(--sp-sm);
}

.chronicles__rule-body {
  font-size: var(--t-small);
  color: var(--c-muted);
  line-height: 1.7;
}

.chronicles__rule-body strong {
  color: var(--c-white);
}

.chronicles__rule-body .no-beats {
  color: var(--c-gold);
  font-weight: 600;
}

/* Cards grid */
.chronicles__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-md);
  margin-bottom: var(--sp-xl);
}

@media (min-width: 600px) {
  .chronicles__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .chronicles__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.chronicle-card {
  display: block;
  background: var(--c-bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-md);
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.chronicle-card:hover {
  border-color: var(--c-gold-border);
  box-shadow: var(--shadow-gold);
  transform: translateY(-4px);
}

.chronicle-card__img-wrap {
  height: 140px;
  background: var(--c-bg-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chronicle-card__img {
  height: 88px;
  width: 88px;
  object-fit: contain;
  opacity: 0.85;
  transition: transform 0.3s, opacity 0.3s;
}

.chronicle-card:hover .chronicle-card__img {
  transform: scale(1.06);
  opacity: 0.7;
}

.chronicle-card__body {
  padding: var(--sp-md);
}

.chronicle-card__title {
  font-family: var(--f-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-gold-bright);
  line-height: 1.3;
  margin-bottom: var(--sp-xs);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chronicle-card__snippet {
  font-size: var(--t-small);
  color: var(--c-muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--sp-sm);
}

.chronicle-card__meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--t-caption);
  color: var(--c-faint);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: var(--sp-xs);
}

.chronicle-card__author {
  font-weight: 600;
  color: var(--c-muted);
}

/* Empty state */
.chronicles__empty {
  text-align: center;
  color: var(--c-faint);
  font-style: italic;
  padding-block: var(--sp-xl);
}

/* CTA row */
.chronicles__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

/* ============================================================
   13. CLOSING CTA SECTION
   ============================================================ */

.closing-cta {
  padding-block: var(--section-py);
  background: var(--c-bg-deep);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Ambient radial glow */
.closing-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(700px, 100vw);
  height: 400px;
  background: radial-gradient(ellipse, rgba(28, 43, 74, 0.6) 0%, transparent 70%);
  pointer-events: none;
}

.closing-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin-inline: auto;
}

.closing-cta__headline {
  font-family: var(--f-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-white);
  margin-bottom: var(--sp-md);
}

.closing-cta__sub {
  font-size: var(--t-subhead);
  color: var(--c-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-xl);
  max-width: 520px;
  margin-inline: auto;
}

.closing-cta__tagline {
  margin-top: var(--sp-xl);
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--c-gold-bright);
  text-shadow: 0 0 16px rgba(246, 196, 83, 0.3);
}

/* ============================================================
   14. FOOTER
   ============================================================ */

.site-footer {
  background: var(--c-bg-base);
  border-top: 1px solid rgba(212, 175, 55, 0.1);
  padding-block: var(--sp-2xl) var(--sp-xl);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-xl);
}

@media (min-width: 640px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
}

.footer__brand-name {
  font-family: var(--f-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--c-white);
}

.footer__brand-tagline {
  font-size: var(--t-small);
  color: var(--c-muted);
  line-height: 1.6;
  max-width: 280px;
}

.footer__logo {
  height: 48px;
  width: 48px;
  object-fit: contain;
  opacity: 0.9;
}

.footer__nav-title {
  font-size: var(--t-caption);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: var(--sp-md);
}

.footer__nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.footer__nav-link {
  font-size: var(--t-small);
  color: var(--c-muted);
  transition: color 0.2s;
}

.footer__nav-link:hover {
  color: var(--c-gold-bright);
}

.footer__bottom {
  margin-top: var(--sp-xl);
  padding-top: var(--sp-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.footer__copy {
  font-size: var(--t-caption);
  color: var(--c-faint);
}

.footer__copy span {
  color: var(--c-gold);
}

/* ============================================================
   15. MODALS
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 5vw, 48px);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--c-bg-surface);
  border: 1px solid var(--c-gold-border);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 680px;
  box-shadow: var(--shadow-deep);
  position: relative;
  margin-top: auto;
  margin-bottom: auto;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.35s var(--ease-out-expo);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.modal-backdrop.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal--wide {
  max-width: 900px;
}

.modal--ebook {
  max-width: 95vw;
  width: 1400px;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal--ebook .modal__body {
  flex: 1;
  height: 100%;
  overflow: hidden;
  padding: 0 !important;
}

@media (max-width: 768px) {
  .modal--ebook {
    max-width: 100vw;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    margin: 0;
  }
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  background: var(--c-bg-surface);
  z-index: 1;
}

.modal__title {
  font-family: var(--f-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-gold-bright);
}

.modal__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
  font-size: 1.5rem;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}

.modal__close:hover {
  color: var(--c-white);
  background: rgba(255, 255, 255, 0.08);
}

.modal__body {
  padding: var(--sp-lg);
}

/* Auth modal — login/signup */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: var(--sp-lg);
}

.auth-tab {
  flex: 1;
  padding: var(--sp-sm);
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--c-muted);
  text-align: center;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.auth-tab.is-active {
  color: var(--c-gold-bright);
  border-bottom-color: var(--c-gold-bright);
}

/* Form elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: var(--sp-md);
}

.form-label {
  font-size: var(--t-small);
  font-weight: 600;
  color: var(--c-gold);
}

.form-input,
.form-textarea {
  width: 100%;
  background: var(--c-bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  padding: 0.7rem 1rem;
  color: var(--c-white);
  font-family: var(--f-sans);
  font-size: var(--t-small);
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--c-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--c-faint);
}

.form-error {
  font-size: var(--t-caption);
  color: #f87171;
}

.form-info {
  font-size: var(--t-caption);
  color: var(--c-gold);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-sm);
  margin-top: var(--sp-md);
  flex-wrap: wrap;
}

/* ============================================================
   16. SCROLL ENTRANCE ANIMATION
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 700ms var(--ease-out-expo),
              transform 700ms var(--ease-out-expo);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 80ms; }
.reveal--delay-2 { transition-delay: 160ms; }
.reveal--delay-3 { transition-delay: 240ms; }
.reveal--delay-4 { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ============================================================
   17. MISC UTILITIES
   ============================================================ */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.text-center { text-align: center; }
.text-left   { text-align: left; }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--c-gold);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Gold shimmer running border for premium cards */
@keyframes border-glow-rotate {
  to { transform: rotate(360deg); }
}

.glow-border {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(
    rgba(246, 196, 83, 0) 0deg,
    rgba(246, 196, 83, 0.9) 60deg,
    rgba(212, 175, 55, 0.7) 120deg,
    rgba(246, 196, 83, 0) 160deg,
    rgba(246, 196, 83, 0) 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-glow-rotate 8s linear infinite;
  pointer-events: none;
  z-index: 0;
}

@supports not (mask-composite: exclude) {
  .glow-border::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .glow-border::before { animation: none; opacity: 0.5; }
}
