/* Penguin Ops: ink, cream, teal. Manrope for everything, Instrument Serif italic for the editorial lines. */

:root {
  --ink: #0f1a1f;
  --ink-2: #16242b;
  --ink-3: #1f3038;
  --cream: #f3efe6;
  --cream-2: #d9d3c6;
  --mute: #8a9ba3;
  --teal: #1fb8a6;
  --teal-2: #7fe3d6;
  --amber: #f2b544;
  --line: rgba(243, 239, 230, 0.12);

  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --gutter: clamp(16px, 5vw, 96px);
  --measure: 62ch;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-weight: 500;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--teal); color: var(--ink); }
:focus-visible { outline: 2px solid var(--teal-2); outline-offset: 3px; border-radius: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -60px; background: var(--teal); color: var(--ink); padding: 10px 16px; z-index: 100; font-weight: 800; }
.skip:focus { top: 12px; }

/* Type scale */
.display {
  font-weight: 800;
  font-size: clamp(2.6rem, 6.8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.display-2 {
  font-weight: 800;
  font-size: clamp(2rem, 4.6vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 20ch;
}
.display-3 {
  font-size: clamp(4rem, 16vw, 15rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.serif, em.serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.display .serif, .display-2 .serif { font-size: 1.08em; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 24px;
  border: 1px solid var(--cream-2);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  background: transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease-out), background 0.3s, color 0.3s, border-color 0.3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn-primary:hover { background: var(--teal-2); border-color: var(--teal-2); }
.btn-ghost:hover { border-color: var(--cream); }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-lg { padding: 18px 32px; font-size: 1.05rem; }

/* Progress bar (Forge style, bottom) */
.progress { position: fixed; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: var(--cream); transition: width 0.1s linear; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 18px var(--gutter);
  background: linear-gradient(to bottom, rgba(15,26,31,0.92), rgba(15,26,31,0.6) 70%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav .btn { justify-self: end; }
.nav, .nav a, .brand-text { transition: color 0.4s, fill 0.4s, border-color 0.4s, background 0.4s; }
body.nav-light .nav { background: linear-gradient(to bottom, rgba(243,239,230,0.94), rgba(243,239,230,0.7) 70%, transparent); }
body.nav-light .brand-text { fill: var(--ink); }
body.nav-light .nav-links a { color: var(--ink); }
body.nav-light .nav .btn { border-color: var(--ink); color: var(--ink); }
.brand { display: inline-block; width: 150px; }
.brand-mark { width: 150px; height: 32px; overflow: visible; }
.brand-text { font-family: var(--sans); font-weight: 800; font-size: 22px; fill: var(--cream); letter-spacing: -0.03em; }
.brand-loop, .brand-arrow { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; gap: 28px; font-size: 0.9rem; font-weight: 600; }
.nav-links a { text-decoration: none; color: var(--cream-2); position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--teal); transition: right 0.3s var(--ease-out); }
.nav-links a:hover::after { right: 0; }

/* Sections */
section { padding: clamp(80px, 12vw, 160px) var(--gutter); position: relative; }
.reveal { opacity: 0; transform: translateY(18px); filter: blur(6px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), filter 0.9s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; filter: none; }

/* Hero */
.hero {
  min-height: 100svh;
  display: grid; align-content: center;
  padding-top: 9vh; padding-bottom: 12vh;
  overflow: hidden;
}
.hero-loop {
  position: absolute; right: -12vw; top: 50%; transform: translateY(-50%);
  width: clamp(420px, 60vw, 900px); height: auto;
  pointer-events: none; z-index: 0;
}
.hero-loop path { fill: none; stroke: var(--teal); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; }
#loop-path { stroke-dasharray: 1700; stroke-dashoffset: 1700; }
#loop-head { stroke-dasharray: 100; stroke-dashoffset: 100; }
.hero-inner { position: relative; z-index: 1; max-width: 1100px; }
.hero-kicker { font-size: 0.95rem; color: var(--teal-2); font-weight: 600; margin-bottom: 28px; }
.hero h1 { max-width: 14ch; }
.hero .w { display: inline-block; opacity: 0; filter: blur(14px); transform: translateY(0.25em); transition: opacity 1.1s var(--ease-out), filter 1.1s var(--ease-out), transform 1.1s var(--ease-out); }
.fonts-ready .hero .w { opacity: 1; filter: blur(0); transform: none; }
.hero-sub { max-width: var(--measure); margin-top: 28px; color: var(--cream-2); font-size: 1.1rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero-proof {
  list-style: none; padding: 0; margin: 52px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  border-top: 1px solid var(--line); padding-top: 32px;
  max-width: 900px;
}
.hero-proof li { display: grid; gap: 6px; }
.hero-proof strong { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.hero-proof span { font-size: 0.9rem; color: var(--mute); max-width: 24ch; }
.hero-scroll { position: absolute; left: var(--gutter); bottom: 32px; width: 1px; height: 56px; background: var(--line); overflow: hidden; }
.hero-scroll span { display: block; width: 100%; height: 40%; background: var(--cream); animation: scrollcue 1.8s ease-in-out infinite; }
@keyframes scrollcue { 0% { transform: translateY(-100%); } 100% { transform: translateY(260%); } }

/* Calculator */
.audit { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.audit-head { max-width: 900px; margin-bottom: 56px; }
.audit-head p { margin-top: 20px; color: var(--cream-2); max-width: var(--measure); }
.audit-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.audit-form { display: grid; gap: 34px; }
.field { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: end; }
.field label { font-size: 0.95rem; color: var(--cream-2); max-width: 30ch; }
.field output { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.field input[type="range"] { grid-column: 1 / -1; width: 100%; appearance: none; -webkit-appearance: none; height: 24px; background: transparent; margin: 0; cursor: pointer; }
.field input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--teal) var(--p, 50%), var(--line) var(--p, 50%)); }
.field input[type="range"]::-moz-range-track { height: 2px; background: var(--line); }
.field input[type="range"]::-moz-range-progress { height: 2px; background: var(--teal); }
.field input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--cream); border: 4px solid var(--ink-2); margin-top: -10px; box-shadow: 0 0 0 1px var(--cream-2); transition: transform 0.2s; }
.field input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--cream); border: 4px solid var(--ink-2); box-shadow: 0 0 0 1px var(--cream-2); }
.field input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.2); }

.audit-result { position: sticky; top: 96px; }
.bars { display: grid; gap: 22px; }
.bar-label { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: 0.95rem; color: var(--cream-2); margin-bottom: 8px; }
.bar-label strong { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--cream); white-space: nowrap; }
.bar-track { height: 10px; background: var(--line); border-radius: 2px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; border-radius: 2px; transition: width 0.7s var(--ease-out); }
.fill-leak { background: var(--amber); opacity: 0.85; }
.bar-total { padding-top: 18px; border-top: 1px solid var(--line); }
.bar-total .bar-label { font-weight: 800; color: var(--cream); }
.bar-total .bar-label strong { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--amber); }
.bar-total .bar-track { height: 16px; }
.fill-total { background: var(--amber); }
.bar-gain .bar-label strong { font-size: clamp(1.6rem, 3vw, 2.2rem); color: var(--teal-2); }
.bar-gain .bar-track { height: 16px; }
.fill-gain { background: var(--teal); }
.audit-verdict { margin-top: 28px; font-size: 1.05rem; color: var(--cream-2); max-width: 52ch; }
.audit-verdict b { color: var(--cream); }
.audit-maths { margin-top: 20px; font-size: 0.9rem; color: var(--mute); }
.audit-maths summary { cursor: pointer; color: var(--cream-2); font-weight: 600; }
.audit-maths ul { padding-left: 18px; margin-top: 12px; display: grid; gap: 8px; }

.lead { margin-top: 40px; padding: 28px; border: 1px solid var(--line); background: var(--ink); border-radius: 6px; }
.lead-title { font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; }
.lead-sub { color: var(--cream-2); margin-top: 6px; font-size: 0.95rem; }
.lead-row { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.lead-row input { flex: 1 1 220px; padding: 14px 16px; border: 1px solid var(--cream-2); background: transparent; border-radius: 999px; min-width: 0; }
.lead-row input::placeholder { color: var(--mute); }
.lead-note { margin-top: 12px; font-size: 0.85rem; color: var(--mute); }
.lead-note.ok { color: var(--teal-2); }
.lead-note.err { color: var(--amber); }
.hp { position: absolute; left: -9999px; }

/* Problem */
.problem-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 64px; border-top: 1px solid var(--line); }
.problem-grid article { padding: 40px 40px 40px 0; border-bottom: 1px solid var(--line); }
.problem-grid article:nth-child(odd) { border-right: 1px solid var(--line); }
.problem-grid article:nth-child(even) { padding-left: 40px; }
.problem-grid h3 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15; max-width: 22ch; }
.problem-grid p { margin-top: 14px; color: var(--cream-2); max-width: 44ch; }

/* Offer */
.offer { background: var(--cream); color: var(--ink); }
.offer-kicker { color: var(--teal); font-weight: 800; margin-bottom: 20px; }
.offer-head p:not(.offer-kicker) { margin-top: 22px; max-width: var(--measure); color: #3d4a50; }
.offer-steps { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid rgba(15,26,31,0.15); }
.offer-step { padding: 36px; display: grid; gap: 18px; align-content: start; border-right: 1px solid rgba(15,26,31,0.15); }
.offer-step:last-child { border-right: 0; }
.step-num { font-family: var(--serif); font-style: italic; font-size: 2.2rem; color: var(--teal); line-height: 1; }
.offer-step h3 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.step-price { font-weight: 800; font-size: 1rem; margin-top: 6px; color: var(--ink); }
.step-price s { color: #7a8489; margin-right: 8px; font-weight: 600; }
.step-body p:not(.step-price) { margin-top: 12px; color: #3d4a50; font-size: 0.98rem; }
.step-keep { padding-top: 14px; border-top: 1px solid rgba(15,26,31,0.15); font-weight: 600; color: var(--ink) !important; }
.offer-cta { margin-top: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.offer .btn-primary { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.offer .btn-primary:hover { background: var(--teal); border-color: var(--teal); color: var(--ink); }
.offer-cta p { color: #3d4a50; max-width: 40ch; font-size: 0.95rem; }

/* Process, pinned stack */
.process { padding: 0; }
.process-stack { position: relative; }
.panel { position: sticky; top: 0; height: 100svh; display: grid; align-items: center; padding: 0 var(--gutter); background: var(--ink); border-top: 1px solid var(--line); }
.panel[data-step="2"] { background: var(--ink-2); }
.panel[data-step="3"] { background: var(--ink-3); }
.panel[data-step="4"] { background: var(--teal); color: var(--ink); }
.panel-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: end; max-width: 1400px; }
.panel-count { font-variant-numeric: tabular-nums; color: var(--mute); grid-column: 1 / -1; font-weight: 600; }
.panel[data-step="4"] .panel-count { color: rgba(15,26,31,0.6); }
.panel h3 { align-self: end; }
.panel p { max-width: 42ch; font-size: 1.1rem; color: var(--cream-2); align-self: end; padding-bottom: 0.5em; }
.panel[data-step="4"] p { color: var(--ink); }
.panel h3 { opacity: 0; transform: translateY(0.15em); filter: blur(12px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out), filter 1s var(--ease-out); }
.panel p { opacity: 0; transform: translateY(16px); transition: opacity 0.9s var(--ease-out) 0.15s, transform 0.9s var(--ease-out) 0.15s; }
.panel.in h3, .panel.in p { opacity: 1; transform: none; filter: none; }

/* Build */
.build-rows { margin-top: 64px; border-top: 1px solid var(--line); }
.build-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 32px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.build-row h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.build-row p { color: var(--cream-2); max-width: 54ch; }
.build-tools { margin-top: 32px; color: var(--mute); font-size: 0.95rem; }

/* Results */
.results { background: var(--ink-2); }
.results-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 64px; }
.stat strong { display: block; font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .arrow { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 0.5em; color: var(--mute); margin: 0 0.15em; }
.stat p { margin-top: 16px; color: var(--cream-2); max-width: 30ch; }
.quotes { margin-top: 80px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.quotes blockquote { padding: 36px 40px 36px 0; border-bottom: 1px solid var(--line); }
.quotes blockquote:nth-child(odd) { border-right: 1px solid var(--line); }
.quotes blockquote:nth-child(even) { padding-left: 40px; }
.quotes p { font-family: var(--serif); font-style: italic; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.3; }
.quotes footer { margin-top: 18px; font-size: 0.9rem; color: var(--mute); }

/* About */
.about-inner { max-width: 760px; }
.about p { margin-top: 24px; color: var(--cream-2); font-size: 1.1rem; }
.about-sig { font-family: var(--serif); font-style: italic; color: var(--teal-2) !important; font-size: 1.3rem !important; }

/* Fit */
.fit-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-top: 56px; border: 1px solid var(--line); }
.fit-col { padding: 36px; }
.fit-col:first-child { border-right: 1px solid var(--line); }
.fit-col h3 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; }
.fit-col:first-child h3 { color: var(--teal-2); }
.fit-col:last-child h3 { color: var(--amber); }
.fit-col ul { padding: 0; margin: 20px 0 0; list-style: none; display: grid; gap: 12px; color: var(--cream-2); }
.fit-col li { padding-left: 22px; position: relative; }
.fit-col li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 10px; height: 1px; background: currentColor; opacity: 0.6; }

/* Compare */
.compare { background: var(--ink-2); }
.table-wrap { margin-top: 56px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 760px; }
th, td { text-align: left; padding: 16px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { color: var(--mute); font-weight: 600; font-size: 0.85rem; }
tbody th { font-weight: 800; color: var(--cream); width: 18%; }
td { color: var(--cream-2); }
th:last-child, td:last-child { background: rgba(31, 184, 166, 0.08); color: var(--cream); font-weight: 600; }
thead th:last-child { color: var(--teal-2); }

/* FAQ */
.faq-list { margin-top: 56px; max-width: 860px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; padding: 26px 48px 26px 0; position: relative; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-weight: 400; font-size: 1.6rem; color: var(--mute); transition: transform 0.3s var(--ease-out); }
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--teal-2); }
.faq-list h3 { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; display: inline; }
.faq-list details p { padding: 0 0 28px; color: var(--cream-2); max-width: 64ch; }

/* Final */
.final { text-align: left; padding-bottom: clamp(100px, 14vw, 200px); }
.final h2 { max-width: 16ch; }
.final p { margin-top: 28px; color: var(--cream-2); max-width: var(--measure); font-size: 1.1rem; }
.final p b { color: var(--amber); }
.final-cta { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }

/* Footer */
.footer { padding: 56px var(--gutter) 64px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; font-size: 0.9rem; color: var(--mute); }
.footer-brand { font-weight: 800; font-size: 1.3rem; color: var(--cream); letter-spacing: -0.03em; margin-bottom: 10px; }
.footer nav { display: grid; gap: 10px; justify-items: start; }
.footer nav a { text-decoration: none; color: var(--cream-2); }
.footer nav a:hover { color: var(--teal-2); }
.footer-legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); }

/* Responsive */
@media (max-width: 1024px) {
  .audit-grid { grid-template-columns: 1fr; }
  .audit-result { position: static; }
  .offer-steps { grid-template-columns: 1fr; }
  .offer-step { border-right: 0; border-bottom: 1px solid rgba(15,26,31,0.15); }
  .offer-step:last-child { border-bottom: 0; }
  .panel-inner { grid-template-columns: 1fr; align-items: start; }
  .panel p { padding-bottom: 0; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .hero { padding-top: 10vh; }
  .hero-loop { right: -40vw; width: 120vw; opacity: 0.6; }
  .hero-proof { grid-template-columns: 1fr; gap: 20px; }
  .problem-grid, .quotes, .fit-cols, .results-grid { grid-template-columns: 1fr; }
  .problem-grid article, .quotes blockquote { padding-left: 0 !important; padding-right: 0 !important; border-right: 0 !important; }
  .fit-col:first-child { border-right: 0; border-bottom: 1px solid var(--line); }
  .build-row { grid-template-columns: 1fr; gap: 12px; }
  .footer { grid-template-columns: 1fr; }
  .field { grid-template-columns: 1fr; }
  .field output { font-size: 1.1rem; }
  .panel { height: auto; min-height: 70svh; padding-top: 64px; padding-bottom: 64px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero .w, .panel h3, .panel p { opacity: 1; transform: none; filter: none; transition: none; }
  .hero-scroll span { animation: none; }
  .bar-fill { transition: none; }
  #loop-path, #loop-head { stroke-dashoffset: 0; }
  .btn:hover { transform: none; }
}
