/* ═══════════════════════════════════════════════════════
   PortfolioAI — Template 2
   Restrained editorial layout for a private-wealth audience.
   Quiet motion, generous whitespace, one accent.
   Light default; [data-theme="dark"] swaps tokens.
   ═══════════════════════════════════════════════════════ */

:root {
  --page:    #fcfcfb;
  --panel:   #f4f5f3;
  --card:    #ffffff;

  --text:    #17211c;
  --muted:   #5b6660;
  --faint:   #8d968f;

  --green:      #0d5c3c;
  --green-2:    #0a4a30;
  --green-tint: rgba(13, 92, 60, .07);
  --green-ring: rgba(13, 92, 60, .13);
  --green-line: rgba(13, 92, 60, .26);
  --on-green:   #ffffff;

  --line:   rgba(23, 33, 28, .1);
  --line-2: rgba(23, 33, 28, .18);

  --shadow: 0 18px 44px -30px rgba(23, 33, 28, .3);

  --danger:      #a3392f;
  --danger-line: rgba(163, 57, 47, .34);
  --danger-bg:   rgba(163, 57, 47, .05);

  --r:    12px;
  --r-lg: 20px;
  --ease: cubic-bezier(.25, .8, .35, 1);
}

[data-theme="dark"] {
  --page:    #0e1310;
  --panel:   #151b17;
  --card:    #151b17;

  --text:    #e9efea;
  --muted:   #9aa8a0;
  --faint:   #6d7a73;

  --green:      #5fbf90;
  --green-2:    #7ad0a6;
  --green-tint: rgba(95, 191, 144, .1);
  --green-ring: rgba(95, 191, 144, .16);
  --green-line: rgba(95, 191, 144, .3);
  --on-green:   #06150e;

  --line:   rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);

  --shadow: 0 18px 44px -30px rgba(0, 0, 0, .8);

  --danger:      #e08a80;
  --danger-line: rgba(224, 138, 128, .34);
  --danger-bg:   rgba(224, 138, 128, .07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  background: var(--page);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px; line-height: 1.6; letter-spacing: -.008em;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
  transition: background-color .5s ease, color .5s ease;
}

h1, h2, h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  font-weight: 500; letter-spacing: -.032em; line-height: 1.15;
}

a { color: inherit; text-decoration: none; }
svg { display: block; }
::selection { background: var(--green-tint); color: var(--text); }

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

.wrap { width: min(1140px, 100% - 3rem); margin-inline: auto; }
.wrap--narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }

/* ── logo lockup ────────────────────────────────────── */
.brand { display: inline-flex; align-items: center; gap: .58rem; }
.brand__mark { flex: none; width: 34px; height: 34px; color: var(--text); }
.brand__mark svg { width: 100%; height: 100%; }
.brand__mark .mk-p      { fill: currentColor; }
.brand__mark .mk-a      { stroke: var(--green); fill: none; }
.brand__mark .mk-a-head { fill: var(--green); }

/* the grid column is sized by the wordmark, so the tagline
   justifies to exactly its width — both edges line up */
.brand__text { display: grid; justify-items: start; line-height: 1; }
.brand__word {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.16rem; font-weight: 700; letter-spacing: -.04em; white-space: nowrap;
}
.brand__word em { font-style: normal; color: var(--green); }
.brand__tag {
  width: 100%; margin-top: .26rem;
  font-size: .46rem; font-weight: 500; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint); white-space: nowrap;
  text-align: justify; text-align-last: justify;
}
.brand--sm .brand__mark { width: 28px; height: 28px; }
.brand--sm .brand__word { font-size: 1.02rem; }

/* ── nav ────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 1.6rem;
  width: min(1140px, 100% - 3rem); margin-inline: auto;
  padding: 1.15rem 0;
}
.nav::before {
  /* full-bleed backdrop that stays inside the viewport — `inset: 0 -50vw`
     reaches past both edges and inflates the document's scroll width. */
  content: ''; position: absolute; top: 0; bottom: 0;
  left: 50%; width: 100vw; transform: translateX(-50%);
  background: color-mix(in srgb, var(--page) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  opacity: 0; pointer-events: none;
  transition: opacity .4s ease, border-color .4s ease;
}
.nav.is-stuck::before { opacity: 1; border-bottom-color: var(--line); }
.nav > * { position: relative; }

.nav__links { display: flex; gap: 1.9rem; margin-left: auto; font-size: .88rem; color: var(--muted); }
.nav__links a { transition: color .3s ease; }
.nav__links a:hover { color: var(--text); }

.themetoggle {
  position: relative; flex: none; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--line); background: none; color: var(--muted);
  cursor: pointer; overflow: hidden;
  transition: color .3s ease, border-color .3s ease;
}
.themetoggle:hover { color: var(--text); border-color: var(--line-2); }
.themetoggle:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.themetoggle svg { position: absolute; transition: opacity .35s ease, transform .45s var(--ease); }
.themetoggle .i-sun  { opacity: 0; transform: rotate(-60deg) scale(.5); }
.themetoggle .i-moon { opacity: 1; }
[data-theme="dark"] .themetoggle .i-sun  { opacity: 1; transform: none; }
[data-theme="dark"] .themetoggle .i-moon { opacity: 0; transform: rotate(60deg) scale(.5); }

/* ── buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .92rem 1.7rem;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-size: .93rem; font-weight: 500; letter-spacing: -.012em;
  cursor: pointer; white-space: nowrap;
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}
.btn--sm { padding: .56rem 1.15rem; font-size: .85rem; }
.btn--lg { padding: 1.02rem 2rem; }

.btn--solid { background: var(--green); color: var(--on-green); }
.btn--solid:hover { background: var(--green-2); }

.btn--outline { border-color: var(--line-2); color: var(--text); }
.btn--outline:hover { border-color: var(--green); color: var(--green); }

.btn__arrow { transition: transform .35s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ── hero ───────────────────────────────────────────── */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 6vw, 5rem); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .82fr);
  gap: clamp(2.5rem, 6vw, 5.5rem); align-items: center;
}

.eyebrow {
  font-size: .74rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--faint);
}
.rule { width: 40px; height: 2px; margin: 1.4rem 0 1.8rem; background: var(--green); }

.hero__title {
  font-size: clamp(2.3rem, 4.4vw, 3.9rem);
  font-weight: 500; letter-spacing: -.038em; line-height: 1.1;
}
.hero__title b { font-weight: 500; color: var(--green); }
.hero__body { margin-top: 1.5rem; max-width: 44ch; color: var(--muted); font-size: 1.03rem; }
.hero__cta { display: flex; align-items: center; gap: .8rem; margin-top: 2.2rem; flex-wrap: wrap; }
.hero__note { margin-top: 1rem; font-size: .85rem; color: var(--faint); }

/* the four systems, stated plainly */
.systems { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.system {
  padding: 1.7rem 1.4rem; background: var(--card);
  transition: background-color .4s ease;
}
.system:hover { background: var(--panel); }
.system svg { color: var(--green); margin-bottom: 1rem; }
.system b { display: block; font-size: .95rem; font-weight: 600; letter-spacing: -.02em; }
.system span { display: block; margin-top: .15rem; font-size: .82rem; color: var(--faint); }

/* ── sections ───────────────────────────────────────── */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section { padding-top: 0; }
.divider { height: 1px; background: var(--line); }

.tag {
  display: block; font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--green);
}
.h2 { margin-top: .9rem; font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.lede { margin-top: .9rem; max-width: 52ch; color: var(--muted); }

/* service rows */
.rows { margin-top: 2.8rem; border-top: 1px solid var(--line); }
.row-item {
  display: grid; grid-template-columns: 3rem minmax(0, 15rem) minmax(0, 1fr);
  gap: 1.6rem; align-items: baseline;
  padding: 1.7rem .2rem; border-bottom: 1px solid var(--line);
}
.row-item__n { font-size: .78rem; color: var(--faint); font-variant-numeric: tabular-nums; }
.row-item h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.02em; }
.row-item p { font-size: .93rem; color: var(--muted); }

/* scope */
.scope {
  margin-top: 2.4rem; padding: 1.4rem 1.6rem;
  border-left: 2px solid var(--green-line);
  background: var(--green-tint);
  border-radius: 0 var(--r) var(--r) 0;
}
.scope p { font-size: .89rem; color: var(--muted); }
.scope b { color: var(--text); font-weight: 600; }

/* ── book ───────────────────────────────────────────── */
.signup { background: var(--panel); padding: clamp(3rem, 7vw, 5.5rem) 0; }

.bookcard {
  margin-top: 2.2rem; padding: clamp(2rem, 5vw, 3rem);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--card); text-align: center;
}
.bookcard p { margin-bottom: 1.4rem; color: var(--muted); }

/* ── footer ─────────────────────────────────────────── */
.foot { padding: 2.4rem 0; border-top: 1px solid var(--line); }
.foot__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.foot p { font-size: .82rem; color: var(--faint); }

/* ── reveal — a short fade, nothing more ────────────── */
.reveal { opacity: 0; }
.reveal.is-in {
  opacity: 1;
  transition: opacity .7s ease;
  transition-delay: var(--rd, 0ms);
}

/* ── responsive ─────────────────────────────────────── */
@media (max-width: 940px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.8rem; }
  .row-item { grid-template-columns: 2.2rem minmax(0, 1fr); gap: 1rem; }
  .row-item p { grid-column: 2; }
}
@media (max-width: 720px) {
  .wrap, .nav { width: min(1140px, 100% - 2rem); }
  .nav__links { display: none; }
  .brand__tag { display: none; }
  .systems { grid-template-columns: 1fr; }
  .hero__cta .btn { width: 100%; }
  .foot__inner { flex-direction: column; text-align: center; }
}

/* ── reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; }
}
