:root {
  --paper: #f6f3f7;
  --white: #ffffff;
  --ink: #2d1234;
  --plum: #472151;
  --plum-deep: #2a0f31;
  --muted: #6d5d72;
  --orange: #ffa345;
  --copper: #b8590a;
  --green: #b9f0ce;
  --red: #ffd0c7;
  --small: 0.875rem;
  --body: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem);
  --lead: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);
  --head: clamp(2.2rem, 1.4rem + 3.4vw, 4.4rem);
  --display: clamp(3.8rem, 2.1rem + 5.8vw, 6.4rem);
  --pad: clamp(1rem, 2.6vw, 2.5rem);
  --radius: 1rem;
  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--body);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
a { color: inherit; }
::selection { background: var(--orange); color: var(--ink); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.04em; line-height: 0.94; text-wrap: balance; }
h2 { font-size: var(--head); }
p { text-wrap: pretty; }

.button {
  min-height: 3.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  padding: 0.8rem 1.25rem;
  background: var(--copper);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms var(--ease), background-color 180ms ease;
}
.button:hover { background: #8f4307; }
.button:active { transform: scale(0.97); }
.text-link, .nav-links a, .showcase-actions a, .footer a {
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.22em;
  text-decoration-color: transparent;
}
.text-link:hover, .nav-links a:hover, .showcase-actions a:hover, .footer a:hover { text-decoration-color: currentColor; }
.section-pad { padding: clamp(5.5rem, 10vw, 10rem) var(--pad); }

/* Telesto is a moon. Its orbit becomes the boundary every prompt must cross. */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--paper);
}
.hero-card, .boundary-stage { min-height: calc(100svh - 1.5rem); border-radius: var(--radius); overflow: hidden; }
.hero-card { display: flex; flex-direction: column; background: var(--white); }
.signal-band { height: 2.4rem; flex: 0 0 auto; display: flex; background: var(--paper); overflow: hidden; }
.signal-band span { flex: 0 0 2.4rem; background: var(--plum); }
.signal-band span:nth-child(even) { background: var(--white); }
.hero-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.4rem clamp(1.25rem, 3vw, 2.5rem); }
.wordmark { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 600; text-decoration: none; }
.wordmark small { color: var(--muted); font-size: var(--small); font-weight: 500; }
.brand-orbit { width: 1.5rem; height: 1.5rem; display: inline-block; border: 0.22rem solid var(--orange); border-radius: 50%; position: relative; }
.brand-orbit::after { content: ""; width: 0.42rem; height: 0.42rem; position: absolute; right: -0.2rem; top: 0.1rem; border-radius: 50%; background: var(--plum); }
.nav-links { display: flex; gap: clamp(0.75rem, 1.8vw, 1.5rem); font-size: var(--small); }
.hero-copy { margin: auto; width: min(100% - 2.5rem, 38rem); padding-block: 2rem; }
.hero-copy h1 { margin-bottom: 2rem; font-size: var(--display); }
.hero-copy h1 span { display: block; }
.hero-copy p { max-width: 34ch; font-size: var(--lead); }
.hero-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 2.2rem; }
.hero-foot { display: flex; justify-content: space-between; gap: 1rem; padding: 1.4rem clamp(1.25rem, 3vw, 2.5rem); font-size: var(--small); color: var(--muted); }

.boundary-stage { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(1.25rem, 3vw, 2.5rem); background: var(--plum); color: var(--white); }
.orbit { position: absolute; z-index: -1; border: clamp(4rem, 9vw, 9rem) solid var(--orange); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 95vh; height: 95vh; right: -47vh; top: -8vh; }
.orbit-two { width: 54vh; height: 54vh; right: -8vh; bottom: -27vh; border-width: clamp(2rem, 5vw, 5rem); border-color: var(--copper); }
.orbit-core { width: 1rem; height: 1rem; position: absolute; right: 11%; top: 23%; border-radius: 50%; background: var(--white); }
.boundary-top, .prompt-head, .threshold-card > div, .decision-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.boundary-top { font-size: var(--small); }
.live-state { display: flex; align-items: center; gap: 0.5rem; }
.live-state i { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--green); }
.prompt-card { width: min(100%, 38rem); margin: auto; padding: clamp(1.25rem, 3vw, 2.5rem); border-radius: var(--radius); background: var(--white); color: var(--ink); }
.prompt-head { margin-bottom: 2rem; color: var(--muted); font-size: var(--small); }
.prompt-card > p { max-width: 30ch; margin-bottom: 2rem; font-size: var(--lead); line-height: 1.25; }
.crossing { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.75rem; margin-bottom: 2rem; font-size: var(--small); color: var(--copper); }
.crossing span { height: 0.35rem; background: var(--orange); }
.decision-row { align-items: stretch; }
.decision-row > div { flex: 1; display: grid; gap: 0.35rem; padding: 1rem; border-radius: calc(var(--radius) * 0.65); background: var(--paper); }
.decision-row span { font-size: var(--small); color: var(--muted); }
.decision-row strong { font-size: var(--lead); font-variant-numeric: tabular-nums; }
.decision-row .decision[data-state="block"] { background: var(--red); }
.decision-row .decision[data-state="allow"] { background: var(--green); }
.decision-row .decision span { color: var(--ink); }
.threshold-card { width: min(100%, 38rem); margin-inline: auto; padding: 1rem 1.25rem; border-radius: var(--radius); background: var(--plum-deep); }
.threshold-card label, .threshold-card p { font-size: var(--small); }
.threshold-card output { font-variant-numeric: tabular-nums; }
.threshold-card input { width: 100%; accent-color: var(--orange); }
.threshold-card p { margin: 0.5rem 0 0; color: #d9cddd; }

.section-shell { margin: 0.75rem; border-radius: var(--radius); overflow: hidden; }
.showcase { min-height: 88svh; display: grid; grid-template-columns: 1fr 1fr; background: var(--white); }
.showcase-ui { margin: clamp(1rem, 4vw, 3.5rem); align-self: center; aspect-ratio: 1; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; border-radius: var(--radius); background: var(--paper); }
.ui-bar { display: flex; justify-content: space-between; gap: 1rem; padding: 1rem; font-size: var(--small); }
.incident-focus { padding: clamp(1.25rem, 3vw, 2.5rem); align-self: center; }
.incident-mark { display: inline-flex; margin-bottom: 1.2rem; padding: 0.35rem 0.7rem; border-radius: 999px; background: var(--red); font-size: var(--small); font-weight: 600; }
.incident-focus h2 { max-width: 10ch; font-size: var(--head); }
.incident-focus p { margin: 0; color: var(--muted); }
.incident-list { display: grid; gap: 0.35rem; padding: 1rem; }
.incident-list div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.8rem 1rem; border-radius: calc(var(--radius) * 0.65); background: var(--white); font-size: var(--small); }
.incident-list .selected { background: var(--orange); }
.showcase-copy { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 5vw, 5rem); background: var(--orange); }
.showcase-copy h2 { max-width: 10ch; }
.showcase-copy p { max-width: 38ch; }
.showcase-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.showcase-actions a { min-height: 4.5rem; display: flex; align-items: center; padding: 1rem; background: var(--plum); color: var(--white); text-decoration: none; }
.showcase-actions a:last-child { background: var(--white); color: var(--ink); }

.route { background: var(--paper); }
.route > h2 { max-width: 12ch; margin-bottom: clamp(3rem, 6vw, 5rem); }
.route-bar { min-height: 22svh; display: flex; gap: 0.4rem; }
.route-bar > div { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 1.2rem; }
.route-bar strong { font-size: var(--lead); }
.route-bar p { max-width: 20ch; margin: 2rem 0 0; }
.route-bar > div:nth-child(1) { flex: 1; background: var(--orange); }
.route-bar > div:nth-child(2) { flex: 2.3; background: var(--plum); color: var(--white); }
.route-bar > div:nth-child(3) { flex: 2; background: var(--plum-deep); color: var(--white); }
.route-bar > div:nth-child(4) { flex: 1.5; background: var(--copper); color: var(--white); }

.proof { background: var(--white); }
.proof-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.proof-intro, .proof-tile { min-height: 17rem; padding: clamp(1.25rem, 2.5vw, 2rem); border-radius: var(--radius); background: var(--paper); }
.proof-intro { grid-column: span 2; background: var(--orange); }
.proof-intro h2 { max-width: 10ch; }
.proof-intro p { margin: 2rem 0 0; }
.proof-tile { display: flex; flex-direction: column; justify-content: space-between; }
.proof-tile strong { font-size: var(--head); line-height: 0.9; letter-spacing: -0.05em; }
.proof-tile span { max-width: 25ch; }
.proof-tile.accent { background: var(--copper); color: var(--white); }
.proof-tile.dark { background: var(--plum); color: var(--white); }
.proof-tile.wide { grid-column: span 2; }
.scope-note { max-width: 75ch; margin: 2rem 0 0; color: var(--muted); }

.pricing { min-height: 80svh; display: grid; grid-template-columns: 4fr 8fr; gap: clamp(2rem, 6vw, 8rem); align-items: center; background: var(--orange); }
.pricing-copy h2 { max-width: 9ch; }
.pricing-copy p { max-width: 30ch; }
.price-display { position: relative; }
.price { position: relative; z-index: 1; display: flex; align-items: flex-end; font-size: var(--display); font-weight: 600; line-height: 0.8; letter-spacing: -0.07em; white-space: nowrap; }
.price sup { align-self: flex-start; margin-top: 0.1em; font-size: 0.5em; }
.price span { margin: 0 0 0.2em 0.5em; font-size: var(--small); font-weight: 500; letter-spacing: 0; }
.price-orbit { width: clamp(8rem, 18vw, 16rem); aspect-ratio: 1; position: absolute; z-index: 0; right: 5%; top: -38%; border: clamp(1.5rem, 4vw, 3.5rem) solid var(--plum); border-radius: 50%; }
.includes { margin: clamp(2rem, 5vw, 4rem) 0 2rem; }
.includes p { margin: 0.45rem 0; }

.faq { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(2rem, 6vw, 8rem); background: var(--paper); }
.faq > h2 { align-self: start; position: sticky; top: 2rem; }
.faq-list { display: grid; gap: 0.5rem; }
.faq details { border-radius: var(--radius); background: var(--white); }
.faq details[open] { background: var(--orange); }
.faq summary { min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem 1.5rem; font-size: var(--lead); font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: 0 0 auto; }
.faq details[open] summary::after { content: "−"; }
.faq details p { max-width: 52ch; margin: 0; padding: 0 1.5rem 1.5rem; }

.pilot { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 7vw, 9rem); background: var(--plum); color: var(--white); }
.pilot-heading h2 { max-width: 11ch; }
.pilot-heading p { max-width: 35ch; color: #d9cddd; }
.pilot-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.pilot-form label { display: grid; gap: 0.45rem; font-size: var(--small); }
.pilot-form input, .pilot-form select { width: 100%; min-height: 3.25rem; border: 0; border-radius: calc(var(--radius) * 0.65); padding: 0.75rem; background: var(--white); color: var(--ink); }
.span-two { grid-column: 1 / -1; }
.form-message { padding: 1rem; border-radius: var(--radius); background: var(--green); color: var(--ink); }
.form-message.error { background: var(--red); }

.footer { position: relative; overflow: hidden; padding: clamp(4rem, 8vw, 8rem) var(--pad) 1.5rem; background: var(--plum-deep); color: var(--white); }
.footer-orbit { width: min(48vw, 36rem); aspect-ratio: 1; position: absolute; right: -12vw; top: -16vw; border: clamp(3rem, 8vw, 7rem) solid var(--orange); border-radius: 50%; }
.footer-orbit i { width: 1rem; height: 1rem; position: absolute; left: 5%; top: 48%; border-radius: 50%; background: var(--white); }
.footer-brand { position: relative; margin-bottom: clamp(4rem, 10vw, 10rem); font-size: var(--display); font-weight: 600; line-height: 0.8; letter-spacing: -0.07em; }
.footer-links { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; font-size: var(--small); }
.footer-links > div { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; }
.footer-links span { margin-bottom: 0.5rem; color: #bbaabd; }
.footer-links p { margin: 0; }
.footer-legal { position: relative; display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; font-size: var(--small); color: #bbaabd; }

@media (prefers-reduced-motion: no-preference) {
  .js .hero-copy > *, .js .prompt-card, .js .threshold-card { opacity: 0; transform: translateY(1rem); animation: enter 800ms var(--ease) forwards; }
  .js .hero-copy > *:nth-child(2), .js .threshold-card { animation-delay: 100ms; }
  .js .hero-copy > *:nth-child(3) { animation-delay: 180ms; }
  .js .prompt-card { animation-delay: 260ms; }
  .js [data-reveal] { opacity: 0; transform: translateY(1.5rem); transition: opacity 700ms var(--ease), transform 850ms var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .orbit-one { animation: orbit-breathe 9s ease-in-out infinite alternate; }
  .orbit-core { animation: orbit-core 12s linear infinite; transform-origin: -26vw 20vh; }
}
@keyframes enter { to { opacity: 1; transform: none; } }
@keyframes orbit-breathe { to { transform: scale(1.04); } }
@keyframes orbit-core { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .boundary-stage { min-height: 62svh; grid-row: 1; }
  .hero-card { min-height: 70svh; grid-row: 2; margin-top: -2rem; position: relative; z-index: 2; }
  .hero-foot { flex-wrap: wrap; }
  .showcase { grid-template-columns: 1fr; }
  .showcase-ui { aspect-ratio: auto; min-height: 65svh; }
  .showcase-copy { min-height: 62svh; }
  .proof-board { grid-template-columns: 1fr 1fr; }
  .proof-intro { grid-column: 1 / -1; }
  .pricing, .faq, .pilot { grid-template-columns: 1fr; }
  .faq > h2 { position: static; }
}

@media (max-width: 620px) {
  .section-pad { padding-block: 5rem; }
  .hero-nav { align-items: flex-start; }
  .nav-links a:not(:last-child) { display: none; }
  .hero-copy { width: min(100% - 2.5rem, 32rem); }
  .hero-copy h1 { font-size: clamp(3rem, 13.5vw, 4.25rem); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .text-link { min-height: 3rem; display: flex; align-items: center; justify-content: center; }
  .hero-foot { display: grid; grid-template-columns: 1fr 1fr; }
  .boundary-stage { min-height: 68svh; }
  .prompt-card { padding: 1.15rem; }
  .prompt-card > p { font-size: var(--body); }
  .crossing { margin-bottom: 1rem; }
  .decision-row > div { padding: 0.8rem; }
  .threshold-card { padding: 0.8rem 1rem; }
  .showcase-ui { margin: 0.75rem; min-height: 34rem; }
  .showcase-copy { padding: 1.5rem; }
  .showcase-actions { grid-template-columns: 1fr; }
  .route-bar { min-height: 70svh; flex-direction: column; }
  .route-bar > div { min-height: 7.5rem; }
  .proof-intro, .proof-tile { min-height: 13rem; }
  .proof-intro, .proof-tile.wide { grid-column: 1 / -1; }
  .price { font-size: 24vw; }
  .price-orbit { right: 0; top: -22%; }
  .faq summary { min-height: 4rem; padding: 1rem; font-size: var(--body); }
  .faq details p { padding: 0 1rem 1rem; }
  .pilot-form { grid-template-columns: 1fr; }
  .pilot-form label, .span-two { grid-column: 1; }
  .footer-links { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .footer-legal { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
