/* Kūhaku website: the design system, applied to a page. */
@font-face { font-family: "Inter"; src: url("fonts/InterVariable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono.ttf") format("truetype"); font-weight: 100 800; font-display: swap; }

:root { --bg:#f7f4f1; --fg:#111111; --muted:#666666; --faint:rgba(17,17,17,.08); --accent:#e0301e; --frame:#ffffff; }
html.night { --bg:#121212; --fg:#ececec; --muted:#9a9a9a; --faint:rgba(236,236,236,.09); --accent:#f0705a; --frame:#1b1b1b; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: "Inter", system-ui, sans-serif; font-weight: 300;
       -webkit-font-smoothing: antialiased; transition: background .6s, color .6s; }
a { color: inherit; }
em { font-style: normal; color: var(--fg); border-bottom: 1.5px solid var(--accent); }
::selection { background: var(--accent); color: var(--bg); }

/* --- the top line: marks left, time right (as on the home screen) --- */
.top { position: fixed; inset: 0 0 auto 0; height: 92px; display: flex; align-items: center; justify-content: space-between;
       padding: 0 clamp(20px, 4vw, 56px); z-index: 10; pointer-events: none; }
.top > * { pointer-events: auto; }
.marks { display: flex; gap: 6px; }
.mark { width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); transition: color .2s; }
.mark:hover { color: var(--fg); }
svg { fill: none; stroke: currentColor; stroke-width: 1.4; }
.mark svg { width: 18px; height: 18px; }
svg .hot { transition: stroke .35s; }
.on svg .hot, .mark:hover .hot, .app:hover .hot { stroke: var(--accent); }
.status { display: flex; align-items: center; gap: 26px; font-size: 13px; letter-spacing: .02em; color: var(--muted); }
.status b { font-weight: 400; color: var(--fg); font-variant-numeric: tabular-nums; }
.theme { border: 0; background: none; width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); cursor: pointer; padding: 0; }
.theme:hover { color: var(--fg); }
.theme svg { width: 18px; height: 18px; }

/* --- hero: the home screen itself --- */
.hero { min-height: 100vh; display: flex; align-items: center; justify-content: center; position: relative; padding: 120px 24px; }
.column { width: min(900px, 100%); display: flex; flex-direction: column; gap: 22px; }
.asked { margin: 0; font-size: 15px; color: var(--muted); min-height: 1.4em; opacity: 0; transition: opacity .5s; }
.answer { margin: 0 0 34px; font-size: clamp(24px, 3vw, 32px); line-height: 1.35; letter-spacing: -.01em; min-height: 2.7em;
          opacity: 0; transform: translateY(6px); transition: opacity .6s, transform .6s; }
.answer.show, .asked.show { opacity: 1; transform: none; }
.line-row { display: flex; align-items: center; gap: 18px; min-height: 44px; }
.line { width: 1.5px; height: 34px; background: var(--accent); flex-shrink: 0; }
.line.pulse, .line.breathe { animation: pulse 1.4s ease-in-out infinite; }
.ask { font-size: clamp(24px, 3.2vw, 30px); font-weight: 200; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; }
.ask .ph { color: var(--muted); opacity: .6; }
.ask .caret { display: inline-block; width: 1px; height: 1.1em; vertical-align: -0.15em; background: var(--accent); margin: 0 1px;
              animation: blink 1.1s steps(1) infinite; }
.ask.working .caret, .ask.working .ph { display: none; }
.ask.working #typed { color: var(--muted); opacity: .55; }
.menu { position: absolute; left: clamp(20px, 4vw, 56px); bottom: 36px; width: 44px; height: 44px; display: grid; place-items: center; }
.menu span { width: 22px; height: 2px; background: var(--accent); transition: width .25s; }
.menu:hover span { width: 30px; }
.scroll { position: absolute; bottom: 48px; left: 50%; transform: translateX(-50%); font-size: 12px; letter-spacing: .14em; color: var(--muted); opacity: .7; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .15 } }
@keyframes blink { 50% { opacity: 0 } }

/* --- sections --- */
main section { width: min(1100px, 100%); margin: 0 auto; padding: clamp(80px, 12vw, 160px) clamp(20px, 4vw, 40px) 0; }
.label { margin: 0 0 40px; font-size: 11px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
h1 { margin: 0 0 40px; font-size: clamp(38px, 6.4vw, 84px); line-height: 1.04; font-weight: 200; letter-spacing: -.035em; max-width: 14ch; }
h3 { margin: 0 0 10px; font-size: 22px; font-weight: 300; letter-spacing: -.01em; }
h3 span { font-size: 13px; color: var(--muted); letter-spacing: .02em; margin-left: 8px; font-weight: 300; }
p { margin: 0; }
.lead { font-size: clamp(19px, 2vw, 24px); line-height: 1.55; max-width: 34em; margin-bottom: 22px; }
.quiet { color: var(--muted); }
.wordmark { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; font-size: 22px; font-weight: 250; letter-spacing: .01em; margin-bottom: 48px; }
.wordmark i { width: 40px; height: 2.5px; background: var(--accent); }
.wordmark.small { flex-direction: row; gap: 10px; font-size: 14px; margin: 0; }
.wordmark.small i { width: 16px; height: 2px; }

/* how it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); }
.demo { height: 120px; display: flex; align-items: center; gap: 12px; padding: 0 22px; margin-bottom: 28px;
        background: var(--frame); box-shadow: 0 0 0 1px var(--faint); overflow: hidden; }
.d-line { width: 1.5px; height: 22px; background: var(--accent); flex-shrink: 0; }
.d-line.pulse { animation: pulse 1.4s ease-in-out infinite; }
.d-text { font-size: 16px; font-weight: 200; white-space: nowrap; }
.d-text.faint { color: var(--muted); opacity: .6; }
.d-answer { font-size: 17px; font-weight: 300; }
.steps p { color: var(--muted); line-height: 1.6; font-size: 16px; }

/* screens */
.frame { margin: 0; background: var(--frame); box-shadow: 0 0 0 1px var(--faint), 0 40px 100px rgba(0,0,0,.10); }
.frame img { display: block; width: 100%; height: auto; transition: opacity .35s; }
.tabs { display: flex; gap: 28px; margin: 26px 0 14px; }
.tabs button { border: 0; background: none; padding: 0 0 4px; font: inherit; font-size: 15px; color: var(--muted); cursor: pointer;
               border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s; }
.tabs button:hover { color: var(--fg); }
.tabs button.on { color: var(--fg); border-color: var(--accent); }
.caption { color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 40em; }

/* marks */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 50px; background: var(--faint); box-shadow: 0 0 0 1px var(--faint); }
.app { background: var(--bg); padding: 34px 26px 40px; transition: background .3s; }
.app svg { width: 46px; height: 46px; stroke-width: 1.1; margin-bottom: 34px; color: var(--fg); }
.app h3 span { display: block; margin: 6px 0 0; }
.app p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* gallery */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); }
.pair figure { margin: 0; }
.pair img { width: 100%; display: block; box-shadow: 0 0 0 1px var(--faint), 0 30px 80px rgba(0,0,0,.10); }
.pair figcaption { margin-top: 18px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.pair figcaption b { color: var(--fg); font-weight: 400; }

/* principles */
dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 50px clamp(30px, 6vw, 90px); }
dt { font-size: 22px; font-weight: 300; margin-bottom: 10px; position: relative; padding-left: 22px; }
dt::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 1.5px; background: var(--accent); }
dd { margin: 0; padding-left: 22px; color: var(--muted); line-height: 1.65; font-size: 16px; }

/* details */
.spec > div { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--faint); font-size: 16px; line-height: 1.7; }
.spec > div > span:first-child { color: var(--muted); font-size: 13px; letter-spacing: .06em; padding-top: 3px; }
.sw { display: inline-block; width: 11px; height: 11px; vertical-align: -1px; margin-right: 6px; box-shadow: 0 0 0 1px var(--faint); }

/* next */
.road { margin: 0; padding: 0; list-style: none; counter-reset: r; display: grid; gap: 4px; }
.road li { counter-increment: r; display: grid; grid-template-columns: 60px 1fr; padding: 22px 0; border-top: 1px solid var(--faint);
           font-size: clamp(17px, 1.8vw, 21px); line-height: 1.55; color: var(--muted); }
.road li::before { content: counter(r, decimal-leading-zero); font-size: 13px; letter-spacing: .1em; color: var(--muted); padding-top: 5px; }
.road b { color: var(--fg); font-weight: 400; }

/* end */
.end { text-align: left; padding-bottom: 160px !important; }
.end .line-row.big .line { height: 46px; }
.end .ask { font-size: clamp(32px, 5vw, 56px); color: var(--muted); }
.end .quiet { margin: 28px 0 0 20px; font-size: 15px; }

footer { display: flex; gap: 32px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 40px 20px 50px;
         border-top: 1px solid var(--faint); color: var(--muted); font-size: 13px; letter-spacing: .02em; }

/* gentle arrival of each section */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .8s, transform .8s; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .steps, .pair, dl { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr 1fr; }
  .spec > div { grid-template-columns: 1fr; gap: 6px; }
  .status span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* A single wide picture (Kansei). */
.wide { margin: 0; }
.wide img { width: 100%; display: block; box-shadow: 0 0 0 1px var(--faint), 0 30px 80px rgba(0,0,0,.10); }
.wide figcaption { margin-top: 18px; color: var(--muted); font-size: 15px; line-height: 1.6; max-width: 760px; }

/* Inner pages (/why, /about, one page per app): the same type in a narrower column. */
.doc section { width: min(760px, 100%); padding-top: clamp(140px, 16vw, 200px); }
.doc section:last-child { padding-bottom: 60px; }
.doc .lead { max-width: none; }
.doc .lead b { font-weight: 400; }
.doc h1 span { font-size: .32em; color: var(--muted); letter-spacing: .02em; font-weight: 300; margin-left: 10px; vertical-align: middle; }
.doc .label { margin-top: 70px; margin-bottom: 22px; }
.doc .wide { margin: 50px 0 10px; width: 100%; }
.big-mark { width: 54px; height: 54px; stroke-width: 1.1; color: var(--fg); margin-bottom: 30px; }
.open { margin: -6px 0 26px; padding-left: 22px; font-size: clamp(17px, 1.8vw, 21px); line-height: 1.7; color: var(--muted); }
.does, .keys, .inspire { margin: 0; display: grid; gap: 22px; }
.does dt, .inspire dt { font-size: 19px; font-weight: 400; margin-bottom: 6px; }
.does dd, .inspire dd { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; }
.keys { gap: 10px; }
.keys div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; font-size: 16px; }
.keys dt { font-family: "JetBrains Mono", monospace; font-size: 14px; }
.keys dd { margin: 0; color: var(--muted); }
.asks { display: grid; gap: 34px; }
.pair-ask .asked { opacity: 1; }
.pair-ask .said { font-size: clamp(21px, 2.4vw, 27px); line-height: 1.4; font-weight: 300; letter-spacing: -.01em; margin-top: 8px; }
.prevnext, .next-links { display: flex; justify-content: space-between; margin-top: 90px; font-size: 16px; color: var(--muted); }
.next-links { justify-content: flex-start; gap: 6px; margin-top: 50px; }
.prevnext a, .next-links a { color: var(--fg); text-decoration: none; border-bottom: 1.5px solid var(--accent); padding-bottom: 2px; }
.app a.app-link { color: inherit; text-decoration: none; display: block; }
.position { margin-top: 26px; font-size: 16px; color: var(--muted); }
.position a, .ending a, footer a { color: var(--fg); text-decoration: none; border-bottom: 1.5px solid var(--accent); }
.ending { margin-top: 30px; font-size: 16px; color: var(--muted); }
@media (max-width: 760px) { .keys div { grid-template-columns: 1fr; gap: 2px; } }
a.inline { color: var(--fg); text-decoration: none; border-bottom: 1.5px solid var(--accent); }

/* Drawings: thin lines in the text colour, one red line, the same rule as the marks. */
.draw { width: 100%; height: auto; display: block; fill: none; stroke: currentColor; stroke-width: 1.2; color: var(--fg); overflow: visible; }
.draw .hot, .pill .hot { stroke: var(--accent); stroke-width: 2; }
.draw .busy { opacity: .45; }
.draw text { fill: currentColor; stroke: none; font-family: Inter, sans-serif; }
.draw .ph { fill: var(--muted); font-size: 18px; font-weight: 200; }
.draw .cap { fill: var(--muted); font-size: 14px; }
.draw .node { font-size: 22px; font-weight: 300; }
.draw .node.s { font-size: 16px; fill: var(--muted); }
.draw.flow { margin-top: 70px; }
.draw.build { margin-top: 60px; stroke-width: .25; }
.draw.build .grid { stroke: var(--faint); stroke-width: .12; }
.draw.build .mk { stroke-width: .3; }
.draw.build .hot { stroke-width: .4; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 60px); }
.three .pill { width: 120px; height: 80px; fill: none; stroke: currentColor; stroke-width: 1.2; margin-bottom: 26px; }
.three p { color: var(--muted); line-height: 1.6; font-size: 16px; }
@media (max-width: 760px) { .three { grid-template-columns: 1fr; } }

/* The manifesto: numbered theses in large light type. */
.theses { list-style: none; counter-reset: t; margin: 0 0 40px; padding: 0; display: grid; gap: 28px; max-width: 46em; }
.theses li { counter-increment: t; display: grid; grid-template-columns: 56px 1fr; font-size: clamp(19px, 2vw, 24px); line-height: 1.5; color: var(--muted); }
.theses li::before { content: counter(t, decimal-leading-zero); font-size: 13px; letter-spacing: .1em; color: var(--accent); padding-top: .55em; }
.theses b { color: var(--fg); font-weight: 400; }

/* The first screen says what Kūhaku is before the demo talks. */
.hero .column { gap: 0; }
.kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 26px; }
.hero-title { margin: 0 0 20px; font-size: clamp(42px, 6.2vw, 88px); line-height: 1; font-weight: 300; letter-spacing: -.04em; max-width: none; }
.hero-sub { font-size: clamp(18px, 1.8vw, 23px); line-height: 1.45; max-width: 32em; margin-bottom: 40px; }
.demo-area { display: flex; flex-direction: column; gap: 22px; padding-left: 2px; }
.demo-area .answer { margin-bottom: 10px; min-height: 2.7em; font-size: clamp(19px, 2.1vw, 24px); }
.hero-foot { margin-top: 34px; font-size: 14px; color: var(--muted); letter-spacing: .01em; }
.hero { padding-top: 110px; padding-bottom: 90px; }

/* Download page */
.doc pre.cmd { font: 15px/1.6 "JetBrains Mono", monospace; background: var(--faint, rgba(17,17,17,.06)); padding: 14px 18px; margin: 6px 0 18px; overflow-x: auto; }
.doc .fine { margin-top: 70px; font-size: 14px; line-height: 1.6; color: var(--muted); }

/* Install: the call to action, the three steps, the installer, the one line */
.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 26px; margin-top: 46px; }
.get { display: inline-flex; align-items: center; gap: 16px; padding: 18px 30px 18px 24px; font-size: 19px; font-weight: 400;
  color: var(--bg); background: var(--fg); text-decoration: none; transition: transform .25s, box-shadow .25s; }
.get:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0,0,0,.14); }
.get-line { width: 1.5px; height: 22px; background: var(--accent); animation: breathe 1.4s ease-in-out infinite; }
.get.small { padding: 13px 22px 13px 18px; font-size: 16px; margin-top: 18px; }
.get.small .get-line { height: 17px; }
@keyframes breathe { 0%, 100% { opacity: 1 } 50% { opacity: .2 } }
.cta-note { font-size: 14px; color: var(--muted); }
.install h1, .new h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 300; letter-spacing: -.035em; line-height: 1.05; margin: 0 0 24px; }
.get-steps { list-style: none; padding: 0; margin: 60px 0 70px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.get-steps li { display: flex; flex-direction: column; gap: 10px; border-top: 1.5px solid var(--faint); padding-top: 22px; }

.get-steps .n { font-size: 12px; letter-spacing: .14em; color: var(--muted); }
.get-steps b { font-size: 24px; font-weight: 300; }
.get-steps span { color: var(--muted); line-height: 1.55; font-size: 16px; }
.get-steps .get { align-self: flex-start; }
.installer .frame img { transition: opacity .3s; }
.itabs { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 26px 0 12px; }
.itabs button { border: 0; background: none; padding: 0 0 4px; font: inherit; font-size: 15px; color: var(--muted); cursor: pointer; border-bottom: 1.5px solid transparent; }
.itabs button:hover { color: var(--fg); }
.itabs button.on { color: var(--fg); border-color: var(--accent); }
#icap { min-height: 3em; max-width: 46em; }
.also { margin-top: 70px; max-width: 760px; }
.also h3 { font-size: 24px; font-weight: 300; margin: 0 0 10px; }
.also p { color: var(--muted); line-height: 1.55; }
.cmd { display: flex; align-items: stretch; margin: 22px 0 8px; box-shadow: 0 0 0 1px var(--faint); background: var(--frame); }
.cmd code { flex: 1; padding: 16px 20px; font: 15px/1.5 "JetBrains Mono", monospace; overflow-x: auto; white-space: nowrap; }
.cmd button { border: 0; border-left: 1px solid var(--faint); background: none; color: var(--fg); font: inherit; font-size: 14px; padding: 0 22px; cursor: pointer; }
.cmd button:hover, .cmd button.done { color: var(--accent); }
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 54px 44px; margin-top: 60px; }
.news article { border-top: 1.5px solid var(--faint); padding-top: 20px; }
.news .when { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.news h3 { font-size: 22px; font-weight: 300; margin: 12px 0 10px; line-height: 1.25; }
.news p { color: var(--muted); line-height: 1.6; font-size: 16px; margin: 0; }
@media (max-width: 860px) { .get-steps, .news { grid-template-columns: 1fr; gap: 34px; } .get { font-size: 17px; } }

/* Download, everywhere: in the top bar and at the end of every page */
.topdl { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 13px; font-size: 13px; color: var(--bg);
  background: var(--fg); text-decoration: none; letter-spacing: .02em; transition: transform .2s; }
.topdl:hover { transform: translateY(-1px); }
.topdl .get-line { height: 13px; }
.getband { width: min(1100px, 100%); margin: 0 auto; padding: clamp(90px, 12vw, 150px) clamp(20px, 4vw, 40px) 40px; border-top: 1px solid var(--faint); margin-top: 80px; }
.doc .getband { width: min(760px, 100%); }
.getband-title { font-size: clamp(34px, 4.6vw, 58px); font-weight: 300; letter-spacing: -.035em; line-height: 1.05; margin: 0 0 18px; }
.getband-sub { font-size: clamp(17px, 1.7vw, 21px); line-height: 1.5; color: var(--muted); margin: 0; max-width: 34em; }
.getband .cta { margin-top: 34px; }
@media (max-width: 700px) { #date { display: none; } .topdl { padding: 7px 12px 7px 10px; } }
.doc section.getband, main section.getband { padding-top: 80px; margin-top: 90px; }
/* Install waits, folded away, until someone asks for it. */
section.install[hidden] { display: none; }
/* Inner pages: the way home, first in the top bar */
.top .home { color: var(--fg); text-decoration: none; margin-right: 18px; font-size: 15px; }
.top .home:hover i { width: 22px; }
.top .home i { transition: width .2s; }
