@font-face {
  font-family: "Caveat";
  src: url("fonts/caveat.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage";
  src: url("fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --paper: #f1f4f2;
  --ink: #0c2326;
  --muted: #4d6366;
  --rule: #cdd7d4;
  --link: #0b6666;
  --ring: #f08a3c;
  --pad: clamp(20px, 5vw, 64px);
  --pen: #b83a08;
  --pen-fill: #ffd23f;
  --grid: rgba(12, 35, 38, .055);
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1b1d;
    --ink: #eef3f1;
    --muted: #93a9ab;
    --rule: #20373a;
    --link: #62d3c9;
    --pen: #ffd23f;
    --grid: rgba(255, 255, 255, .045);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  color: var(--ink);
  font-family: "Bricolage", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; border-radius: 3px; }

/* ---------- hero: the wallpaper ---------- */
.hero {
  --hero-ink: #fff7ee;
  --hero-ink-soft: rgba(255, 247, 238, .82);
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0 var(--pad) clamp(24px, 5vh, 56px);
  overflow: hidden;
  background: radial-gradient(circle at 78% 22%, #f08a3c 0, #157878 38%, #0a3236 72%);
  color: var(--hero-ink);
}
.hero[data-ink="dark"] {
  --hero-ink: #0e2a2b;
  --hero-ink-soft: rgba(14, 42, 43, .78);
  --ring: #0e2a2b;
}
.hero > canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity .8s ease;
}
.hero > canvas.on { opacity: 1; }

.top, .hero-body { position: relative; z-index: 1; }
.top { display: flex; justify-content: flex-end; gap: 28px; padding-top: 28px; font-size: 1rem; }
.top a { color: var(--hero-ink); text-decoration: none; font-weight: 500; }
.top a:hover { text-decoration: underline; }

h1 {
  margin: 0;
  font-size: clamp(4rem, 19vw, 16rem);
  font-weight: 700;
  font-stretch: 90%;
  line-height: .86;
  letter-spacing: -.015em;
  margin-left: -.05em;
}
.tagline {
  margin: clamp(18px, 3vh, 32px) 0 0;
  max-width: 24em;
  text-wrap: balance;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.35;
  font-weight: 400;
  color: var(--hero-ink-soft);
}
.wall-ctl { margin-top: clamp(22px, 4vh, 40px); display: flex; align-items: center; flex-wrap: wrap; gap: 14px 18px; font-size: .95rem; color: var(--hero-ink-soft); }
.wall-ctl button {
  font: inherit; font-weight: 600; font-size: 1rem;
  color: var(--hero-ink);
  background: transparent;
  border: 2px solid currentColor;
  border-radius: 999px;
  padding: 10px 22px;
  cursor: pointer;
  min-height: 44px;
}
.wall-ctl button:hover { background: var(--hero-ink); color: var(--paper); }
.hero[data-ink="light"] .wall-ctl button:hover { color: #0a3236; }
.hero[data-ink="dark"] .wall-ctl button:hover { color: #f1f4f2; }

/* ---------- sections ---------- */
.block {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 5fr;
  column-gap: clamp(20px, 4vw, 64px);
  padding: clamp(56px, 10vw, 120px) var(--pad) 0;
  max-width: 1400px;
  margin: 0 auto;
}
.block + .block { padding-bottom: 0; }
h2 { margin: .35em 0 0; font-size: 1.125rem; font-weight: 700; color: var(--muted); }

.row { --h3: clamp(2.6rem, 7vw, 5.5rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(28px, 5vw, 72px); align-items: start; padding: 0 0 clamp(40px, 6vw, 80px); margin-bottom: clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--rule); }
.row:last-child { border-bottom: 0; margin-bottom: 0; }
.row header { margin-bottom: clamp(18px, 3vw, 32px); }
h3 {
  margin: 0;
  font-size: var(--h3);
  font-weight: 700;
  font-stretch: 88%;
  line-height: .98;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.kind { margin: .5em 0 0; font-size: 1rem; color: var(--muted); }
.text p { margin: 0 0 1em; max-width: 34em; text-wrap: pretty; }
.links { display: flex; flex-wrap: wrap; gap: 6px 26px; font-weight: 600; }

/* quiet app-window mockups */
.win {
  --win: #ffffff;
  background: var(--win);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 48px -28px rgba(12, 35, 38, .45);
}
@media (prefers-color-scheme: dark) { .win { --win: #112528; box-shadow: 0 24px 48px -28px rgba(0, 0, 0, .7); } }
.win .chrome { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--rule); font-size: .85rem; color: var(--muted); }
.win .chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.win .chrome span { margin: 0 auto; transform: translateX(-22px); font-weight: 600; }

.files { list-style: none; margin: 0; padding: 8px 18px 18px; }
.files li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 0; font-size: .95rem; }
.files li + li { border-top: 1px solid var(--rule); }
.files .n { font-weight: 600; }
.files .s { color: var(--muted); font-size: .85rem; align-self: center; }
.files b { grid-column: 1 / -1; display: block; height: 5px; border-radius: 3px; background: var(--rule); overflow: hidden; margin-top: 8px; }
.files u { display: block; height: 100%; width: 0; background: var(--link); border-radius: 3px; text-decoration: none; }
.win.go .files u { width: var(--w); transition: width 1.8s cubic-bezier(.2, .7, .2, 1); }
.win.still .files u { transition: none; }

.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 14px 14px 6px; }
.thumbs canvas { width: 100%; aspect-ratio: 16 / 10; border-radius: 6px; display: block; }
.win .foot { margin: 0; padding: 8px 16px 14px; font-size: .85rem; color: var(--muted); }

.prose p { max-width: 34em; margin: 0 0 1em; text-wrap: pretty; }
.prose .lead { font-size: clamp(1.5rem, 3.2vw, 2.2rem); line-height: 1.2; font-weight: 500; max-width: 20em; margin-bottom: 1em; text-wrap: balance; letter-spacing: -.01em; }

footer { max-width: 1400px; margin: 0 auto; padding: clamp(64px, 10vw, 120px) var(--pad) 40px; color: var(--muted); font-size: .95rem; }
footer p { margin: 0; }

::selection { background: var(--ring); color: #fff; }
section[id] { scroll-margin-top: 24px; }

.wall-ctl button.quiet { border-color: transparent; text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; padding-inline: 8px; }
.wall-ctl button.quiet:hover { background: transparent; color: var(--hero-ink); text-decoration-thickness: 2px; }
.hero[data-ink="light"] .wall-ctl button.quiet:hover, .hero[data-ink="dark"] .wall-ctl button.quiet:hover { background: transparent; color: var(--hero-ink); }

@media (max-width: 720px) {
  .block { grid-template-columns: 1fr; }
  h2 { margin: 0 0 20px; }
    .win .chrome span { transform: none; }
  .top { gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero > canvas { transition: none; }
  .win.go .files u { transition: none; }
}

/* keeps the text readable on busy wallpapers */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(to top, rgba(6, 18, 20, .55) 0, rgba(6, 18, 20, .25) 38%, transparent 62%);
}
.hero[data-ink="dark"]::after {
  background: linear-gradient(to top, rgba(246, 249, 248, .7) 0, rgba(246, 249, 248, .35) 38%, transparent 62%);
}

/* Driftwall tabs */
.win .tabs { display: flex; gap: 18px; padding: 10px 16px 0; font-size: .85rem; color: var(--muted); font-weight: 600; }
.win .tabs .on { color: var(--ink); box-shadow: 0 2px 0 var(--link); padding-bottom: 6px; }

/* PantryChef phone */
.win.phone { width: min(100%, 290px); padding: 9px; border-radius: 40px; }
.phone .screen { position: relative; border-radius: 32px; background: var(--paper); border: 1px solid var(--rule); padding: 34px 16px 18px; font-size: .9rem; }
.phone .island { position: absolute; top: 10px; left: 50%; width: 76px; height: 20px; margin-left: -38px; border-radius: 12px; background: var(--rule); }
.ph-title { margin: 6px 0 10px; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.ph-sub { margin: 16px 0 6px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.ph-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--win); border: 1px solid var(--rule); }
.ph-card b { display: block; line-height: 1.2; }
.ph-card small { color: var(--muted); font-size: .78rem; line-height: 1.3; display: block; margin-top: 2px; }
.ph-list { list-style: none; margin: 0; padding: 0; }
.ph-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.ph-list li + li { border-top: 1px solid var(--rule); }
.ph-list em { margin-left: auto; font-style: normal; color: var(--muted); font-size: .85rem; }
.dot { flex: none; width: 30px; height: 30px; border-radius: 50%; }
.ph-card .dot { width: 42px; height: 42px; }
.dot { background: radial-gradient(circle at 30% 26%, rgba(255,255,255,.75) 0, rgba(255,255,255,0) 42%), linear-gradient(145deg, var(--a), var(--b)); }
.t1 { --a: #ffb074; --b: #f08a3c; }
.t2 { --a: #ff9a82; --b: #ff5a45; }
.t3 { --a: #e2c4f3; --b: #a869d4; }
.t4 { --a: #fff3cf; --b: #f1d28c; }
.t5 { --a: #fffaf0; --b: #e6d9bd; }
.soon { font-weight: 500; color: var(--muted); }

/* ---------- apps: name and window share a line ---------- */
.row .shot { margin-top: calc(var(--h3) * .17); position: relative; }
.row.solo { grid-template-columns: minmax(0, 1fr); }
.shot .win.phone { width: min(100%, 290px); }

/* ---------- hand-drawn annotations ---------- */
.hand { font-family: "Caveat", "Segoe Print", "Bradley Hand", cursive; font-weight: 500; font-size: 1.7rem; line-height: 1; letter-spacing: .01em; display: inline-block; transform: rotate(-2deg); }
.ink { fill: none; stroke: var(--note-ink, var(--pen)); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ring .ink, .squig .ink { stroke-width: 2; }
.note { --note-ink: var(--pen); color: var(--pen); margin: 0; display: flex; align-items: flex-end; gap: 6px; pointer-events: none; }
.note .arr { flex: none; width: 82px; height: 49px; overflow: visible; }

/* below a window, arrow pointing up at it */
.note.below { flex-direction: column; align-items: flex-start; gap: 2px; margin: 6px 0 0 6%; max-width: 15em; }
.note.below .hand { transform: rotate(-1.5deg); }
.note.below.flip { margin-left: auto; margin-right: 6%; align-items: flex-end; text-align: right; }
.note.below.flip .arr { transform: scaleX(-1); }

/* beside the phone, arrow pointing left at it */
.note.side .arr-left { display: none; }
@media (min-width: 1100px) {
  .note.side { position: absolute; left: 316px; top: 84px; width: 150px; flex-direction: column; align-items: flex-start; gap: 4px; }
  .note.side .arr-left { display: block; width: 76px; height: 46px; }
  .note.side .arr-up { display: none; }
}
@media (max-width: 1099px) {
  .note.side { flex-direction: column; align-items: flex-start; margin: 6px 0 0 4%; max-width: 15em; }
}

/* greeting in About */
.note.greet { flex-direction: column; align-items: flex-start; gap: 0; margin: 0 0 6px 2px; }
.note.greet .arr { width: 52px; height: 45px; margin-left: 26px; }

/* circle around a word, underline under a phrase */
.circled, .squig { position: relative; display: inline-block; --note-ink: var(--pen); }
.circled { --note-ink: var(--hero-ink); }
.circled svg { position: absolute; left: -17%; top: -48%; width: 134%; height: 196%; overflow: visible; pointer-events: none; }
.squig svg { position: absolute; left: 0; bottom: -.3em; width: 100%; height: .5em; overflow: visible; pointer-events: none; }

/* hero note beside the buttons */
.hero .note { --note-ink: var(--hero-ink); color: var(--hero-ink); }
.hero-note { align-items: center; margin-left: 4px; }
.hero-note .arr { width: 70px; height: 42px; }
.wall-label { margin: 16px 0 0; font-size: .95rem; color: var(--hero-ink-soft); }
@media (max-width: 720px) { .hero-note { display: none; } }

/* the pens draw themselves once, when they scroll into view */
.armed .ink { stroke-dasharray: 1; stroke-dashoffset: 1; }
.armed.in .ink { stroke-dashoffset: 0; transition: stroke-dashoffset .9s cubic-bezier(.5, .1, .3, 1); }
.armed.in .ink.head { transition-delay: .75s; transition-duration: .4s; }
.armed .hand { opacity: 0; }
.armed.in .hand { opacity: 1; transition: opacity .5s ease .15s; }
.armed.circled.in .ink { transition-delay: .5s; transition-duration: 1s; }
.armed.hero-note.in .ink { transition-delay: 1.4s; }
.armed.hero-note.in .hand { transition-delay: 1.5s; }

/* buttons: a pill with an arrow in a coin */
.links { align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 7px 20px 7px 7px; border-radius: 999px; background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600; }
.btn .ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--pen-fill); transition: transform .2s ease; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: #1a1400; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { text-decoration: none; }
.btn:hover .ic { transform: translateX(3px); }

/* stacked layout */
@media (max-width: 900px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row .shot { margin-top: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .armed.in .ink, .armed.in .hand, .btn .ic { transition: none; }
}

/* ---------- hero doodle: a hand-drawn monitor showing the live wallpaper ---------- */
.doodle { --note-ink: var(--hero-ink); position: absolute; z-index: 1; right: var(--pad); top: clamp(76px, 13vh, 130px); width: clamp(290px, min(27vw, 58vh), 520px); aspect-ratio: 460 / 410; transform: rotate(2.2deg); }
.doodle .sketch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.doodle .ink.thin { stroke-width: 2; opacity: .75; }
.doodle .ink.fill { fill: var(--hero-ink); }
.doodle-screen { position: absolute; left: calc(100% * 64 / 460); top: calc(100% * 58 / 410); width: calc(100% * 332 / 460); height: calc(100% * 204 / 410); border-radius: 6px 8px 5px 7px; cursor: pointer; background: #0a3236; }
.doodle-screen.flash { animation: screen-in .7s ease; }
@keyframes screen-in { from { opacity: .15; } to { opacity: 1; } }
.doodle-note { position: absolute; right: -2%; top: 94%; flex-direction: row; align-items: flex-start; gap: 6px; width: 15em; justify-content: flex-end; text-align: left; }
.doodle-note .arr { width: 56px; height: 42px; flex: none; margin-top: -8px; transform: scaleX(-1); }
.doodle-note .hand { font-size: 1.55rem; line-height: 1.05; max-width: 8.5em; transform: rotate(-2deg); }
.armed .doodle-screen { opacity: 0; }
.armed.in .doodle-screen { opacity: 1; transition: opacity .8s ease .2s; }
.armed.doodle.in .ink { transition-duration: 1.2s; }
.armed.doodle.in .ink:nth-of-type(2) { transition-delay: .3s; }
.armed.doodle.in .ink:nth-of-type(n+3) { transition-delay: .6s; }
.armed.doodle.in .ink:nth-of-type(n+7) { transition-delay: 1.2s; }
.armed.doodle.in .ink.head { transition-delay: 1.9s; }
.armed.doodle.in .doodle-note .ink { transition-delay: 1.7s; }
.armed.doodle.in .doodle-note .hand { transition-delay: 1.9s; }
.armed .ink.fill { fill-opacity: 0; }
.armed.in .ink.fill { fill-opacity: 1; transition: stroke-dashoffset 1.2s ease 1.2s, fill-opacity .4s ease 2s; }
@media (max-width: 900px) { .doodle { top: 86px; width: min(62vw, 340px); } .doodle-note { display: none; } }
/* short landscape screens (phones turned sideways): no room for the drawing */
@media (max-height: 560px) and (orientation: landscape) { .doodle { display: none; } }
.wall-ctl button:disabled { opacity: .6; cursor: progress; }
