/* Agentic OS site. One ground, one ink, one accent; the product's own fragments carry the rest. */
:root {
  --bg: #12211a;
  --bg-2: #1a3026;
  --ink: #f3f5f1;
  --muted: #a9b8ae;
  --accent: #ff7a59;
  --on-accent: #1c0d07;
  --paper: #eef1ed;
  --paper-2: #dfe5de;
  --paper-ink: #12211a;
  --paper-muted: #4c5c53;
  --green: #285d49;

  --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-title: clamp(1.625rem, 1.2rem + 1.2vw, 2rem);
  --step-display: clamp(2.5rem, 1rem + 4.6vw, 4.75rem);
  --step-poster: clamp(3.25rem, 7vw, 7rem);

  --display: 'Stack Sans Headline', 'Stack Sans Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --text: 'Stack Sans Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --margin: clamp(1rem, 2.8vw, 2.5rem);
  --radius: 4px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.5 var(--text); }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.display { font: 300 var(--step-display)/1.05 var(--display); letter-spacing: -0.022em; }
.title { font: 500 var(--step-title)/1.15 var(--text); letter-spacing: -0.01em; }
.lead { font-size: var(--step-lead); line-height: 1.35; }
.small { font-size: var(--step-small); }
.muted { color: var(--muted); }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 1.5rem;
  border: 0; border-radius: var(--radius); background: var(--accent); color: var(--on-accent);
  font-weight: 500; text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms;
}
.button:hover { background: #ff8f73; transform: translateY(-2px); }
.button:active { transform: translateY(1px) scale(0.98); }
.link { text-underline-offset: 0.2em; text-decoration-thickness: 2px; transition: color 160ms; }
.link:hover { color: var(--accent); }

/* ── The product's own look, inside fragments only ─────────────────────────── */
[data-ui] {
  --ui-bg: #e9e2d4; --ui-card: #dccdae; --ui-ink: #1f2a24; --ui-soft: #5d665f; --ui-line: #cfc5b2; --ui-touch: #c2164e;
  background: var(--ui-bg); color: var(--ui-ink); border-radius: 10px; font: 400 14px/1.45 var(--text); text-align: left;
}
[data-ui] .ui-card { background: var(--ui-card); border: 1px solid #c9b78f; border-radius: 10px; padding: 16px; }
[data-ui] .ui-row { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--ui-line); }
[data-ui] .ui-id { color: var(--ui-soft); width: 34px; flex: none; font-variant-numeric: tabular-nums; }
[data-ui] .ui-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
[data-ui] .ui-chip { flex: none; padding: 2px 9px; border: 1px solid var(--ui-line); border-radius: 999px; font-size: 14px; color: var(--ui-soft); background: #efe9dd; }
[data-ui] .ui-chip.needs { background: #e6d6a8; border-color: #d9c68f; color: #5a4a12; }
[data-ui] .ui-chip.high { background: #ecc2bb; border-color: #e0aaa1; color: #7a2418; }
[data-ui] .ui-chip.done { background: #cfe0cf; border-color: #b4cdb5; color: #1f4a2c; }
[data-ui] .ui-chip.run { background: #d5dcea; border-color: #bcc6da; color: #23365c; }
[data-ui] .ui-btn { min-height: 40px; padding: 0 14px; border: 1px solid var(--ui-line); border-radius: 7px; background: #f3eee4; color: var(--ui-ink); font-weight: 500; cursor: pointer; transition: transform 140ms var(--ease-out), background-color 140ms; }
[data-ui] .ui-btn:hover { background: #fbf8f1; }
[data-ui] .ui-btn:active { transform: scale(0.97); }
[data-ui] .ui-btn.primary { background: var(--ui-touch); border-color: var(--ui-touch); color: #fff; }
[data-ui] .ui-btn.primary:hover { background: #d42a61; }
[data-ui] .ui-field { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--ui-line); border-radius: 7px; background: #f3eee4; }
[data-ui] .ui-heading { font-weight: 500; }
[data-ui] .ui-soft { color: var(--ui-soft); }
[data-ui] .ui-card .ui-soft { color: #3f4943; }

/* ── Hero: two tones, the fragment on the lighter one ──────────────────────── */
.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; }
.hero-text { display: flex; flex-direction: column; justify-content: space-between; padding: var(--margin); }
.hero-stage { display: grid; place-items: center; padding: var(--margin); background: var(--bg-2); position: relative; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; font-weight: 500; }
.brand svg { width: 40px; height: 40px; flex: none; }
.ring { fill: none; stroke: #f5f5f2; stroke-width: 15; stroke-linecap: round; stroke-dasharray: 264 88; transition: stroke-dasharray 900ms var(--ease-out); }
.is-closed .ring { stroke-dasharray: 352 0; }
.dot { transition: transform 700ms var(--ease-out); transform-origin: 100px 100px; }
.is-closed .dot { transform: scale(0.6); }
.hero-copy { display: grid; gap: 1.1rem; max-width: 34rem; }
.hero-copy p { max-width: 44ch; color: var(--muted); }
.hero-top { position: absolute; top: var(--margin); right: var(--margin); }
.approval { width: min(450px, 100%); padding: 20px; }
.approval .ui-card { display: grid; gap: 12px; }
.approval-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.approval-readout { margin-top: 14px; display: flex; justify-content: space-between; gap: 12px; color: var(--ui-soft); }
.approval [data-after] { display: none; }
.approval.is-decided [data-before] { display: none; }
.approval.is-decided [data-after] { display: grid; }

.lines .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.lines [data-line] { display: block; }

/* ── Sections ──────────────────────────────────────────────────────────────── */
.field { padding: clamp(5rem, 11vw, 11rem) var(--margin); }
.field.paper { background: var(--paper); color: var(--paper-ink); }
.field.paper .muted { color: var(--paper-muted); }
.field.green { background: var(--green); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(0.75rem, 2vw, 2rem); }

/* How it works: one slider drives both halves */
.stages { display: grid; grid-template-columns: 1fr 1fr; min-height: 88svh; position: relative; background: var(--paper); color: var(--paper-ink); }
.stages-clause { padding: var(--margin); padding-top: clamp(3rem, 7vw, 6rem); }
.stages-stage { display: grid; place-items: center; padding: var(--margin); padding-bottom: 9rem; background: var(--paper-2); }
.stages-clause h2 { max-width: 11ch; }
.stages-clause p { margin-top: 1.5rem; max-width: 36ch; color: var(--paper-muted); }
.stage-panel { width: min(440px, 100%); padding: 18px; display: grid; gap: 10px; }
.stage-panel [data-stage] { display: none; }
.stage-panel [data-stage].is-on { display: grid; gap: 10px; }
.stages-control { position: absolute; left: var(--margin); right: var(--margin); bottom: 1.75rem; }
.track { position: relative; height: 32px; }
.track::before, .track-fill { content: ''; position: absolute; left: 0; top: 12px; height: 8px; }
.track::before { right: 0; background: #c3ccc3; }
.track-fill { width: var(--fill, 0%); background: var(--paper-ink); transition: width 200ms var(--ease-out); }
.stages-control input { -webkit-appearance: none; appearance: none; position: relative; width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer; }
.stages-control input::-webkit-slider-runnable-track { height: 8px; background: transparent; }
.stages-control input::-moz-range-track { height: 8px; background: transparent; }
.stages-control input::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: -12px; background: var(--accent); border: 0; border-radius: 0; transition: transform 160ms var(--ease-out); }
.stages-control input::-moz-range-thumb { width: 32px; height: 32px; background: var(--accent); border: 0; border-radius: 0; }
.stages-control input:active::-webkit-slider-thumb { transform: scale(1.15); }
.stage-names { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 0.5rem; color: var(--paper-muted); }
.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; }
.stage-names .is-on { color: var(--paper-ink); font-weight: 500; }

/* The phone: three real screens on one stage colour */
.phones h2 { grid-column: 1 / span 5; align-self: end; }
.phones .phones-text { grid-column: 7 / span 6; align-self: end; max-width: 46ch; }
.phones-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(0.75rem, 2vw, 2rem); margin-top: clamp(3rem, 6vw, 5rem); align-items: start; }
.phones-row figure { overflow: hidden; border-radius: 22px; background: #e9e2d4; }
.phones-row figure:nth-child(2) { margin-top: clamp(2rem, 6vw, 6rem); }
.phones-row figcaption { padding: 0.9rem 1.1rem 1.1rem; color: #1f2a24; }
.phones-row img { width: 100%; aspect-ratio: 644 / 1100; object-fit: cover; object-position: top; }

/* Capabilities: the command list, scaled up */
.commands { background: var(--bg); }
.commands-search { grid-column: 1 / span 10; width: 100%; height: 2.4em; padding: 0 0.6em; border: 0; border-radius: var(--radius); background: var(--bg-2); color: var(--ink); font: 400 var(--step-title)/1 var(--text); }
.commands-search::placeholder { color: var(--muted); opacity: 1; }
.commands-list { grid-column: 1 / -1; margin-top: 1.5rem; }
.commands-list li { border-radius: var(--radius); }
.commands-list button { display: block; width: 100%; padding: 0.08em 0.25em; border: 0; background: none; text-align: left; cursor: pointer; font: 300 var(--step-display)/1.1 var(--display); letter-spacing: -0.022em; color: var(--muted); transition: color 160ms, transform 200ms var(--ease-out); }
.commands-list button:hover { color: var(--ink); transform: translateX(6px); }
.commands-list p { display: none; padding: 0 0.6rem 0.9rem; max-width: 58ch; font-size: var(--step-body); }
.commands-list li.is-on { background: var(--accent); color: var(--on-accent); }
.commands-list li.is-on button { color: var(--on-accent); }
.commands-list li.is-on p { display: block; }
.commands-list li[hidden] { display: none; }
.commands-none { grid-column: 1 / -1; margin-top: 1.5rem; color: var(--muted); }

/* What stays on the Mac */
.local .local-text { grid-column: 1 / span 5; display: grid; gap: 1.5rem; align-content: start; }
.local ul { display: grid; gap: 1.4rem; margin-top: 1rem; }
.local li { max-width: 40ch; }
.local li strong { display: block; font-weight: 500; }
.local figure { grid-column: 7 / -1; overflow: hidden; border-radius: 14px; align-self: start; }
.local figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top left; transform-origin: top left; }

/* Runs with: names in one row */
.runs { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem 2rem; padding: clamp(5rem, 9vw, 9rem) var(--margin); background: var(--paper); color: var(--paper-ink); }
.runs p { color: var(--paper-muted); }
.runs li { font-size: var(--step-lead); }
.runs ul { display: contents; }

/* Questions */
.faq h2 { grid-column: 1 / span 4; position: sticky; top: 96px; align-self: start; font: 300 var(--step-display)/1.05 var(--display); letter-spacing: -0.022em; }
.faq-list { grid-column: 5 / -1; display: grid; gap: 8px; }
.faq details { background: var(--bg-2); border-radius: var(--radius); transition: background-color 200ms; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; padding: 1rem 1.5rem; font-size: var(--step-lead); font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.plus { position: relative; flex: none; width: 16px; height: 16px; }
.plus::before, .plus::after { content: ''; position: absolute; left: 0; top: 6.5px; width: 16px; height: 3px; background: currentColor; transition: transform 300ms var(--ease-out); }
.plus::after { transform: rotate(90deg); }
.faq details[open] { background: var(--accent); color: var(--on-accent); }
.faq details[open] .plus::after { transform: rotate(0deg); }
.faq details p { padding: 0 1.5rem 1.5rem; max-width: 52ch; }

/* The first step, already open */
.start { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(0.75rem, 2vw, 2rem); min-height: 90svh; padding: var(--margin); background: var(--accent); color: var(--on-accent); }
.start-text { grid-column: 1 / span 6; align-self: end; display: grid; gap: 1.25rem; }
.start-text h2 { font: 300 var(--step-poster)/0.95 var(--display); letter-spacing: -0.03em; }
.start-text p { max-width: 40ch; }
.start-dialog { grid-column: 8 / span 4; align-self: center; padding: 22px; display: grid; gap: 14px; }
.start-dialog label { display: grid; gap: 6px; }
.segments { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.segments label { display: block; }
.segments input { position: absolute; opacity: 0; }
.segments span { display: grid; place-items: center; min-height: 44px; padding: 0 8px; border-radius: 7px; background: #f3eee4; text-align: center; cursor: pointer; transition: background-color 140ms, color 140ms; }
.segments input:checked + span { background: var(--ui-ink); color: #f3eee4; }
.segments input:focus-visible + span { outline: 3px solid var(--ui-touch); outline-offset: 2px; }

/* Footer of tiles */
.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; padding: 10px; background: var(--bg); }
.tile { display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem; min-height: 220px; padding: 1.25rem; border-radius: var(--radius); background: var(--bg-2); }
.tile.statement { grid-column: span 4; font-size: var(--step-lead); line-height: 1.25; }
.tile.nav { grid-column: span 3; }
.tile.nav ul { display: grid; gap: 0.4rem; }
.tile.lang { grid-column: span 2; }
.tile.mail { grid-column: span 3; justify-content: flex-end; overflow-wrap: anywhere; }
.tile.word { grid-column: span 8; min-height: 320px; justify-content: center; align-items: center; background: var(--ink); color: var(--bg); font: 300 var(--step-poster)/1 var(--display); letter-spacing: -0.03em; }
.tile.go { grid-column: span 4; min-height: 320px; background: var(--accent); color: var(--on-accent); font-size: var(--step-lead); line-height: 1.15; text-decoration: none; transition: transform 200ms var(--ease-out); }
.tile.go:hover { transform: translateY(-4px); }
.tile.go svg { width: 56px; height: 56px; align-self: flex-end; transition: transform 240ms var(--ease-out); }
.tile.go:hover svg { transform: translate(6px, -6px); }

/* Support and privacy: reading pages */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: var(--margin); }
.bar ul { display: flex; gap: clamp(1rem, 3vw, 2rem); }
.page-head { padding: clamp(3rem, 8vw, 7rem) var(--margin) clamp(3rem, 6vw, 5rem); }
.page-head p { margin-top: 1.25rem; max-width: 52ch; color: var(--muted); }
.prose { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(0.75rem, 2vw, 2rem); row-gap: clamp(3rem, 6vw, 5rem); padding: clamp(4rem, 8vw, 7rem) var(--margin); background: var(--paper); color: var(--paper-ink); }
.prose h2 { grid-column: 1 / span 4; font: 500 var(--step-title)/1.15 var(--text); letter-spacing: -0.01em; }
.prose > div { grid-column: 5 / span 7; display: grid; gap: 1rem; max-width: 66ch; }
.prose ul { display: grid; gap: 0.6rem; }
.prose li { padding: 0.9rem 1.1rem; background: var(--paper-2); border-radius: var(--radius); }
.prose ol { display: grid; gap: 0.6rem; padding-left: 1.4rem; list-style: decimal; }
.prose a { text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
.prose a:hover { color: #b33e22; }
.prose strong { font-weight: 500; }

/* ── Motion ────────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .js .lines [data-line] { transform: translateY(105%); animation: line-up 900ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 110ms + 150ms); }
  .js .hero-copy > :not(.lines), .js .hero-stage > [data-ui] { opacity: 0; animation: fade-up 800ms var(--ease-out) 520ms forwards; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--d, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .local figure img { animation: drift 18s ease-in-out infinite alternate; }
  .stage-panel [data-stage].is-on { animation: fade-in 200ms ease-out; }
}
@keyframes line-up { to { transform: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.12); } }

/* ── Phone ─────────────────────────────────────────────────────────────────── */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-stage { order: -1; min-height: 58svh; padding-top: 5.5rem; }
  .hero-text { gap: 0; padding: 1.75rem 1.25rem 2.5rem; }
  .hero-text .brand { position: absolute; top: 1.25rem; left: 1.25rem; }
  .stages { grid-template-columns: 1fr; min-height: 0; }
  .stages-stage { order: -1; min-height: 46svh; padding-bottom: var(--margin); }
  .stages-control { display: contents; }
  .track { order: 0; margin: 0.75rem 1.25rem 0; }
  .stages-clause { order: 1; padding: 1.5rem 1.25rem 1.5rem; }
  .stage-names { order: 2; grid-template-columns: 1fr 1fr; gap: 0.25rem 1rem; padding: 0 1.25rem 3.5rem; }
  .stage-names li { text-align: left !important; padding: 0 !important; }
  .stages-control input::-webkit-slider-thumb { width: 40px; height: 40px; margin-top: -16px; }
  .phones h2, .phones .phones-text, .local .local-text, .local figure, .faq h2, .faq-list, .commands-search { grid-column: 1 / -1; }
  .phones .phones-text { margin-top: 1rem; }
  .phones-row { grid-template-columns: 1fr; }
  .phones-row figure:nth-child(2) { margin-top: 0; }
  .local figure { margin-top: 2.5rem; }
  .commands-search { height: 56px; }
  .faq h2 { position: static; margin-bottom: 1.5rem; }
  .faq-list { gap: 6px; }
  .faq summary { min-height: 64px; padding: 1rem 1.25rem; }
  .faq details p { padding: 0 1.25rem 1.25rem; }
  .start { grid-template-columns: 1fr; min-height: 84svh; padding: 2.5rem 1rem 1rem; gap: 2.5rem; }
  .start-text, .start-dialog { grid-column: 1; }
  .start-text { align-self: start; }
  .start-dialog { align-self: end; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 6px; }
  .tile { min-height: 160px; }
  .tile.word { grid-column: 1 / -1; order: -2; min-height: 160px; }
  .tile.go { grid-column: 1 / -1; order: -1; min-height: 180px; }
  .tile.nav, .tile.mail, .tile.lang, .tile.statement { grid-column: span 1; }
  .tile.statement, .tile.mail { grid-column: 1 / -1; }
  .runs { flex-direction: column; }
  .runs ul { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1rem; width: 100%; }
  .prose h2, .prose > div { grid-column: 1 / -1; }
  .prose { row-gap: 1rem; }
  .prose > div { margin-bottom: 2rem; }
  .bar ul { gap: 1rem; }
}
