/* On It — one motif: the clipped corner of the note Nell leaves you. */
:root {
  --bg: #eef0f3;
  --surface: #e2e5ea;
  --ink: #0b0c0e;
  --muted: #5d6470;
  --accent: #1f2de6;
  --accent-ink: #ffffff;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.2rem + 3.2vw, 3.75rem);
  --step-giant: clamp(4rem, 1rem + 8vw, 8.5rem);

  --m: clamp(16px, 1.6vw, 24px);
  --gap: 12px;
  --section: clamp(96px, 12vw, 200px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, sans-serif;
  font-size: var(--step-body);
  line-height: 1.45;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}
h1, h2 { font-weight: 500; letter-spacing: -0.05em; line-height: 0.95; margin: 0; text-wrap: balance; }
h2 { font-size: var(--step-head); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.demo :focus-visible, .foot :focus-visible { outline-color: var(--accent-ink); }
::selection { background: var(--accent); color: var(--accent-ink); }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { padding-inline: var(--m); }
main > section { margin-top: var(--section); }

/* The motif at four sizes */
.cut-md { clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%); }
.cut-lg { clip-path: polygon(0 0, calc(100% - 56px) 0, 100% 56px, 100% 100%, 0 100%); }
.cut-xl { clip-path: polygon(0 0, calc(100% - 12vw) 0, 100% 12vw, 100% 100%, 0 100%); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 500;
  padding: 18px 40px 18px 28px;
  border: 0;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
  transition: transform 180ms var(--ease), background-color 180ms;
}
.btn:hover { background: var(--ink); transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-ink { background: var(--ink); width: 100%; text-align: left; }
.btn-ink:hover { background: var(--accent); }
.btn-small { padding: 12px 28px 12px 18px; font-size: var(--step-small); }

/* Photographs: one treatment everywhere */
.hero-photo img, .who-photo img { filter: grayscale(1) contrast(1.06); object-fit: cover; width: 100%; height: 100%; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); padding-block: var(--m); align-items: start; }
.hero-card {
  background: var(--surface);
  min-height: calc(100svh - 2 * var(--m));
  display: flex; flex-direction: column;
}
.hours { display: flex; height: 56px; gap: 0; }
.hours i { flex: 1; background: var(--bg); }
.hours i.off { background: var(--accent); }
.hours i:nth-child(even) { opacity: 0.86; }
.hero-body {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 28px; padding: 48px clamp(20px, 2.4vw, 40px);
}
.wordmark { font-size: var(--step-head); font-weight: 500; letter-spacing: -0.06em; line-height: 1; text-decoration: none; }
.hero h1 { font-size: var(--step-head); }
.lead { font-size: var(--step-lead); line-height: 1.3; max-width: 34ch; margin-top: -8px; }
.hours-note { font-size: var(--step-small); color: var(--muted); max-width: 40ch; }
.hero-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; padding: 0 20px 28px; }
.hero-links a { text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: transparent; transition: text-decoration-color 180ms; }
.hero-links a:hover { text-decoration-color: var(--accent); }
.hero-photo { position: sticky; top: var(--m); height: calc(100svh - 2 * var(--m)); background: var(--ink); overflow: hidden; }
.hero-photo img { position: absolute; inset: 0; opacity: 0; transition: opacity 1600ms ease; }
.hero-photo img.is-on { opacity: 1; animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06); } }

/* ---------- How it works ---------- */
.how { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr auto; min-height: 88svh; }
.how-text { background: var(--surface); padding: clamp(28px, 4vw, 64px) var(--m); }
.stages li { font-size: var(--step-head); font-weight: 500; letter-spacing: -0.05em; line-height: 0.95; max-width: 14ch; text-wrap: balance; }
.js .stages { display: grid; }
.js .stages li { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 200ms, visibility 200ms; }
.js .stages li.is-on { opacity: 1; visibility: visible; }
html:not(.js) .stages li + li { margin-top: 0.5em; }
.how-stage { background: var(--ink); display: grid; place-items: center; padding: 48px var(--m); }
.slip { width: min(440px, 100%); background: var(--bg); color: var(--ink); padding: 32px 32px 28px; display: grid; }
.slip-state { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 14px; }
.js .slip-state { opacity: 0; visibility: hidden; transition: opacity 200ms, visibility 200ms; }
.js .slip-state.is-on { opacity: 1; visibility: visible; }
html:not(.js) .slip { display: block; }
html:not(.js) .slip-state + .slip-state { margin-top: 32px; }
.slip-title { font-size: var(--step-small); color: var(--muted); font-weight: 500; }
.slip-big { font-size: var(--step-head); font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.slip-quote { background: var(--surface); padding: 14px 16px; }
.slip-quote-them { background: var(--accent); color: var(--accent-ink); margin-left: 40px; }
.slip-foot { font-size: var(--step-small); color: var(--muted); margin-top: 6px; }
.diary li { display: flex; gap: 16px; padding: 12px 14px; background: var(--surface); margin-bottom: 4px; }
.diary li span { color: var(--muted); min-width: 3.2em; }
.diary li.is-new { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.diary li.is-new span { color: var(--accent-ink); }
.how-slider { grid-column: 1 / -1; background: var(--ink); padding: 28px 28px 36px; }
.stage-names { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 14px; font-size: var(--step-body); }
.stage-names li { color: #a9aeb8; }
.stage-names li.is-on { color: #ffffff; font-weight: 500; }
.stage-names li:nth-child(2) { text-align: center; padding-right: 20%; }
.stage-names li:nth-child(3) { text-align: center; padding-left: 20%; }
.stage-names li:last-child { text-align: right; }

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 32px; background: transparent; cursor: pointer; margin: 0; --fill: 0%; }
input[type="range"]::-webkit-slider-runnable-track { height: 8px; /* taste-skill-ignore: flat two-colour progress fill */ background: linear-gradient(var(--track-on, var(--accent)), var(--track-on, var(--accent))) 0 / var(--fill) 100% no-repeat, var(--track, #9aa0ab); }
input[type="range"]::-moz-range-track { height: 8px; background: var(--track, #9aa0ab); }
input[type="range"]::-moz-range-progress { height: 8px; background: var(--track-on, var(--accent)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -12px; background: var(--accent); border: 0; clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%); transition: transform 150ms var(--ease); }
input[type="range"]::-moz-range-thumb { width: 32px; height: 32px; background: var(--accent); border: 0; border-radius: 0; }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
.how-slider input { --track: #7b818c; --track-on: #ffffff; }

/* ---------- Who ---------- */
.who { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: end; }
.who-list { grid-column: 1 / 7; align-self: end; }
.who-list h2, .who-list button { font-size: var(--step-head); font-weight: 500; letter-spacing: -0.05em; line-height: 1.12; }
.who-list h2 { color: var(--muted); }
.who-list button { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--muted); transition: color 200ms, transform 200ms var(--ease); }
.who-list button:hover { transform: translateX(6px); }
.who-list button.is-on { color: var(--ink); }
.who-list button.is-on::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.3em; background: var(--accent); clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 0 100%); }
.who-stage { grid-column: 7 / 10; position: relative; height: min(78svh, 760px); }
.who-slab { position: absolute; inset: 8% -10% 0 14%; background: var(--accent); }
.who-photo { position: absolute; inset: 0 8% 6% 0; background: var(--ink); overflow: hidden; }
.who-photo img { position: absolute; inset: 0; opacity: 0; transition: opacity 300ms; }
.who-photo img.is-on { opacity: 1; }
.who-fact { grid-column: 10 / 13; display: grid; align-self: end; padding: 0 0 8px clamp(24px, 3vw, 56px); }
.who-fact p { grid-area: 1 / 1; opacity: 0; transition: opacity 300ms; }
.who-fact p.is-on { opacity: 1; }
html:not(.js) .who-fact p { opacity: 1; grid-area: auto; margin-top: 12px; }

/* ---------- Tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; grid-template-rows: 14vh 12vh 34vh 10vh; }
.tile { display: flex; flex-direction: column; justify-content: space-between; padding: 28px; }
.tile .fig { font-size: var(--step-giant); font-weight: 500; letter-spacing: -0.05em; line-height: 0.9; }
.tile-a { grid-column: 1 / 7; grid-row: 1 / 5; background: var(--accent); color: var(--accent-ink); }
.tile-a .cap { max-width: 34ch; }
.tile-b { grid-column: 7 / 10; grid-row: 2 / 5; background: var(--ink); color: var(--bg); margin-bottom: 10vh; }
.tile-c { grid-column: 10 / 13; grid-row: 3 / 5; background: var(--surface); }
.tiles-head { grid-column: 7 / 13; grid-row: 1; }
.tiles-head h2 { line-height: 0.98; }
.tiles-head p { margin-top: 10px; max-width: 44ch; color: var(--muted); }
.tiles { grid-template-rows: auto 12vh 34vh 10vh; }

/* ---------- Calculator ---------- */
.calc { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: stretch; }
.calc-controls { grid-column: 1 / 7; padding-right: clamp(0px, 4vw, 64px); display: flex; flex-direction: column; gap: 28px; }
.calc-controls > p { color: var(--muted); margin-top: -12px; }
.field label { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 6px; }
.field output { font-weight: 500; font-size: var(--step-lead); white-space: nowrap; }
.calc-result { grid-column: 7 / 13; background: var(--ink); color: var(--bg); padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 60svh; }
.calc-label { font-size: var(--step-lead); max-width: 14ch; line-height: 1.2; }
.calc-fig { font-size: var(--step-giant); font-weight: 500; letter-spacing: -0.06em; line-height: 0.85; }
.calc-note { color: #b9bec8; max-width: 44ch; }

/* ---------- Prices ---------- */
.prices { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); align-items: start; }
.plan-names { grid-column: 1 / 7; display: flex; flex-direction: column; align-items: flex-start; }
.plan-names button { background: none; border: 0; padding: 0; cursor: pointer; font-size: var(--step-head); font-weight: 500; letter-spacing: -0.05em; line-height: 1.12; color: var(--muted); text-align: left; transition: color 200ms, transform 200ms var(--ease); }
.plan-names button:hover { transform: translateX(8px); }
.plan-names button.is-on { color: var(--ink); }
.plan-names button.is-on::before { content: ""; display: inline-block; width: 0.3em; height: 0.3em; margin-right: 0.2em; vertical-align: middle; background: var(--accent); clip-path: polygon(0 0, 60% 0, 100% 40%, 100% 100%, 0 100%); }
.plan-stage { grid-column: 8 / 13; display: grid; }
.plan { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
.js .plan { opacity: 0; visibility: hidden; transition: opacity 200ms, visibility 200ms; }
.js .plan.is-on { opacity: 1; visibility: visible; }
html:not(.js) .plan { grid-area: auto; margin-bottom: 48px; }
.plan-price { font-size: var(--step-giant); font-weight: 500; letter-spacing: -0.06em; line-height: 0.85; }
.plan-price span { display: block; font-size: var(--step-body); letter-spacing: -0.005em; line-height: 1.4; font-weight: 400; margin-top: 14px; color: var(--muted); }
.plan p:not(.plan-price) { max-width: 46ch; }

/* ---------- Questions ---------- */
.faq { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); }
.faq h2 { grid-column: 3 / 11; margin-bottom: 40px; }
.cards { grid-column: 3 / 11; }
.cards details {
  --x: calc(var(--o) * 150px);
  padding: 0 28px 52px;
  margin-top: -28px;
  background: var(--surface);
  clip-path: polygon(0 40px, var(--x) 40px, var(--x) 0, calc(var(--x) + 200px) 0, calc(var(--x) + 200px) 40px, 100% 40px, 100% 100%, 0 100%);
}
.cards details:first-child { margin-top: 0; }
.cards details:nth-child(3n + 2) { background: var(--ink); color: var(--bg); }
.cards details:nth-child(3n) { background: var(--accent); color: var(--accent-ink); }
.cards summary { list-style: none; cursor: pointer; display: block; }
.cards summary::-webkit-details-marker { display: none; }
.tab { display: flex; align-items: center; height: 40px; width: 200px; margin-left: calc(var(--x) - 28px); padding-left: 16px; font-size: var(--step-small); font-weight: 500; }
.q { display: block; font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.02em; padding-top: 18px; transition: transform 200ms var(--ease); }
.cards summary:hover .q { transform: translateX(6px); }
.cards details p { max-width: 50ch; padding-top: 14px; }

/* ---------- Demo ---------- */
.demo { background: var(--accent); color: var(--accent-ink); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); padding: clamp(64px, 7vw, 112px) var(--m); align-items: center; }
.demo-text { grid-column: 1 / 7; }
.demo-text h2 { font-size: var(--step-giant); line-height: 0.9; max-width: 8ch; }
.demo-text p { margin-top: 24px; max-width: 40ch; }
.talk { margin-top: 24px; max-width: 40ch; }
.talk-btn { width: auto; }
.talk-btn:hover { background: var(--bg); color: var(--ink); }
.talk-btn.is-live { background: var(--bg); color: var(--ink); }
.talk-btn:disabled { opacity: 0.6; cursor: progress; transform: none; }
.demo-text .talk-status { margin-top: 12px; min-height: 1.5em; font-weight: 500; }
.demo-text .talk-note { margin-top: 4px; font-size: var(--step-small); opacity: 0.85; }
.dialog { grid-column: 7 / 12; justify-self: center; width: min(440px, 100%); background: var(--bg); color: var(--ink); padding: 36px 32px 32px; display: flex; flex-direction: column; gap: 12px; }
.dialog-title { font-size: var(--step-lead); font-weight: 500; letter-spacing: -0.02em; margin-bottom: 12px; }
.dialog label, .dialog legend { font-size: var(--step-small); color: var(--muted); padding: 0; }
.dialog input[type="text"] { border: 2px solid var(--ink); background: #ffffff; padding: 14px 16px; border-radius: 0; width: 100%; }
.dialog fieldset { border: 0; padding: 0; margin: 12px 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.dialog legend { margin-bottom: 8px; }
.dialog fieldset label { display: block; }
.dialog fieldset input { position: absolute; opacity: 0; }
.dialog fieldset span { display: block; text-align: center; padding: 14px; background: var(--surface); color: var(--ink); font-size: var(--step-body); cursor: pointer; transition: background-color 150ms, color 150ms; }
.dialog fieldset input:checked + span { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.dialog fieldset input:focus-visible + span { outline: 3px solid var(--ink); outline-offset: 2px; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: var(--bg); padding: 56px 0 28px; }
.mark { display: flex; align-items: flex-end; gap: 4px; height: 34svh; min-height: 180px; }
.mark span { flex: 1; height: var(--h); background: var(--c); color: var(--ink); display: flex; align-items: flex-end; justify-content: center; font-size: min(22svh, 22vw); font-weight: 500; letter-spacing: -0.06em; line-height: 0.82; overflow: hidden; }
.mark span:nth-child(1) { flex: 1.5; }
.mark span:nth-child(3) { flex: 0.5; clip-path: polygon(0 0, 60% 0, 100% 22%, 100% 100%, 0 100%); }
.foot-cols { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--gap); margin-top: 56px; }
.foot-cols ul { grid-column: span 3; display: grid; gap: 8px; align-content: start; }
.foot-cols ul:nth-child(3) { grid-column: span 2; }
.foot-cols a { text-underline-offset: 4px; text-decoration-color: transparent; transition: text-decoration-color 180ms; }
.foot-cols a:hover { text-decoration-color: currentColor; }
.foot-contact { grid-column: 9 / 13; }
.credits { font-size: var(--step-small); color: #b9bec8; max-width: 70ch; margin-top: 48px; }
.foot-last { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 28px; font-size: var(--step-small); }
.foot .btn:hover { background: var(--bg); color: var(--ink); }

/* ---------- Entrances ---------- */
.js [data-in] > * { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js [data-in].in > * { opacity: 1; transform: none; }
.js h2[data-in], .js .tile[data-in], .js .calc-result[data-in], .js .dialog[data-in] { opacity: 0; transform: translateY(24px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.js h2[data-in].in, .js .tile[data-in].in, .js .calc-result[data-in].in, .js .dialog[data-in].in { opacity: 1; transform: none; }
.js .tile[data-in] > *, .js .calc-result[data-in] > *, .js .dialog[data-in] > * { opacity: 1; transform: none; }

.js .who-fact.in p:not(.is-on) { opacity: 0; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-photo { order: -1; position: relative; top: 0; height: 48svh; }
  .hero-card { min-height: 0; margin-top: -36px; position: relative; margin-inline: 12px; }
  .hours { height: 40px; }
  .hero-body { padding: 36px 20px; gap: 22px; }
  .hero h1 { font-size: clamp(1.9rem, 8vw, 3.5rem); }

  .how { grid-template-columns: 1fr; grid-template-rows: none; }
  .how-stage { order: -1; padding: 28px var(--m) 28px; min-height: 46svh; }
  .how-slider { order: 0; padding: 0 20px 28px; }
  .how-text { padding: 32px var(--m) 48px; }
  .stages li { font-size: clamp(2rem, 9vw, 3.25rem); }
  .stage-names { font-size: var(--step-small); }

  .who { min-height: 0; gap: 24px 0; }
  .who-stage { grid-column: 1 / -1; order: -1; height: 86vw; margin-right: 12vw; }
  .who-list, .who-fact { grid-column: 1 / -1; }
  .who-fact { padding-left: 0; }
  .who-list ul { display: flex; flex-wrap: wrap; gap: 4px 24px; }

  .tiles { grid-template-rows: none; grid-template-columns: 1fr 1fr; gap: 6px; }
  .tiles-head { grid-column: 1 / -1; grid-row: 1; margin-bottom: 18px; }
  .tile-a { grid-column: 1 / -1; grid-row: 2; min-height: 64vw; gap: 28px; }
  .tile-b { grid-column: 1; grid-row: 3; margin-bottom: 0; min-height: 52vw; }
  .tile-c { grid-column: 2; grid-row: 3; margin-top: 32px; }
  .tile { padding: 20px; }

  .calc-controls, .calc-result { grid-column: 1 / -1; padding-right: 0; }
  .calc-result { min-height: 0; margin-top: 16px; }

  .plan-names, .plan-stage { grid-column: 1 / -1; }
  .plan-stage { margin-top: 28px; }
  .plan .btn { width: 100%; }

  .faq h2, .cards { grid-column: 1 / -1; }
  .cards details { --x: calc(var(--o) * 48px); padding: 0 20px 48px; }
  .tab { width: 140px; margin-left: calc(var(--x) - 20px); font-size: var(--step-small); padding-left: 12px; }
  .cards details { clip-path: polygon(0 40px, var(--x) 40px, var(--x) 0, calc(var(--x) + 140px) 0, calc(var(--x) + 140px) 40px, 100% 40px, 100% 100%, 0 100%); }

  .demo { grid-template-columns: 1fr; padding: 56px 16px 40px; align-items: start; gap: 40px; }
  .demo-text, .dialog { grid-column: 1; }
  .dialog { justify-self: stretch; width: 100%; }
  .dialog .btn { padding-block: 16px; min-height: 52px; }

  .mark { height: 22svh; min-height: 140px; }
  .foot-cols ul, .foot-cols ul:nth-child(3) { grid-column: span 6; }
  .foot-contact { grid-column: 1 / -1; margin-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js [data-in] > *, .js [data-in] { transform: none !important; }
}
