/* ============================================================
   XENTH GROUP — Design System v1
   Structure. Clarity. Execution.
   ============================================================ */

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

:root {
  /* Colors */
  --bg:          #050505;
  --bg-2:        #0a0a0a;
  --text:        #f5f5f5;
  --cream:       #f0eedd;
  --gold:        #d4af6e;
  --muted:       rgba(245,245,245,0.72);
  --faint:       rgba(245,245,245,0.58);
  --border:      rgba(255,255,255,0.08);
  --gold-border: rgba(212,175,110,0.20);
  --card:        rgba(255,255,255,0.03);
  --card-hover:  rgba(212,175,110,0.30);

  /* Type */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max:   1160px;
  --pad-x: 48px;
  --section: 104px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Visible keyboard focus for all interactive elements */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

body {
  background: var(--bg);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Layout ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad-x); }
.section { padding: var(--section) 0; }
.center { text-align: center; }
.narrow { max-width: 720px; margin: 0 auto; }
.narrow.center { margin: 0 auto; }

/* ---------- Type ---------- */
.eyebrow {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--gold);
}

.display {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(52px, 8vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.5px;
  color: var(--text);
}
/* Brand wordmark lockup — all caps, XENTH leads, GROUP as lighter descriptor */
.display.wordmark { text-transform: uppercase; letter-spacing: 0.03em; }
.wordmark .g { font-weight: 400; color: rgba(245,245,245,0.78); letter-spacing: 0.12em; }

.h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  color: var(--text);
}

.h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  color: var(--text);
}

.serif-lead {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.45;
  color: var(--cream);
}

p { color: var(--muted); }
.lead { font-size: 19px; line-height: 1.7; color: var(--muted); }
.small { font-size: 14px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.cream { color: var(--cream); }
.gold  { color: var(--gold); }
.text  { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 34px;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-primary { background: var(--gold); color: #0a0a0a; }
.btn-primary:hover { background: #e2c184; transform: translateY(-1px); }
.btn-secondary { background: transparent; border: 1px solid rgba(212,175,110,0.45); color: var(--gold); }
.btn-secondary:hover { border-color: var(--gold); background: rgba(212,175,110,0.06); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.btn-row.center { justify-content: center; }

/* ---------- Text links ---------- */
.tlink {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.4px;
  transition: opacity 0.2s ease;
}
.tlink:hover { opacity: 0.7; }

/* ---------- Divider ---------- */
.divider { width: 56px; border-top: 1px solid rgba(212,175,110,0.35); margin: 28px auto; }
.divider.left { margin: 28px 0; }
.rule { width: 100%; border-top: 1px solid var(--border); }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 38px 34px;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.card:hover { border-color: var(--card-hover); }
.card .eyebrow { display: block; margin-bottom: 18px; }
.card h3 { margin-bottom: 14px; }
.card .num {
  font-family: var(--serif);
  font-size: 26px;
  color: var(--gold);
  display: block;
  margin-bottom: 16px;
}
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* feature card (larger, for two public paths) */
.path-card {
  background: var(--card);
  border: 1px solid var(--gold-border);
  border-radius: 4px;
  padding: 48px 44px;
  transition: border-color 0.25s ease;
}
.path-card:hover { border-color: var(--card-hover); }
.path-card .h3 { margin-bottom: 16px; }
.path-card p { margin-bottom: 28px; }

/* ---------- Pill list (chips) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 10px 18px;
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--cream);
  background: var(--card);
}

/* ---------- Flow (How We Work) ---------- */
.flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; }
.flow .step {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--cream);
  border: 1px solid var(--gold-border);
  border-radius: 2px;
  padding: 12px 20px;
}
.flow .arrow { color: var(--gold); font-size: 14px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad-x);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}
.nav.scrolled {
  background: rgba(5,5,5,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gold-border);
  padding: 15px var(--pad-x);
}
.nav-wordmark {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 3px;
  color: var(--cream);
  text-decoration: none;
}
.nav-links { display: flex; gap: 38px; }
.nav-links a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-cta { font-size: 11px; padding: 12px 22px; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--cream); transition: all 0.3s ease; }

.nav-overlay {
  position: fixed; inset: 0; z-index: 99;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }
.nav-overlay a { font-family: var(--serif); font-weight: 500; font-size: 30px; color: var(--text); text-decoration: none; }
.nav-overlay a:hover { color: var(--gold); }
.nav-overlay .btn { font-family: var(--sans); font-size: 12px; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 150px var(--pad-x) 104px;
}
.hero .eyebrow { margin-bottom: 30px; }
.hero .display { margin-bottom: 26px; }
.hero .serif-lead { margin-bottom: 30px; }
.hero .lead { max-width: 660px; margin: 0 auto 40px; }
.hero .trust { margin-top: 44px; font-size: 13px; letter-spacing: 1px; color: var(--faint); }
.hero-compact { min-height: auto; padding: 190px var(--pad-x) 64px; }

/* ---------- Section heads ---------- */
.block-head { margin-bottom: 56px; }
.block-head .eyebrow { display: block; margin-bottom: 22px; }

/* ---------- Stacked list ---------- */
.stack-item { padding: 38px 0; border-bottom: 1px solid var(--border); }
.stack-item:last-child { border-bottom: none; }
.stack-item .k {
  font-family: var(--sans); font-weight: 600; font-size: 12px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--gold);
  display: block; margin-bottom: 14px;
}
.stack-item h3 { margin-bottom: 12px; }

/* numbered steps */
.steps { display: grid; gap: 4px; }
.step-row { display: grid; grid-template-columns: 64px 1fr; gap: 20px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.step-row:last-child { border-bottom: none; }
.step-row .idx { font-family: var(--serif); font-size: 30px; color: var(--gold); line-height: 1; }
.step-row h3 { margin-bottom: 8px; }

/* ---------- CTA band ---------- */
.cta { text-align: center; background: var(--bg-2); border-top: 1px solid var(--gold-border); border-bottom: 1px solid var(--gold-border); }
.cta .h2 { margin-bottom: 22px; }
.cta p { max-width: 560px; margin: 0 auto 38px; }

/* ---------- Forms ---------- */
.form { max-width: 720px; margin: 0 auto; }
.field { margin-bottom: 26px; }
.field label {
  display: block; font-family: var(--sans); font-weight: 600;
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--cream); margin-bottom: 10px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 14px 16px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  transition: border-color 0.2s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: rgba(212,175,110,0.5); }
.field textarea { min-height: 130px; resize: vertical; }
.field select {
  appearance: none; cursor: pointer; padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d4af6e' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.radio-group { display: flex; flex-direction: column; gap: 12px; }
.radio-row { display: flex; align-items: center; gap: 12px; color: var(--cream); font-size: 15px; }
.radio-row input { width: auto; }
.consent-note {
  font-size: 13px; line-height: 1.7; color: var(--faint);
  border-left: 2px solid var(--gold-border); padding: 4px 0 4px 18px; margin: 8px 0 28px;
}
.form-note-banner {
  font-size: 13px; letter-spacing: 0.5px; color: var(--faint);
  border: 1px dashed var(--gold-border); border-radius: 4px; padding: 14px 18px; margin-bottom: 32px;
}
.form-status {
  margin-top: 18px; font-size: 14px; line-height: 1.6; padding: 14px 16px;
  border-radius: 3px; border: 1px solid var(--border); background: var(--card); color: var(--cream);
}
.form-status[data-state="ok"]   { border-color: rgba(212,175,110,0.5); color: var(--gold); }
.form-status[data-state="warn"] { border-color: rgba(245,245,245,0.25); color: var(--muted); }
.form-status[data-state="info"] { color: var(--muted); }

/* ---------- Footer ---------- */
.footer { background: var(--bg); border-top: 1px solid var(--gold-border); padding: 72px var(--pad-x) 44px; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
.footer h4 { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); margin-bottom: 18px; }
.footer-brand .mark { font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: 3px; color: var(--cream); display: block; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; color: var(--faint); margin-bottom: 8px; }
.footer-brand a { color: var(--gold); text-decoration: none; font-size: 14px; }
.footer-col a { display: block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 12px; transition: color 0.2s ease; }
.footer-col a:hover { color: var(--gold); }
.footer-col span.legal-static { display: block; color: var(--faint); font-size: 13px; margin-top: 4px; }
.footer-bottom { max-width: var(--max); margin: 48px auto 0; padding-top: 26px; border-top: 1px solid var(--border); text-align: center; font-size: 12px; letter-spacing: 1px; color: var(--faint); }

/* ---------- Legal ---------- */
.legal-body h2 { margin: 40px 0 12px; }
.legal-body p { margin-bottom: 18px; }
.legal-body ul { margin: 0 0 18px 20px; }
.legal-body li { margin-bottom: 10px; color: var(--muted); }

/* ---------- utilities ---------- */
.mt-s { margin-top: 16px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 44px; }
.mb-s { margin-bottom: 16px; } .mb-m { margin-bottom: 28px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  :root { --pad-x: 24px; --section: 64px; }
  body { font-size: 16px; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 104px 24px 64px; min-height: auto; }
  .hero-compact { padding: 128px 24px 48px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .btn-row.center { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 340px; text-align: center; }
  .flow { flex-direction: column; }
  .flow .arrow { transform: rotate(90deg); }
  .step-row { grid-template-columns: 48px 1fr; gap: 14px; }
}

/* ============================================================
   CINEMATIC MOTION LAYER
   ============================================================ */
.hero { position: relative; overflow: hidden; }
.hero > * { position: relative; z-index: 2; }
.hero-fx { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; will-change: transform; }
.hero-fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.fx-vignette { position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 32%, rgba(212,175,110,0.07), rgba(5,5,5,0) 55%); }
.fx-sweep { position: absolute; top: -20%; left: -60%; width: 55%; height: 140%;
  background: linear-gradient(105deg, rgba(212,175,110,0) 0%, rgba(212,175,110,0.10) 50%, rgba(212,175,110,0) 100%);
  filter: blur(22px); transform: skewX(-12deg); animation: fx-sweep 11s ease-in-out 1s infinite; }
@keyframes fx-sweep { 0% { left: -60%; opacity: 0; } 20% { opacity: 1; } 60% { opacity: 1; } 100% { left: 135%; opacity: 0; } }
.fx-x { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(1.12);
  font-family: var(--serif); font-weight: 600; font-size: 54vh; line-height: 1;
  color: rgba(212,175,110,0.05); user-select: none;
  opacity: 0; animation: fx-x 2.6s cubic-bezier(.2,.7,.2,1) 0.3s forwards; }
@keyframes fx-x { to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(26px);
  transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

/* Gold divider draw-in */
.divider { transform: scaleX(0); transform-origin: center; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.divider.in { transform: scaleX(1); }

/* Chips: scattered notes settle into structure */
.chip { transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2,.7,.2,1); }
.chips.scatter .chip { opacity: 0; transform: translate(var(--dx,0), var(--dy,0)) rotate(var(--dr,0)); }
.chips.scatter.in .chip { opacity: 1; transform: none; }

/* NOIR gold waveform */
.waveform { display: flex; align-items: center; justify-content: center; gap: 5px; height: 40px; margin: 30px auto 0; max-width: 320px; }
.waveform span { width: 3px; border-radius: 2px; background: var(--gold); opacity: 0.5;
  animation: fx-wave 1.7s ease-in-out infinite; }
@keyframes fx-wave { 0%, 100% { height: 8px; opacity: 0.35; } 50% { height: 32px; opacity: 0.75; } }

/* CTA end-card gold glow */
.cta { position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(60% 130% at 50% 125%, rgba(212,175,110,0.12), rgba(5,5,5,0) 70%);
  transition: opacity 1.2s ease; }
.cta.in::before { opacity: 1; animation: fx-glow 7s ease-in-out 1.2s infinite; }
@keyframes fx-glow { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }

/* Guards */
@media (max-width: 820px) {
  .hero-fx canvas { display: none; }
  .fx-x { font-size: 40vh; }
  .fx-sweep { animation-duration: 14s; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .divider, .chip { transition: none !important; opacity: 1 !important; transform: none !important; }
  .fx-sweep, .fx-x, .waveform span, .cta.in::before { animation: none !important; }
  .fx-x { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  .hero-fx canvas { display: none; }
}

/* ============================================================
   CINEMATIC ENTRY SEQUENCE (Home)
   ============================================================ */
html.entry-lock { overflow: hidden; }
#entry {
  position: fixed; inset: 0; z-index: 9999;
  background: #050505;
  display: flex; align-items: center; justify-content: center;
  animation: entry-auto 4.8s forwards;
}
#entry.done { opacity: 0; visibility: hidden; transition: opacity 0.85s ease, visibility 0s linear 0.85s; }
@keyframes entry-auto { 0%, 86% { opacity: 1; visibility: visible; } 100% { opacity: 0; visibility: hidden; } }

.entry-inner { position: relative; text-align: center; padding: 0 24px; }
.entry-x {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(1.15);
  font-family: var(--serif); font-weight: 600; font-size: 38vh; line-height: 1;
  color: rgba(212,175,110,0.06); opacity: 0; user-select: none;
  animation: entry-x 1.6s cubic-bezier(.2,.7,.2,1) 0.5s forwards;
}
@keyframes entry-x { to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.entry-line {
  display: block; width: 0; height: 1px; margin: 0 auto 34px;
  background: linear-gradient(90deg, rgba(212,175,110,0), var(--gold), rgba(212,175,110,0));
  animation: entry-line 0.9s ease 0.1s forwards;
}
@keyframes entry-line { to { width: 130px; } }
.entry-seq { position: relative; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 4vw, 46px); color: var(--cream); }
.entry-seq .ew { opacity: 0; transform: translateY(14px); animation: entry-word 0.8s cubic-bezier(.2,.7,.2,1) forwards; }
.entry-seq .e1 { animation-delay: 1.3s; }
.entry-seq .e2 { animation-delay: 1.8s; }
.entry-seq .e3 { animation-delay: 2.3s; }
@keyframes entry-word { to { opacity: 1; transform: none; } }
.entry-brand { position: relative; margin-top: 30px; opacity: 0; transform: translateY(14px);
  animation: entry-word 1s cubic-bezier(.2,.7,.2,1) 2.9s forwards; }
.entry-brand .eb-mark { display: block; font-family: var(--sans); font-weight: 600;
  font-size: 13px; letter-spacing: 4px; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.entry-brand .eb-mark .ebg { opacity: 0.6; }
.entry-brand .eb-sub { display: block; font-family: var(--serif); font-size: clamp(18px, 2.4vw, 26px); color: var(--muted); }
.entry-skip {
  position: fixed; bottom: 30px; right: 32px; z-index: 10000;
  background: none; border: 1px solid var(--gold-border); color: var(--faint);
  font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
  padding: 9px 16px; border-radius: 2px; cursor: pointer; transition: color 0.2s ease, border-color 0.2s ease;
  opacity: 0; animation: entry-word 0.6s ease 1s forwards;
}
.entry-skip:hover { color: var(--gold); border-color: rgba(212,175,110,0.5); }

@media (max-width: 820px) { .entry-x { font-size: 30vh; } }
@media (prefers-reduced-motion: reduce) { #entry { display: none !important; } }
