/* K3 "Kynä" — Tykky Design · ink-line storybook
   Palette strictly from tokens: Snow paper, Spruce ink, Frost wash, one Cloudberry spot. */

:root {
  --ink: var(--tykky-spruce);
  --paper: var(--tykky-snow);
  --wash: var(--tykky-frost);
  --spot: var(--tykky-cloudberry);
  --muted: var(--tykky-muted);
  --head-h: 76px;
  --gut: clamp(20px, 5.5vw, 96px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sketch-r: 14px 7px 12px 9px / 9px 12px 7px 14px;
  --paper-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .12 0 0 0 0 .23 0 0 0 0 .2 0 0 0 .028 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--paper-tex);
  color: var(--ink);
  font: 400 var(--tykky-body-mobile)/var(--tykky-body-lh) var(--tykky-font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
@media (min-width: 900px) { body { font-size: var(--tykky-body); } }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1.5px; }
p { margin: 0 0 1em; }
h1, h2, h3, .h4 { font-family: var(--tykky-font-heading); font-weight: 500; margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(var(--tykky-h1-mobile), 6.4vw, var(--tykky-h1)); line-height: var(--tykky-h1-lh); letter-spacing: var(--tykky-h1-ls); }
h2 { font-size: clamp(var(--tykky-h2-mobile), 4.4vw, var(--tykky-h2)); line-height: var(--tykky-h2-lh); letter-spacing: var(--tykky-h2-ls); }
h3 { font-size: clamp(var(--tykky-h4-mobile), 2vw, var(--tykky-h4)); line-height: var(--tykky-h4-lh); letter-spacing: -.01em; }
.h4 { font-size: clamp(20px, 1.7vw, 24px); line-height: 1.3; }
.caption, .eyebrow { font: 500 var(--tykky-caption)/var(--tykky-caption-lh) var(--tykky-font-body); letter-spacing: var(--tykky-caption-ls); text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 10px; text-decoration: none; font-weight: 500; }
.skip:focus { top: 12px; outline-color: var(--spot); }

.wrap { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--gut); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 12px 24px; border-radius: 10px;
  font: 500 17px/1.2 var(--tykky-font-body); text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--ink); color: var(--ink); background: transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}
.btn-primary { background: var(--spot); box-shadow: var(--tykky-shadow); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(30, 58, 50, .1), 0 8px 20px rgba(30, 58, 50, .1); }
.btn-primary:active { transform: none; box-shadow: none; }
.btn-ghost:hover { background: var(--wash); }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: 15px; }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 6' preserveAspectRatio='none'%3E%3Cpath d='M0 3 C60 1 120 5 200 3 S340 1 400 3' fill='none' stroke='%231E3A32' stroke-width='1.2' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center/100% 100% no-repeat; opacity: 0; transition: opacity .3s; }
.site-header.scrolled::after { opacity: .5; }
.header-in { display: flex; align-items: center; gap: 24px; height: var(--head-h); }
.brand { display: block; padding: 6px; margin-left: -6px; border-radius: 8px; flex: none; }
.brand img { height: 36px; width: auto; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a { display: block; padding: 10px 12px; font-size: 15px; font-weight: 500; text-decoration: none; border-radius: 8px; position: relative; }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; background: var(--ink); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; font-weight: 500; font-size: 15px; text-decoration: none; border-radius: 50%; border: 1.5px dashed var(--ink); }
.lang:hover { background: var(--wash); }
.menu-btn { display: none; }
.nav-cta { display: none; }
.menu-ico { width: 16px; height: 10px; border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; position: relative; transition: transform .2s; }
.menu-ico::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid currentColor; }
.nav.open .menu-ico { border-color: transparent; }
.nav.open .menu-ico::after { top: 2px; transform: rotate(45deg); }
.nav.open .menu-ico::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; border-top: 2px solid currentColor; transform: rotate(-45deg); }
@media (max-width: 1080px) {
  .nav ul { flex-wrap: wrap; }
  .js .menu-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); color: var(--ink); font: 500 15px/1 var(--tykky-font-body); cursor: pointer; }
  .js .menu-btn:hover { background: var(--wash); }
  .js .nav ul { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; padding: 8px var(--gut) 20px; background: var(--paper); border-bottom: 1.5px solid color-mix(in srgb, var(--ink) 30%, transparent); box-shadow: var(--tykky-shadow); }
  .js .nav.open ul { display: flex; }
  .js .nav a { font-size: 18px; padding: 12px 4px; border-bottom: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 0; }
  .js .nav a::after { display: none; }
  .js .nav-cta { display: block; margin-top: 12px; }
  .js .nav-cta a { display: flex; justify-content: center; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--spot); }
}
@media (max-width: 520px) { .header-actions .btn-sm { display: none; } .brand img { height: 32px; } :root { --head-h: 64px; } }

/* ---------- hand-drawn bits ---------- */
.illo { color: var(--ink); overflow: visible; }
.illo .ink-root { filter: url(#rough); }
.illo .i { fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.illo .t { stroke-width: 1.45; }
.illo .th { stroke-width: 3; }
.illo .h { stroke-width: 1.05; }
.illo .dash { stroke-dasharray: 3 6; }
.illo .body, .illo .paper { fill: var(--paper); }
.illo .dot { fill: currentColor; }
.illo .wash { fill: var(--wash); }
.illo .spot { fill: var(--spot); }
.illo .ftext { font: 600 7px/1 var(--tykky-font-body); fill: currentColor; letter-spacing: .06em; }
.illo .svgt { font: 500 23px/1 var(--tykky-font-heading); fill: currentColor; letter-spacing: -.01em; }

.uline { position: relative; white-space: nowrap; display: inline-block; }
.uline-svg { position: absolute; left: -3%; width: 106%; bottom: -.1em; height: .3em; color: var(--spot); pointer-events: none; }
.uline-svg .ink-root { filter: none; }
.uline-svg .th { stroke-width: 5; vector-effect: non-scaling-stroke; }
.uline-svg .t { stroke-width: 2.5; vector-effect: non-scaling-stroke; }
h2 .uline-svg { color: var(--ink); height: .26em; bottom: -.06em; }
h2 .uline-svg .th { stroke-width: 3; }

.note {
  font: italic 400 15px/1.35 var(--tykky-font-body); color: var(--muted);
  transform: rotate(-3deg); margin: 0;
}
.note-arrow { width: 72px; height: auto; color: var(--muted); }
.note-arrow .i { stroke-width: 1.6; }

/* sketch frame: double pen line with an uneven radius */
.sketch { position: relative; isolation: isolate; }
.sketch { border-radius: 12px; }
.sketch::before {
  content: ""; position: absolute; inset: -3px; z-index: 1; pointer-events: none;
  background: url("img/frame-1.svg") 0 0 / 100% 100% no-repeat;
}
.sketch:nth-child(3n+2)::before { background-image: url("img/frame-2.svg"); }
.sketch:nth-child(3n)::before { background-image: url("img/frame-3.svg"); }

/* ---------- HERO ---------- */
.hero { padding-block: clamp(20px, 3vw, 40px) clamp(40px, 5vw, 64px); }
.hero-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: center; min-height: min(calc(100svh - var(--head-h)), 860px); }
.hero-copy { grid-column: 1 / span 5; position: relative; z-index: 2; }
.hero-art { grid-column: 6 / span 7; margin: 0; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--ink); }
.coords { color: var(--muted); font-variant-numeric: tabular-nums; }
.coords::before { content: "×" / ""; margin-right: 12px; font-weight: 400; color: var(--muted); }
.hero h1 { margin: 6px 0 24px; font-size: clamp(var(--tykky-h1-mobile), 4.6vw, 70px); }
.lead { font-size: clamp(17px, 1.45vw, 20px); color: var(--ink); max-width: 34em; margin-bottom: 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px 16px; margin-bottom: 28px; }
.trust { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; color: var(--muted); }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust li::before { content: ""; width: 12px; height: 12px; flex: none; background: url("/brand/graphics/icons/icon-flake.svg") center/150% no-repeat; }
.trust small { font-size: inherit; }

.hero-canvas { position: relative; }
.hero-illo { width: 100%; height: auto; aspect-ratio: 760 / 600; max-height: calc(min(100svh, 960px) - var(--head-h) - 110px); margin-inline: auto; }
.nib { position: absolute; left: 0; top: 0; width: 22px; height: 36px; pointer-events: none; opacity: 0; transform-origin: 50% 100%; transition: opacity .3s; z-index: 3; }
.hero-canvas .note { position: absolute; z-index: 2; font-size: 15px; letter-spacing: .01em; color: var(--muted); text-shadow: 0 0 3px var(--paper), 0 0 6px var(--paper), 0 0 10px var(--paper); }
.note-cathedral { left: 33%; top: 5%; transform: rotate(-2deg); }
.note-lead { position: absolute; color: var(--muted); height: auto; }
.note-lead .i { stroke-width: 1.5; }
.note-cathedral .note-lead { left: -58px; top: 6px; width: 54px; }
.note-castle { left: 74%; top: 31%; transform: rotate(2.5deg); max-width: 9.5em; }
.note-castle .note-lead { left: 30%; top: 100%; width: 22px; }
.note-fori { left: 3%; top: 86%; display: flex; align-items: flex-start; gap: 6px; transform: rotate(-2deg); }
.note-fori .note-arrow { position: absolute; right: -58px; top: -46px; width: 64px; transform: scale(-1, -1) rotate(-8deg); }
.note-cast { left: 47%; top: 86%; transform: rotate(-3deg); }
.note-cast .note-arrow { position: absolute; left: 100%; top: -30px; width: 54px; transform: scale(-1, 1) rotate(-20deg); }
.art-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.art-cap { font-style: italic; }
.art-ctrl { display: flex; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); font: 500 14px/1 var(--tykky-font-body); cursor: pointer; }
.chip:hover { background: var(--wash); }
.chip[hidden] { display: none; }
.chip .i-play { display: none; }
.chip[aria-pressed="true"] .i-play { display: inline; }
.chip[aria-pressed="true"] .i-pause { display: none; }

/* drawing states (JS adds .pending / .washed / .done; without JS the drawing is simply there) */
.draw.pending .body { fill-opacity: 0; }
.draw .body { transition: fill-opacity .5s var(--ease); }
.draw.pending .wash, .draw.pending .spot, .draw.pending .dot, .draw.pending .paper:not(.body), .draw.pending .ftext { opacity: 0; }
.draw .wash, .draw .spot, .draw .dot, .draw .paper, .draw .ftext { transition: opacity .7s var(--ease); }
.draw.washed .wash, .draw.washed .spot, .draw.washed .dot, .draw.washed .paper, .draw.washed .ftext { opacity: 1; }
.draw.washed .dot { transition-duration: .3s; transition-delay: .1s; }
.hero-illo.washed .eye { transition-delay: .6s; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.12); } }
.alive .eye { transform-box: fill-box; transform-origin: center; animation: blink 5.5s infinite; }
.alive .cr:nth-of-type(2n) .eye { animation-duration: 7.3s; animation-delay: -2s; }
.alive .cr:nth-of-type(3n) .eye { animation-duration: 6.1s; animation-delay: -4s; }
.hero .note { transition: opacity .6s var(--ease); }
.hero.pending-notes .note { opacity: 0; }

/* after drawing: the world breathes (pausable) */
@keyframes fall { 0% { transform: translate(0, -14px); opacity: 0; } 12% { opacity: 1; } 50% { transform: translate(6px, 30px); } 88% { opacity: 1; } 100% { transform: translate(-2px, 74px); opacity: 0; } }
@keyframes ferry { 0%, 8% { transform: translate(0, 0); } 50%, 58% { transform: translate(-14px, -24px); } 100% { transform: translate(0, 0); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(1.6px); } }
.alive .snow .fl { animation: fall 9s linear infinite; }
.alive .snow .fl1 { animation-duration: 11s; animation-delay: -3s; }
.alive .snow .fl2 { animation-duration: 13s; animation-delay: -6s; }
.alive .snow .fl3 { animation-duration: 10s; animation-delay: -8s; }
.alive .fori { animation: ferry 26s ease-in-out infinite; transform-box: view-box; }
.alive .fori-move > * { animation: bob 3.2s ease-in-out infinite; }
.motion-paused .snow .fl, .motion-paused .fori, .motion-paused .fori-move > *, .motion-paused .eye, .motion-paused .snowfield-svg .fl, .offscreen .eye,
.offscreen .snow .fl, .offscreen .fori, .offscreen .fori-move > * { animation-play-state: paused; }

/* ---------- chapters ---------- */
.chapter { padding-block: clamp(44px, 5vw, 80px); position: relative; }
.ch-head { margin-bottom: clamp(28px, 3vw, 44px); max-width: 780px; position: relative; }
.ch-center { margin-inline: auto; text-align: center; }
.ch-num { position: relative; display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 14px; }
.ch-num .ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ch-num .ring-svg .i { stroke-width: 1.8; }
.ch-num b { font: 500 30px/1 var(--tykky-font-heading); position: relative; top: 1px; }
.ch-head h2 { margin-bottom: 20px; }
.ch-lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--muted); max-width: 40em; }
.ch-center .ch-lead { margin-inline: auto; }

/* chapter 1 — layers */
.layers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.card { padding: 20px 22px 24px; background: color-mix(in srgb, var(--paper) 70%, transparent); }
.card-illo { width: 100%; max-width: 220px; height: auto; aspect-ratio: 200 / 150; margin: 0 auto 10px; }
.card h3 { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.card .k { font: 500 13px/1 var(--tykky-font-body); letter-spacing: .04em; color: var(--muted); }
.card p { margin: 0; color: var(--ink); }
.layers li:nth-child(2)::before { transform: rotate(.6deg); }
.layers li:nth-child(3)::before { transform: rotate(-.5deg); }
.layers li:nth-child(4)::before { transform: rotate(.4deg); }
@media (max-width: 1000px) { .layers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .layers { grid-template-columns: 1fr; } }

/* chapter 2 — demo */
.chapter-demo { background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--wash) 28%, transparent) 20%, color-mix(in srgb, var(--wash) 28%, transparent) 80%, transparent); }
.demo-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.demo-art { grid-column: 1 / span 6; position: relative; }
.demo-art .illo { width: 100%; height: auto; aspect-ratio: 360 / 280; }
.note-demo { position: absolute; right: 2%; top: -4%; transform: rotate(3deg); }
.demo-copy { grid-column: 7 / span 6; padding-left: clamp(0px, 3vw, 48px); }
.demo-copy > p { font-size: clamp(17px, 1.4vw, 20px); }
.keep { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; padding: 20px 22px; margin-top: 28px; background: var(--paper); }
.keep .key-svg { width: 120px; height: auto; aspect-ratio: 140 / 70; }
.keep h3 { margin-bottom: 6px; }
.keep p { margin: 0; color: var(--muted); }

/* chapter 3 — prices */
.digi { display: grid; grid-template-columns: 1fr auto; gap: 16px 40px; align-items: center; padding: clamp(24px, 3vw, 40px); margin-bottom: clamp(24px, 3vw, 40px); background: var(--wash); }
.digi h3 { font-size: clamp(28px, 2.8vw, 40px); margin-bottom: 10px; }
.digi p:last-child { margin-bottom: 0; }
.digi-l { max-width: 44em; }
.digi-r { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.price-big { font: 500 clamp(48px, 5vw, 72px)/1 var(--tykky-font-heading); letter-spacing: -.02em; margin: 0; }
.plans { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.plan { padding: 28px 26px 26px; background: var(--paper); }
.plan h3 { margin-bottom: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.addon { font: 500 12px/1 var(--tykky-font-body); letter-spacing: .04em; text-transform: uppercase; border: 1.2px solid var(--ink); border-radius: 999px; padding: 5px 9px; }
.price { font: 500 clamp(30px, 2.6vw, 38px)/1.1 var(--tykky-font-heading); letter-spacing: -.015em; margin-bottom: 8px; }
.price .from { font-size: .55em; color: var(--muted); letter-spacing: 0; }
.price small { display: block; font: 400 14px/1.4 var(--tykky-font-body); color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.price-note { font-size: 15px; color: var(--muted); min-height: 3em; margin-bottom: 16px; }
.ticks { list-style: none; margin: 0; padding: 16px 0 0; border-top: 1.5px dashed color-mix(in srgb, var(--ink) 40%, transparent); }
.ticks li { position: relative; padding-left: 28px; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 14px; height: 9px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-48deg) skewX(-6deg); border-radius: 1px; }
.plan-start::before { transform: rotate(-.6deg); }
.tag { position: absolute; top: -34px; right: 8px; width: 150px; transform: rotate(6deg); transform-origin: 10% 50%; z-index: 2; }
.tag .tag-svg { width: 100%; height: auto; aspect-ratio: 220 / 96; color: var(--ink); overflow: visible; }
.tag span { position: absolute; inset: 0 0 0 20%; display: grid; place-items: center; font: 500 18px/1 var(--tykky-font-heading); letter-spacing: -.01em; color: var(--ink); }
.extras { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 32px; margin: clamp(32px, 4vw, 48px) 0 0; }
.extras div { padding-left: 30px; position: relative; }
.extras div::before { content: ""; position: absolute; left: 0; top: 3px; width: 20px; height: 20px; background: url("/brand/graphics/icons/icon-flake.svg") center/140% no-repeat; }
.extras dt { font: 500 18px/1.3 var(--tykky-font-heading); margin-bottom: 4px; }
.extras dd { margin: 0; color: var(--muted); font-size: 16px; }
.vat-note { margin: 28px 0 0; font: 500 13px/1.4 var(--tykky-font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-align: center; }
@media (max-width: 1000px) { .plans { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } .extras { grid-template-columns: 1fr; } .digi { grid-template-columns: 1fr; } .digi-r { align-items: flex-start; } }

/* chapter 4 — process */
.process-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.process-grid > .ch-head { grid-column: 1 / span 5; align-self: start; position: sticky; top: calc(var(--head-h) + 32px); }
.steps-wrap { grid-column: 7 / span 6; position: relative; }
.river-svg { position: absolute; left: 4px; top: 10px; bottom: 10px; width: 60px; height: calc(100% - 20px); color: var(--muted); }
.river-svg .i { vector-effect: non-scaling-stroke; }
.river-svg .ink-root { filter: none; }
.river-svg { width: 72px; left: -2px; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps li { display: grid; grid-template-columns: 68px 1fr; gap: 20px; padding: 14px 0 26px; }
.stone { width: 64px; height: 56px; display: grid; place-items: center; background: var(--paper); border: 1.8px solid var(--ink); border-radius: 52% 48% 46% 54% / 58% 55% 45% 42%; font: 500 24px/1 var(--tykky-font-heading); }
.steps li:nth-child(even) .stone { border-radius: 46% 54% 50% 50% / 50% 44% 56% 50%; }

.steps h3 { margin: 12px 0 6px; }
.steps p { margin: 0; color: var(--muted); }
.note-process { margin-top: 28px; display: flex; align-items: flex-end; gap: 8px; }
.note-process .note-arrow { width: 80px; order: 2; transform: rotate(-10deg); }
@media (max-width: 900px) { .process-grid > .ch-head, .steps-wrap { grid-column: 1 / -1; position: static; } .note-process { display: none; } }

/* chapter 5 — proof: pinned notes */
.notes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); }
.pin { padding: 30px 22px 22px; background: var(--paper); }
.pin::marker { content: none; }
.pin::after { content: ""; position: absolute; z-index: 2; top: -12px; left: 50%; width: 76px; height: 24px; margin-left: -38px; background: color-mix(in srgb, var(--wash) 85%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); transform: rotate(-4deg); }
.notes li:nth-child(odd)::before { transform: rotate(-1.2deg); }
.notes li:nth-child(even)::before { transform: rotate(.8deg); }
.notes li:nth-child(even) { margin-top: 10px; }

.pin .metric { font: 500 clamp(44px, 4vw, 60px)/1 var(--tykky-font-heading); letter-spacing: -.02em; margin: 6px 0 12px; }
.pin .metric-word { font-size: clamp(34px, 3vw, 44px); }
.pin p:not(.caption):not(.metric) { font-size: 16px; }
.pin p.role { font-size: 14px; color: var(--muted); font-style: italic; margin: 0; padding-top: 10px; border-top: 1.5px dashed color-mix(in srgb, var(--ink) 30%, transparent); }
@media (max-width: 1100px) { .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .notes { grid-template-columns: 1fr; } } 

/* chapter 6 — about */
.chapter-about { background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--wash) 28%, transparent) 18%, color-mix(in srgb, var(--wash) 28%, transparent) 82%, transparent); }
.about-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: center; }
.photo { grid-column: 1 / span 5; margin: 0 auto; position: relative; max-width: 360px; width: 100%; transform: rotate(-2deg); }
.photo .illo { width: 100%; height: auto; aspect-ratio: 300 / 360; }
.photo-old-figcaption { position: absolute; left: 0; right: 0; bottom: 30%; text-align: center; font: 500 var(--tykky-caption)/1.4 var(--tykky-font-body); letter-spacing: .04em; text-transform: uppercase; color: var(--ink); }
.about-copy { grid-column: 7 / span 6; }
.about-copy .big { font-size: clamp(19px, 1.7vw, 23px); line-height: 1.5; }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.facts li { font: italic 400 15px/1.3 var(--tykky-font-body); padding: 6px 14px; border: 1.3px dashed var(--ink); border-radius: 12px 6px 12px 6px; background: var(--paper); }


/* chapter 7 — faq */
.faq-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.faq-grid > .ch-head { grid-column: 1 / span 4; }
.faq { grid-column: 6 / span 7; }
.faq details { border-bottom: 1.5px solid color-mix(in srgb, var(--ink) 50%, transparent); }
.faq details:first-child { border-top: 1.5px solid color-mix(in srgb, var(--ink) 50%, transparent); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 64px; padding: 14px 4px; font: 500 clamp(19px, 1.6vw, 22px)/1.3 var(--tykky-font-heading); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 24px; height: 24px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12.3 3.6 C11.8 8 12.4 15 11.7 20.6 M3.4 11.8 C8 12.4 15.5 11.5 20.7 12.2' fill='none' stroke='%231E3A32' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center/100% no-repeat; transition: transform .35s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 4px 20px; margin: 0; color: var(--muted); max-width: 38em; }
@media (max-width: 900px) { .faq-grid > .ch-head, .faq { grid-column: 1 / -1; } }

/* chapter 8 — contact */
.contact-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.contact-copy { grid-column: 1 / span 5; }
.contact-copy > p { font-size: clamp(17px, 1.4vw, 20px); }
.reply { font-weight: 500; }
.mail a { font-weight: 500; }
.hello-svg { width: 100%; max-width: 360px; height: auto; aspect-ratio: 340 / 222; margin-top: 24px; }
.form-wrap { grid-column: 7 / span 6; padding: clamp(24px, 3vw, 40px); background: var(--wash); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 500; font-size: 16px; margin-bottom: 6px; }
.opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; font: 400 17px/1.4 var(--tykky-font-body); color: var(--ink); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 10px; padding: 12px 14px; min-height: 50px; }
.field textarea { resize: vertical; min-height: 96px; }
.field input::placeholder { color: var(--muted); opacity: 1; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.field [aria-invalid="true"] { border-width: 2.5px; }
.err { margin: 6px 0 0; font-size: 15px; font-weight: 500; }
.err::before { content: "× " / ""; }
.form-small { margin: 12px 0 0; font-size: 14px; color: var(--muted); text-align: center; }
.thanks h3 { margin-bottom: 10px; }
.thanks:focus { outline: none; }
/* v6: honeypot (hidden from people, visible to bots) + send error */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-fail { text-align: center; }
.form [type=submit][aria-busy=true] { opacity: .7; cursor: progress; }
@media (max-width: 900px) { .contact-copy, .form-wrap { grid-column: 1 / -1; } .demo-art, .demo-copy, .photo, .about-copy { grid-column: 1 / -1; } .photo { max-width: 320px; margin-inline: auto; } .hello-svg { max-width: 280px; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding: 0 0 32px; margin-top: clamp(112px, 12vw, 160px); position: relative; }
.parade-svg { width: 100%; height: clamp(90px, 10vw, 130px); color: var(--paper); margin-top: calc(clamp(90px, 10vw, 130px) * -0.8); position: relative; pointer-events: none; }
.site-footer { display: flow-root; }
.parade-svg .body { fill: var(--ink); }
.site-footer .illo .ink-root { filter: url(#rough); }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-top: 40px; padding-bottom: 32px; }
.f-brand img { height: 40px; width: auto; margin: 6px 0 18px; padding: 0; }
.motto { font: 500 clamp(22px, 2vw, 28px)/1.25 var(--tykky-font-heading); letter-spacing: -.01em; margin: 0; }
.f-nap p { margin: 0; line-height: 1.7; }
.f-links { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.f-links a { display: inline-block; padding: 4px 0; min-height: 32px; }
.site-footer a:focus-visible { outline-color: var(--spot); }
.f-legal { position: relative; padding-top: 20px; font-size: 14px; color: color-mix(in srgb, var(--paper) 82%, transparent); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.f-legal p { margin: 0; }
.f-legal::before { content: ""; position: absolute; top: 0; left: var(--gut); right: var(--gut); border-top: 1px solid color-mix(in srgb, var(--paper) 25%, transparent); }
@media (max-width: 800px) { .footer-in { grid-template-columns: 1fr; } }

/* ---------- mobile sticky CTA ---------- */
.sticky-cta { display: none; }
@media (max-width: 700px) {
  .sticky-cta { display: flex; position: fixed; right: 16px; bottom: 14px; z-index: 50; min-height: 48px; padding: 10px 20px; font-size: 16px; background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: var(--tykky-shadow); transform: translateY(160%); visibility: hidden; transition: transform .35s var(--ease), visibility 0s linear .35s; }
  .sticky-cta.show { transform: none; visibility: visible; transition: transform .35s var(--ease), visibility 0s; }
  .sticky-cta:focus-visible { outline-color: var(--spot); }
  body { padding-bottom: 0; }
  html { scroll-padding-bottom: 88px; }
  .site-footer { padding-bottom: 96px; }
}

/* ---------- scroll-in reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }


/* ---------- responsive hero ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; row-gap: 8px; }
  .hero-copy, .hero-art { grid-column: 1; }
  .hero-art { order: -1; }
  .hero-illo { max-height: 42svh; }
  .hero .note, .art-cap { display: none; }
  .art-bar { justify-content: flex-end; margin-top: 0; }
}
@media (max-width: 560px) {
  .hero { padding-top: 4px; }
  .hero h1 { margin-bottom: 16px; }
  .lead { margin-bottom: 20px; }
  .cta-row { gap: 10px; margin-bottom: 18px; }
  .cta-row .btn { padding-inline: 16px; font-size: 16px; }
  .trust { font-size: 14px; gap: 6px 16px; }
  .chip { min-height: 32px; font-size: 13px; padding: 4px 10px; }
  .keep { grid-template-columns: 1fr; }
  .tag { width: 140px; right: -6px; top: -22px; }
  .tag span { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .nib { display: none; }
}

/* ================= v2 additions ================= */
/* sketchbook margin rail (desktop): chapter numbers live in a ruled margin */
@media (min-width: 1200px) {
  .chapter > .wrap { position: relative; padding-left: calc(var(--gut) + 168px); }
  .chapter::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(max(0px, (100% - 1280px) / 2) + var(--gut) + 132px); width: 1px; background: color-mix(in srgb, var(--ink) 18%, transparent); box-shadow: 4px 0 0 color-mix(in srgb, var(--ink) 9%, transparent); pointer-events: none; }
}


/* small drawings in later chapters */
.step-illo { float: right; width: 110px; height: auto; margin: 0 0 6px 16px; }
#svg-tower-mini { width: 76px; }
.pin-illo { display: block; width: 88px; height: auto; margin: -4px 0 8px -4px; }
.reader-svg { width: 200px; max-width: 60%; height: auto; margin-top: 28px; }
@media (max-width: 900px) { .reader-svg { width: 140px; margin-top: 12px; } }

/* hero: click the drawing to replay */
.hero-canvas.replayable { cursor: pointer; }

/* contact: the paper plane flies when the form is sent */
@keyframes fly { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(140px, -90px) rotate(-12deg); opacity: 0; } }
.hello-svg .plane { transform-box: view-box; }
.hello-svg.sent .plane { animation: fly 1.6s var(--ease) forwards; }

/* ================= v3 ================= */
@media (max-width: 400px) {
  .header-in { gap: 8px; }
  .brand img { height: 28px; }
  .js .menu-btn { padding: 8px 12px; gap: 8px; }
  .lang { min-width: 40px; min-height: 40px; }
}
/* one left edge: the margin rail runs through the hero too */
@media (min-width: 1200px) {
  .hero { position: relative; }
  .hero > .wrap { position: relative; padding-left: calc(var(--gut) + 168px); }
  .hero::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(max(0px, (100% - 1280px) / 2) + var(--gut) + 132px); width: 1px; background: color-mix(in srgb, var(--ink) 18%, transparent); box-shadow: 4px 0 0 color-mix(in srgb, var(--ink) 9%, transparent); pointer-events: none; }
  .hero-copy { position: static; grid-column: 1 / span 6; }
  .hero-art { grid-column: 7 / span 6; }
  .hero .eyebrow { position: absolute; left: var(--gut); width: 116px; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 18px; }
  .hero .coords { font-size: 11.5px; letter-spacing: .02em; white-space: nowrap; }
  .hero .coords::before { display: none; }
  /* founder: the taped photo overlaps the rail like a pasted-in picture */
  .about-grid { align-items: start; }
  .photo { grid-column: 1 / span 5; margin: 8px 0 0; max-width: 380px; transform: rotate(-3deg); }
  .about-copy { grid-column: 6 / span 7; padding-top: 12px; }
}

/* ================= v4 ================= */
/* 4 + 6: sticky rail — numbered circle + short chapter label (+ margin note) */
.rail { grid-column: 1 / -1; margin-bottom: 18px; }
.rail-in { display: flex; align-items: center; gap: 14px; }
.rail .ch-num { margin: 0; flex: none; }
.rail-label { font: 500 var(--tykky-caption)/1.4 var(--tykky-font-body); letter-spacing: var(--tykky-caption-ls); text-transform: uppercase; color: var(--muted); }
.rail-note { display: none; }
.ch-center .rail-in { justify-content: center; }
@media (min-width: 1200px) {
  .rail { grid-column: auto; grid-row: auto; position: absolute; top: 0; bottom: 0; left: var(--gut); width: 124px; margin: 0; padding-top: clamp(44px, 5vw, 80px); padding-bottom: clamp(44px, 5vw, 80px); }
  .chapter > .wrap { padding-top: 0; }
  .rail-in { position: sticky; top: calc(var(--head-h) + 28px); flex-direction: column; align-items: flex-start; gap: 10px; }
  .ch-center .rail-in { justify-content: flex-start; }
  .rail .ch-num { width: 80px; height: 80px; }
  .rail .ch-num b { font-size: 36px; }
  .rail-note { display: block; font: italic 400 14px/1.4 var(--tykky-font-body); color: var(--muted); transform: rotate(-3deg); margin-top: 4px; }
  .chapter { padding-block: 0; }
  .chapter > .wrap { padding-block: clamp(44px, 5vw, 80px); }
  .layers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .layers .card { display: grid; grid-template-columns: 180px 1fr; gap: 6px 22px; align-items: center; }
  .layers .card-illo { grid-row: 1 / 3; margin: 0; }
  .layers .card h3 { align-self: end; }
  .layers .card p { align-self: start; }
}
.chapter > .wrap { position: relative; }
.notes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .notes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .notes { grid-template-columns: 1fr; } }
.ch-lead a { color: var(--ink); font-weight: 500; }

/* hero: the drawing alone, no labels */
.art-bar { justify-content: flex-end; }

/* 8. prices: CTA under the extras */
.extras-cta { margin-top: 28px; text-align: center; }

/* 9c. the river flows out into the sea */
.steps-wrap .river-svg { bottom: 10px; height: auto; } /* v6: no sea below the river any more */
.sea-svg { display: block; width: 100%; max-width: 600px; height: 170px; margin: 0 0 0 -3px; position: relative; z-index: 0; }
.sea-svg .ink-root { filter: none; }
.steps { z-index: 1; }
/* 9f. mobile: keep the river slim and behind the copy */
@media (max-width: 700px) {
  .steps li { grid-template-columns: 52px 1fr; gap: 14px; }
  .stone { width: 48px; height: 44px; font-size: 20px; }
  .steps-wrap .river-svg { width: 52px; left: -1px; opacity: .75; }
  .step-illo { width: 84px; }
  #svg-tower-mini { width: 60px; }
  .sea-svg { height: 150px; }
}

/* 10d. illustrated portrait */
.portrait-svg { width: 100%; height: auto; aspect-ratio: 300 / 360; }

/* 12. snow in the contact chapter */
.chapter-contact { position: relative; overflow: clip; }
.snowfield-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--ink); opacity: .5; z-index: 0; }
.snowfield-svg .ink-root { filter: none; }
.chapter-contact > .wrap { z-index: 1; }
.snow-on .snowfield-svg .fl { animation: fall 9s linear infinite; }
.snow-on .snowfield-svg .fl1 { animation-duration: 11s; animation-delay: -3s; }
.snow-on .snowfield-svg .fl2 { animation-duration: 13s; animation-delay: -6s; }
.snow-on .snowfield-svg .fl3 { animation-duration: 10s; animation-delay: -8s; }
.snow-toggle { margin-top: 8px; }
.chapter-contact.offscreen .snowfield-svg .fl { animation-play-state: paused; }

/* ================= v5 ================= */
/* 1. hero controls take their space from the first frame; only visibility changes */
.chip.off { visibility: hidden; }
.art-bar { min-height: 40px; }

/* 3. demo heading: shorter and lighter, the promise emphasised */
.h2-sm { font-size: clamp(30px, 3.2vw, 46px); line-height: 1.15; letter-spacing: -.015em; }
.h2-sm .em { display: block; font-style: normal; color: var(--ink); background: linear-gradient(transparent 62%, color-mix(in srgb, var(--spot) 55%, transparent) 62%, color-mix(in srgb, var(--spot) 55%, transparent) 92%, transparent 92%); width: fit-content; }
.demo-copy > p { max-width: 30em; }

/* 4. price cards: one playful wobble on hover / focus */
@keyframes wobble {
  0% { transform: none; }
  30% { transform: translateY(-4px) rotate(-1.2deg); }
  60% { transform: translateY(-5px) rotate(.8deg); }
  100% { transform: translateY(-4px) rotate(-.3deg); }
}
.plans .plan:hover, .plans .plan:focus-within { animation: wobble .55s var(--ease) forwards; }
@media (prefers-reduced-motion: reduce) { .plans .plan:hover, .plans .plan:focus-within { animation: none; } }

/* 5. process: river only on desktop, meanders wider */
.steps-wrap .river-svg { width: 100px; left: -18px; }
/* v5.1: river + sea only on full desktop (same breakpoint as the sticky rail); none on tablet or mobile */
@media (max-width: 1199.98px) {
  .steps-wrap .river-svg, .sea-svg { display: none; }
  .steps li { padding-bottom: 18px; }
}

/* 6. merged "who you'll work with" */
.chapter-about .about-copy { max-width: 46em; }
.chapter-about .about-copy .big { font-size: clamp(19px, 1.6vw, 22px); }
.li-link { margin: 8px 0 36px; }
.li-link a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 18px; border: 1.5px solid var(--ink); border-radius: 10px; font-weight: 500; text-decoration: none; background: var(--paper); }
.li-link a:hover { background: var(--wash); }
.chapter-about .facts { margin-top: 32px; }
.chapter-about .notes { margin-top: 8px; }

/* 7. contact snow: shared pause really stops it; never over text; none on mobile */
html.motion-paused .snowfield-svg .fl, html.motion-paused .hero-illo .snow .fl { animation-play-state: paused !important; }
.chapter-contact .rail-in, .chapter-contact .ch-head, .chapter-contact .contact-copy > p, .chapter-contact .snow-toggle { position: relative; z-index: 2; background: var(--paper); box-shadow: 0 0 0 10px var(--paper); border-radius: 2px; }
.chapter-contact .snow-toggle { box-shadow: 0 0 0 6px var(--paper); border-radius: 999px; }
.chapter-contact .form-wrap { z-index: 2; background: var(--wash); }
@media (max-width: 700px) {
  .snowfield-svg, .snow-toggle, .hero-illo .snow { display: none !important; }
}

/* 8. footer parade: whole creatures only, centred */
.parade-svg { display: block; width: min(880px, 100%); height: auto; aspect-ratio: 880 / 130; margin: calc(min(880px, 100vw) * -0.118) auto 0; overflow: visible; }
.parade-sm { display: none; }
@media (max-width: 600px) {
  .parade-svg:not(.parade-sm) { display: none; }
  .parade-sm { display: block; width: 300px; aspect-ratio: 400 / 130; margin-top: -78px; }
}
