/* =========================================================
   Next Chapter Consulting — site styles
   Same type system as tupunapai.com (Nunito Sans),
   with a mono accent and a darker, techier palette.
   ========================================================= */

@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans-latin.woff2") format("woff2");
  font-weight: 200 1000; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/fonts/nunito-sans-latin-ext.woff2") format("woff2");
  font-weight: 200 1000; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  --ink: #0a0d12;
  --ink-2: #10151d;
  --panel: #151c26;
  --line: rgba(255,255,255,.09);
  --green: #099c4e;
  --mint: #3fe08f;
  --cyan: #5cc8f0;
  --paper: #f4f6f5;
  --paper-2: #e7ebe9;
  --text: #141a20;
  --muted: #5a6470;
  --white: #ffffff;
  --on-dark: #e9eef2;
  --on-dark-muted: rgba(233,238,242,.7);

  --fs-hero: clamp(2.3rem, 6vw, 4.5rem);
  --fs-h2: clamp(1.85rem, 3.8vw, 2.9rem);
  --fs-h3: 1.2rem;
  --fs-lede: clamp(1.1rem, 1.8vw, 1.3rem);
  --fs-body: 1.0625rem;
  --fs-small: .875rem;

  --section: clamp(72px, 10vw, 124px);
  --max: 1160px;
  --radius: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-body); line-height: 1.65; color: var(--text); background: var(--white);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }
h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -.01em; line-height: 1.3; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }
.section { padding: var(--section) 0; position: relative; }
.center { text-align: center; }
.lede { font-size: var(--fs-lede); line-height: 1.55; }
.muted { color: var(--muted); }
.mono, .eyebrow { font-family: "JetBrains Mono", ui-monospace, monospace; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em;
  font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green); margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.center .eyebrow::after { content: ""; width: 18px; height: 2px; background: currentColor; }
.dark { background: var(--ink); color: var(--on-dark); }
.dark .eyebrow { color: var(--mint); }
.dark .muted { color: var(--on-dark-muted); }
.paper { background: var(--paper); }
.head-block { max-width: 760px; margin: 0 auto 3.25rem; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--white); padding: 8px 14px; border-radius: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 1.5em; border-radius: 999px;
  font: inherit; font-weight: 800; font-size: 1rem; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: #0bb35a; box-shadow: 0 8px 30px rgba(9,156,78,.35); }
.btn-ghost { border-color: rgba(233,238,242,.4); color: var(--on-dark); }
.btn-ghost:hover { border-color: var(--on-dark); background: rgba(255,255,255,.06); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: #1b2430; }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row { justify-content: center; }
.arrow { transition: transform .15s ease; }
.btn:hover .arrow, .link:hover .arrow { transform: translateX(3px); }
.link { font-weight: 800; text-decoration: none; color: var(--green); display: inline-flex; gap: .4em; align-items: center; }
.dark .link { color: var(--mint); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: rgba(10,13,18,.94); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); color: var(--on-dark); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; padding-top: env(safe-area-inset-top); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--on-dark); }
.brand img { height: 45px; width: auto; }
.brand .mark { width: 36px; height: 36px; }
.brand .name { font-weight: 900; font-size: 1.12rem; letter-spacing: -.02em; line-height: 1; }
.brand .name small { display: block; font-family: "JetBrains Mono", monospace; font-weight: 500; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--mint); margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-weight: 700; font-size: .98rem; color: var(--on-dark); opacity: .78; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 2px; text-decoration-color: var(--mint); }
.nav .btn { opacity: 1; min-height: 42px; padding: 0 1.2em; color: var(--white); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; cursor: pointer; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; border: 1.5px solid rgba(233,238,242,.3); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary span, .menu summary span::before, .menu summary span::after { display: block; width: 20px; height: 2px; background: var(--on-dark); border-radius: 2px; position: relative; content: ""; }
.menu summary span::before { position: absolute; top: -6px; }
.menu summary span::after { position: absolute; top: 6px; }
.menu[open] summary span { background: transparent; }
.menu[open] summary span::before { top: 0; transform: rotate(45deg); }
.menu[open] summary span::after { top: 0; transform: rotate(-45deg); }
.menu .panel { position: absolute; right: 0; top: 56px; min-width: 240px; background: var(--white); border-radius: 16px; padding: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.menu .panel a { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; font-weight: 700; color: var(--ink); }
.menu .panel a:hover { background: var(--paper); }
.menu .panel a.cta { background: var(--green); color: var(--white); text-align: center; margin-top: 6px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 600px at 75% 30%, #0f2a1d 0%, transparent 60%), linear-gradient(180deg, #0a0d12 0%, #0b1118 100%); color: var(--on-dark); }
.hero .art { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photo { position: absolute; z-index: 1; right: max(3vw, calc((100vw - 1160px) / 2 + 10px)); bottom: 0; height: 90%; width: auto; filter: drop-shadow(0 20px 50px rgba(0,0,0,.55)); }
.hero::after { content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(transparent, #0b1118); pointer-events: none; }
.hero .hero-inner { position: relative; z-index: 2; padding-top: clamp(80px, 13vh, 150px); padding-bottom: clamp(90px, 15vh, 170px); }
.hero h1 { max-width: 14ch; font-size: clamp(2.3rem, 5.4vw, 4.1rem); margin-bottom: .45em; }
.hero h1 em { white-space: nowrap; font-style: normal; background: linear-gradient(90deg, var(--mint), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { max-width: 42ch; color: var(--on-dark-muted); margin-bottom: 2rem; }
.hero .stats { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 20px 34px; margin-top: 3.2rem; padding-top: 2rem; border-top: 1px solid var(--line); max-width: 680px; }
.hero .stats div { font-family: "JetBrains Mono", monospace; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--on-dark-muted); }
.hero .stats strong { white-space: nowrap; display: block; font-family: "Nunito Sans", sans-serif; font-size: 1.6rem; letter-spacing: -.02em; text-transform: none; color: var(--white); }
.pulse { animation: pulse 3.2s ease-in-out infinite; }
.pulse.d2 { animation-delay: 1.1s; } .pulse.d3 { animation-delay: 2.2s; }
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }
.flow { stroke-dasharray: 6 10; animation: flow 6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -160; } }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--paper-2); border-radius: var(--radius); padding: 30px 26px; display: flex; flex-direction: column; position: relative; text-decoration: none; transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease; }
a.card:hover { border-color: var(--green); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(10,13,18,.08); }
.card .icon { width: 52px; height: 52px; border-radius: 14px; background: var(--ink); display: grid; place-items: center; margin-bottom: 20px; }
.card .icon svg { width: 26px; height: 26px; }
.card h3 { color: var(--ink); }
.card p { color: var(--muted); font-size: 1rem; }
.card .tag { font-family: "JetBrains Mono", monospace; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: 12px; }
.card .more { margin-top: auto; padding-top: 16px; }
.card ul { list-style: none; padding: 0; margin: 4px 0 0; }
.card li { position: relative; padding-left: 22px; margin-bottom: 8px; color: var(--text); font-size: .98rem; }
.card li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 8px; height: 8px; border-radius: 2px; background: var(--green); }
.dark .card { background: var(--panel); border-color: var(--line); }
.dark .card h3 { color: var(--white); }
.dark .card p { color: var(--on-dark-muted); }
.dark .card li { color: var(--on-dark); }
.dark .card .icon { background: rgba(63,224,143,.1); }
.dark a.card:hover { border-color: var(--mint); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.dark .card .tag { color: var(--mint); }

/* ---------- Two-column ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.two-col.top { align-items: start; }

/* ---------- Portrait ---------- */
.portrait { position: relative; max-width: 460px; }
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; object-position: center bottom; border-radius: 22px; position: relative; z-index: 1; background: radial-gradient(70% 55% at 50% 38%, #1b5a3a 0%, #0f2a1d 55%, #0a0d12 100%); }
.portrait::before { content: ""; position: absolute; inset: 18px -18px -18px 18px; border: 2px solid var(--green); border-radius: 22px; }
.portrait .badge { position: absolute; z-index: 2; left: -12px; bottom: 26px; background: var(--ink); color: var(--white); border-radius: 14px; padding: 12px 16px; font-family: "JetBrains Mono", monospace; font-size: .75rem; letter-spacing: .06em; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.portrait .badge strong { display: block; font-family: "Nunito Sans", sans-serif; font-size: 1rem; letter-spacing: 0; }

/* ---------- Timeline (chapters) ---------- */
.chapters { list-style: none; margin: 0; padding: 0; position: relative; }
.chapters::before { content: ""; position: absolute; left: 23px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--green), var(--cyan)); }
.chapters > li { position: relative; padding-left: 76px; margin-bottom: 44px; }
.chapters > li:last-child { margin-bottom: 0; }
.chapters .num { position: absolute; left: 0; top: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--ink); color: var(--mint); border: 2px solid var(--green); display: grid; place-items: center; font-family: "JetBrains Mono", monospace; font-weight: 700; }
.chapters h3 { font-size: 1.45rem; color: var(--ink); }
.chapters .tag { font-family: "JetBrains Mono", monospace; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin-bottom: 6px; }
.chapters p { color: var(--muted); max-width: 62ch; }

/* ---------- Quote ---------- */
.quote blockquote { margin: 0 auto; max-width: 880px; font-size: clamp(1.45rem, 3vw, 2.2rem); font-weight: 800; line-height: 1.3; letter-spacing: -.015em; }
.quote blockquote::before { content: "“"; display: block; font-size: 5rem; line-height: .6; color: var(--mint); margin-bottom: .2em; }

/* ---------- CTA band ---------- */
.cta-band { position: relative; background: linear-gradient(120deg, #07361f 0%, #0a0d12 70%); color: var(--on-dark); overflow: hidden; }
.cta-band .wrap { position: relative; z-index: 1; }
.cta-band .muted { color: var(--on-dark-muted); }
.cta-band .eyebrow { color: var(--mint); }
.cta-band h2 { max-width: 18ch; }
.cta-band .contact-line { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-top: 1.6rem; font-family: "JetBrains Mono", monospace; font-size: .92rem; color: var(--on-dark-muted); }
.cta-band .contact-line a { color: var(--on-dark); text-decoration: none; }
.cta-band .contact-line a:hover { color: var(--mint); }

/* ---------- Page hero ---------- */
.page-hero { background: radial-gradient(900px 400px at 85% 0%, #0f2a1d 0%, transparent 60%), var(--ink); color: var(--on-dark); position: relative; overflow: hidden; }
.page-hero .wrap { padding-top: clamp(56px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 96px); position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); max-width: 20ch; }
.page-hero p { font-size: var(--fs-lede); max-width: 60ch; color: var(--on-dark-muted); }
.grid-bg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }

/* ---------- Prose ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.6rem; color: var(--ink); margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 1.08rem; color: #2d3640; }
.prose a { color: var(--green); font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.facts li { background: var(--white); border: 1px solid var(--paper-2); border-radius: 14px; padding: 20px; }
.facts strong { display: block; font-size: 1.7rem; letter-spacing: -.02em; color: var(--ink); line-height: 1.1; }
.facts span { font-size: .92rem; color: var(--muted); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.people li { background: var(--white); border: 1px solid var(--paper-2); border-radius: 14px; padding: 16px 18px; }
.people strong { display: block; color: var(--ink); }
.people span { color: var(--muted); font-size: .95rem; }
.steps-inline { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps-inline li { counter-increment: s; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; color: var(--on-dark); }
.steps-inline li::before { content: "0" counter(s); display: block; font-family: "JetBrains Mono", monospace; color: var(--mint); font-weight: 700; margin-bottom: 10px; }
.steps-inline strong { display: block; color: var(--white); font-size: 1.12rem; margin-bottom: 4px; }
.steps-inline span { color: var(--on-dark-muted); font-size: .98rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-dark-muted); padding: 64px 0 calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer .brand { margin-bottom: 18px; }
.site-footer h4 { color: var(--on-dark); font-family: "JetBrains Mono", monospace; font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1.2em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .7em; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--mint); }
.site-footer .legal { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 22px; font-size: var(--fs-small); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .hero-photo { height: 72%; opacity: .3; right: -40px; }
  .hero .stats { grid-template-columns: repeat(2, auto); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .nav { gap: 18px; }
}
@media (max-width: 860px) {
  .nav { display: none; }
  .menu { display: block; }
}
@media (max-width: 760px) {
  .hero-photo { display: none; }
  .grid-4, .grid-3, .grid-2, .steps-inline { grid-template-columns: 1fr; }
  .hero .btn-row .btn { flex: 1 1 100%; }
  .hero .stats { grid-template-columns: repeat(2, 1fr); gap: 22px 24px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .portrait { margin: 0 auto 28px !important; max-width: 320px; }
  .chapters > li { padding-left: 64px; }
  .brand .name { font-size: 1rem; }
}
