@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --teal: #17414c; --teal-2: #0f2f37; --sand: #efe9dc; --sand-2: #e6ddcb;
  --grey: #8a8577; --grey-dark: #8fb0b4; --lime: #c6f432;
  --wrap: 1120px; --gutter: clamp(16px, 4vw, 40px);
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--sand); color: var(--teal); font: 300 18px/1.6 "Space Grotesk", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; line-height: 1.1; }
h2 { font-size: clamp(30px, 4.4vw, 52px); max-width: 18ch; margin-bottom: 48px; }
h3 { font-size: 20px; font-weight: 500; margin-bottom: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
section { padding: clamp(80px, 12vw, 150px) 0; }
.eyebrow { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; color: var(--grey); margin-bottom: 18px; }
.lead { font-size: clamp(19px, 2vw, 23px); max-width: 34ch; }

/* header */
.top { position: fixed; inset: 0 0 auto 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: 18px var(--gutter); background: color-mix(in srgb, var(--sand) 86%, transparent); backdrop-filter: blur(8px); }
.brand svg { height: 34px; width: auto; display: block; color: var(--teal); }
.top nav { display: flex; gap: 26px; align-items: center; font: 400 13px "JetBrains Mono", monospace; }
.top nav a { text-decoration: none; opacity: .8; }
.top nav a:hover { opacity: 1; }
.pill { border: 1px solid var(--teal); border-radius: 99px; padding: 7px 14px; opacity: 1 !important; }
@media (max-width: 760px) { .top nav a:not(.pill) { display: none; } }

/* hero */
.hero { --band: clamp(96px, 12vw, 150px); min-height: 100svh; display: flex; flex-direction: column; justify-content: center; position: relative; padding-top: 120px; overflow: hidden; }
.wave { position: absolute; left: 0; right: 0; top: 54%; width: 100%; height: var(--band); transform: translateY(-50%); pointer-events: none; overflow: visible; }
.wave path { fill: none; stroke: var(--teal); stroke-width: 1.6; vector-effect: non-scaling-stroke; opacity: .9; }
.hero-text { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); width: 100%; }
.hero h1 { font: 400 clamp(56px, 10vw, 136px)/0.95 "JetBrains Mono", monospace; letter-spacing: -0.04em; margin-bottom: var(--band); background: var(--sand); display: inline-block; padding-right: .2em; }
.hero .lead { background: var(--sand); }
.hero h1, .hero .lead, .cta-row { position: relative; }
.cta-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 34px; }
.hint { font-size: 12px; color: var(--grey); }
.scroll { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 11px; letter-spacing: .2em; color: var(--grey); }

.btn { display: inline-block; background: var(--teal); color: var(--sand); text-decoration: none; padding: 15px 24px; border-radius: 4px; font: 400 15px "JetBrains Mono", monospace; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); background: var(--teal-2); }
.btn.light { background: var(--sand); color: var(--teal); }
.btn.light:hover { background: #fff; }

/* chaos */
.chaos { background: var(--sand-2); }
.notes { list-style: none; padding: 0; display: grid; gap: 12px; max-width: 640px; }
.notes li { background: #fbf8f1; border: 1px solid #ddd3bf; padding: 14px 18px; font-size: 15px; box-shadow: 0 2px 0 rgba(23, 65, 76, .05);
  transition: transform 1.1s cubic-bezier(.2, .8, .2, 1), opacity 1.1s; }
.notes:not(.calm) li:nth-child(1) { transform: translate(12%, 6px) rotate(-4deg); }
.notes:not(.calm) li:nth-child(2) { transform: translate(38%, -4px) rotate(3deg); }
.notes:not(.calm) li:nth-child(3) { transform: translate(-6%, 8px) rotate(-2deg); }
.notes:not(.calm) li:nth-child(4) { transform: translate(24%, -10px) rotate(5deg); }
.notes:not(.calm) li:nth-child(5) { transform: translate(52%, 4px) rotate(-6deg); }
.notes:not(.calm) li:nth-child(6) { transform: translate(4%, -6px) rotate(2deg); }
.notes:not(.calm) li:nth-child(7) { transform: translate(30%, 10px) rotate(-3deg); }
.notes.calm li { transform: none; }
.notes.calm li:nth-child(n) { transition-delay: calc(var(--i, 0) * 70ms); }
.after { margin-top: 36px; font-size: 15px; opacity: 0; transform: translateY(8px); transition: opacity .8s .9s, transform .8s .9s; }
.after.show { opacity: 1; transform: none; }

/* how */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; padding-top: 34px; }
.steps::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 1.5px; background: var(--teal); }
.steps li { position: relative; }
.steps li::before { content: ""; position: absolute; top: -40px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--sand); border: 1.5px solid var(--teal); }
.steps .n { display: block; font-size: 12px; color: var(--grey); margin-bottom: 14px; }
.steps p { font-size: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* what */
.what { background: var(--teal); color: var(--sand); }
.what .eyebrow { color: var(--grey-dark); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(239, 233, 220, .25); }
.grid article { padding: 30px 28px 34px 0; border-bottom: 1px solid rgba(239, 233, 220, .25); }
.grid article p { font-size: 16px; color: #cfd9d8; max-width: 32ch; }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr; } }

/* why */
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.facts dt { font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.03em; margin-bottom: 10px; }
.facts dd { font-size: 16px; }
@media (max-width: 860px) { .facts { grid-template-columns: 1fr 1fr; } }

/* talk */
.talk { background: var(--teal); color: var(--sand); }
.calm-line { width: 100%; height: 20px; display: block; margin-bottom: 60px; }
.calm-line path { stroke: var(--sand); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.talk .lead { margin-bottom: 36px; color: #cfd9d8; }

footer { background: var(--teal-2); color: var(--grey-dark); padding: 26px 0; font-size: 12px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .notes li, .after { transition: none; }
}

/* phones: smaller scatter, vertical timeline */
@media (max-width: 520px) {
  .chaos { overflow: hidden; }
  .notes:not(.calm) li:nth-child(odd) { translate: -8% 0; }
  .notes:not(.calm) li:nth-child(1) { transform: translate(6%, 4px) rotate(-4deg); }
  .notes:not(.calm) li:nth-child(2) { transform: translate(14%, -4px) rotate(3deg); }
  .notes:not(.calm) li:nth-child(4) { transform: translate(10%, -8px) rotate(4deg); }
  .notes:not(.calm) li:nth-child(5) { transform: translate(18%, 4px) rotate(-5deg); }
  .notes:not(.calm) li:nth-child(7) { transform: translate(12%, 8px) rotate(-3deg); }
  .notes.calm li { translate: none; }
  .notes li { transition: transform 1.1s cubic-bezier(.2, .8, .2, 1), translate 1.1s cubic-bezier(.2, .8, .2, 1); }
  .steps { padding-top: 0; padding-left: 30px; gap: 36px; }
  .steps::before { top: 6px; bottom: 6px; left: 5px; right: auto; width: 1.5px; height: auto; }
  .steps li::before { top: 2px; left: -30px; }
}

.sub { font-size: 18px; max-width: 46ch; margin: -28px 0 44px; color: #3d5f67; }
.what .sub { color: #cfd9d8; }
.note { font-size: 12px; color: var(--grey); margin-top: 18px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

/* flow */
.track { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; margin-bottom: 40px; }
.track::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1.5px; background: #c9bfa9; }
.track::after { content: ""; position: absolute; left: 0; top: 7px; height: 1.5px; width: var(--progress, 0%); background: var(--teal); transition: width .7s cubic-bezier(.2, .8, .2, 1); }
.track button { display: block; width: 100%; text-align: left; padding: 28px 8px 0 0; font-size: 15px; position: relative; opacity: .55; transition: opacity .3s; }
.track button::before { content: ""; position: absolute; top: 2px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--sand); border: 1.5px solid #c9bfa9; transition: all .3s; z-index: 1; }
.track button span { display: block; font-size: 11px; color: var(--grey); margin-bottom: 4px; }
.track button.done { opacity: .8; }
.track button.done::before { border-color: var(--teal); background: var(--teal); }
.track button[aria-selected="true"] { opacity: 1; font-weight: 500; }
.track button[aria-selected="true"]::before { border-color: var(--teal); background: var(--lime); transform: scale(1.35); }
.flow-stage { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.doc { background: #fbf8f1; border: 1px solid #ddd3bf; padding: 26px 28px 30px; box-shadow: 0 18px 40px -24px rgba(23, 65, 76, .35); min-height: 230px; }
.doc header { display: flex; justify-content: space-between; font-size: 13px; color: var(--grey); margin-bottom: 18px; }
.doc .tag { background: var(--teal); color: var(--sand); padding: 2px 10px; border-radius: 99px; font-size: 12px; }
.doc h3 { font-size: 24px; font-weight: 400; margin-bottom: 12px; }
.doc p { font-size: 17px; max-width: 44ch; }
.doc.swap { animation: swap .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes swap { from { opacity: 0; transform: translateY(10px) rotate(-.6deg); } }
.label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--grey); margin-bottom: 14px; }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-height: 120px; align-content: flex-start; }
.chips li { font-size: 13px; padding: 6px 12px; border: 1px solid var(--teal); border-radius: 99px; animation: pop .45s cubic-bezier(.2, .8, .2, 1) both; }
.chips li.new { background: var(--teal); color: var(--sand); }
@keyframes pop { from { opacity: 0; transform: scale(.7); } }
.saved { font-size: 14px; margin-top: 18px; }
.saved b { font-weight: 500; color: var(--teal); }
@media (max-width: 860px) {
  .track { grid-template-columns: repeat(4, 1fr); row-gap: 22px; }
  .track::before, .track::after { display: none; }
  .flow-stage { grid-template-columns: 1fr; }
}

/* peek: app mock */
.peek { background: var(--sand-2); }
.app { background: #fbf8f1; border: 1px solid #d8ceb9; border-radius: 10px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(23, 65, 76, .45); }
.app-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; background: var(--teal); color: var(--grey-dark); font-size: 12px; }
.app-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(239, 233, 220, .25); }
.app-bar span { margin-left: 12px; }
.app-body { display: grid; grid-template-columns: 180px 1fr; min-height: 420px; }
.app-tabs { display: flex; flex-direction: column; padding: 16px 10px; gap: 4px; border-right: 1px solid #e6ddcb; font-size: 14px; }
.app-tabs button { text-align: left; padding: 10px 12px; border-radius: 6px; opacity: .7; }
.app-tabs button:hover { opacity: 1; background: #f1ebde; }
.app-tabs button[aria-selected="true"] { background: var(--teal); color: var(--sand); opacity: 1; }
.app-main { padding: 24px; display: grid; gap: 20px; align-content: start; }
.app-main.swap { animation: swap .45s cubic-bezier(.2, .8, .2, 1); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.kpi { border: 1px solid #e6ddcb; border-radius: 8px; padding: 14px 16px; }
.kpi small { display: block; font-size: 12px; color: var(--grey); }
.kpi b { font: 400 26px "JetBrains Mono", monospace; letter-spacing: -.02em; }
.kpi em { font-style: normal; font-size: 12px; color: #4f7f3a; margin-left: 6px; }
.kpi em.bad { color: #b0533c; }
.panel { border: 1px solid #e6ddcb; border-radius: 8px; padding: 16px; }
.panel h4 { font: 400 12px "JetBrains Mono", monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--grey); margin-bottom: 14px; }
.two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.bars div { flex: 1; background: var(--teal); border-radius: 3px 3px 0 0; height: 0; transition: height .8s cubic-bezier(.2, .8, .2, 1); position: relative; }
.bars div:last-child { background: var(--lime); }
.bars-x { display: flex; gap: 6px; font: 10px "JetBrains Mono", monospace; color: var(--grey); margin-top: 6px; }
.bars-x span { flex: 1; text-align: center; }
.rows { list-style: none; padding: 0; font-size: 14px; }
.rows li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #efe7d6; }
.rows li:last-child { border: 0; }
.rows .dot { width: 8px; height: 8px; border-radius: 50%; background: #c9a227; flex: none; margin-top: 7px; }
.rows .dot.red { background: #b0533c; }
.rows .dot.ok { background: #4f7f3a; }
.rows li > span:nth-child(2) { flex: 1; }
.rows .v { font-family: "JetBrains Mono", monospace; font-size: 13px; color: #3d5f67; white-space: nowrap; }
.meter { display: block; height: 6px; background: #efe7d6; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.meter i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.meter i.low { background: #b0533c; }
.funnel div { height: 30px; background: var(--teal); color: var(--sand); border-radius: 4px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; font-size: 13px; width: 0; transition: width .8s cubic-bezier(.2, .8, .2, 1); white-space: nowrap; overflow: hidden; }
@media (max-width: 760px) {
  .app-body { grid-template-columns: 1fr; }
  .app-tabs { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid #e6ddcb; padding: 10px; }
  .app-tabs button { white-space: nowrap; flex: 1; text-align: center; padding: 8px 4px; font-size: 12px; }
  .app-main { padding: 16px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .kpis .kpi:nth-child(3) { grid-column: 1 / -1; }
  .two { grid-template-columns: 1fr; }
  .kpi b { font-size: 22px; }
  .kpi em { display: block; margin: 2px 0 0; }
}

/* possibilities */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: -12px 0 36px; font-size: 13px; }
.filters button { border: 1px solid rgba(239, 233, 220, .4); border-radius: 99px; padding: 8px 16px; transition: all .25s; }
.filters button:hover { border-color: var(--sand); }
.filters button[aria-pressed="true"] { background: var(--lime); border-color: var(--lime); color: var(--teal); }
.caps { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(239, 233, 220, .25); }
.caps article { padding: 26px 24px 30px 0; border-bottom: 1px solid rgba(239, 233, 220, .25); transition: opacity .4s, transform .4s; }
.caps article h3 { font-size: 18px; position: relative; padding-left: 18px; }
.caps article h3::before { content: ""; position: absolute; left: 0; top: .45em; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--grey-dark); transition: all .3s; }
.caps article.on h3::before { background: var(--lime); border-color: var(--lime); }
.caps article p { font-size: 15px; color: #cfd9d8; max-width: 30ch; }
.caps article h3, .caps article p { transition: opacity .4s; }
.caps article.off h3, .caps article.off p { opacity: .22; }
@media (max-width: 1000px) { .caps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .caps { grid-template-columns: 1fr; } .caps article.off { display: none; } }

/* calculator */
.calc { background: var(--sand-2); }
.calc-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.sliders { display: grid; gap: 28px; background: #fbf8f1; border: 1px solid #ddd3bf; padding: 32px; }
.sliders label span { display: flex; justify-content: space-between; gap: 16px; font-size: 16px; margin-bottom: 10px; }
.sliders output { font-size: 18px; font-weight: 500; }
input[type=range] { width: 100%; accent-color: var(--teal); height: 28px; }
.result { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-top: 1px solid #e6ddcb; padding-top: 24px; }
.result b { display: block; font-size: clamp(30px, 4vw, 44px); font-weight: 400; letter-spacing: -.03em; }
.result span { font-size: 14px; color: var(--grey); }
@media (max-width: 860px) { .calc-grid { grid-template-columns: 1fr; gap: 10px; } .sliders { padding: 22px; } }

.foot a { text-decoration: none; }
@media (prefers-reduced-motion: reduce) {
  .doc.swap, .app-main.swap, .chips li { animation: none; }
  .bars div, .meter i, .funnel div, .track::after { transition: none; }
}

/* demo button + code dialog */
.demo-btn { font: 400 13px "JetBrains Mono", monospace; color: var(--teal); padding: 7px 14px; border-radius: 99px; background: var(--lime); }
.demo-btn:hover { background: #d4fb57; }
@media (max-width: 760px) { .top nav { gap: 10px; } }
dialog.demo { margin: auto; border: 0; padding: 0; background: var(--sand); color: var(--teal); width: min(440px, calc(100% - 32px)); box-shadow: 0 40px 80px -30px rgba(15, 47, 55, .55); }
dialog.demo::backdrop { background: rgba(15, 47, 55, .55); backdrop-filter: blur(3px); }
dialog.demo form { padding: 30px 28px 26px; display: grid; gap: 6px; }
dialog.demo h3 { font-size: 26px; font-weight: 400; margin: 0; }
.demo-help { font-size: 15px; color: #3d5f67; margin-bottom: 12px; }
#demo-code { font-size: 17px; padding: 14px 16px; border: 1.5px solid var(--teal); border-radius: 4px; background: #fbf8f1; color: var(--teal); width: 100%; }
#demo-code:focus { outline: 2px solid var(--lime); outline-offset: 2px; }
.demo-err { min-height: 20px; font-size: 12px; color: #b0533c; }
.demo-row { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }
.demo-cancel { font-size: 13px; padding: 10px; opacity: .7; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
