/* hodoapps.com: the house page. Colours, space and easing come from tokens.css (vendored by
   scripts/sync.mjs); nothing here is a hex. Density: spacious (DESIGN.md §4.2). */

@font-face {
  font-family: "Manrope";
  src: url("/fonts/Manrope-wght.woff2") format("woff2-variations"), url("/fonts/Manrope-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* Each page wears one hue, set by data-app on <html>: the house is gold, an app page its own.
   The hue marks links (where an allowed pair exists), focus and checked boxes, nothing else.
   The primary button is ink: the text/surface pair, reversed. */
:root {
  --hue: var(--gold);
  --link: var(--gold-text);
  --focus-ring: color-mix(in oklch, var(--hue) 70%, transparent);
  --wrap: 1120px;
  --gutter: var(--space-4);
  --section: var(--space-8);
  --clip-wash: color-mix(in oklch, var(--clip) var(--wash), transparent);
  --clip-mark: color-mix(in oklch, var(--clip) 22%, transparent);
}

html[data-app="clip"] { --hue: var(--clip); --link: var(--clip-text); --focus-ring: color-mix(in oklch, var(--clip) 60%, transparent); }
html[data-app="notes"] { --hue: var(--notes); --link: var(--text); --focus-ring: color-mix(in oklch, var(--notes) 60%, transparent); }
html[data-app="tasks"] { --hue: var(--tasks); --link: var(--tasks-text); --focus-ring: color-mix(in oklch, var(--tasks) 60%, transparent); }

@media (min-width: 720px) {
  :root { --gutter: var(--space-7); --section: var(--space-9); }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: auto; scroll-padding-top: var(--space-9); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: var(--weight-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
p, h1, h2, h3, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }

a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.sr, .hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 50;
  padding: var(--space-2) var(--space-4);
  background: var(--surface-raised);
  color: var(--text);
  border-radius: 6px;
}
.skip:focus { top: var(--space-4); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Line icons: hodoclip's style. 24 grid, 1.75 stroke, round, currentColor. */
.i {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i-lg { width: 24px; height: 24px; }

/* ---- Type ---------------------------------------------------------------------------- */

h1 {
  font-size: clamp(2.5rem, 1.5rem + 4vw, 4rem);
  line-height: 1.04;
  font-weight: var(--weight-heading);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.875rem, 1.4rem + 1.8vw, 2.625rem);
  line-height: 1.12;
  font-weight: var(--weight-heading);
  letter-spacing: -0.028em;
  text-wrap: balance;
}

h3 {
  font-size: 17px;
  line-height: 1.35;
  font-weight: var(--weight-heading);
  letter-spacing: -0.01em;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: var(--weight-label);
}

.lead {
  margin-top: var(--space-4);
  color: var(--text-secondary);
  font-size: clamp(17px, 16px + 0.3vw, 19px);
  line-height: 1.6;
  max-width: 34em;
  text-wrap: pretty;
}
.narrow { max-width: 30em; }

.muted { color: var(--text-muted); }

/* ---- Buttons ------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 52px;
  padding: 0 var(--space-5);
  border: 0;
  border-radius: 10px;
  font: var(--weight-control) 16px/1 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn .i { width: 18px; height: 18px; stroke-width: 2; }

.btn-ink { background: var(--text); color: var(--surface); }
.btn-ink:hover { background: color-mix(in oklch, var(--text) 86%, var(--surface)); }
.btn-ink:active { background: color-mix(in oklch, var(--text) 78%, var(--surface)); }

.btn-sm { min-height: var(--target-touch); padding: 0 var(--space-4); font-size: 14px; border-radius: 8px; }
.btn-sm .i { width: 16px; height: 16px; }

.btn-quiet {
  background: var(--surface-raised);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.btn-quiet:hover { background: color-mix(in oklch, var(--text) 6%, var(--surface-raised)); }
.btn-quiet:active { background: color-mix(in oklch, var(--text) 10%, var(--surface-raised)); }

@media (prefers-reduced-motion: no-preference) {
  .btn, .top, .top-nav a, .foot-nav a, .clip-link { transition: background-color 120ms linear, color 120ms linear, box-shadow 150ms linear; }
}

/* ---- Header: fixed place for the one action; a hairline once you scroll ---------------- */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  box-shadow: 0 1px 0 transparent;
}
.scroll-marker { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }
.top.is-scrolled { box-shadow: 0 1px 0 var(--border); }

.top-row {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-right: auto;
  min-height: var(--target-touch);
  border-radius: 8px;
}
.brand .wordmark { height: 22px; width: auto; }
.brand .wordmark.wm-app { height: 24px; }

.top-nav { display: none; gap: var(--space-1); }
.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-touch);
  padding: 0 var(--space-3);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: var(--weight-label);
  text-decoration: none;
}
.top-nav a:hover { background: var(--hover-bg); color: var(--text); }

@media (min-width: 860px) { .top-nav { display: flex; } }
@media (max-width: 420px) { .brand .wordmark { display: none; } }

/* ---- Hero ---------------------------------------------------------------------------- */

.hero {
  display: grid;
  gap: var(--space-8);
  align-items: center;
  padding-top: var(--space-8);
  padding-bottom: calc(var(--section) / 2);
}

@media (min-width: 1000px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-8);
    padding-top: var(--space-9);
  }
}

.hero .lead { max-width: 28em; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-6);
}
.cta-note { color: var(--text-muted); font-size: 14px; }

.ticks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-5);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: var(--weight-label);
}
.ticks li { display: flex; align-items: center; gap: var(--space-2); }
.ticks .i { color: var(--text-muted); stroke-width: 2; }

/* ---- The picture: a page, and hodoclip's panel beside it ------------------------------ */

.shot { min-width: 0; }

.win {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
  grid-template-rows: auto 1fr;
  background: var(--surface-raised);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px var(--shadow-color), 0 24px 56px -16px var(--shadow-color);
  font-size: 13px;
  line-height: 1.65;
  user-select: none;
}

.win-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: 40px;
  padding: 0 var(--space-4);
  background: var(--surface-sunken);
}
.dots { display: flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.tab {
  padding: 3px var(--space-3);
  border-radius: 6px;
  background: var(--surface-raised);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: var(--weight-label);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page {
  padding: var(--space-6) var(--space-6) 0;
  color: var(--text-secondary);
  max-height: 440px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(black 70%, transparent);
  mask-image: linear-gradient(black 70%, transparent);
}
.page p + p { margin-top: var(--space-3); }
.page-kicker { color: var(--text-muted); font-size: 12px; font-weight: var(--weight-label); }
.page .page-title {
  margin: var(--space-1) 0 var(--space-4);
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
  font-weight: var(--weight-heading);
  letter-spacing: -0.02em;
}
.sel { background: var(--clip-mark); color: var(--text); border-radius: 2px; }

.panel {
  background: var(--surface);
  box-shadow: inset 1px 0 0 var(--border);
  min-height: 400px;
}

.panel-head {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-1);
  height: 44px;
  padding: 0 var(--panel-pad-min);
}
.pc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 6px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: var(--weight-control);
}
.pc .i { width: 14px; height: 14px; }
/* Copy is neutral like its neighbours, marked by its place: first (house DESIGN §2.3). */
.pc-theme {
  justify-content: center;
  width: 26px;
  border-radius: 50%;
  background: var(--surface-sunken);
}

.pad { padding: var(--space-3) var(--panel-pad-min) var(--space-6); color: var(--text); }
.pad > * + * { margin-top: var(--space-3); }
.pad-h { font-size: 17px; font-weight: var(--weight-heading); letter-spacing: -0.01em; }
.pad-h2 { padding-top: var(--space-2); font-size: 14px; font-weight: var(--weight-heading); }

.q {
  padding: var(--space-2) var(--space-3) var(--space-2) 14px;
  border-left: 3px solid var(--clip);
  border-radius: 8px;
  background: var(--clip-wash);
  color: var(--text-secondary);
}
.q-src {
  margin-top: var(--space-1);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: var(--weight-label);
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.q-src u { text-decoration-color: var(--border-strong); text-underline-offset: 2px; }

.hl { background: var(--clip-mark); border-radius: 2px; }

.caret {
  display: inline-block;
  width: 1.5px;
  height: 1.1em;
  margin-left: 1px;
  vertical-align: -0.15em;
  background: var(--clip);
}

.pad .task { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); }
.box {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  flex: none;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1.5px var(--border-strong);
}
.box.on { background: var(--clip); box-shadow: none; color: var(--surface); }
.box .i { width: 11px; height: 11px; stroke-width: 2.5; }

/* On a phone the page drops away and the panel stands alone. */
@media (max-width: 719px) {
  .win { grid-template-columns: minmax(0, 1fr); }
  .page { display: none; }
  .panel { box-shadow: none; min-height: 0; }
  .tab::before { content: "hodoclip · "; }
}

/* The clip lands: highlight first, then the quote settles into the pad. Motion is the
   enhancement; with reduced motion the picture is simply already there. */
@media (prefers-reduced-motion: no-preference) {
  .sel { animation: sel 150ms linear 300ms both; }
  .q { animation: land 320ms var(--ease-settle) 600ms both; }
  @keyframes sel { from { background: transparent; } }
  @keyframes land { from { opacity: 0; transform: translateY(-8px) scale(0.98); } }
}

/* ---- Sections ------------------------------------------------------------------------ */

.section { padding-block: calc(var(--section) / 2); }

.steps, .facts {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-7);
}
@media (min-width: 800px) {
  .steps, .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-7); }
}
.steps li, .facts li { display: grid; gap: var(--space-2); align-content: start; }
.steps .i-lg, .facts .i-lg { color: var(--text-secondary); margin-bottom: var(--space-2); }
.steps p, .facts p { color: var(--text-secondary); max-width: 26em; }

.split { display: grid; gap: var(--space-7); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-8); align-items: start; }
}

.uses li {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--border);
}
.uses li:first-child { padding-top: 0; }
.uses li:last-child { border-bottom: 0; }
.uses strong { font-weight: var(--weight-control); }
.uses span { color: var(--text-secondary); }
@media (min-width: 560px) {
  .uses li { grid-template-columns: 9.5em 1fr; gap: var(--space-4); }
}

/* ---- Why: a change of tone, full bleed ------------------------------------------------ */

.sheet { background: var(--surface-raised); }
.why {
  display: grid;
  gap: var(--space-6);
  padding-block: var(--section);
}
@media (min-width: 900px) {
  .why { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-8); }
  .why-head { position: sticky; top: calc(72px + var(--space-7)); align-self: start; }
}
.why-head img { margin-bottom: var(--space-5); }
.why-body { font-size: 17px; line-height: 1.7; max-width: 34em; }
.why-body > p + p { margin-top: var(--space-4); }

.promises { margin-top: var(--space-6); }
.promises li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
}
.promises li:last-child { border-bottom: 0; }
.promises strong { font-weight: var(--weight-heading); }

.sign {
  margin-top: var(--space-6);
  font-weight: var(--weight-heading);
  font-size: 17px;
}
.sign span { display: block; color: var(--text-muted); font-weight: var(--weight-body); font-size: 14px; }

/* ---- The apps ------------------------------------------------------------------------ */

.apps { margin-top: var(--space-7); }
.apps li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border);
}
.apps li:first-child { padding-top: 0; }
.apps .app-text p { color: var(--text-secondary); }
.app-go { grid-column: 2; justify-self: start; font-size: 14px; font-weight: var(--weight-control); }
@media (min-width: 640px) {
  .apps li { grid-template-columns: 56px minmax(0, 1fr) auto; }
  .app-go { grid-column: 3; justify-self: end; }
}
.status { color: var(--text-muted); font-weight: var(--weight-label); }

.clip-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--target-touch);
  color: var(--clip-text);
  text-decoration: none;
}
.clip-link:hover { text-decoration: underline; }

/* Waitlist: one field, feedback on the button that caused it. */
.waitlist { margin-top: var(--space-8); max-width: 36em; }
.waitlist .muted { margin-top: var(--space-1); }
.waitlist .wl-note { margin-top: var(--space-3); font-size: 14px; }

.picks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin: var(--space-4) 0 0;
  padding: 0;
  border: 0;
}
.pick {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--target-touch);
  font-weight: var(--weight-label);
  cursor: pointer;
}
.pick input { width: 18px; height: 18px; margin: 0; accent-color: var(--hue); }

.wl-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.wl-row input {
  flex: 1 1 16em;
  min-width: 0;
  min-height: 52px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: 10px;
  background: var(--surface-raised);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  color: var(--text);
  font: var(--weight-body) 16px var(--font-sans);
}
.wl-row input::placeholder { color: var(--text-faint); }
.wl-row .btn { flex: 0 0 auto; }

.waitlist:not(.is-done) .btn:disabled { color: var(--text-faint); cursor: default; }

.wl-done { display: none; }
.waitlist.is-done .wl-done { display: block; }
.waitlist.is-done .btn { cursor: default; }

.wl-error {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
  color: var(--text);
  font-size: 14px;
}
.wl-error[hidden] { display: none; }
.wl-error .i { color: var(--error); margin-top: 3px; }

/* ---- Closer + footer ----------------------------------------------------------------- */

.closer {
  padding-bottom: var(--section);
  display: grid;
  justify-items: center;
  text-align: center;
}
.closer img { margin-bottom: var(--space-5); }
.closer .lead { margin-bottom: var(--space-6); }

.foot { padding-block: var(--space-7) var(--space-8); }
.foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4) var(--space-6);
  padding-top: var(--space-6);
  /* The hairline spans the content column, not the gutters. */
  background: linear-gradient(var(--border), var(--border)) top center / calc(100% - 2 * var(--gutter)) 1px no-repeat;
}
.foot-brand { display: flex; align-items: center; gap: var(--space-3); color: var(--text-muted); font-size: 14px; }
.foot-brand img { height: 20px; width: auto; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 0 var(--space-5); }
.foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-touch);
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
}
.foot-nav a:hover { color: var(--text); text-decoration: underline; }

/* ---- Plain pages (privacy, joined) ----------------------------------------------------- */

.doc { padding-block: var(--space-8) var(--space-9); max-width: calc(40em + 2 * var(--gutter)); }
.doc h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3rem); }
.doc h2 { margin-top: var(--space-7); font-size: 24px; letter-spacing: -0.02em; }
.doc p, .doc ul { margin-top: var(--space-4); color: var(--text-secondary); max-width: 36em; }
.doc ul { list-style: disc; padding-left: 1.25em; }
.doc li + li { margin-top: var(--space-2); }
.doc .muted { color: var(--text-muted); }

/* ---- One-column hero (the house, and the apps that aren't out yet) -------------------- */

.hero-solo {
  padding-top: var(--space-8);
  padding-bottom: calc(var(--section) / 2);
}
@media (min-width: 1000px) {
  .hero-solo { padding-top: var(--space-9); }
}
.hero-solo > * { max-width: 40em; }
.hero-mark { margin-bottom: var(--space-6); }
.hero-solo .waitlist { margin-top: var(--space-6); }

/* ---- The house's app rows: each row is a link to the app's own page ------------------- */

.app-rows { margin-top: var(--space-7); }
.app-rows li { border-bottom: 1px solid var(--border); }
.app-rows li:last-child { border-bottom: 0; }
.app-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-1) var(--space-5);
  margin-inline: calc(var(--space-3) * -1);
  padding: var(--space-5) var(--space-3);
  border-radius: 12px;
  color: inherit;
  text-decoration: none;
}
.app-row:hover { background: var(--hover-bg); }
.app-row:active { background: var(--pressed-bg); }
.app-row img { width: 64px; height: 64px; }
.app-row h3 { font-size: 20px; letter-spacing: -0.015em; }
.app-row p { color: var(--text-secondary); }
.app-row .meta { margin-top: var(--space-1); color: var(--text-muted); font-size: 14px; font-weight: var(--weight-label); }
.app-row .go { color: var(--text-muted); }
.app-row:hover .go, .app-row:focus-visible .go { color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .app-row { transition: background-color 120ms linear; }
  .app-row .go { transition: color 120ms linear, transform 150ms var(--ease-out); }
  .app-row:hover .go { transform: translateX(2px); }
}
@media (max-width: 520px) {
  .app-row { grid-template-columns: 48px minmax(0, 1fr); }
  .app-row img { width: 48px; height: 48px; }
  .app-row .go { display: none; }
}

/* Four facts sit two by two. */
@media (min-width: 800px) {
  .facts.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 52em; }
}

/* ---- "Part of hodo": one quiet line on an app page, pointing at the house -------------- */

.house-note {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  color: var(--text-secondary);
}
.house-note img { flex: none; }
.house-note p { max-width: 36em; }
