/* Otto — the sketchbook. Every page shares this sheet: cream paper, Otto's navy for type and
   line work, pen-blue handwriting in his voice, and one orange spark for the things you click. */
:root {
  --paper: #f4efe3;
  --paper-2: #ece5d4;
  --white: #fffdf8;        /* the whites of his eyes */
  --ink: #161c2e;          /* Otto's body */
  --ink-deep: #161c2e;
  --ink-soft: rgba(22, 28, 46, .64);
  --hair: rgba(22, 28, 46, .16);
  --pen: #2b3fa8;          /* the ballpoint he writes notes with */
  --spark: #ff5a1f;        /* the "!" over his head */
  --display: "Fredoka", "Avenir Next Rounded", "SF Pro Rounded", system-ui, sans-serif;
  --serif: var(--display); /* older pages ask for the serif; they get Otto's voice */
  --sans: "Geist", -apple-system, "Helvetica Neue", sans-serif;
  --mono: "Geist Mono", ui-monospace, monospace;
  --hand: "Nanum Pen Script", cursive;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --pop: cubic-bezier(.34, 1.56, .64, 1);
  --line: 2.5px solid var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--spark); color: var(--ink); }

/* Paper tooth over everything, very faint. */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .45; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .5 0 0 0 0 .4 0 0 0 .12 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: min(1248px, 100% - 64px); margin-inline: auto; }
.label { font: 400 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.hand { font-family: var(--hand); color: var(--pen); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 40; transition: background .5s var(--ease), box-shadow .5s var(--ease); }
.nav .wrap { display: flex; align-items: center; height: 84px; transition: height .5s var(--ease); }
.nav.paper { background: rgba(244, 239, 227, .94); backdrop-filter: saturate(1.2) blur(18px); -webkit-backdrop-filter: saturate(1.2) blur(18px); box-shadow: 0 1px 0 var(--hair); }
.nav.paper .wrap { height: 68px; }
.wordmark { display: flex; align-items: center; gap: 10px; font: 600 28px/1 var(--display); letter-spacing: -.02em; color: var(--ink); }
.wordmark img { width: 46px; height: auto; display: block; transition: transform .5s var(--pop); }
.wordmark:hover img { transform: rotate(-8deg) scale(1.06); }
.nav nav { margin-left: auto; display: flex; align-items: center; gap: 30px; font: 500 15px var(--sans); color: var(--ink); }
.nav nav a:not(.get):not(.gh) { position: relative; }
.nav nav a:not(.get):not(.gh)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: var(--spark); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav nav a:not(.get):not(.gh):hover::after, .nav nav a[aria-current]::after { transform: scaleX(1); }
.gh { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--ink); font: 500 14px var(--sans); color: var(--ink); transition: background .3s; }
.gh:hover { background: var(--white); }
.gh svg { width: 17px; height: 17px; }
.gh b { font: 500 12px var(--mono); padding-left: 9px; border-left: 1.5px solid var(--hair); }
.get { display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: var(--white); font: 600 16px var(--display); transition: transform .3s var(--pop), background .3s; }
.get:hover { transform: translateY(-2px) rotate(-2deg); }

/* ---------- Buttons: stickers you can press ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; height: 60px; padding: 0 30px; border-radius: 999px; background: var(--spark); color: var(--ink);
  border: var(--line); box-shadow: 5px 5px 0 var(--ink); font: 600 20px var(--display); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn svg { width: 17px; height: 17px; }
.cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.meta { font: 500 14px/1.6 var(--sans); color: var(--ink); }

/* ---------- Unsigned build: one Terminal line until notarisation ---------- */
.unlock { width: min(560px, 100%); margin-top: 30px; text-align: left; }
.unlock-note { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 8px; }
.unlock-note .hand { font-size: 25px; margin-right: 8px; }
.cmd { display: flex; align-items: center; gap: 14px; height: 50px; padding: 0 8px 0 16px; border: 2px solid var(--ink); border-radius: 14px; background: var(--white); }
.cmd .ps { font: 400 13px var(--mono); color: var(--ink-soft); }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; font: 400 13.5px var(--mono); color: var(--ink); scrollbar-width: none; }
.cmd button { flex-shrink: 0; height: 34px; padding: 0 14px; border: 0; border-radius: 9px; background: var(--ink); color: var(--white); font: 600 14px var(--display); cursor: pointer; transition: background .2s, transform .2s var(--pop); }
.cmd button:hover { transform: rotate(-3deg); }

/* ---------- Product in a Mac window, drawn into the notebook ---------- */
.window { border-radius: 18px; overflow: hidden; background: var(--white); border: var(--line); box-shadow: 10px 10px 0 var(--ink); }
.window .bar { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: var(--white); border-bottom: 2px solid var(--ink); }
.window .bar i { width: 13px; height: 13px; border-radius: 50%; border: 1.8px solid var(--ink); }
.window .bar i:first-child { background: var(--spark); }
.window img { width: 100%; aspect-ratio: 1280 / 820; object-fit: cover; }
.sticker { display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 12px; background: var(--white); border: var(--line); box-shadow: 4px 4px 0 var(--ink);
  font: 600 18px var(--display); color: var(--ink); transform: rotate(-4deg); }

/* ---------- Hand-drawn rule ---------- */
.rule { display: block; width: 100%; height: 14px; color: var(--ink); }
.rule path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; vector-effect: non-scaling-stroke; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.on { opacity: 1; transform: none; }

/* ---------- Footer: the valley in ballpoint, Otto asleep on it ---------- */
footer { position: relative; margin-top: 150px; }
.foot { position: relative; z-index: 2; }
.foot .wrap { display: flex; justify-content: space-between; align-items: flex-end; font: 28px/1.2 var(--hand); color: var(--ink); padding-bottom: 6px; }
.foot nav { display: flex; gap: 28px; }
.foot a:hover { color: var(--pen); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1.6px; }
.sketch { position: relative; height: 56vh; min-height: 420px; background: url(highfell-ink.jpg) 50% 78% / cover; }
.sketch::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--paper) 0%, rgba(244, 239, 227, 0) 42%); }
.otto-night { position: absolute; z-index: 2; left: 50%; top: 30%; width: 190px; height: auto; transform: translateX(-50%); }

@media (max-width: 900px) {
  .nav nav a:not(.get):not(.gh) { display: none; }
  .gh span { display: none; }
  .foot .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
  .foot nav { flex-wrap: wrap; gap: 6px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
