/* Minu Works. Three colors, one typeface, one rounded stroke. */

@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #111111;
  --paper: #F4F3EF;
  --signal: #FF5A36;

  --stroke: 3px;
  --edge: clamp(1.25rem, 4.5vw, 4rem);
  --gap: clamp(4.5rem, 11vw, 10rem);

  --display: min(17vw, 19svh, 13rem, calc((100vw - 2 * var(--edge)) / 5.75));
  --h2: clamp(2.35rem, 6.4vw, 5.25rem);
  --h3: clamp(1.3rem, 2vw, 1.7rem);
  --text: clamp(1.0625rem, 0.4vw + 0.98rem, 1.3rem);

  --out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--ink) var(--paper);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--text);
  line-height: 1.5;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--signal); color: var(--ink); }

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 0.09em;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 0.18em; }

:focus-visible {
  outline: var(--stroke) solid currentColor;
  outline-offset: 4px;
  border-radius: 6px;
}
main:focus { outline: none; }

.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap { padding-inline: var(--edge); max-width: 96rem; margin-inline: auto; }

.skip {
  position: absolute;
  left: var(--edge); top: 0.75rem;
  z-index: 10;
  padding: 0.7em 1.1em;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  text-decoration: none;
  transform: translateY(-300%);
}
.skip:focus { transform: none; outline-color: var(--ink); outline-offset: 3px; border-radius: 999px; }

/* Top bar */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(1rem, 2.4vw, 1.75rem) var(--edge);
}
.mark { display: inline-flex; padding: 4px 7px; margin-inline: -3px; border-radius: 12px; }
.mark svg { height: clamp(2.4rem, 4vw, 3.25rem); width: auto; }
.mark-w { stroke: var(--signal); }
.reply {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.55em 1.15em;
  border: var(--stroke) solid var(--ink);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.25s var(--out), color 0.25s var(--out);
}
.reply:hover { background: var(--ink); color: var(--paper); }
.reply:focus-visible { border-radius: 999px; }

/* Opening: what a screen reader says */

.heard-pin {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(1.5rem, 4vw, 3rem);
  min-height: 100svh;
  padding: clamp(5.5rem, 14svh, 8.5rem) var(--edge) clamp(1.5rem, 4svh, 3rem);
}

.heard-lines { align-self: start; padding-top: clamp(0.5rem, 5svh, 3rem); }

.said {
  font-size: var(--display);
  font-weight: 600;
  line-height: 0.96;
  letter-spacing: -0.04em;
}
.line { display: block; }
.enter, .roll { display: block; }

.after-label {
  display: block;
  font-size: var(--text);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.5;
  margin-block: 1.5rem 0.5rem;
}

.said-cart { margin-top: 0.12em; }
.pill {
  display: inline-block;
  border: 2px solid transparent;
  background: var(--signal);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.07em 0.3em 0.13em;
  margin-left: -0.05em;
  white-space: nowrap;
}

.heard-note {
  display: grid;
  gap: 0.9rem;
  max-width: 34rem;
}
.note + .note { margin-top: 0.6rem; }
.byline { font-weight: 600; }
.meter { display: none; }

/* Sections */

section { position: relative; }

h2 {
  font-size: var(--h2);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
  max-width: 16ch;
}
h3 {
  font-size: var(--h3);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
section p { max-width: 62ch; text-wrap: pretty; }

/* The problem in plain words, for a reader who has never heard a screen reader. */
.why { padding-block: var(--gap); }
.why h2 { max-width: 18ch; }
.lead {
  margin-top: clamp(2rem, 5vw, 4rem);
  font-size: clamp(1.375rem, 1.6vw + 1rem, 2.25rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  max-width: 34ch;
}
section .lead { max-width: 34ch; }
.why-grid { display: grid; gap: 1.5rem; margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.why-grid strong { display: block; margin-bottom: 0.35rem; }

/* The legal context, stated once and sourced. */
.law { padding-top: var(--gap); }
.source { margin-top: clamp(2rem, 4vw, 3rem); }

.who {
  background: var(--ink);
  color: var(--paper);
  padding-block: var(--gap);
}
/* The same round photo and signal ring as the sender picture in the email,
   sitting beside the heading at avatar size. */
/* On phones the pair spans the full column: sizes follow the row's own width,
   so the heading always sits in two lines beside the photo. */
.who-head { container-type: inline-size; }
.who-head-row { display: flex; align-items: center; gap: 5cqw; }
.who-head .portrait { width: 25cqw; }
.who-head h2 { flex: 1; min-width: 0; max-width: none; font-size: 10.8cqw; }
.portrait { flex: none; width: clamp(5.5rem, 13vw, 10rem); aspect-ratio: 1; border-radius: 50%; overflow: hidden; }
.portrait img { display: block; width: 100%; height: 100%; object-fit: cover; }
.who-text { display: grid; gap: 1.15rem; margin-top: clamp(2rem, 5vw, 3.5rem); }
.who a { display: inline-block; padding-block: 0.75rem; margin-block: -0.75rem; text-decoration-color: var(--signal); }

.check { padding-block: var(--gap); }
.steps {
  display: grid;
  gap: 0;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  counter-reset: step;
}
.steps li {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding-block: clamp(1.4rem, 3vw, 2.25rem);
}
.steps li::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--stroke);
  background: var(--ink);
  border-radius: 999px;
  transform-origin: 0 50%;
}
.aside {
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font-size: var(--h3);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
  max-width: 28ch;
  text-wrap: balance;
}

.work { padding-top: 0; }
.work > .wrap:first-child { padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.rows { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.rows li {
  position: relative;
  display: grid;
  gap: 0.5rem;
  padding-block: clamp(1.25rem, 2.6vw, 2rem);
}
.rows li::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: var(--stroke);
  background: var(--ink);
  border-radius: 999px;
  transform-origin: 0 50%;
}

.total { position: relative; background: var(--ink); color: var(--paper); }
.total-grid {
  display: grid;
  gap: 0.25rem;
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.total-label { font-weight: 600; }
.total-price {
  font-size: clamp(3.25rem, 13vw, 9rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--signal);
  font-variant-numeric: tabular-nums;
}
.after-total {
  display: grid;
  gap: 1.15rem;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.wont { padding-block: var(--gap); }
.nots {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
}
.nots li { display: grid; gap: 0.5rem; align-content: start; }
.nots h3 { font-size: clamp(1.5rem, 3.2vw, 2.5rem); letter-spacing: -0.025em; line-height: 1.08; max-width: 22ch; text-wrap: balance; }

.close {
  background: var(--signal);
  color: var(--ink);
  padding-block: var(--gap);
}
.close .wrap { display: grid; gap: 1.5rem; }
.close h2 { font-size: clamp(3rem, 11vw, 9rem); max-width: 11ch; letter-spacing: -0.04em; line-height: 0.96; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 56px;
  padding: 0.75em 1.4em;
  background: var(--ink);
  color: var(--paper);
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: transform 0.35s var(--out);
}
.motion .button:hover { transform: translateY(-3px); }
.button:focus-visible { outline-color: var(--ink); border-radius: 999px; }

.foot {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  font-size: 1rem;
}
.foot-grid { display: grid; gap: 1rem; }
.foot p { max-width: 46ch; }
.foot a { text-decoration-color: var(--signal); }

/* Wider screens */

@media (min-width: 48rem) {
  .steps li, .rows li { grid-template-columns: minmax(14rem, 1fr) minmax(0, 1.4fr); gap: 2.5rem; align-items: baseline; }
  .nots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem); }
  .why-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem); }
  .law .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 62rem; }
  .who-head-row { gap: clamp(1.5rem, 3vw, 2.25rem); }
  .who-head .portrait { width: clamp(5.5rem, 13vw, 10rem); }
  .who-head h2 { flex: none; max-width: 16ch; font-size: var(--h2); }
  .total-grid { grid-template-columns: 1fr auto; align-items: baseline; }
  .after-total { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 5rem); }
  .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem); }
}

/* Wide screens: the note sits beside the lines, and the type is sized so the
   longest line always fits its column. */
@media (min-width: 64rem) {
  :root { --display: min(17vw, 19svh, 13rem, calc((100vw - 2 * var(--edge) - 23rem) / 6.3)); }
  .heard-pin { grid-template-columns: minmax(0, 1fr) 20rem; grid-template-rows: 1fr; column-gap: 3rem; align-items: end; }
  .heard-lines { align-self: center; }
  .heard-note { padding-bottom: 0.5rem; }
}

/* ------------------------------------------------------------------
   Motion. Everything below applies only when the visitor has not asked
   for reduced motion and scripts are running. Without it the page shows
   every state at once and nothing moves.
   ------------------------------------------------------------------ */

/* The pinned opening needs room. On short screens, and at high zoom, it is
   not pinned: both states are shown in the normal flow, as without motion. */
@media (min-height: 37.5rem) {
  .motion .heard { height: 260svh; --p: 0; }
  .motion .heard-pin { position: sticky; top: 0; height: 100svh; min-height: 0; overflow: clip; }
}

/* Stacked layout: while pinned, the four lines and the note under them must
   share one screen, so the type also answers to the height left for it. */
@media (min-height: 37.5rem) and (max-width: 63.99rem) {
  .motion { --display: max(2.75rem, min(17vw, 13rem, calc((100vw - 2 * var(--edge)) / 5.75), calc((100svh - 25rem) / 4.3))); }
}

@media (min-height: 37.5rem) {

  .motion .stack { display: grid; }
  .motion .stack > * { grid-area: 1 / 1; }
  .motion .after-label { display: none; }
  .motion .note + .note { margin-top: 0; }
  .motion .said-before .roll { transform: translateY(calc(var(--t) * -112%)); }
  .motion .said-after .roll { transform: translateY(calc((1 - var(--t)) * 112%)); }
  .motion .roll { will-change: transform; }

  .motion .note { transition: opacity 0.5s var(--out), transform 0.7s var(--out); }
  .motion .note-before { opacity: calc(1 - var(--done, 0)); transform: translateY(calc(var(--done, 0) * -0.75rem)); }
  .motion .note-after { opacity: var(--done, 0); transform: translateY(calc((1 - var(--done, 0)) * 0.75rem)); }

  .motion .meter {
    display: block;
    height: var(--stroke);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.4rem;
  }
  .motion .meter span {
    display: block;
    height: 100%;
    background: var(--ink);
    border-radius: 999px;
    transform-origin: 0 50%;
    transform: scaleX(var(--p));
  }
}

/* Each line is a mask; its text rolls up and out, and the real name rolls in. */
.motion .line {
  overflow: clip;
  padding-bottom: 0.13em;
  margin-bottom: -0.13em;
  --t: clamp(0, calc((var(--p) - var(--s)) / 0.2), 1);
}

/* First load: the lines are announced one after another. */
.motion .said .enter { animation: rise 1s var(--out) both; animation-delay: calc(0.25s + var(--i) * 0.38s); }
.motion .said-cart .enter { transform-origin: 0 60%; animation-name: pop; }
@keyframes rise {
  from { transform: translateY(112%); }
  to { transform: none; }
}
@keyframes pop {
  from { transform: scale(0.6); opacity: 0; clip-path: inset(0 100% 0 0 round 999px); }
  to { transform: none; opacity: 1; clip-path: inset(0 0 0 0 round 999px); }
}
.motion .said-before .line { overflow: clip; }

.motion .heard-note { animation: settle 1.1s var(--out) 1.6s both; }
@keyframes settle {
  from { opacity: 0; transform: translateY(1.25rem); }
  to { opacity: 1; transform: none; }
}

/* When the third name lands, the button answers. */
.motion .heard.is-fixed .pill { animation: nod 0.9s var(--out); }
@keyframes nod {
  0% { transform: none; }
  35% { transform: scale(1.045); }
  100% { transform: none; }
}

/* The closing button opens from the left, like the one that opens the page. */
.motion [data-reveal="pop"] { opacity: 1; transform: none; }
.motion [data-reveal="pop"] .button { clip-path: inset(0 100% 0 0 round 999px); transition: clip-path 1.1s var(--out) 0.25s, transform 0.35s var(--out); }
.motion [data-reveal="pop"].in .button { clip-path: inset(-14px -14px -14px -14px round 999px); } /* past the box, so the focus ring is never clipped */

/* Headings rise word by word from a mask. */
.motion .w { display: inline-block; overflow: clip; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.motion .wi { display: inline-block; transform: translateY(115%); transition: transform 1s var(--out); transition-delay: calc(var(--i) * 55ms); }
.motion .in .wi { transform: none; }

/* Paragraphs settle; they never start invisible for long. */
.motion [data-reveal] { opacity: 0; transform: translateY(1.5rem); transition: opacity 0.8s var(--out), transform 0.9s var(--out); transition-delay: var(--d, 0ms); }
.motion [data-reveal].in { opacity: 1; transform: none; }

/* Rules draw from the left before their text arrives. */
.motion [data-reveal="rule"], .motion [data-reveal="row"] { opacity: 1; transform: none; }
.motion [data-reveal="rule"]::before, .motion [data-reveal="row"]::before { transform: scaleX(0); transition: transform 1.1s var(--out); transition-delay: var(--d, 0ms); }
.motion [data-reveal="rule"].in::before, .motion [data-reveal="row"].in::before { transform: none; }
.motion [data-reveal="rule"] > *, .motion [data-reveal="row"] > * { opacity: 0; transform: translateY(1rem); transition: opacity 0.7s var(--out), transform 0.8s var(--out); transition-delay: calc(var(--d, 0ms) + 180ms); }
.motion [data-reveal="rule"].in > *, .motion [data-reveal="row"].in > * { opacity: 1; transform: none; }
.motion [data-reveal="rule"] > :last-child, .motion [data-reveal="row"] > :last-child { transition-delay: calc(var(--d, 0ms) + 280ms); }

/* The portrait grows in from its centre. */
.motion [data-reveal="portrait"] { opacity: 0; transform: scale(0.6); transition: opacity 0.7s var(--out), transform 1.1s var(--out); }
.motion [data-reveal="portrait"].in { opacity: 1; transform: none; }

/* The total wipes in as one block; the price follows. */
.motion [data-reveal="total"] { opacity: 1; transform: none; }
.motion [data-reveal="total"]::after { content: ""; position: absolute; inset: 0; background: var(--paper); transform-origin: 100% 50%; transition: transform 1.1s var(--out); }
.motion [data-reveal="total"].in::after { transform: scaleX(0); }
.motion [data-reveal="total"] .total-label { opacity: 0; transition: opacity 0.6s var(--out) 0.45s; }
.motion [data-reveal="total"].in .total-label { opacity: 1; }
.motion [data-reveal="total"] .total-price { transform: translateY(0.35em); opacity: 0; transition: transform 1s var(--out) 0.5s, opacity 0.6s var(--out) 0.5s; }
.motion [data-reveal="total"].in .total-price { transform: none; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .steps li::before, .rows li::before, .meter span { forced-color-adjust: none; background: CanvasText; }
  .meter { forced-color-adjust: none; background: Canvas; border: 1px solid CanvasText; }
  .mark-w { stroke: currentColor; }
}

@media print {
  .motion .heard { height: auto; }
  .motion .heard-pin { position: static; height: auto; min-height: 0; overflow: visible; }
  .motion .stack { display: block; }
  .motion .after-label { display: block; }
  .motion .roll, .motion .wi, .motion [data-reveal], .motion [data-reveal] > *, .motion .note { opacity: 1 !important; transform: none !important; }
  .motion [data-reveal] .button { clip-path: none !important; }
  .motion [data-reveal]::before { transform: none !important; }
  .motion [data-reveal="total"]::after { display: none; }
  .motion [data-reveal="total"] .total-label, .motion [data-reveal="total"] .total-price { opacity: 1 !important; transform: none !important; }
  .top, .skip, .meter { display: none; }
  .who, .total, .foot, .close { background: none; color: var(--ink); }
  .total-price { color: var(--ink); }
}
