/* Cordly marketing site.
 * Brand values: Manrope only, sentence case, no monospace. Palette (Oct 2026):
 * fern #1E7A52 is the interactive colour on light grounds, lime #B4F05C on
 * grove (dark green) grounds, sea glass #55CCB6 stays in the mark. Lime never
 * carries text on a light ground (1.4:1 on white). The house from the Cordly mark (#house) frames every photograph.
 * Every scene's finished composition is written first; the moving layout
 * sits under .scene.is-live. */

@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ground: #F5F8F6;
  --paper: #FFFFFF;
  --step: #EAF0EC;
  --ink: #14302A;
  --ink-deep: #07130F;
  --muted: #4F6B63;
  --accent: #1E7A52;
  --accent-hover: #17633F;
  --accent-tint: #E3F7D2;
  --accent-tint-hover: #D6F1C0;
  --lime: #B4F05C;
  --lime-hover: #C8F585;
  --sea: #55CCB6;
  --night: #0D3B30;
  --night-2: #13473A;
  --night-3: #1A5444;
  --on-night: #F5F8F6;
  --on-night-muted: #C9DBD4;

  --t-display: clamp(2.875rem, 6vw, 6.5rem);
  --t-h2: clamp(2.25rem, 4.4vw, 4.5rem);
  --t-statement: clamp(1.5rem, 2.3vw, 2.25rem);
  --t-body: clamp(1.0625rem, 0.35vw + 0.95rem, 1.1875rem);
  --t-small: 0.9375rem;

  --margin: max(16px, clamp(1rem, 3vw, 3rem));
  --gutter: clamp(0.75rem, 1.6vw, 1.75rem);
  --gap: clamp(7rem, 13vw, 13rem);
  --radius: 24px;
  --bar: 76px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 16px); }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 0.2em; }
p, h1, h2, h3, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--sea); color: var(--ink-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
.defs { position: absolute; }
.visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip { position: fixed; top: 12px; left: 12px; z-index: 50; background: var(--paper); padding: 12px 16px; }
.house-mask { clip-path: url(#house); overflow: clip; }

.button, .ui-dialog, .ui-card, .ui-panel, .faq details, .receipt, .choice, .tabs, .pillar, .pad, .piece {
  corner-shape: squircle;
}

/* ---------- Type ---------- */
.display {
  font-size: var(--t-display);
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: -0.045em;
}
.h2 {
  font-size: var(--t-h2);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.closing {
  font-size: var(--t-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.045em;
  max-width: 13ch;
}
.statement {
  font-size: var(--t-statement);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.body { font-size: var(--t-body); max-width: 46ch; }
.lead { font-size: var(--t-body); max-width: 40ch; }

/* ---------- Buttons: one shape, two weights, everywhere ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 48px; padding: 0 22px;
  background: var(--accent); color: #fff;
  border: 0; border-radius: 14px;
  font-size: var(--t-small); font-weight: 700; letter-spacing: -0.005em; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.button:hover { background: var(--accent-hover); }
.button:active { transform: scale(0.97); }
.button--soft { background: var(--accent-tint); color: var(--accent); }
.button--soft:hover { background: var(--accent-tint-hover); color: var(--accent-hover); }
.button--block { display: flex; width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; gap: 40px;
  height: var(--bar);
  padding: 0 var(--margin);
  background: var(--ground);
}
.bar__mark img { width: 136px; height: auto; }
.bar__links { display: flex; gap: 32px; }
.bar__links a { color: var(--ink); text-decoration: none; font-size: var(--t-small); font-weight: 600; transition: color var(--t-hover) ease; }
.bar__links a:hover { color: var(--accent); }
.bar__actions { display: flex; gap: 8px; margin-left: auto; }

/* ---------- Hero (scene: window) ---------- */
/* Finished composition: words beside the house, the story on a night panel below. */
.hero { padding-top: var(--bar); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gutter);
  align-items: end;
  padding: clamp(24px, 5vh, 64px) var(--margin) 0;
}
.hero__copy { display: grid; gap: 28px; padding-bottom: clamp(32px, 7vh, 88px); align-self: center; }
.hero__slot { position: relative; width: 100%; max-width: calc((100svh - var(--bar) - 48px) * 1.075); justify-self: end; aspect-ratio: 14.05 / 13.07; }
.hero__window { position: absolute; inset: 0; clip-path: url(#house); background: #C9B48A; overflow: clip; }
.frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.frame[data-frame] { opacity: 0; }
.hero__shade { position: absolute; inset: 0; background: var(--night); opacity: 0; }
.next { position: absolute; left: -32px; bottom: 40px; width: min(330px, 70%); z-index: 2; }

.story {
  display: grid; gap: 20px;
  margin: 0 var(--margin);
  padding: clamp(40px, 6vw, 80px);
  background: var(--night); color: #fff;
  border-radius: var(--radius);
}
.story__line { font-size: var(--t-statement); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; max-width: 22ch; }
.story__line:last-child { color: var(--lime); }

/* Live: the stage is one screen, the house is drawn in page units and grows. */
.hero.is-live { padding-top: 0; }
.hero.is-live .hero__stage { padding-top: var(--bar); }
.hero.is-live .hero__grid { height: 100%; }
.hero.is-live .hero__slot { position: static; align-self: end; animation: none; }
.hero.is-live .next { animation: none; }
.hero.is-live .hero__window { clip-path: url(#window-clip); z-index: 1; }
.hero.is-live .hero__copy { position: relative; z-index: 3; }
.hero.is-live .next { position: absolute; bottom: auto; z-index: 3; }
.hero.is-live .story {
  position: absolute; inset: 0; z-index: 2;
  margin: 0; padding: var(--bar) var(--margin) 0; border-radius: 0;
  background: none;
  display: grid; place-items: center; text-align: center;
  pointer-events: none;
}
.hero.is-live .story__line { grid-area: 1 / 1; font-size: var(--t-h2); line-height: 1.02; letter-spacing: -0.04em; max-width: 15ch; opacity: 0; }
.hero.is-live .story__line:last-child { color: var(--lime); }

/* ---------- Pillars ---------- */
.pillars { position: relative; padding: var(--gap) var(--margin) 0; }
.pillars .h2 { margin-bottom: clamp(40px, 6vw, 80px); }
.pillars__list { display: grid; gap: 10px; }
.pillar {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; align-items: center; gap: var(--gutter);
  padding: clamp(24px, 3vw, 40px) clamp(20px, 3vw, 40px);
  background: var(--paper); color: var(--ink);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color var(--t-ui) ease, color var(--t-ui) ease;
}
.pillar__name { font-size: var(--t-h2); font-weight: 700; letter-spacing: -0.04em; line-height: 1; }
.pillar__text { font-size: var(--t-body); max-width: 44ch; transition: color var(--t-ui) ease; }
.pillar__go {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent);
  transition: background-color var(--t-ui) ease, color var(--t-ui) ease, transform var(--t-ui) var(--ease-out);
}
.pillar__go svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pillar:hover { background: var(--night); color: #fff; }
.pillar:hover .pillar__text { color: var(--on-night); }
.pillar:hover .pillar__go { background: var(--lime); color: var(--night); transform: translateX(6px); }
.pillar:active { transform: scale(0.995); }
.pillars__preview {
  position: absolute; left: 0; top: 0; z-index: 5;
  width: 260px; aspect-ratio: 14.05 / 13.07;
  clip-path: url(#house);
  pointer-events: none;
  opacity: 0; scale: 0.6;
  transition: opacity 220ms ease, scale 380ms var(--ease-out);
}
.pillars__preview.is-on { opacity: 1; scale: 1; }
.pillars__preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sort (scene) ---------- */
/* Finished composition: words, the pieces in a loose row, the app with every row filled. */
.sort { margin-top: var(--gap); }
.sort__stage {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-rows: auto 1fr; gap: 40px var(--gutter);
  padding: 0 var(--margin);
}
.sort__words { grid-column: 1; display: grid; gap: 24px; align-content: start; }
.sort__pile { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 10px; align-content: start; }
.app { grid-column: 2; grid-row: 1 / span 2; align-self: start; }

.piece {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: var(--paper); color: var(--ink);
  border-radius: 18px;
  font-size: 17px; line-height: 1.3;
  transform: rotate(var(--r, 0deg));
}
.piece b { font-weight: 700; }
.piece span { color: var(--muted); font-size: 14px; }
.piece--mail { flex-direction: column; align-items: flex-start; gap: 2px; }
.piece--invite { flex-direction: column; align-items: flex-start; gap: 2px; background: #E4F0F8; }
.piece--note { background: #FBF0D9; font-size: 18px; padding: 22px 22px 28px; max-width: 220px; border-radius: 6px; }
.piece--photo { flex-direction: column; align-items: flex-start; padding: 10px 10px 12px; }
.piece__img { display: block; width: 168px; aspect-ratio: 14.05 / 13.07; background: var(--img) center / cover #B79E7A; }
.tag { font-style: normal; font-size: 13px; font-weight: 700; padding: 3px 8px; border-radius: 8px; color: #fff; }
.tag--sheet { background: #18764C; }
.tag--pdf { background: #B42318; }
.tag--doc { background: #126DA0; }

[data-ui].app { padding: 0; overflow: clip; }
[data-ui] .app__head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid #E0E5E7; }
[data-ui] .app__mark img { width: 24px; height: 24px; border-radius: 7px; }
[data-ui] .app__title { font-size: 16px; font-weight: 700; margin-right: auto; }
[data-ui] .app__rows { padding: 8px; display: grid; gap: 2px; }
[data-ui] .row { position: relative; min-height: 60px; border-radius: 14px; }
[data-ui] .row__fill { display: flex; align-items: center; gap: 14px; padding: 10px 14px; min-height: 60px; }
[data-ui] .row__icon { flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #F0F3F4; color: var(--c); font-size: 14px; font-weight: 800; }
[data-ui] .row__text { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; }
.sort__done { grid-column: 1; max-width: 20ch; }

/* Live: words top left, the pile scattered under them, the app waiting on the right. */
.sort.is-live { margin-top: calc(var(--gap) - 10svh); }
.sort.is-live .sort__stage { padding-top: calc(var(--bar) + 24px); padding-bottom: 32px; grid-template-rows: auto minmax(0, 1fr); align-items: stretch; }
.sort.is-live .sort__pile { position: relative; display: block; }
.sort.is-live .piece { position: absolute; left: var(--x); top: var(--y); }
.sort.is-live .app { align-self: center; }
.sort.is-live .sort__done { grid-row: 2; align-self: end; opacity: 0; }
.sort.is-live [data-ui] .row::before {
  content: ""; position: absolute; left: 56px; right: 24px; top: 50%; height: 10px; margin-top: -5px;
  border-radius: 5px; background: #EEF1F2;
  opacity: var(--empty, 1);
}

/* ---------- Meetings ---------- */
.meetings {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gutter); align-items: center;
  margin-top: var(--gap);
  padding: 0 var(--margin);
}
.meetings__words { display: grid; gap: 32px; align-content: start; }
.tabs {
  display: inline-flex; justify-self: start; gap: 4px; padding: 4px;
  background: var(--step); border-radius: 16px;
}
.tabs button {
  height: 40px; padding: 0 18px; border: 0; border-radius: 12px; cursor: pointer;
  background: transparent; color: var(--muted);
  font-size: var(--t-small); font-weight: 700;
  transition: background-color var(--t-ui) ease, color var(--t-hover) ease;
}
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }
.meetings__copy .body { animation: pane-in 320ms var(--ease-out); }
.meetings__plate { position: relative; padding-bottom: 40px; }
.meetings__photo { width: 100%; aspect-ratio: 14.05 / 13.07; background: #B79E7A; }
.meetings__photo img, .service__photo img { width: 100%; height: 100%; object-fit: cover; }
.minutes { position: absolute; left: -24px; bottom: 0; width: min(390px, 72%); }

/* ---------- App fragments (data-ui): the app's own look ---------- */
[data-ui].ui-card, [data-ui].ui-panel, [data-ui].ui-dialog {
  background: #fff;
  color: #182B30;
  border: 1px solid #E0E5E7;
  border-radius: 28px;
  padding: 22px;
  font-size: 14px;
  line-height: 1.5;
}
[data-ui] .ui-context { display: flex; align-items: center; gap: 8px; color: #586B73; font-size: 13px; font-weight: 600; }
[data-ui] .ui-context svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
[data-ui] .ui-title { margin-top: 10px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
[data-ui] .ui-meta { margin-top: 2px; color: #586B73; }
[data-ui] .ui-checks { margin: 14px 0 16px; display: grid; gap: 6px; }
[data-ui] .ui-checks li { display: flex; align-items: center; gap: 10px; }
[data-ui] .ui-checks li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #CED6D9; flex: 0 0 auto; }
[data-ui] .ui-checks li.done::before { background: #18764C; border-color: #18764C; box-shadow: inset 0 0 0 3px #fff; }
[data-ui] .ui-button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px;
  background: var(--accent); color: #fff; border: 0; border-radius: 14px;
  font-size: 14px; font-weight: 600;
}
[data-ui] .chip { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
[data-ui] .chip--success { background: #E3F2EA; color: #18764C; }
[data-ui] .chip--info { background: #E4F0F8; color: #126DA0; }
[data-ui] .chip--warning { background: #FBF0D9; color: #946000; }
[data-ui] .chip--neutral { background: #EEF1F2; color: #586B73; }
[data-ui] .ui-panel__title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 700; margin-bottom: 14px; }
[data-ui] .ui-pane { display: none; }
[data-ui] .ui-pane.is-on { display: block; animation: pane-in 320ms var(--ease-out); }
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } }
[data-ui] .ui-agenda { display: grid; gap: 2px; }
[data-ui] .ui-agenda li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 10px; }
[data-ui] .ui-agenda li.is-sel { background: var(--accent-tint); font-weight: 600; }
[data-ui] .ui-time { color: #586B73; }
[data-ui] .ui-section { color: #586B73; font-size: 13px; font-weight: 600; }
[data-ui] .ui-item { font-weight: 700; margin: 4px 0 6px; }
[data-ui] .caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -0.2em; margin-left: 2px; background: var(--accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
[data-ui] .ui-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
[data-ui] .ui-shortcuts span { padding: 4px 10px; border-radius: 10px; background: #F0F3F4; color: #586B73; font-size: 13px; }
[data-ui] .ui-votes { display: grid; gap: 4px; }
[data-ui] .ui-votes li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
[data-ui] .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-tint); color: var(--accent); font-size: 11px; font-weight: 700; display: grid; place-items: center; }
[data-ui] .vote { margin-left: auto; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
[data-ui] .vote.yes { background: #E3F2EA; color: #18764C; }
[data-ui] .vote.absent { background: #EEF1F2; color: #586B73; }
[data-ui] .ui-quorum { margin-top: 10px; color: #18764C; font-weight: 600; }
[data-ui] .ui-steps { font-size: 13px; font-weight: 500; color: #586B73; }
[data-ui] .ui-steps b { color: var(--accent); }
[data-ui] .ui-field { display: grid; gap: 4px; margin-bottom: 12px; }
[data-ui] .ui-label { font-size: 13px; font-weight: 600; color: #586B73; }
[data-ui] .ui-input { display: block; padding: 10px 12px; border: 1px solid #7C8B92; border-radius: 14px; }
[data-ui] .ui-input--tall { min-height: 64px; }
[data-ui] .ui-photo { width: 120px; aspect-ratio: 14.05 / 13.07; background: var(--img) center / cover #ccc; margin: 4px 0 14px; }
[data-ui] .ui-letter { background: #F6F7F8; border-radius: 16px; padding: 16px; margin-bottom: 14px; display: grid; gap: 8px; }
[data-ui] .ui-letter__head { font-weight: 700; color: var(--accent); }
[data-ui] .ui-hint { color: #18764C; font-weight: 600; }
[data-ui] .ui-timeline { display: grid; gap: 12px; padding-left: 18px; border-left: 2px solid #E0E5E7; }
[data-ui] .ui-timeline li { position: relative; }
[data-ui] .ui-timeline li::before { content: ""; position: absolute; left: -25px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
[data-ui] .ui-timeline li:last-child::before { background: #18764C; }
[data-ui] .ui-timeline b { display: block; }

/* ---------- Violations ---------- */
.stages {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gutter);
  margin: var(--gap) var(--margin) 0;
  padding: clamp(32px, 4vw, 64px);
  background: var(--accent-tint);
  border-radius: var(--radius);
}
.stages__words { display: flex; flex-direction: column; gap: 28px; }
.stages__clause { margin-top: auto; font-size: var(--t-statement); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; min-height: 2.4em; }
.stages__clause.swap { animation: pane-in 300ms var(--ease-out); }
.stages__ui { display: flex; align-items: center; justify-content: center; padding: 24px 0; }
.stage-ui { width: min(460px, 100%); min-height: 400px; }
.stages input[type="range"] { -webkit-appearance: none; appearance: none; position: relative; width: 100%; height: 40px; background: transparent; margin: 0; cursor: pointer; }
.track { position: relative; }
.track::before, .track__fill { content: ""; position: absolute; left: 0; top: 16px; height: 8px; border-radius: 4px; pointer-events: none; }
.track::before { right: 0; background: #C3D5CF; }
.track__fill { width: var(--pct, 0%); background: var(--accent); transition: width var(--t-ui) var(--ease-out); }
.stages input[type="range"]::-webkit-slider-runnable-track { height: 8px; background: transparent; }
.stages input[type="range"]::-moz-range-track { height: 8px; background: transparent; }
.stages input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 32px; height: 32px; margin-top: -12px;
  background: var(--accent); border-radius: 50%; border: 6px solid #fff;
  transition: transform var(--t-press) var(--ease-out);
}
.stages input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); }
.stages input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; background: var(--accent); border-radius: 50%; border: 6px solid #fff; }
.stages__names { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 8px; }
.stages__names li { font-size: var(--t-small); font-weight: 600; color: var(--muted); cursor: pointer; transition: color var(--t-hover) ease; }
.stages__names li:nth-child(2) { text-align: center; transform: translateX(-16%); }
.stages__names li:nth-child(3) { text-align: center; transform: translateX(16%); }
.stages__names li:last-child { text-align: right; }
.stages__names li.is-on { color: var(--ink); }

/* ---------- The AI chapter, at night ---------- */
.night { margin-top: var(--gap); background: var(--night); color: var(--on-night); }
.night .h2 { color: #fff; }
.night .body { color: var(--on-night); }
.night .button, .foot .button { background: var(--lime); color: var(--night); }
.night :focus-visible, .foot :focus-visible, .story :focus-visible { outline-color: var(--lime); }
.night .button:hover, .foot .button:hover { background: var(--lime-hover); }

/* Notes (scene). Finished composition: words, the pasted notes, the drafted minutes. */
.notes__stage {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px var(--gutter);
  padding: clamp(96px, 12vw, 160px) var(--margin) 0;
  align-items: start;
}
.notes__words { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gutter); align-items: end; }
.pad { grid-column: 1; background: var(--night-2); border-radius: var(--radius); padding: clamp(24px, 3vw, 40px); }
.pad__title { color: var(--on-night-muted); font-size: var(--t-small); font-weight: 600; margin-bottom: 16px; }
.pad__lines { display: grid; gap: 6px; }
.pad__lines li { font-size: clamp(1.125rem, 1.6vw, 1.5rem); font-weight: 500; line-height: 1.4; padding: 8px 12px; margin: 0 -12px; border-radius: 10px; color: var(--on-night); }
.draft { grid-column: 2; }
[data-ui].draft { padding: 28px; font-size: 15px; }
[data-ui] .draft__block { padding: 10px 0; border-top: 1px solid #EEF1F2; }
[data-ui] .draft__block:first-of-type { border-top: 0; padding-top: 0; }
[data-ui] .draft__block p:last-child { margin-top: 2px; }

.notes.is-live .notes__stage {
  height: 100svh; padding-top: calc(var(--bar) + 32px); padding-bottom: 32px;
  grid-template-rows: auto minmax(0, 1fr); align-items: center;
}
.notes.is-live .notes__words { align-self: start; }

/* Ask Cordly */
.ask {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 56px var(--gutter);
  padding: var(--gap) var(--margin);
  align-items: start;
}
.ask__words { display: grid; gap: 28px; align-content: start; }
.choices { display: grid; gap: 8px; max-width: 560px; margin-top: 12px; }
.choice {
  text-align: left; padding: 16px 20px; border: 0; cursor: pointer;
  border-radius: 16px;
  background: var(--night-3); color: var(--on-night);
  font-size: var(--t-body); font-weight: 600;
  transition: background-color var(--t-hover) ease, color var(--t-hover) ease, transform var(--t-press) var(--ease-out);
}
.choice:hover { background: #22604F; }
.choice:active { transform: scale(0.985); }
.choice.is-on { background: var(--lime); color: var(--night); }
.answer { position: sticky; top: calc(var(--bar) + 24px); }
[data-ui].answer { padding: 28px; }
[data-ui] .answer__q { margin-top: 16px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
[data-ui] .answer__a { margin-top: 14px; font-size: 16px; line-height: 1.6; min-height: 8.5em; }
[data-ui] .answer__src { margin-top: 18px; display: inline-flex; padding: 6px 12px; border-radius: 10px; background: var(--accent-tint); color: #17633F; font-size: 13px; font-weight: 600; }
[data-ui] .answer__note { margin-top: 14px; color: #5F6F76; font-size: 13px; }
[data-ui] .answer__a .w { opacity: 0; animation: word 260ms var(--ease-out) forwards; }
@keyframes word { to { opacity: 1; } }
.ask__close { grid-column: 1; max-width: 30ch; color: #fff; margin-top: clamp(40px, 6vw, 96px); }

/* ---------- Service ---------- */
.service {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--gutter); align-items: center;
  padding: var(--gap) var(--margin) 0;
}
.service__photo { aspect-ratio: 14.05 / 13.07; background: #B79E7A; }
.service__words { display: grid; gap: 28px; padding-left: clamp(0px, 4vw, 64px); }
.steps { display: grid; gap: 10px; margin-top: 12px; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 16px; row-gap: 2px;
  padding: 20px 24px;
  background: var(--paper); border-radius: 18px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step); grid-row: span 2;
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--step); color: var(--ink); font-weight: 800;
}
.steps b { font-weight: 700; }
.steps span { color: var(--muted); font-size: var(--t-small); }

/* ---------- Privacy ---------- */
.privacy { padding: var(--gap) var(--margin) 0; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); }
.privacy__title { grid-column: 1 / span 7; }
.privacy__lead { grid-column: 9 / span 4; align-self: end; }
.table-wrap { grid-column: 1 / -1; margin-top: 72px; overflow-x: auto; }
.who { width: 100%; border-collapse: collapse; font-size: var(--t-body); }
.who th, .who td { text-align: left; padding: 18px 20px; vertical-align: top; }
.who thead th { font-size: var(--t-small); color: var(--muted); font-weight: 600; padding-top: 0; }
.who tbody th { font-weight: 700; width: 34%; }
.who tbody tr:nth-child(odd) { background: var(--paper); }
.who tbody tr td:nth-child(2) { font-weight: 700; }

/* ---------- Pricing ---------- */
.pricing {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  margin: var(--gap) var(--margin) 0;
  padding: 0 clamp(24px, 4vw, 64px) 96px;
  background: var(--accent-tint);
  border-radius: var(--radius);
  overflow: clip;
}
.pricing__words { grid-column: 1 / span 6; padding-top: 96px; display: grid; align-content: start; gap: 32px; justify-items: start; }
.receipt {
  grid-column: 8 / span 5;
  background: var(--paper);
  padding: 56px 32px 64px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), 95% 100%, 90% calc(100% - 14px), 85% 100%, 80% calc(100% - 14px), 75% 100%, 70% calc(100% - 14px), 65% 100%, 60% calc(100% - 14px), 55% 100%, 50% calc(100% - 14px), 45% 100%, 40% calc(100% - 14px), 35% 100%, 30% calc(100% - 14px), 25% 100%, 20% calc(100% - 14px), 15% 100%, 10% calc(100% - 14px), 5% 100%, 0 calc(100% - 14px));
}
.receipt__name { text-align: center; font-size: var(--t-body); font-weight: 800; margin-bottom: 28px; }
.receipt__rows { width: 100%; border-collapse: collapse; font-size: var(--t-small); }
.receipt__rows th, .receipt__rows td { padding: 7px 0; vertical-align: top; }
.receipt__rows th { text-align: left; font-weight: 500; padding-right: 16px; }
.receipt__rows tbody td { text-align: right; font-weight: 700; white-space: nowrap; }
.receipt__rows tfoot td.receipt__total { text-align: right; padding-top: 20px; border-top: 4px solid var(--ink); font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.receipt__rows tbody tr:last-child th, .receipt__rows tbody tr:last-child td { padding-bottom: 24px; }

/* ---------- FAQ ---------- */
.faq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); padding: var(--gap) var(--margin) 0; }
.faq__title { grid-column: 1 / span 4; align-self: start; position: sticky; top: calc(var(--bar) + 24px); max-width: 8ch; }
.faq__list { grid-column: 5 / -1; display: grid; gap: 8px; }
.faq details { background: var(--paper); border-radius: 18px; transition: background-color 260ms ease, color 260ms ease; }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  display: flex; align-items: center;
  min-height: 72px; padding: 18px 64px 18px 24px;
  font-size: var(--t-body); font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; top: 50%; right: 24px;
  width: 16px; height: 3px; margin-top: -1.5px; border-radius: 2px;
  background: currentColor;
  transition: transform 260ms var(--ease-out);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { padding: 0 24px 26px; max-width: 56ch; }
.faq details[open] p { animation: pane-in 320ms var(--ease-out); }
.faq details a { font-weight: 700; }
.faq summary:hover { color: var(--accent); }

/* ---------- Start ---------- */
.start {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  margin: var(--gap) var(--margin) 0;
  padding: clamp(40px, 5vw, 80px);
  min-height: 80svh;
  background: var(--night);
  color: #fff;
  border-radius: var(--radius);
}
.start__words { grid-column: 1 / span 5; align-self: end; display: grid; gap: 28px; }
.start .body { color: #fff; max-width: 40ch; }
.ui-dialog { grid-column: 6 / span 7; align-self: center; width: 100%; max-width: 620px; justify-self: end; }
[data-ui].ui-dialog { padding: 28px; border-radius: 32px; }
[data-ui] .ui-dialog__title { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 18px; }
[data-ui].ui-dialog .ui-label { display: block; margin: 0 0 6px; }
[data-ui] .ui-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
[data-ui] .ui-cell { min-width: 0; }
[data-ui] .ui-cell--wide { grid-column: 1 / -1; }
[data-ui] .ui-text-input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid #7C8B92; border-radius: 14px; font-size: 16px; background: #fff; }
[data-ui] .ui-text-input:focus { outline: 3px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
[data-ui] .segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: #F0F3F4; border-radius: 14px; }
[data-ui] .segmented button { height: 40px; border: 0; border-radius: 11px; background: transparent; font-size: 14px; font-weight: 600; color: #586B73; cursor: pointer; transition: background-color 220ms ease, color 160ms ease; }
[data-ui] .segmented button[aria-checked="true"] { background: #fff; color: #182B30; outline: 1px solid #E0E5E7; }
.ui-dialog .button { margin-top: 22px; }
[data-ui] .ui-textarea { height: auto; min-height: 72px; padding: 12px 14px; resize: vertical; font: inherit; font-size: 16px; }
[data-ui] .ui-text-input::placeholder { color: #7C8B92; }
[data-ui] .ui-optional { font-weight: 500; }
[data-ui] .ui-error { margin-top: 14px; color: #B42318; font-weight: 600; }
[data-ui] .ui-alt { margin-top: 14px; text-align: center; color: #586B73; }
[data-ui] .ui-thanks { display: grid; gap: 10px; font-size: 16px; }
[data-ui] .ui-thanks:focus { outline: none; }
.start__origin { font-size: var(--t-small); color: #fff; max-width: 40ch; font-weight: 600; }

/* ---------- Footer ---------- */
.foot { margin-top: var(--gap); background: var(--ink-deep); color: var(--on-night); padding: clamp(72px, 9vw, 128px) var(--margin) 28px; overflow: clip; }
.foot__top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px var(--gutter); align-items: end; }
.foot__line { font-size: var(--t-statement); font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; color: #fff; max-width: 18ch; }
.foot__act { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px 28px; }
.foot__cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 32px; margin-top: clamp(64px, 8vw, 112px); }
.foot__cols nav { grid-column: span 2; display: grid; align-content: start; }
.foot__cols nav a { display: flex; align-items: center; min-height: 44px; }
.foot__head { margin-bottom: 4px; }
.foot__note { grid-column: 9 / span 4; font-size: var(--t-small); color: var(--on-night-muted); max-width: 34ch; justify-self: end; }
.foot__head { color: var(--on-night-muted); font-size: var(--t-small); font-weight: 600; }
.foot a:not(.button) { color: var(--on-night); text-decoration: none; font-size: var(--t-small); font-weight: 600; transition: color var(--t-hover) ease; }
.foot a:not(.button):hover { color: var(--lime); }
.foot .foot__mail { font-size: var(--t-body); }
.foot__brand { margin-top: clamp(48px, 6vw, 88px); }
.foot__wordmark { width: clamp(160px, 22vw, 320px); height: auto; }
.foot__last { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; margin-top: 28px; font-size: var(--t-small); color: var(--on-night-muted); }

/* ---------- Motion (outside the scenes) ---------- */
.lines .line { display: block; overflow: clip; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.lines [data-line] { display: block; }

@media (prefers-reduced-motion: no-preference) {
  .js .hero [data-line] { transform: translateY(105%); animation: rise-line 900ms var(--ease-expo) forwards; animation-delay: calc(120ms + var(--i) * 90ms); }
  .js [data-load] { opacity: 0; transform: translateY(14px); animation: rise 600ms var(--ease-out) forwards; animation-delay: var(--d); }
  .js .hero__slot { animation: rise-slot 1100ms var(--ease-expo) 60ms both; }
  .js .next { animation: rise 700ms var(--ease-out) 700ms both; }

  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .pillars__list li { opacity: 0; transform: translateY(32px); transition: opacity 600ms var(--ease-out), transform 900ms var(--ease-expo); transition-delay: calc(var(--i, 0) * 90ms); }
  .js .pillars__list li.is-in { opacity: 1; transform: none; }
  .js .meetings__photo img, .js .service__photo img { transform: scale(1.12); transition: transform 1600ms var(--ease-out); }
  .js .is-in .meetings__photo img, .js .service__photo.is-in img { transform: none; }
  .js .who tbody tr { opacity: 0; transform: translateY(12px); transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-expo); transition-delay: calc(200ms + var(--r, 0) * 70ms); }
  .js .is-in .who tbody tr { opacity: 1; transform: none; }
  .js .receipt { transform: translateY(-40px); }
  .js .receipt.is-in { transform: none; transition: opacity 700ms var(--ease-out), transform 1100ms var(--ease-expo); }
  .js .faq details { opacity: 0; transform: translateY(16px); transition: opacity 500ms var(--ease-out), transform 700ms var(--ease-expo), background-color 260ms ease, color 260ms ease; transition-delay: calc(var(--i, 0) * 60ms), calc(var(--i, 0) * 60ms), 0ms, 0ms; }
  .js .faq details.is-in { opacity: 1; transform: none; }
  .js .foot__brand[data-reveal] { opacity: 1; transform: none; clip-path: inset(100% 0 0 0); transition: clip-path 1200ms var(--ease-in-out); }
  .js .foot__brand[data-reveal].is-in { clip-path: inset(0 0 0 0); }
  .js .closing { clip-path: inset(0 -20% 100% 0); transform: translateY(30px); transition: clip-path 1000ms var(--ease-in-out), transform 1000ms var(--ease-expo); opacity: 1; }
  .js .closing.is-in { clip-path: inset(0 -20% -10% 0); transform: none; }
  .js .ui-dialog { opacity: 0; transform: translateY(40px) scale(0.98); transition: opacity 600ms var(--ease-out) 200ms, transform 1000ms var(--ease-expo) 200ms; }
  .js .ui-dialog.is-in { opacity: 1; transform: none; }
}
@keyframes rise-line { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes rise-slot { from { transform: translateY(14%); opacity: 0; } to { transform: none; opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  [data-ui] .caret { animation: none; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .bar__links { display: none; }
  .hero__grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .hero__copy { padding-bottom: 0; }
  .hero__slot { justify-self: center; max-width: 640px; }
  .hero.is-live .hero__grid { grid-template-rows: auto minmax(0, 1fr); }
  .next { display: none; }
  .pillar { grid-template-columns: minmax(0, 1fr) auto; }
  .pillar__text { grid-column: 1; grid-row: 2; }
  .pillar__go { grid-column: 2; grid-row: 1 / span 2; }
  .pillars__preview { display: none; }
  .sort__stage { grid-template-columns: minmax(0, 1fr); }
  .sort__words, .sort__pile, .app { grid-column: 1; grid-row: auto; }
  .meetings, .service, .stages { grid-template-columns: minmax(0, 1fr); }
  .meetings__plate { max-width: 640px; }
  .minutes { left: auto; right: 0; }
  .service__words { padding-left: 0; }
  .service__photo { max-width: 560px; }
  .notes__stage { grid-template-columns: minmax(0, 1fr); }
  .notes__words { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pad, .draft { grid-column: 1; }
  .ask { grid-template-columns: minmax(0, 1fr); }
  .answer { position: static; }
  .privacy__title { grid-column: 1 / -1; }
  .privacy__lead { grid-column: 1 / span 10; margin-top: 32px; }
  .pricing__words { grid-column: 1 / span 7; }
  .receipt { grid-column: 8 / -1; }
  .faq__title { grid-column: 1 / -1; position: static; margin-bottom: 40px; max-width: none; }
  .faq__list { grid-column: 1 / -1; }
  .start { min-height: 0; }
  .start__words { grid-column: 1 / -1; align-self: start; }
  .ui-dialog { grid-column: 1 / -1; justify-self: start; margin-top: 48px; }
  .foot__note { grid-column: 7 / -1; }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  :root { --bar: 64px; --radius: 20px; }
  .bar { gap: 12px; }
  .bar__mark img { width: 112px; }
  .bar .button--soft { display: none; }
  .bar .button { height: 40px; padding: 0 16px; font-size: 14px; }

  .hero__grid { padding-top: 20px; gap: 24px; }
  .hero__copy { gap: 18px; }
  .hero__slot { width: 100%; }
  .story { margin-top: 16px; padding: 32px 24px; }
  .hero.is-live .story__line { font-size: 2rem; }
  .hero.is-live .frame { height: 125%; object-position: 50% 50%; }

  .pillar { padding: 24px 20px; column-gap: 12px; }
  .pillar__name { font-size: 2rem; }
  .pillar__go { width: 44px; height: 44px; }

  .piece { font-size: 14px; }
  .piece--note { max-width: none; }
  .piece__img { width: 88px; }

  .meetings__plate { padding-bottom: 0; }
  .minutes { position: relative; width: 100%; margin-top: -48px; }
  .tabs button { padding: 0 14px; }

  .stages { margin-inline: 0; border-radius: 0; padding: 48px var(--margin); }
  .stage-ui { min-height: 0; }
  .stages input[type="range"]::-webkit-slider-thumb { width: 40px; height: 40px; margin-top: -16px; }
  .stages__names li { font-size: 13px; }

  .notes__stage { padding-top: 96px; }
  .ask { padding-block: 96px; }

  .steps li { padding: 18px; grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; }
  .steps li::before { width: 36px; height: 36px; }

  .privacy { padding-top: 96px; }
  .privacy__lead { grid-column: 1 / -1; }
  .table-wrap { margin-top: 40px; }
  .who, .who tbody, .who tr, .who th, .who td { display: block; }
  .who thead { display: none; }
  .who tbody tr { padding: 16px; border-radius: 12px; }
  .who tbody th { width: auto; padding: 0 0 6px; }
  .who td { padding: 2px 0; font-size: var(--t-small); }
  .who td::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 600; }
  .who tbody tr td:nth-child(2) { color: var(--ink); font-weight: 400; }

  .pricing { margin-inline: 0; border-radius: 0; padding: 0 var(--margin) 72px; row-gap: 40px; }
  .pricing__words, .receipt { grid-column: 1 / -1; }
  .pricing__words { padding-top: 64px; }
  .receipt { width: 90%; justify-self: center; padding: 40px 24px 56px; }

  .faq { padding-top: 96px; }
  .faq summary { min-height: 64px; padding: 16px 56px 16px 20px; }
  .faq details p { padding: 0 20px 22px; font-size: 16px; }

  .start { margin-inline: 0; border-radius: 0; padding: 72px var(--margin) 40px; }
  .closing { font-size: 13vw; }

  .foot__top { grid-template-columns: minmax(0, 1fr); }
  .foot__act { justify-content: flex-start; }
  .foot__cols nav { grid-column: span 6; }
  .foot__note { grid-column: 1 / -1; justify-self: start; }
}

@media (max-width: 520px) {
  [data-ui] .ui-grid { grid-template-columns: minmax(0, 1fr); }
}
