/* ============================================================
   JelfriTorres — Earner to Owner
   Design system: editorial ledger / climb journal
   Palette: ink, paper, gold — no gradients-as-decoration
   Type: Newsreader (display serif) · Inter (body) · IBM Plex Mono (meta)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Core palette */
  --ink:         #0E1620;   /* deep navy/ink */
  --ink-2:       #1A2330;   /* card */
  --ink-3:       #243042;   /* hairline on dark */
  --paper:       #F4EFE6;   /* warm paper */
  --paper-2:     #EBE3D4;   /* paper shadow */
  --paper-3:     #D9CFBA;   /* rule on paper */
  --gold:        #C9A84C;   /* accent */
  --gold-ink:    #8A6E1F;   /* gold on paper */
  --oxblood:     #8E3A2B;   /* occasional accent, honest red */
  --forest:      #2F5347;   /* occasional accent, gain green */

  /* Greys on dark */
  --text:        #F4EFE6;
  --text-mute:   #B9B2A4;
  --text-dim:    #8A8575;

  /* Greys on paper */
  --body:        #1A2330;
  --body-mute:   #59544A;
  --body-dim:    #8A8575;

  /* Back-compat aliases for the uploaded legacy files */
  --dark-navy:   var(--ink);
  --navy:        var(--ink-2);
  --white:       var(--paper);
  --light-gray:  var(--text-mute);
  --medium-gray: var(--text-dim);
  --light-gold:  #E3C876;

  /* Type */
  --f-display: "Newsreader", "Source Serif Pro", Georgia, serif;
  --f-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Rhythm */
  --radius-sm: 2px;
  --radius:    4px;
  --radius-lg: 8px;
  --hairline:  1px solid var(--paper-3);
  --hairline-dark: 1px solid var(--ink-3);
  --container: 1240px;
  --gap: clamp(1rem, 2vw, 1.5rem);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--body);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

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

a { color: inherit; }

/* ----------------------------------------------------------
   Typography
   ---------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--f-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  color: var(--body);
}

h1 {
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.02;
}
h1 em { font-style: italic; font-weight: 500; color: var(--gold-ink); }

h2 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
h2 em { font-style: italic; color: var(--gold-ink); }

h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p { max-width: 62ch; }

p.lede {
  font-family: var(--f-display);
  font-size: clamp(1.2rem, 1.7vw, 1.5rem);
  line-height: 1.45;
  color: var(--body);
  font-weight: 400;
  max-width: 36ch;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-ink);
}

.meta {
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--body-mute);
}

.pull {
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  line-height: 1.25;
  color: var(--body);
  max-width: 28ch;
}

/* Selection */
::selection { background: var(--gold); color: var(--ink); }

/* ----------------------------------------------------------
   Header / nav
   ---------------------------------------------------------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(244, 239, 230, 0.88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: var(--hairline);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 2rem;
}

.brand {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--body);
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  transition: color 0.15s ease;
}
.brand:hover { color: var(--gold-ink); }
.brand:hover .mark { color: var(--body-mute); }
.brand .mark {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--gold-ink);
  text-transform: uppercase;
  font-weight: 500;
}

nav.primary { display: flex; align-items: center; gap: 2rem; }
nav.primary a {
  text-decoration: none;
  color: var(--body);
  font-size: 0.92rem;
  font-weight: 500;
  position: relative;
  padding: 0.25rem 0;
}
nav.primary a:hover { color: var(--gold-ink); }
nav.primary a.cta {
  background: var(--ink);
  color: var(--paper);
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  transition: background 0.2s ease;
}
nav.primary a.cta:hover { background: var(--gold-ink); color: var(--paper); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
}
.hamburger span {
  width: 22px;
  height: 1.5px;
  background: var(--body);
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-decoration: none;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn:hover {
  background: var(--gold-ink);
  border-color: var(--gold-ink);
  transform: translateY(-1px);
}
.btn-lg {
  padding: 1.05rem 1.65rem;
  font-size: 1rem;
}
.btn-xl {
  padding: 1.2rem 2rem;
  font-size: 1.05rem;
}
.btn-secondary {
  background: transparent;
  color: var(--body);
  border: 1.5px solid var(--body);
}
.btn-secondary:hover {
  background: var(--body);
  color: var(--paper);
}
.btn-gold {
  background: var(--gold-ink);
  border-color: var(--gold-ink);
  color: var(--paper);
}
.btn-gold:hover {
  background: var(--ink);
  border-color: var(--ink);
}
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--paper-3);
  color: var(--body);
}
.btn-ghost:hover { border-color: var(--body); background: var(--paper-2); }

.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Legacy style from uploaded files */
.btn-large { padding: 1.1rem 1.8rem; font-size: 1rem; }

/* ----------------------------------------------------------
   Grid & section utilities
   ---------------------------------------------------------- */

.grid   { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.rule-top    { border-top: var(--hairline); }
.rule-bottom { border-bottom: var(--hairline); }

section.sec { padding: clamp(4rem, 9vw, 7rem) 0; }

.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { max-width: 20ch; margin: 0.5rem auto 0; }
.section-title p  { margin: 1rem auto 0; color: var(--body-mute); }

/* Scrolling ticker */
.ticker {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  border-top: 1px solid var(--ink-3);
  border-bottom: 1px solid var(--ink-3);
}
.ticker-track {
  display: flex;
  gap: 3rem;
  padding: 0.75rem 0;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
  font-family: var(--f-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--text-mute);
}
.ticker-track span { display: inline-flex; align-items: center; gap: 0.75rem; }
.ticker-track b { color: var(--gold); font-weight: 500; }
.ticker-track i { color: var(--paper-3); font-style: normal; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ----------------------------------------------------------
   Hero — editorial masthead
   ---------------------------------------------------------- */

.masthead {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(3rem, 5vw, 4rem);
  position: relative;
}
.masthead .ed-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: var(--hairline);
  margin-bottom: 2rem;
}
.masthead .ed-row .meta { color: var(--body-mute); }
.masthead h1 {
  max-width: 18ch;
}
.masthead .sub {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: end;
}
.masthead .sub p.lede { max-width: 34ch; }
.masthead .sub .side-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
  border-top: 1px solid var(--paper-3);
  padding-top: 1.25rem;
}
.masthead .stat-k {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  color: var(--body-mute);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.masthead .stat-v {
  font-family: var(--f-display);
  font-size: 1.9rem;
  font-weight: 500;
  color: var(--body);
  margin-top: 0.15rem;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------
   Ledger card — the signature component
   ---------------------------------------------------------- */

.ledger {
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
}
.ledger-dark {
  background: var(--ink-2);
  border-color: var(--ink-3);
  color: var(--text);
}
.ledger .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.65rem 0;
  border-bottom: 1px dashed var(--paper-3);
  font-family: var(--f-mono);
  font-size: 0.92rem;
}
.ledger-dark .row { border-bottom-color: var(--ink-3); }
.ledger .row:last-child { border-bottom: none; }
.ledger .row .k { color: var(--body-mute); letter-spacing: 0.01em; }
.ledger-dark .row .k { color: var(--text-mute); }
.ledger .row .v { color: var(--body); font-weight: 500; }
.ledger-dark .row .v { color: var(--text); }
.ledger .row .v.good { color: var(--forest); }
.ledger .row .v.bad  { color: var(--oxblood); }
.ledger .row .v.gold { color: var(--gold-ink); }
.ledger-dark .row .v.gold { color: var(--gold); }
.ledger .row.total {
  border-top: 2px solid var(--body);
  border-bottom: none;
  margin-top: 0.5rem;
  padding-top: 0.9rem;
  font-weight: 600;
  font-size: 1rem;
}
.ledger-dark .row.total { border-top-color: var(--gold); }

/* Receipt look: perforated edges */
.receipt {
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 2.25rem;
  position: relative;
  box-shadow: 0 1px 0 var(--paper-2), 0 10px 30px -20px rgba(14,22,32,0.25);
}
.receipt::before, .receipt::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 10px;
  background-image: radial-gradient(circle at 5px 5px, var(--paper) 4px, transparent 4.5px);
  background-size: 12px 10px;
  background-repeat: repeat-x;
}
.receipt::before { top: -5px; }
.receipt::after  { bottom: -5px; }

/* ----------------------------------------------------------
   Step cards
   ---------------------------------------------------------- */

.step-card {
  background: var(--paper);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.step-card:hover {
  border-color: var(--body);
  transform: translateY(-2px);
}
.step-number {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--gold-ink);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}
.step-number .n {
  font-family: var(--f-display);
  font-size: 2.4rem;
  color: var(--body);
  letter-spacing: -0.02em;
  font-weight: 500;
  line-height: 1;
}

.card {
  background: var(--paper);
  border: var(--hairline);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.card-title {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.card-content { color: var(--body-mute); font-size: 0.98rem; line-height: 1.6; }

/* ----------------------------------------------------------
   Ink section (dark)
   ---------------------------------------------------------- */

.ink {
  background: var(--ink);
  color: var(--text);
}
.ink h1, .ink h2, .ink h3, .ink h4 { color: var(--text); }
.ink .eyebrow { color: var(--gold); }
.ink p { color: var(--text-mute); }
.ink .btn { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.ink .btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.ink .btn-secondary { background: transparent; color: var(--text); border-color: var(--text-mute); }
.ink .btn-secondary:hover { background: var(--text); color: var(--ink); border-color: var(--text); }

/* ----------------------------------------------------------
   Income bars (little data viz)
   ---------------------------------------------------------- */

.bars { display: grid; gap: 0.75rem; }
.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  align-items: center;
  gap: 1rem;
  font-family: var(--f-mono);
  font-size: 0.82rem;
}
.bar-row .label { color: var(--body-mute); letter-spacing: 0.02em; }
.bar-row .bar {
  height: 14px;
  background: var(--paper-2);
  border: 1px solid var(--paper-3);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.bar-row .bar .fill {
  display: block;
  height: 100%;
  background: var(--gold);
}
.bar-row .bar .fill.ink { background: var(--ink); }
.bar-row .amt { text-align: right; color: var(--body); font-weight: 500; }

.ink .bar-row .label { color: var(--text-mute); }
.ink .bar-row .amt   { color: var(--text); }
.ink .bar-row .bar   { background: var(--ink-2); border-color: var(--ink-3); }
.ink .bar-row .bar .fill {
  background: var(--gold);
}
.ink .bar-row .bar .fill.ink { background: var(--paper); }

/* ----------------------------------------------------------
   Forms
   ---------------------------------------------------------- */

form.optin {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  max-width: 520px;
  margin: 0 auto;
}
form.optin input[type=email] {
  width: 100%;
  padding: 0.95rem 1.1rem;
  background: var(--paper);
  border: 1.5px solid var(--paper-3);
  border-radius: var(--radius);
  font-family: var(--f-body);
  font-size: 0.98rem;
  color: var(--body);
  outline: none;
  transition: border-color 0.2s;
}
form.optin input[type=email]:focus {
  border-color: var(--gold-ink);
}
.ink form.optin input[type=email] {
  background: var(--ink-2);
  border-color: var(--ink-3);
  color: var(--text);
}
.ink form.optin input[type=email]:focus { border-color: var(--gold); }

form.optin button {
  padding: 0.95rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
form.optin button:hover {
  background: var(--gold-ink);
  border-color: var(--gold-ink);
}
.ink form.optin button {
  background: var(--gold);
  color: var(--ink);
  border-color: var(--gold);
}
.ink form.optin button:hover {
  background: var(--paper);
  border-color: var(--paper);
}

.disclaimer {
  font-size: 0.82rem;
  color: var(--body-dim);
  line-height: 1.55;
  margin-top: 1rem;
  max-width: 520px;
}
.ink .disclaimer { color: var(--text-dim); }
.disclaimer a { color: var(--gold-ink); }

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */

footer.site {
  background: var(--ink);
  color: var(--text);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--ink-3);
}
footer.site h4 {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
footer.site ul { list-style: none; display: grid; gap: 0.55rem; }
footer.site a {
  color: var(--text-mute);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s;
}
footer.site a:hover { color: var(--gold); }
footer.site .bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--ink-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--f-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

/* ----------------------------------------------------------
   Portrait plate
   ---------------------------------------------------------- */

.portrait {
  position: relative;
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.92) contrast(1.02);
}
.portrait .plate {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(to top, rgba(14,22,32,0.9) 30%, rgba(14,22,32,0));
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}
.portrait .plate .name {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--paper);
}
.portrait .plate .loc { color: var(--gold); }

/* ----------------------------------------------------------
   Offer ladder
   ---------------------------------------------------------- */

.ladder {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}
.ladder .rung {
  background: var(--paper);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
}
.ladder .rung.feature {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.ladder .rung.feature h3 { color: var(--paper); }
.ladder .rung.feature .desc { color: var(--text-mute); }
.ladder .rung .tag {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-ink);
}
.ladder .rung.feature .tag { color: var(--gold); }
.ladder .rung .price {
  font-family: var(--f-display);
  font-size: 2.4rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.ladder .rung .price small {
  font-family: var(--f-mono);
  font-size: 0.82rem;
  color: var(--body-mute);
  margin-left: 0.25rem;
}
.ladder .rung.feature .price small { color: var(--text-mute); }
.ladder .rung .desc { color: var(--body-mute); font-size: 0.95rem; line-height: 1.55; }
.ladder .rung ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.ladder .rung li {
  font-size: 0.9rem;
  color: var(--body-mute);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}
.ladder .rung li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold-ink);
  font-weight: 600;
}
.ladder .rung.feature li { color: var(--text-mute); }
.ladder .rung.feature li::before { color: var(--gold); }
.ladder .rung .cta { margin-top: auto; padding-top: 1rem; }

/* ----------------------------------------------------------
   Exit intent modal
   ---------------------------------------------------------- */

.exit-intent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,22,32,0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.exit-intent-overlay.open { display: flex; }
.exit-intent-modal {
  background: var(--paper);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  padding: 2.5rem;
  position: relative;
}
.exit-intent-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--body-mute);
}
.exit-intent-title {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin-bottom: 0.75rem;
}
.exit-intent-heading {
  font-family: var(--f-display);
  font-size: 1.8rem;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}
.exit-intent-description {
  color: var(--body-mute);
  margin-bottom: 1.5rem;
}
.exit-intent-form {
  display: grid;
  gap: 0.5rem;
}
.exit-intent-form input {
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--paper-3);
  border-radius: var(--radius);
  font-family: var(--f-body);
  font-size: 0.95rem;
}
.exit-intent-form button {
  padding: 0.9rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: var(--radius);
  font-family: var(--f-body);
  font-weight: 600;
  cursor: pointer;
}

/* ----------------------------------------------------------
   Motion — Apple-grade
   Curves: entry (0.22, 1, 0.36, 1), precise (0.32, 0.72, 0, 1)
   Principle: slow, small, sharp. Nothing announces itself.
   ---------------------------------------------------------- */

:root {
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-precise: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-soft:   cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:    0.45s;
  --dur-med:     0.8s;
  --dur-slow:    1.1s;
}

/* Hero entry — subtle rise + blur clear. Runs once. */
.anim-rise {
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  filter: blur(6px);
  animation: rise var(--dur-slow) var(--ease-precise) forwards;
}
.anim-rise.d-1 { animation-delay: 0.08s; }
.anim-rise.d-2 { animation-delay: 0.22s; }
.anim-rise.d-3 { animation-delay: 0.38s; }
.anim-rise.d-4 { animation-delay: 0.54s; }
.anim-rise.d-5 { animation-delay: 0.70s; }
.anim-rise.d-6 { animation-delay: 0.86s; }

@keyframes rise {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
  }
}

/* Italic gold — underline sweeps, then a light sheen passes once */
h1 em {
  position: relative;
  background-image: linear-gradient(to right, var(--gold), var(--gold));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  padding-bottom: 3px;
  animation: sweep 1.1s var(--ease-precise) forwards;
}
h1 em:nth-of-type(1) { animation-delay: 1.1s; }
h1 em:nth-of-type(2) { animation-delay: 1.55s; }
h1 em:nth-of-type(3) { animation-delay: 2.0s; }

@keyframes sweep {
  0%   { background-size: 0% 2px; }
  100% { background-size: 100% 2px; }
}

/* Scroll reveal — blur-sharpen + tiny rise. Apple's signature. */
.reveal {
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  filter: blur(8px);
  transition:
    opacity var(--dur-med) var(--ease-precise),
    transform var(--dur-med) var(--ease-precise),
    filter var(--dur-med) var(--ease-precise);
  will-change: opacity, transform, filter;
}
.reveal.in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}

/* Stagger children when parent has .reveal-stagger */
.reveal-stagger > * {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  filter: blur(6px);
  transition:
    opacity 0.75s var(--ease-precise),
    transform 0.75s var(--ease-precise),
    filter 0.75s var(--ease-precise);
  will-change: opacity, transform, filter;
}
.reveal-stagger.in > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  filter: blur(0);
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.04s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.20s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.28s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.36s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.44s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 0.52s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 0.60s; }

/* Bar fills — widths come from inline styles on the spans. No animation. */

/* Card depth — slow, precise lift. No bounce. */
.card, .step-card, .ladder .rung {
  transition:
    transform 0.55s var(--ease-precise),
    border-color 0.4s var(--ease-soft),
    box-shadow 0.55s var(--ease-precise);
  will-change: transform;
}
.card:hover, .ladder .rung:hover, .step-card:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 24px 50px -28px rgba(14, 22, 32, 0.28);
}

/* Buttons — refined press */
.btn {
  transition:
    background 0.3s var(--ease-soft),
    color 0.3s var(--ease-soft),
    transform 0.3s var(--ease-precise),
    box-shadow 0.3s var(--ease-precise);
  will-change: transform;
}
.btn:hover { transform: translate3d(0, -1px, 0); }
.btn:active { transform: translate3d(0, 0, 0); transition-duration: 0.1s; }

/* Links — subtle underline draw */
a.inline, .hero-cta a.btn-secondary,
.card a, footer a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  transition: background-size 0.4s var(--ease-precise);
}
a.inline:hover, .card a:hover, footer a:hover {
  background-size: 100% 1px;
}

/* Sticky header: subtle on-scroll fade-in of depth + slight translucency */
header.site {
  transition:
    background 0.35s var(--ease-soft),
    border-color 0.35s var(--ease-soft),
    box-shadow 0.35s var(--ease-soft),
    backdrop-filter 0.35s var(--ease-soft);
}
header.site.scrolled {
  background: rgba(244, 239, 230, 0.82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(14, 22, 32, 0.06);
}
body.ink-header header.site.scrolled {
  background: rgba(14, 22, 32, 0.72);
}

/* Hero portrait — gentle parallax pull (set via JS --py) */
.portrait-frame[data-parallax] {
  transform: translate3d(0, var(--py, 0px), 0);
  transition: transform 0.1s linear;
  will-change: transform;
}

/* Gold sheen on italic em — one-time pass after sweep completes */
h1 em::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 240, 200, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-120%);
  pointer-events: none;
  animation: sheen 1.4s 2.6s var(--ease-soft) 1;
  mix-blend-mode: screen;
}
@keyframes sheen {
  to { transform: translateX(120%); }
}

/* Count-up uses tabular figures for steady width */
[data-countup], .stat-v { font-variant-numeric: tabular-nums; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .anim-rise, .reveal, .reveal-stagger > *, .bar-row .bar .fill, h1 em, h1 em::after {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    background-size: 100% 2px !important;
  }
}

/* ----------------------------------------------------------
   Book covers — editorial placeholders
   ---------------------------------------------------------- */

.book-grid { gap: 2.5rem; }

.book {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.75rem;
  align-items: start;
}

.book-cover {
  aspect-ratio: 2 / 3;
  background: var(--c1, #1a2330);
  color: var(--c2, #c9a84c);
  padding: 1rem 0.9rem;
  border: 1px solid rgba(0,0,0,0.25);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--f-display);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.06) inset,
    -3px 0 0 rgba(0,0,0,0.08) inset,
    0 12px 30px -18px rgba(14,22,32,0.35);
  position: relative;
  overflow: hidden;
}
.book-cover::before {
  content: "";
  position: absolute;
  left: 10px; top: 10px; right: 10px; bottom: 10px;
  border: 1px solid currentColor;
  opacity: 0.35;
  pointer-events: none;
}
.book-cover .bc-title {
  font-size: 1.1rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.book-cover .bc-author {
  font-family: var(--f-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.book-meta .book-author {
  font-family: var(--f-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-ink);
  margin: 0.35rem 0 0.9rem;
}
.book-meta .card-content { color: var(--body-mute); }

@media (max-width: 600px) {
  .book { grid-template-columns: 110px 1fr; gap: 1.25rem; }
  .book-cover .bc-title { font-size: 0.95rem; }
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */

@media (max-width: 960px) {
  .masthead .sub { grid-template-columns: 1fr; gap: 2rem; }
  .ladder { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  nav.primary { display: none; }
  nav.primary.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--paper);
    padding: 1.5rem;
    border-bottom: var(--hairline);
    gap: 1.25rem;
  }
  .hamburger { display: flex; }
  .bar-row { grid-template-columns: 100px 1fr 90px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 1.25rem; }
  .masthead { padding: 2rem 0; }
  .masthead h1 { font-size: clamp(2.2rem, 10vw, 3rem); }
  .masthead .ed-row { flex-wrap: wrap; gap: 0.5rem; }
  .masthead .lede { font-size: 1.05rem; }
  form.optin { grid-template-columns: 1fr; }

  /* Header */
  header.site { padding: 0.75rem 0; }
  .brand { font-size: 1rem; }
  .brand .mark { display: none; }
  .header-row { gap: 0.5rem; }

  /* Section spacing */
  .sec { padding: 3.5rem 0; }
  .sec h2 { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .section-title { margin-bottom: 2rem; }

  /* Cards */
  .card { padding: 1.5rem; }
  .card h3, .card-title { font-size: 1.1rem; }

  /* Bars */
  .bar-row { grid-template-columns: 1fr; gap: 0.35rem; }
  .bar-row .label { font-size: 0.7rem; }
  .bar-row .amt { text-align: left; }

  /* Ledger */
  .ledger .row { flex-wrap: wrap; gap: 0.25rem 0.75rem; padding: 0.9rem 0; }
  .ledger .k { font-size: 0.85rem; }
  .ledger .v { font-size: 0.9rem; }

  /* Portrait plate */
  .portrait .plate { flex-direction: column; align-items: flex-start; gap: 0.4rem; padding: 1rem; }

  /* Buttons */
  .btn, .btn-xl { width: 100%; justify-content: center; text-align: center; }
  .btn-xl { padding: 1rem 1.5rem; font-size: 1rem; }

  /* Footer */
  footer.site { padding: 2.5rem 0 1.5rem; }
  footer.site .grid-4 { gap: 1.75rem; }
  .bottom { flex-direction: column; gap: 0.5rem; align-items: flex-start; }

  /* Hide decorative figure blocks on small screens to save vertical space */
  .fig-block { aspect-ratio: 16/9; }

  /* Timeline / stack tightening */
  .timeline { gap: 1.5rem; }
  .stack { gap: 1rem; }

  /* Pull-quote */
  .pull { font-size: 1.1rem; padding-left: 1.25rem; }

  /* Exit intent */
  .exit-intent-overlay .inner { padding: 1.75rem; }
}
