/* ============================================================
   Meridian — premium wealth landing page
   Reference DNA: Marvell Tile & Stone (Awwwards SOTD)
   Near-black + champagne metallic + emerald, refined motion
   ============================================================ */

:root {
  --bg:        #0a0c0b;
  --bg-2:      #10130f;
  --panel:     #14160f;
  --panel-2:   #181b14;
  --line:      rgba(189,164,122,0.16);
  --line-soft: rgba(236,232,223,0.08);

  --ink:       #ece8df;
  --ink-soft:  #b9b6ab;
  --ink-mute:  #807d72;

  --gold:      #bda47a;
  --gold-2:    #d8c39a;
  --gold-3:    #f3ead3;
  --emerald:   #3f7d68;
  --emerald-2: #1f3a30;

  --maxw: 1240px;
  --pad: clamp(20px, 5vw, 64px);
  --r: 20px;

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

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

body::before {
  /* faint metallic top-light so the page reads as a finished surface */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(189,164,122,0.10), transparent 60%),
    radial-gradient(90% 60% at 85% 8%, rgba(63,125,104,0.10), transparent 55%);
}

main, .nav, .footer { position: relative; z-index: 1; }

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

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

.italic { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* film grain overlay --------------------------------------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

/* ============================ NAV ========================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--pad);
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), backdrop-filter 0.5s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(10,12,11,0.72);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: conic-gradient(from 220deg, var(--gold-2), var(--emerald), var(--gold), var(--gold-2));
  box-shadow: inset 0 0 0 1px rgba(243,234,211,0.35), 0 0 14px rgba(189,164,122,0.4);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--bg);
}
.nav-links {
  display: flex;
  gap: 34px;
  margin-left: auto;
  margin-right: 28px;
}
.nav-links a {
  font-size: 14.5px;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  transition: color 0.25s var(--ease);
}
.nav-links a:hover { color: var(--ink); }

/* ============================ BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 14px 26px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  will-change: transform;
}
.btn span { transition: transform 0.3s var(--ease); }
.btn-pill {
  padding: 11px 20px;
  font-size: 14px;
  background: rgba(236,232,223,0.05);
  border-color: var(--line);
  color: var(--ink);
}
.btn-pill:hover { border-color: var(--gold); }
.btn-pill:hover span { transform: translateX(3px); }
.btn-solid {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #1a160d;
  box-shadow: 0 10px 30px -12px rgba(189,164,122,0.6), inset 0 1px 0 rgba(255,255,255,0.4);
}
.btn-solid:hover { box-shadow: 0 16px 40px -12px rgba(189,164,122,0.8), inset 0 1px 0 rgba(255,255,255,0.55); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--gold); background: rgba(189,164,122,0.06); }
.btn.full { width: 100%; }
.btn.big { padding: 18px 40px; font-size: 17px; }

/* ============================ LAYOUT ====================== */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 11vw, 150px) var(--pad);
}
.section-head { margin-bottom: clamp(40px, 6vw, 72px); max-width: 720px; }
.tag {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}
h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.025em;
}

/* ============================ HERO ======================== */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(130px, 18vh, 200px) var(--pad) clamp(60px, 9vw, 110px);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  min-width: 0;
}
.hero-inner { min-width: 0; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 100px;
  margin-bottom: 26px;
  background: rgba(236,232,223,0.03);
}
.eyebrow::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
}
.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(46px, 8vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin-bottom: 26px;
}
.hero-title span { display: block; }
.hero-title .italic { color: var(--gold-2); }
.hero-sub {
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--ink-soft);
  max-width: 30em;
  margin-bottom: 34px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.hero-meta {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 38px);
}
.hero-meta strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.02em;
  display: block;
  line-height: 1;
}
.hero-meta strong span { font-size: 0.6em; color: var(--gold); margin-left: 1px; }
.hero-meta small { font-size: 12.5px; color: var(--ink-mute); display: block; margin-top: 8px; }
.hero-meta .div { width: 1px; height: 42px; background: var(--line); }

/* hero balance card (3D tilt) ------------------------------ */
.hero-visual { min-width: 0; perspective: 1100px; }
.balance-card {
  position: relative;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 40px 90px -50px rgba(0,0,0,0.9), inset 0 1px 0 rgba(243,234,211,0.06);
  transform-style: preserve-3d;
  transition: transform 0.25s var(--ease);
  overflow: hidden;
}
.card-sheen {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(60% 50% at var(--mx, 30%) var(--my, 0%), rgba(216,195,154,0.16), transparent 60%);
  transition: opacity 0.4s var(--ease);
}
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card-label { font-size: 13px; color: var(--ink-mute); letter-spacing: 0.02em; }
.card-chip {
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-2);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 4px 11px;
}
.card-value {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4.6vw, 50px);
  letter-spacing: -0.02em;
  margin-top: 18px;
  line-height: 1;
}
.card-delta { font-size: 14px; color: var(--emerald); margin-top: 12px; font-weight: 500; }
.card-delta span { color: var(--ink-mute); font-weight: 400; }
.card-spark { margin: 22px 0 24px; }
.card-spark svg { width: 100%; height: 60px; }
.card-alloc { border-top: 1px solid var(--line-soft); padding-top: 20px; }
.alloc-bar {
  display: flex;
  height: 9px;
  border-radius: 100px;
  overflow: hidden;
  gap: 3px;
}
.alloc-bar i { width: var(--w); background: var(--gold); border-radius: 100px; }
.alloc-bar i.b { background: var(--emerald); }
.alloc-bar i.c { background: var(--gold-2); }
.alloc-bar i.d { background: var(--ink-mute); }
.alloc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 16px;
}
.alloc-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.alloc-legend b { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.alloc-legend b.b { background: var(--emerald); }
.alloc-legend b.c { background: var(--gold-2); }
.alloc-legend b.d { background: var(--ink-mute); }

/* ============================ MARQUEE ===================== */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  overflow: hidden;
  white-space: nowrap;
  background: rgba(20,22,15,0.5);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 26px;
  animation: marquee 38s linear infinite;
}
.marquee-track span {
  font-family: var(--serif);
  font-size: clamp(18px, 2.4vw, 26px);
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}
.marquee-track span.dot { color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================ STEPS ======================= */
.panel {
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 30px 70px -50px rgba(0,0,0,0.8), inset 0 1px 0 rgba(243,234,211,0.04);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step { padding: 32px 28px 36px; min-width: 0; transition: transform 0.5s var(--ease), border-color 0.5s var(--ease); }
.step:hover { transform: translateY(-5px); border-color: var(--line); }
.step-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 30px;
  color: var(--gold);
  display: block;
  margin-bottom: 20px;
}
.step h3 { font-size: 21px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 10px; }
.step p { color: var(--ink-soft); font-size: 15px; }

/* ============================ SPLIT ======================= */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.split-text { min-width: 0; }
.split-text h2 { margin-bottom: 20px; }
.split-text > p { color: var(--ink-soft); font-size: 16px; max-width: 34em; margin-bottom: 26px; }
.split-text .italic { color: var(--gold-2); }
.feature-list { list-style: none; display: grid; gap: 14px; }
.feature-list li {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  font-size: 15px;
  color: var(--ink-soft);
}
.feature-list li span {
  flex: none;
  width: 18px; height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: rgba(63,125,104,0.18);
  border: 1px solid var(--emerald);
  position: relative;
}
.feature-list li span::after {
  content: "";
  position: absolute;
  left: 5px; top: 7px;
  width: 5px; height: 3px;
  border-left: 1.5px solid var(--gold-2);
  border-bottom: 1.5px solid var(--gold-2);
  transform: rotate(-45deg);
}

/* self-drawing chart -------------------------------------- */
.split-visual { min-width: 0; }
.chart { padding: 28px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.chart-label { font-size: 13px; color: var(--ink-mute); display: block; }
.chart-value {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.02em;
  margin-top: 7px;
  display: block;
  line-height: 1;
}
.chart-badge {
  font-size: 13px;
  font-weight: 500;
  color: var(--emerald);
  border: 1px solid rgba(63,125,104,0.4);
  background: rgba(63,125,104,0.1);
  border-radius: 100px;
  padding: 5px 11px;
}
.chart-plot { margin-top: 22px; position: relative; }
#growthChart { width: 100%; height: clamp(180px, 26vw, 260px); }
#growthChart .grid { stroke: var(--line-soft); stroke-width: 1; }
#growthChart .area { opacity: 0; transition: opacity 1.1s var(--ease) 0.35s; }
#growthChart .line {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  filter: drop-shadow(0 4px 12px rgba(63,125,104,0.35));
}
#growthChart .dot { opacity: 0; transition: opacity 0.5s var(--ease) 1.5s; }
#chartCard.drawn #growthChart .line {
  transition: stroke-dashoffset 1.9s var(--ease) 0.15s;
  stroke-dashoffset: 0;
}
#chartCard.drawn #growthChart .area { opacity: 1; }
#chartCard.drawn #growthChart .dot { opacity: 1; animation: pulse 2.4s ease-in-out 1.9s infinite; }
@keyframes pulse {
  0%, 100% { r: 5; }
  50% { r: 7; }
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 11.5px;
  color: var(--ink-mute);
}

/* ============================ STATS ======================= */
.stats {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(50px, 7vw, 90px) var(--pad);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { min-width: 0; }
.stat strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 76px);
  letter-spacing: -0.03em;
  line-height: 1;
  display: block;
  color: var(--ink);
  margin-bottom: 14px;
}
.stat strong .count { color: var(--gold-2); }
.stat span { color: var(--ink-soft); font-size: 15px; display: block; max-width: 22em; }

/* ============================ QUOTE ======================= */
.quote {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(72px, 11vw, 140px) var(--pad);
  text-align: center;
}
.quote p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.6vw, 42px);
  line-height: 1.28;
  letter-spacing: -0.02em;
}
.quote .italic { color: var(--gold-2); }
.quote-by {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  color: var(--ink-mute);
}
.quote .avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--gold-2), var(--emerald));
  box-shadow: inset 0 0 0 1px rgba(243,234,211,0.3);
}

/* ============================ PLANS ======================= */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}
.plan {
  padding: 34px 30px 32px;
  min-width: 0;
  position: relative;
  transition: transform 0.5s var(--ease), border-color 0.5s var(--ease);
}
.plan:hover { transform: translateY(-5px); }
.plan.featured {
  border-color: var(--gold);
  background: linear-gradient(165deg, rgba(189,164,122,0.1), var(--panel));
  box-shadow: 0 40px 90px -50px rgba(189,164,122,0.45), inset 0 1px 0 rgba(243,234,211,0.08);
}
.badge {
  position: absolute;
  top: -12px; left: 30px;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #1a160d;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  border-radius: 100px;
  padding: 5px 14px;
  font-weight: 600;
}
.plan h3 { font-family: var(--serif); font-weight: 500; font-size: 25px; letter-spacing: -0.01em; }
.price {
  margin: 14px 0 4px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--gold-2);
}
.price small { font-family: var(--sans); font-size: 14px; color: var(--ink-mute); letter-spacing: 0; margin-left: 4px; }
.plan > p { color: var(--ink-soft); font-size: 14.5px; margin: 16px 0 22px; min-height: 3em; }
.plan ul { list-style: none; display: grid; gap: 12px; margin-bottom: 28px; }
.plan li {
  font-size: 14.5px;
  color: var(--ink-soft);
  padding-left: 24px;
  position: relative;
}
.plan li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 12px; height: 7px;
  border-left: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(-45deg);
}
.fineprint {
  margin-top: 34px;
  font-size: 12.5px;
  color: var(--ink-mute);
  text-align: center;
  max-width: 56em;
  margin-left: auto;
  margin-right: auto;
}

/* ============================ CTA ========================= */
.cta {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad) clamp(80px, 11vw, 150px);
}
.cta-inner {
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(189,164,122,0.16), transparent 60%),
    linear-gradient(170deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(48px, 8vw, 96px) var(--pad);
  text-align: center;
  box-shadow: 0 50px 110px -60px rgba(0,0,0,0.9);
}
.cta-inner h2 { margin-bottom: 32px; }
.cta-inner .italic { color: var(--gold-2); }

/* ============================ FOOTER ====================== */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) var(--pad);
  border-top: 1px solid var(--line);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.footer-top nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-top nav a { font-size: 14px; color: var(--ink-soft); transition: color 0.25s var(--ease); }
.footer-top nav a:hover { color: var(--gold-2); }
.footer-fine { font-size: 12.5px; color: var(--ink-mute); max-width: 60em; }

/* ============================ REVEAL ====================== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ============================ RESPONSIVE ================== */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 460px; }
  .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .plan.featured { order: -1; }
  .stats { grid-template-columns: 1fr; gap: 36px; text-align: left; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
}

@media (max-width: 480px) {
  .hero-meta { flex-wrap: wrap; gap: 18px 24px; }
  .hero-meta .div { display: none; }
  .btn.full { width: 100%; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}

/* ============================ REDUCED MOTION ============== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .marquee-track { animation: none; }
  /* chart shows final drawn state */
  #growthChart .line { stroke-dashoffset: 0 !important; }
  #growthChart .area { opacity: 1 !important; }
  #growthChart .dot { opacity: 1 !important; }
}
