/* Autohaku site. Reference: tally.so (centred headline, hand-drawn notes, the real product in a big window).
   White page, plum ink, rose only for actions and the hand-drawn marks. Fonts are self-hosted. */
@font-face { font-family: "Figtree"; src: url(fonts/Figtree-normal.woff2) format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Caveat"; src: url(fonts/Caveat.woff2) format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  color-scheme: light;
  --paper: #ffffff;
  --card: #ffffff;
  --ink: #2a1620;
  --text: #4a3640;
  --muted: #7a5864;
  --line: #ebe7e8;
  --rose: #b83e62;
  --rose-2: #d4607f;
  --rose-dark: #9e3253;
  --rose-soft: #f6d3dc;
  --shadow: 0 1px 2px rgba(91, 33, 52, 0.06), 0 30px 60px -30px rgba(91, 33, 52, 0.3);
  --wide: 976px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 "Figtree", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; border-radius: 6px; }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; height: 62px; padding: 0 20px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; text-decoration: none; }
.logo::before { content: ""; width: 26px; height: 26px; border-radius: 8px; background: url(icon.png) center / cover; }
.top-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lang { display: flex; gap: 2px; font-size: 14px; }
.lang a { padding: 4px 7px; border-radius: 6px; color: var(--muted); text-decoration: none; }
.lang a[aria-current] { color: var(--ink); font-weight: 700; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; background: var(--rose); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(91, 33, 52, 0.25); transition: background-color 0.15s ease, transform 0.15s ease; }
.btn:hover { background: var(--rose-dark); }
.btn:active { transform: scale(0.97); }
.btn-sm { height: 34px; padding: 0 13px; font-size: 14px; }
.btn-lg { height: 44px; padding: 0 18px; font-size: 16px; }
.btn svg { transition: transform 0.15s ease; }
.btn:hover svg { transform: translateX(2px); }

/* Hero */
.hero { position: relative; max-width: 1240px; margin: 0 auto; padding: 72px 20px 0; text-align: center; }
.hero h1 { position: relative; max-width: 900px; margin: 0 auto; font-size: clamp(38px, 5.6vw, 64px); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; }
.mark { position: relative; white-space: nowrap; }
.squiggle { position: absolute; left: 4%; right: 4%; bottom: -0.16em; width: 92%; height: 0.2em; color: var(--rose); }
.lead { position: relative; max-width: 600px; margin: 22px auto 30px; font-size: 21px; font-weight: 500; line-height: 1.3; color: var(--text); }
.note { position: relative; margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* Hand-drawn notes around the hero. Hidden where they would crowd the text. */
.doodles { position: absolute; inset: 0; pointer-events: none; }
.d { position: absolute; display: block; }
.dd { display: block; width: 100%; height: auto; overflow: visible; }
.dd text { font: 700 30px "Caveat", cursive; fill: var(--ink); }
.d1 { width: 104px; left: 5%; top: 150px; transform: rotate(-8deg); }
.d2 { width: 150px; right: 6%; top: 128px; transform: rotate(6deg); }
.d2 .dd text { font-size: 36px; fill: var(--rose); }
.dd text.t-sm { font-size: 21px; }
.d3 { width: 124px; left: -64px; top: 600px; transform: rotate(5deg); }
.d4 { width: 180px; right: -70px; top: 760px; transform: rotate(-5deg); }
.dash { position: absolute; width: 26px; height: 3px; border-radius: 3px; background: var(--rose-2); }
.k1 { left: 13%; top: 112px; transform: rotate(35deg); }
.k2 { right: 20%; top: 96px; width: 34px; background: var(--line); transform: rotate(-50deg); }
.k3 { left: 9%; top: 420px; transform: rotate(-30deg); background: var(--line); width: 40px; }
.k4 { right: 9%; top: 330px; transform: rotate(40deg); }
.k5 { left: 15%; top: 330px; transform: rotate(60deg); width: 18px; }
.k6 { right: 15%; top: 470px; transform: rotate(-20deg); width: 18px; background: var(--line); }

/* The window: real fills on real job forms (site/demo.js). A camera layer glides between fields. */
.window { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  position: relative; max-width: var(--wide); margin: 56px auto 0; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); overflow: hidden; text-align: left; }
.win-bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--line); background: #fafafa; }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e2e2; }
.url { flex: 1; max-width: 360px; min-height: 22px; margin: 0 auto; padding: 4px 12px; border-radius: 6px; background: #f0f0f0; font-size: 12.5px; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ext { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.ext b { width: 20px; height: 20px; border-radius: 6px; background: url(icon.png) center / cover; }
.win-body { position: relative; height: 600px; overflow: hidden; background: #fff; }
.win-body.film { height: auto; aspect-ratio: 976 / 600; }
/* The film carries its own browser window: drop ours. */
.has-film .win-bar { display: none; }
.has-film { border-radius: 16px; }
.win-body.film video { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-reduced-motion: reduce) { .win-body.film video { display: none; } .win-body.film { background: url(video/hero.jpg) center / cover; } }
.deck { position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s ease-out; }
.shown .deck { opacity: 1; }
.sheet { position: absolute; left: 0; top: 0; width: 1040px; transform-origin: 0 0; background: #fff; box-shadow: 0 0 0 1px rgba(42, 22, 32, 0.08), 0 30px 60px -20px rgba(42, 22, 32, 0.25); will-change: transform; }
.sheet.glide { transition: transform 0.75s var(--ease-in-out), opacity 0.5s ease-out; }
.pg { display: block; width: 1040px; max-width: none; height: auto; }
.pg.filled { position: absolute; left: 0; top: 0; clip-path: inset(0 0 calc(100% - var(--scan, 0px)) 0); }
/* The scan line: where Autohaku is writing right now. */
.scan { position: absolute; left: 0; right: 0; top: var(--scan, 0px); height: 2px; background: var(--ink); opacity: 0; transition: opacity 0.25s ease-out; pointer-events: none; }
.scan::before { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 90px; background: linear-gradient(rgba(42, 22, 32, 0), rgba(42, 22, 32, 0.06)); }
.scan b { position: absolute; left: 60px; top: -13px; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 700; }
.scan b::before { content: ""; width: 16px; height: 16px; border-radius: 5px; background: url(icon.png) center / cover; }
.scanning .scan { opacity: 1; }
.live { font-variant-numeric: tabular-nums; font-weight: 700; }

/* The add-on's popup, coded in its own look: white, rose only on the button. */
.pop { position: absolute; z-index: 2; top: 10px; right: 14px; width: 270px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px #e6e6e6, 0 24px 50px -18px rgba(42, 22, 32, 0.35); font-size: 12.5px; color: var(--ink); overflow: hidden; }
.pop-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 11px 13px 0; border-bottom: 1px solid #eee; }
.pop-h b { display: inline-flex; align-items: center; gap: 7px; padding-bottom: 9px; font-size: 14px; font-weight: 700; }
.pop-h b::before { content: ""; width: 18px; height: 18px; border-radius: 5px; background: url(icon.png) center / cover; }
.tabs { display: flex; gap: 11px; }
.tabs i { position: relative; padding-bottom: 9px; font-style: normal; font-size: 12px; color: #77706f; white-space: nowrap; }
.tabs i.on { color: var(--ink); font-weight: 600; }
.tabs i.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--rose); }
.fill { position: relative; display: grid; height: 38px; margin: 12px 13px 13px; place-items: center; border-radius: 9px; background: var(--rose); color: #fff; font-weight: 600; font-size: 13.5px; }
.fill > span { grid-area: 1 / 1; transition: opacity 0.18s ease-out; }
.fill .l-busy { opacity: 0; }
.busy .fill .l-idle { opacity: 0; }
.busy .fill .l-busy { opacity: 1; }
.clicked .fill { animation: press 0.28s var(--ease-out); }
@keyframes press { 40% { transform: scale(0.96); } }
.res-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.32s var(--ease-out); }
.res-in { min-height: 0; overflow: hidden; }
.result .res-wrap { grid-template-rows: 1fr; }
.res { margin: 0 13px 13px; padding: 12px; border: 1px solid #eee; border-radius: 10px; opacity: 0; transform: translateY(6px) scale(0.98); transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out); }
.result .res { opacity: 1; transform: none; }
.res > b { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.job { display: block; margin: 1px 0 9px; color: #77706f; font-size: 11.5px; }
.todo { padding: 7px 10px; border: 1.5px dashed var(--ink); border-radius: 8px; }
.todo b { font-weight: 700; }
.chk { margin: 8px 0 0; color: #77706f; font-size: 11.5px; }

/* Pointer that presses Fill. */
.cursor { position: absolute; z-index: 3; top: 0; left: 0; opacity: 0; transform: translate(420px, 360px); transition: opacity 0.2s ease-out, transform 0.8s var(--ease-in-out); pointer-events: none; }
.cursor-on .cursor { opacity: 1; }
.cursor-at .cursor { transform: translate(var(--cx), var(--cy)); }

.caption { position: relative; z-index: 1; margin: 0; padding: 12px 18px 14px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); text-align: center; }

/* Tested on */
.tested { max-width: var(--wide); margin: 56px auto 0; padding: 0 20px; text-align: center; }
.tested p { margin: 0 0 16px; font-size: 15px; color: var(--text); }
.tested ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 34px; margin: 0; padding: 0; list-style: none; }
.tested li { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; color: #b6a0a8; }

/* Sections */
.block { max-width: var(--wide); margin: 0 auto; padding: 120px 20px 0; }
.block h2, .end h2 { font-size: 36px; font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; }
.scribble { position: absolute; left: -2%; bottom: -0.12em; width: 104%; height: 0.32em; color: var(--rose-2); }
.sub { max-width: 560px; margin: 12px 0 0; font-size: 21px; font-weight: 500; line-height: 1.3; color: var(--text); }
.box { position: relative; padding: 24px 26px 26px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); box-shadow: 0 1px 2px rgba(91, 33, 52, 0.04); }
.box h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; letter-spacing: -0.015em; }
.box p { margin: 0; color: var(--text); }
.icon { display: inline-flex; margin-bottom: 14px; color: var(--rose); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 36px 0 0; padding: 0; list-style: none; }
.big { margin-top: 36px; border-color: var(--rose-2); box-shadow: 0 0 0 1px var(--rose-2), 0 1px 2px rgba(91, 33, 52, 0.04); }
.big h3 { font-size: 26px; color: var(--rose); letter-spacing: -0.025em; }
.big p { max-width: 620px; }
.meter { max-width: 360px; margin-top: 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.meter span { display: block; font: 700 26px/1 "Caveat", cursive; color: var(--ink); }
.bar { height: 7px; border-radius: 9px; background: var(--rose-soft); overflow: hidden; }
.bar i { display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--rose); }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

.end { max-width: var(--wide); margin: 0 auto; padding: 140px 20px 0; text-align: center; }
.end .sub { margin: 12px auto 28px; }

.faq h2 { margin-bottom: 18px; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 15px 2px; cursor: pointer; list-style: none; font-size: 15.5px; font-weight: 600; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: none; width: 8px; height: 8px; border-right: 1.8px solid var(--muted); border-bottom: 1.8px solid var(--muted); transform: rotate(-45deg); transition: transform 0.2s ease; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: -4px 2px 18px; max-width: 720px; color: var(--text); }
details a { color: var(--rose); }

footer { max-width: var(--wide); margin: 120px auto 0; padding: 32px 20px 48px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; font-size: 14px; color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer p { flex-basis: 100%; margin: 0; }

/* Documents (privacy, terms) */
.doc { max-width: 720px; margin: 0 auto; padding: 40px 20px 72px; }
.doc h1, .doc .doc-title { font-size: 40px; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 8px; }
.doc h2 { font-size: 21px; font-weight: 800; letter-spacing: -0.015em; margin: 36px 0 8px; }
.doc .meta { color: var(--muted); font-size: 15px; margin: 0 0 28px; }
.doc a { color: var(--rose); }
.doc ul { padding-left: 20px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 56px 0; }
.doc-page footer { margin-top: 0; justify-content: center; }
.doc-page footer .wrap { display: flex; gap: 20px; }

@media (max-width: 1420px) { .d3, .d4 { display: none; } }
@media (max-width: 1100px) {
  .d1 { left: -10px; }
  .d2 { right: -10px; }
  .k3, .k6 { display: none; }
}
@media (max-width: 860px) {
  .doodles { display: none; }
  .hero { padding-top: 44px; }
  .steps, .cards { grid-template-columns: 1fr; }
  .block { padding-top: 88px; }
}
@media (max-width: 560px) {
  .top .btn-sm { display: none; }
  .lead, .sub { font-size: 18px; }
  .hero .btn { width: 100%; max-width: 360px; }
  .window { margin-top: 40px; }
  .pop { top: auto; bottom: 10px; left: 10px; right: 10px; width: auto; opacity: 0; transform: translateY(16px); transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out); }
  .result .pop { opacity: 1; transform: none; }
  .tabs, .pop .fill { display: none; }
  .pop .res { margin-top: 8px; }
  .cursor { display: none; }
  .win-body { height: 470px; }
  .block h2, .end h2 { font-size: 30px; }
  .box { padding: 20px; }
  .big h3 { font-size: 22px; }
  .end { padding-top: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn svg, summary::after { transition: none; }
  .sheet, .deck, .res, .pop, .res-wrap { transition: none; }
}
