/* Wealth Engine — website v2 (premium pass)
   Design system: deep emerald + gold, serif display type (Playfair Display),
   luxury real-estate photography as the visual lead.
   Motion system: ONE language, repeated — fade + small rise on scroll
   (IntersectionObserver, staggered), Ken Burns hero drift with a soft
   gradient melt, and hover micro-interactions (card lift, button arrow
   slide, nav underline draw). Transform/opacity only. Reduced-motion safe. */

:root {
  /* Color tokens */
  --emerald-950: #06231b;
  --emerald-900: #0a2f24;
  --emerald-800: #0e3d2e;
  --emerald-700: #14503c;
  --emerald-wash: #e9efe8;
  --gold: #c9a24b;
  --gold-soft: #e3c878;
  --gold-deep: #7d611c;      /* gold for small text on light surfaces — 5.0–5.7:1 (bright gold is only 2.2:1 on cream) */
  --cream: #faf7f1;
  --paper: #fffdf9;
  --ink: #1d2420;
  --ink-soft: #4c554f;
  --line: #e5ddcb;
  --on-dark: #c3cec6;        /* body text on emerald — verified on --emerald-950/900 */
  --on-dark-bright: #e4e9e2; /* lead text on emerald */

  /* Type tokens */
  --serif: "Playfair Display", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Spacing scale */
  --sp-1: 8px;  --sp-2: 14px; --sp-3: 18px; --sp-4: 24px;
  --sp-5: 36px; --sp-6: 52px; --sp-7: 68px;

  /* Radii + shadows */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-card: 0 2px 10px rgba(10, 47, 36, .05);
  --shadow-lift: 0 22px 44px rgba(10, 47, 36, .16);
  --shadow-shot: 0 16px 40px rgba(10, 47, 36, .15);
  --shadow-header: 0 10px 30px rgba(3, 18, 13, .35);

  /* Motion tokens */
  --ease: cubic-bezier(.22, .61, .21, 1);
  --dur: .8s;
  --dur-fast: .25s;

  --max: 1140px;
  --header-h: 60px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--emerald-700); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; color: var(--emerald-950); }
h2 { font-size: clamp(1.65rem, 3.1vw, 2.25rem); margin-bottom: 12px; }
h3 { font-size: 1.2rem; }

.eyebrow {
  text-transform: uppercase; letter-spacing: .22em; font-size: .72rem;
  font-weight: 700; color: var(--gold-deep); margin-bottom: 14px;
}
.dark .eyebrow, .hero .eyebrow { color: var(--gold); } /* bright gold passes 6.6:1+ on emerald */
.lede { color: var(--ink-soft); max-width: 640px; font-size: 1rem; }

section { padding: var(--sp-7) 0; }
.section-head { margin-bottom: var(--sp-5); }

/* Section rhythm bands — full-bleed photo (hero) / emerald band / light areas */
.band-paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-wash  { background: var(--emerald-wash); }

/* ---------- Scroll reveal (JS-gated: content is never hidden without JS) ---------- */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--rv, 0) * 90ms);
  /* No will-change here: 37 permanently promoted layers cost real memory on
     low-end phones; the reveal transition composites fine without it. */
}
.js .reveal.in { opacity: 1; transform: none; }

/* Interactive tiles keep the staggered reveal, then get snappy hover timing back */
.js .reveal.card, .js .reveal.step, .js .reveal.price-box,
.js .reveal.affiliate-card, .js details.reveal {
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
              box-shadow .35s var(--ease), border-color .35s var(--ease);
  transition-delay: calc(var(--rv, 0) * 90ms), calc(var(--rv, 0) * 90ms), 0ms, 0ms;
}
.js .reveal.card.in:hover, .js .reveal.step.in:hover, .js .reveal.price-box.in:hover,
.js .reveal.affiliate-card.in:hover, .js details.reveal.in:hover { transition-delay: 0ms; }

/* Hero entrance — same fade+rise language, runs once on load, short delays */
.js .rise {
  opacity: 0;
  animation: rise-in .9s var(--ease) forwards;
  animation-delay: calc(80ms + var(--rv, 0) * 110ms);
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 35, 27, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 75, .28);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
header.scrolled {
  background: rgba(6, 35, 27, .98);
  border-bottom-color: rgba(201, 162, 75, .5);
  box-shadow: var(--shadow-header);
}
.header-in { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand span { font-family: var(--serif); font-size: 1.15rem; color: var(--cream); letter-spacing: .02em; }
nav.main { display: flex; gap: 26px; align-items: center; }
nav.main a { color: #d9e2dc; text-decoration: none; font-size: .93rem; position: relative; }
nav.main a:not(.nav-cta) { padding-bottom: 3px; }
nav.main a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: var(--gold-soft);
  transform: scaleX(0); transform-origin: right;
  transition: transform .35s var(--ease);
}
nav.main a:not(.nav-cta):hover { color: var(--gold-soft); }
nav.main a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: left; }
nav.main a.nav-cta {
  border: 1px solid var(--gold); color: var(--gold-soft);
  padding: 8px 18px; border-radius: 999px; font-weight: 600;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
nav.main a.nav-cta:hover { background: var(--gold); color: var(--emerald-950); }
.nav-toggle { display: none; background: none; border: 0; color: var(--cream); font-size: 1.5rem; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 600;
  padding: 13px 26px; border-radius: 999px; font-size: .95rem;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.btn::after {
  content: "\2192"; display: inline-block; margin-left: 10px;
  transition: transform var(--dur-fast) var(--ease);
}
.btn:hover::after { transform: translateX(4px); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-gold { background: var(--gold); color: var(--emerald-950); box-shadow: 0 8px 22px rgba(201, 162, 75, .28); }
.btn-gold:hover { background: var(--gold-soft); box-shadow: 0 12px 28px rgba(201, 162, 75, .38); }
.btn-outline { border: 1px solid rgba(250, 247, 241, .65); color: var(--cream); }
.btn-outline:hover { border-color: var(--gold-soft); color: var(--gold-soft); }
.btn-dark { background: var(--emerald-900); color: var(--cream); }
.btn-dark:hover { background: var(--emerald-700); box-shadow: 0 12px 26px rgba(10, 47, 36, .28); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.btn[aria-disabled="true"]::after { content: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: var(--cream); padding: 0;
  background: var(--emerald-950); overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img {
  width: 100%; height: 100%; object-fit: cover;
  animation: ken-burns 28s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes ken-burns {
  from { transform: scale(1.03) translate(0, 0); }
  to   { transform: scale(1.12) translate(-1.6%, -1.6%); }
}
/* Scrim: deep emerald on the text side, melting off to the right.
   Animated background-position gives the soft gradient melt. */
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg,
    rgba(6,35,27,.96) 22%, rgba(6,35,27,.82) 52%,
    rgba(6,35,27,.52) 76%, rgba(6,35,27,.30) 100%);
  background-size: 160% 100%;
  animation: melt 16s ease-in-out infinite alternate;
}
@keyframes melt {
  from { background-position: 0% 0; }
  to   { background-position: 28% 0; }
}
.hero-in { position: relative; padding: 84px 0 72px; max-width: 680px; }
.hero h1 { color: var(--cream); font-size: clamp(2.1rem, 4.6vw, 3.1rem); margin-bottom: 16px; }
.hero h1 em { color: var(--gold-soft); font-style: italic; }
.hero p.sub { font-size: 1.05rem; color: var(--on-dark-bright); max-width: 560px; margin-bottom: 26px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.hero-note { font-size: .9rem; color: var(--on-dark); letter-spacing: .01em; }
.hero-note b { color: var(--gold-soft); font-weight: 600; }

/* ---------- Fact strip ---------- */
.strip { background: var(--emerald-900); color: var(--cream); padding: 18px 0; border-bottom: 1px solid rgba(201,162,75,.25); }
.strip-in { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.strip .fact { text-align: left; }
.strip .fact b { font-family: var(--serif); font-size: 1.2rem; color: var(--gold-soft); display: block; line-height: 1.2; }
.strip .fact span { font-size: .82rem; color: var(--on-dark); }

/* ---------- Product ladder ---------- */
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease),
              opacity var(--dur) var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); border-color: rgba(201,162,75,.55); }
.card img.cover { aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: transform .6s var(--ease); }
.card:hover img.cover { transform: scale(1.045); }
.card .card-body { padding: 20px 18px 22px; display: flex; flex-direction: column; flex: 1; }
.card .step-label { font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-deep); font-weight: 700; margin-bottom: 8px; }
.card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.card p { font-size: .93rem; color: var(--ink-soft); flex: 1; }
.card .price { font-family: var(--serif); font-size: 1.5rem; color: var(--emerald-950); margin: 12px 0 10px; }
.card .price small { font-size: .85rem; color: var(--ink-soft); font-family: var(--sans); }
.card .btn { text-align: center; padding: 12px 18px; font-size: .95rem; }
.card.featured { border-color: var(--gold); box-shadow: 0 14px 34px rgba(10, 47, 36, .14); }
.card.featured:hover { box-shadow: 0 26px 50px rgba(10, 47, 36, .22); }
.badge {
  display: inline-block; align-self: flex-start; font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--emerald-950);
  background: var(--gold-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px;
}
.badge.soon { background: var(--emerald-900); color: var(--gold-soft); }
.toolkit-visual {
  aspect-ratio: 4/3; position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--emerald-800), var(--emerald-950));
  display: flex; align-items: center; justify-content: center; padding: 22px; text-align: center;
}
.toolkit-visual img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .6s var(--ease);
}
.toolkit-visual::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(10, 47, 36, .82), rgba(6, 35, 27, .93));
}
.card:hover .toolkit-visual img { transform: scale(1.045); }
.toolkit-visual p { position: relative; z-index: 1; color: var(--gold-soft); font-family: var(--serif); font-size: 1.2rem; line-height: 1.35; }

/* ---------- Value stack ---------- */
.dark { background: var(--emerald-950); color: var(--cream); }
.dark h2 { color: var(--cream); }
.dark .lede { color: var(--on-dark); }
.stack-grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: 36px; align-items: start; }
.stack-list { list-style: none; }
.stack-list li {
  display: flex; gap: 16px; padding: 13px 0; border-bottom: 1px solid rgba(201,162,75,.22);
  transition: transform .35s var(--ease), opacity var(--dur) var(--ease);
}
.stack-list li:hover { transform: translateX(6px); }
.stack-list li:first-child { padding-top: 4px; }
.stack-num { font-family: var(--serif); color: var(--gold); font-size: 1.15rem; min-width: 36px; }
.stack-list b { display: block; color: var(--cream); font-size: 1.03rem; }
.stack-list span { color: var(--on-dark); font-size: .93rem; }
.stack-note { margin-top: 16px; color: var(--on-dark); font-size: .93rem; }
.stack-note b { color: var(--gold-soft); }
.price-box {
  background: var(--emerald-900); border: 1px solid rgba(201,162,75,.45);
  border-radius: var(--radius); padding: 26px 22px; text-align: center;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity var(--dur) var(--ease);
}
.price-box:hover { transform: translateY(-4px); box-shadow: 0 22px 44px rgba(0,0,0,.35); }
.price-box .was { color: var(--on-dark); font-size: .95rem; }
.price-box .big { font-family: var(--serif); font-size: 2.5rem; color: var(--cream); line-height: 1.1; }
.price-box .code {
  display: inline-block; margin: 12px 0 16px; border: 1px dashed var(--gold);
  color: var(--gold-soft); padding: 8px 18px; border-radius: 8px; letter-spacing: .14em; font-weight: 700;
}
.price-box p.small { font-size: .87rem; color: var(--on-dark); margin-top: 14px; }

/* ---------- Example output ---------- */
.example-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.example-grid img.shot { border-radius: var(--radius); box-shadow: var(--shadow-shot); }
.example-quote {
  background: var(--paper); border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 22px 24px;
  font-size: 1.02rem; color: var(--ink); font-style: italic;
  box-shadow: 0 8px 26px rgba(10,47,36,.08);
}
.example-meta { font-size: .9rem; color: var(--ink-soft); margin-top: 16px; font-style: normal; }
.inside-img { border-radius: var(--radius); margin-top: 32px; box-shadow: var(--shadow-shot); width: 100%; }

/* ---------- Steps / who ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px;
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease),
              opacity var(--dur) var(--ease);
}
.band-paper .step { background: var(--cream); }
.step:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); border-color: rgba(201,162,75,.55); }
.step .n { font-family: var(--serif); font-size: 1.7rem; color: var(--gold-deep); line-height: 1; margin-bottom: 10px; }
.step h3 { margin-bottom: 8px; }
.step p { font-size: .95rem; color: var(--ink-soft); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; }
.split img { border-radius: var(--radius); box-shadow: var(--shadow-shot); }
.check-list { list-style: none; margin-top: 18px; }
.check-list li { padding: 7px 0 7px 28px; position: relative; color: var(--ink-soft); }
.check-list li::before { content: "—"; position: absolute; left: 2px; color: var(--gold); font-weight: 700; }
.check-list b { color: var(--ink); }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; }
details {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 18px; margin-bottom: 10px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
              opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}
details:hover { border-color: rgba(201,162,75,.6); box-shadow: var(--shadow-card); }
details summary { font-weight: 600; cursor: pointer; color: var(--emerald-950); list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; float: right; color: var(--gold-deep); font-size: 1.25rem; line-height: 1; transition: transform var(--dur-fast) var(--ease); }
details[open ] summary::after { content: "–"; }
details p { margin-top: 10px; color: var(--ink-soft); font-size: .96rem; }

/* ---------- Affiliate (first content band, directly under the fact strip) ---------- */
#partners { border-top: 1px solid rgba(201,162,75,.25); }
.affiliate-in { display: grid; grid-template-columns: 1.2fr .8fr; gap: 36px; align-items: center; }
.affiliate-card {
  background: var(--paper); border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 24px 22px; text-align: center; box-shadow: 0 14px 34px rgba(10,47,36,.10);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), opacity var(--dur) var(--ease);
}
.affiliate-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.affiliate-card .big { font-family: var(--serif); font-size: 2.2rem; color: var(--emerald-950); line-height: 1.1; }
.affiliate-card p { color: var(--ink-soft); font-size: .93rem; margin: 10px 0 20px; }

/* ---------- Footer ---------- */
footer { background: var(--emerald-950); color: var(--on-dark); padding: 52px 0 28px; border-top: 1px solid rgba(201,162,75,.25); }
.footer-grid { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; margin-bottom: 32px; }
footer .brand span { color: var(--cream); }
footer h4 { color: var(--cream); font-family: var(--serif); font-weight: 600; margin-bottom: 12px; font-size: 1.05rem; }
footer ul { list-style: none; }
footer li { margin-bottom: 8px; }
footer a { color: var(--on-dark); text-decoration: none; font-size: .93rem; transition: color var(--dur-fast) var(--ease); }
footer a:hover { color: var(--gold-soft); }
.footer-tag { max-width: 300px; font-size: .93rem; margin-top: 14px; }

/* Follow strip — integrated into the top of the footer (single emerald band,
   hairline-separated from the footer grid; no second dark strip above it) */
.follow { text-align: center; padding-bottom: 30px; margin-bottom: 34px; border-bottom: 1px solid rgba(201,162,75,.25); }
.follow-line { font-family: var(--serif); font-size: 1.08rem; color: var(--cream); }
.follow-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.follow-links a {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 18px; border: 1px solid rgba(201,162,75,.35); border-radius: 999px;
  color: var(--on-dark); font-size: .9rem; text-decoration: none;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.follow-links a svg { width: 16px; height: 16px; flex: none; fill: var(--gold); transition: fill var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease); }
.follow-links a span { position: relative; }
.follow-links a span::after {
  content: ""; position: absolute; left: 0; bottom: -3px; height: 1px; width: 100%;
  background: var(--gold-soft); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-fast) var(--ease);
}
.follow-links a:hover { color: var(--gold-soft); border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(3,18,13,.35); }
.follow-links a:hover svg { fill: var(--gold-soft); transform: translateY(-1px); }
.follow-links a:hover span::after { transform: scaleX(1); }
.footer-base { border-top: 1px solid rgba(201,162,75,.25); padding-top: 22px; font-size: .85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .ladder { grid-template-columns: repeat(2, 1fr); }
  .stack-grid, .example-grid, .affiliate-in, .split { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  section { padding: var(--sp-6) 0; }
  .price-box { max-width: 520px; }
}
@media (max-width: 640px) {
  .ladder { grid-template-columns: 1fr; }
  nav.main {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--emerald-950); flex-direction: column; align-items: flex-start;
    padding: 18px 24px 26px; gap: 16px; border-bottom: 1px solid rgba(201,162,75,.35);
  }
  nav.main.open { display: flex; }
  .nav-toggle { display: block; }
  .hero-in { padding: 56px 0 48px; }
  .hero-ctas .btn { width: 100%; text-align: center; }
  .hero-bg::after {
    background: linear-gradient(180deg, rgba(6,35,27,.94) 30%, rgba(6,35,27,.78) 70%, rgba(6,35,27,.55));
  }
  .strip-in { gap: 12px; }
  .strip .fact { flex: 1 1 40%; }
  h2 { font-size: 1.6rem; }
}

/* ---------- Reduced motion: everything settles, nothing hidden ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal, .js .rise { opacity: 1 !important; transform: none !important; }
  .hero-bg img { animation: none; }
}
