/* ============================================================
   CG Capital Wealth — Golden Spiral Flythrough
   ============================================================ */
:root {
  --bg:        #060910;
  --bg-2:      #080d18;
  --fg:        #f4f7fc;
  --muted:     #9aa6bd;
  --muted-2:   #677289;

  --line:       rgba(200, 168, 106, 0.18);
  --line-soft:  rgba(255, 255, 255, 0.08);

  --gold:        #c8a86a;
  --gold-bright: #ecd6a4;
  --gold-deep:   #9c7b3c;
  --emerald:     #3ddc97;

  --grad-gold: linear-gradient(135deg, #ecd6a4 0%, #c8a86a 45%, #9c7b3c 100%);
  --grad-text: linear-gradient(120deg, #f6ecd2 0%, #d8b878 55%, #c8a86a 100%);

  --serif: "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", system-ui, -apple-system, sans-serif;

  --container: 1240px;
  --radius:   18px;
  --radius-sm: 12px;
  --ease:     cubic-bezier(0.22, 1, 0.36, 1);
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* soft "settle" onto each beat is handled in JS (main.js softSnap) for a tunable pull */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; scroll-snap-type: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }
::selection { background: rgba(200,168,106,0.3); color: #fff; }

/* ---------- Persistent 3D world ---------- */
.world { position: fixed; inset: 0; z-index: 0; }
.world canvas { width: 100%; height: 100%; display: block; }
.world__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(130% 100% at 50% 40%, transparent 50%, rgba(3,5,10,0.78) 100%);
}
main, .nav, .footer { position: relative; z-index: 2; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0%;
  background: var(--grad-gold); z-index: 100; box-shadow: 0 0 12px rgba(200,168,106,0.6);
}

/* ---------- Type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .76rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}
.eyebrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

.display {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(3rem, 8vw, 6rem); line-height: .98; letter-spacing: -.015em; margin: 1.2rem 0 0;
}
.display em {
  font-style: italic;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.title {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(2.1rem, 4.6vw, 3.5rem); line-height: 1.06; letter-spacing: -.01em; margin: .5rem 0 0;
}
.title em { font-style: italic; color: var(--gold-bright); }
.lead { color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.22rem); max-width: 44ch; margin-top: 1.2rem; }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90; height: var(--nav-h);
  display: flex; align-items: center; border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s;
}
.nav.is-scrolled {
  background: rgba(6,9,16,.6); backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line-soft);
}
.nav__inner { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: .7rem; }
.brand__mark { width: 34px; height: 34px; color: var(--gold); }
.brand__mark svg { width: 100%; height: 100%; }
.brand__text { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; line-height: 1; color: var(--fg); }
.brand__sub { color: var(--gold); font-style: italic; font-weight: 500; }
.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a { font-size: .92rem; font-weight: 500; color: var(--muted); position: relative; transition: color .25s var(--ease); }
.nav__links a:not(.nav__cta)::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 1px; width: 0; background: var(--gold); transition: width .3s var(--ease); }
.nav__links a:not(.nav__cta):hover { color: var(--fg); }
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta { padding: .6rem 1.2rem; border-radius: 999px; border: 1px solid var(--line); color: var(--gold-bright) !important; transition: all .3s var(--ease); }
.nav__cta:hover { background: rgba(200,168,106,.1); border-color: var(--gold); box-shadow: 0 0 24px rgba(200,168,106,.18); }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; }
.nav__toggle span { width: 24px; height: 2px; background: var(--fg); border-radius: 2px; transition: .3s var(--ease); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-size: .95rem; font-weight: 600; padding: .95rem 1.7rem; border-radius: 999px; border: 1px solid transparent;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s, color .3s; white-space: nowrap;
}
.btn--gold { background: var(--grad-gold); color: #1a1304; box-shadow: 0 8px 30px -8px rgba(200,168,106,.5); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px rgba(200,168,106,.65); }
.btn--ghost { color: var(--fg); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(200,168,106,.06); }
.btn--ghost svg { transition: transform .3s var(--ease); }
.btn--ghost:hover svg { transform: translateX(4px); }
.btn--full { width: 100%; }
.btn:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }

/* ============================================================
   BEATS (scroll stations over the 3D world)
   ============================================================ */
.beat {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem;
  scroll-snap-align: start;
  scroll-snap-stop: normal;
}
.beat--hero { min-height: 100vh; min-height: 100dvh; }
/* contact content is tall — top-align it so the heading is never clipped by the nav on snap,
   and trim the top gap a little so the whole panel fits within one screen */
.beat--contact { min-height: auto; align-items: flex-start; padding-top: calc(var(--nav-h) + 3rem); padding-bottom: 3.5rem; }
.beat__panel { position: relative; z-index: 2; width: 100%; max-width: var(--container); margin: 0 auto; }
.align-left .__inner, .align-left { }
.beat__panel.align-left  > * { max-width: 560px; }
.beat__panel.align-right { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.beat__panel.align-right > * { max-width: 520px; }
.beat__panel.align-right .lead { margin-left: auto; }
.beat__panel.align-center { text-align: center; }
.beat__panel.wide > *:not(.symbols) { max-width: 620px; }
.beat__panel.narrow > * { max-width: 460px; }

/* scrims keep text legible over the 3D */
.beat__scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.beat__scrim--left  { background: linear-gradient(90deg, rgba(6,9,16,.9) 0%, rgba(6,9,16,.55) 34%, rgba(6,9,16,0) 62%); }
.beat__scrim--right { background: linear-gradient(270deg, rgba(6,9,16,.9) 0%, rgba(6,9,16,.55) 34%, rgba(6,9,16,0) 62%); }
.beat__scrim--bottom{ background: linear-gradient(0deg, rgba(6,9,16,.92) 0%, rgba(6,9,16,.5) 38%, rgba(6,9,16,0) 72%); }

/* scroll cue */
.scrollcue { position: absolute; left: 50%; bottom: 1.6rem; transform: translateX(-50%); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: .55rem; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-2); }
.scrollcue i { width: 1px; height: 46px; background: linear-gradient(var(--gold), transparent); position: relative; overflow: hidden; }
.scrollcue i::after { content: ""; position: absolute; top: -50%; left: 0; width: 100%; height: 50%; background: var(--gold-bright); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { top: -50%; } 100% { top: 110%; } }

/* ============================================================
   SYMBOLS (approach)
   ============================================================ */
.symbols { list-style: none; margin-top: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; max-width: 660px; }
.symbol { display: flex; gap: 1rem; align-items: flex-start; }
.symbol__icon { flex: 0 0 auto; width: 48px; height: 48px; color: var(--gold); }
.symbol__icon svg { width: 100%; height: 100%; overflow: visible; transition: transform .6s var(--ease); }
.symbol h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; }
.symbol p { color: var(--muted); font-size: .94rem; margin-top: .15rem; }
.compass__needle { transform-origin: 32px 32px; transition: transform .9s var(--ease); }
.symbol:hover .compass__needle { transform: rotate(160deg); }
.scales__pan { transform-origin: 32px 18px; transition: transform .7s var(--ease); }
.symbol:hover .scales__pan--l { transform: translateY(-3px) rotate(-4deg); }
.symbol:hover .scales__pan--r { transform: translateY(3px) rotate(4deg); }
.symbol:hover [data-icon="key"] svg { transform: rotate(-12deg); }
.symbol:hover [data-icon="crystal"] svg { transform: translateY(-3px); }

/* ============================================================
   STAT ROW (growth)
   ============================================================ */
.statrow { display: flex; flex-wrap: wrap; gap: 1.8rem 2.4rem; margin-top: 2rem; justify-content: flex-end; }
.stat { display: flex; flex-direction: column; align-items: flex-end; }
.stat .count {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.stat small { color: var(--muted); font-size: .82rem; margin-top: .35rem; letter-spacing: .03em; }

/* ============================================================
   STEPS (process)
   ============================================================ */
.steps { list-style: none; margin: 2.4rem auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; max-width: 920px; }
.step {
  position: relative; padding: 1.8rem 1.5rem; border-radius: var(--radius); text-align: left;
  border: 1px solid var(--line-soft); background: linear-gradient(180deg, rgba(13,20,36,.72), rgba(13,20,36,.28));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.step::before { content: ""; position: absolute; top: 0; left: 1.5rem; right: 1.5rem; height: 2px; background: var(--grad-gold); transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease); }
.step:hover { transform: translateY(-4px); border-color: var(--line); }
.step:hover::before { transform: scaleX(1); }
.step span { font-family: var(--serif); font-size: 2.2rem; font-weight: 600; color: var(--gold); opacity: .85; line-height: 1; }
.step h3 { font-family: var(--serif); font-size: 1.35rem; margin: .6rem 0 .35rem; }
.step p { color: var(--muted); font-size: .92rem; }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.form {
  margin-top: 1.2rem; width: 100%; max-width: 460px;
  background: linear-gradient(180deg, rgba(13,20,36,.82), rgba(13,20,36,.5));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 1.3rem; display: grid; gap: .8rem; text-align: left;
}
.field { display: grid; gap: .35rem; }
.field label { font-size: .82rem; font-weight: 500; color: var(--muted); }
.field .opt { color: var(--muted-2); font-weight: 400; }
.field input, .field textarea {
  font-family: inherit; font-size: 1rem; color: var(--fg);
  background: rgba(6,9,16,.7); border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
  padding: .7rem 1rem; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); min-height: 46px; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(200,168,106,.14); }
.field.is-invalid input, .field.is-invalid textarea { border-color: #e06a6a; }
.field__error { color: #e89090; font-size: .78rem; min-height: 1em; }
.form__success { color: var(--emerald); font-weight: 500; text-align: center; }
/* Booking card — replaces the form; keeps the panel's height so scroll positions don't shift */
.booking {
  margin-top: 1.2rem; width: 100%; max-width: 460px;
  background: linear-gradient(180deg, rgba(13,20,36,.82), rgba(13,20,36,.5));
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  padding: 1.4rem; display: flex; flex-direction: column;
  gap: 1rem; text-align: left;
}
.booking .btn { justify-content: center; }
.booking__note { color: var(--muted); font-size: .9rem; line-height: 1.6; margin: 0; }
.contactline { margin-top: .85rem; color: var(--muted-2); font-size: .85rem; letter-spacing: .02em; }
.contactline a { color: inherit; transition: color .2s var(--ease); }
.contactline a:hover { color: var(--gold); }
/* keep the contact lead tight so the whole panel fits within one screen on snap */
.beat--contact .lead { margin-top: 1rem; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: rgba(8,13,24,.85); backdrop-filter: blur(10px); border-top: 1px solid var(--line-soft); padding: 2.4rem 1.5rem; }
.footer__inner { max-width: var(--container); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.footer__links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer__links a { color: var(--muted); font-size: .9rem; transition: color .25s var(--ease); }
.footer__links a:hover { color: var(--fg); }
.footer__links .footer__legal-link { color: var(--muted-2); }
.footer__links .footer__legal-link:hover { color: var(--gold); }
.footer__legal { max-width: var(--container); margin: 1.6rem auto 0; color: var(--muted-2); font-size: .76rem; line-height: 1.7; display: grid; gap: .9rem; border-top: 1px solid var(--line-soft); padding-top: 1.5rem; }
.footer__legal strong { color: var(--muted); font-weight: 600; }
.footer__legal a { color: var(--muted); border-bottom: 1px solid var(--line-soft); transition: color .2s var(--ease), border-color .2s var(--ease); }
.footer__legal a:hover { color: var(--gold); border-color: var(--gold); }
.footer__copy { color: var(--muted-2); }

/* ============================================================
   SIDE QUOTES (ambient wisdom in the negative space)
   ============================================================ */
.sidequote {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  max-width: 300px; pointer-events: none;
}
/* soft localized scrim so the quote stays legible over bright 3D */
.sidequote::before {
  content: ""; position: absolute; inset: -34% -24%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(6,9,16,.74) 0%, rgba(6,9,16,.42) 46%, transparent 72%);
}
.sidequote--right { right: clamp(1.5rem, 6vw, 5rem); text-align: right; }
.sidequote--left  { left: clamp(1.5rem, 6vw, 5rem); text-align: left; }
.sidequote__inner { margin: 0; }
.sidequote blockquote {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(1.3rem, 1.9vw, 1.7rem); line-height: 1.35;
  color: var(--fg); opacity: .72;
  text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 22px rgba(0,0,0,.8);
}
.sidequote figcaption {
  margin-top: .8rem; font-family: var(--sans); font-size: .7rem;
  letter-spacing: .22em; text-transform: uppercase; color: var(--gold); opacity: .75;
}
@media (max-width: 768px) { .sidequote { display: none; } }

/* ============================================================
   REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .symbols { grid-template-columns: 1fr; gap: 1.3rem; }
  .steps { grid-template-columns: 1fr; }
  .beat__panel.align-right { align-items: flex-start; text-align: left; }
  .beat__panel.align-right > * { max-width: 560px; }
  .beat__panel.align-right .lead, .statrow { margin-left: 0; justify-content: flex-start; }
  .stat { align-items: flex-start; }
}

@media (max-width: 768px) {
  :root { --nav-h: 62px; }
  .nav__links {
    position: fixed; inset: var(--nav-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(8,12,22,.97); backdrop-filter: blur(18px); padding: 1rem 1.5rem 1.4rem; border-bottom: 1px solid var(--line-soft);
    transform: translateY(-120%); transition: transform .4s var(--ease); visibility: hidden;
  }
  .nav__links.is-open { transform: translateY(0); visibility: visible; }
  .nav__links a { padding: .9rem 0; border-bottom: 1px solid var(--line-soft); }
  .nav__cta { text-align: center; margin-top: .8rem; border: 1px solid var(--gold) !important; }
  .nav__toggle { display: flex; }

  /* stronger scrims on mobile (3D is smaller / behind) */
  .beat__scrim--left, .beat__scrim--right { background: linear-gradient(180deg, rgba(6,9,16,.55), rgba(6,9,16,.8)); }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .beat { padding: calc(var(--nav-h) + 1.5rem) 1.25rem 3rem; }
  .actions { flex-direction: column; align-items: stretch; }
  .actions .btn { width: 100%; }
}
