/* ==========================================================================
   The OS Company — landing

   Monochrome by default. Colour is functional, never decorative: the single
   signal tone marks the one thing the product is about — a blocked action
   waiting for a human. Everything else is ink, paper and hairlines.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --paper-2: #fafafa;

  --ink: #0a0a0b;
  --ink-2: #55555f;
  /* Tertiary grey still carries real text (form labels, captions, the kicker),
     so it sits at ~5:1 on paper rather than the 3.4:1 a lighter grey gave. */
  --ink-3: #6f6f7a;

  --line: #e7e7ec;
  --line-2: #d5d5dd;

  /* The only colour on the page. Used for gated / blocked states. */
  --signal: #b4380f;
  --signal-soft: #fdf3ef;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shell: min(1080px, calc(100% - 48px));

  /* The stack is one SVG on a 300x560 viewBox: five slabs 100 units apart,
     each 120 tall plus a 14-unit extruded edge. Only the rendered height is
     set here; the label columns position themselves as fractions of it. */
  --iso-height: 545px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.14;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
}

::selection {
  background: #e8e8ee;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- Reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

[data-reveal].in-view {
  opacity: 1;
  transform: none;
}

[data-reveal-delay='1'] { transition-delay: 0.06s; }
[data-reveal-delay='2'] { transition-delay: 0.12s; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
    color 0.18s var(--ease);
}

.btn-dark,
.btn-grad {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover,
.btn-grad:hover {
  background: #2a2a30;
}

.btn-light {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-2);
}

.btn-light:hover {
  border-color: var(--ink-3);
}

.btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

/* ---------- Nav ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 14px max(24px, calc((100% - 1080px) / 2));
  border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

/* Transparent over the video, solid once the white page starts. */
.site-nav::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 10, 11, 0.55), transparent);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s var(--ease);
}

.site-nav.is-solid {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}

.site-nav.is-solid::before {
  opacity: 0;
}

.site-nav.is-solid .brand,
.site-nav.is-solid .nav-links a {
  color: var(--ink);
}

.site-nav.is-solid .nav-links a {
  color: var(--ink-2);
}

.site-nav.is-solid .nav-links a:hover {
  color: var(--ink);
}

.site-nav.is-solid .btn-ghost {
  color: var(--ink-2);
  border-color: var(--line-2);
}

.site-nav.is-solid .btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink-3);
}

.site-nav.is-solid .btn-light {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.015em;
  text-decoration: none;
}

/* The mark is the logo itself — no container box. It inherits the brand
   colour so it flips with the nav state. */
.brand-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: inherit;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.nav-links {
  display: flex;
  gap: 26px;
  margin-right: auto;
  font-size: 15px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}

.nav-links a:hover {
  color: #fff;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   HERO — scroll-scrub
   ========================================================================== */

.hero {
  position: relative;
  height: 420vh;
  background: var(--ink);
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.hero-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ink) url('../assets/scroll-video/poster.jpg?v=3') center / cover no-repeat;
}

/* Neutral scrim — darkens, does not tint. */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 46% at 50% 40%, rgba(10, 10, 11, 0.42), transparent 72%),
    linear-gradient(
      180deg,
      rgba(10, 10, 11, 0.62) 0%,
      rgba(10, 10, 11, 0.34) 34%,
      rgba(10, 10, 11, 0.28) 58%,
      rgba(10, 10, 11, 0.72) 100%
    );
}

.hero-title {
  position: relative;
  z-index: 4;
  width: min(860px, calc(100% - 40px));
  text-align: center;
  will-change: opacity, transform;
}

.hero-title h1 {
  font-size: clamp(1.9rem, 5vw, 3.7rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.06;
  color: #fff;
  margin-bottom: 20px;
  /* Both lines are short enough to hold on one line on desktop; balance keeps
     the phone breaks even instead of dropping a single word onto its own. */
  text-wrap: balance;
}

/* Tonal, not chromatic. Kept high enough to stay legible over the brightest
   frames of the clip — a lighter grey disappeared into the office scenes. */
.hero-title .accent {
  color: rgba(255, 255, 255, 0.88);
}

.hero-sub {
  margin: 0 auto;
  max-width: 30em;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.hero-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 46px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

.hero-cue-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.8));
  animation: cue 2s var(--ease) infinite;
}

@keyframes cue {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ---- Chapters: solid paper cards, so contrast never depends on the frame ---- */
.hero-chapters {
  position: absolute;
  z-index: 4;
  left: max(24px, calc(50% - 540px));
  bottom: 108px;
  width: min(400px, calc(100% - 48px));
  display: grid;
}

.hero-chapter {
  grid-area: 1 / 1;
  opacity: 0;
  padding: 24px 26px 26px;
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  will-change: opacity, transform;
}

.hero-chapter-num {
  display: block;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
}

.hero-chapter-title {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 8px;
}

.hero-chapter-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
}

.hero-rail {
  position: absolute;
  z-index: 4;
  left: max(24px, calc(50% - 540px));
  bottom: 60px;
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(400px, calc(100% - 48px));
}

.hero-marker {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.hero-marker.is-on {
  background: #fff;
  transform: scale(1.5);
}

.hero-progress {
  flex: 1;
  height: 1px;
  margin-left: 8px;
  background: rgba(255, 255, 255, 0.24);
  overflow: hidden;
}

.hero-progress-fill {
  display: block;
  height: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left;
}

/* ==========================================================================
   Sections
   ========================================================================== */

/* Anchor jumps must clear the fixed nav, which otherwise covers the heading. */
section[id] {
  scroll-margin-top: 88px;
}

section:not(.hero) {
  position: relative;
  width: var(--shell);
  margin: 0 auto;
  padding: clamp(88px, 12vh, 136px) 0;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}

section h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  max-width: 17em;
}

/* The stack section must fit one screen; the generic section rhythm is too
   generous for a 480px diagram. Matches `section:not(.hero)` specificity. */
section.stack {
  padding-block: clamp(56px, 7vh, 80px);
}

/* ---- Pillars ---- */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 56px;
  border-top: 1px solid var(--line);
}

.pillar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 34px 30px 32px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.pillar:first-child {
  border-left: 1px solid var(--line);
}

.pillar--key {
  background: var(--paper-2);
}

.pillar h3 {
  font-size: 1.08rem;
}

.pillar p {
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink-2);
}

.pillar code {
  margin-top: auto;
  padding-top: 18px;
  color: var(--ink-3);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

/* ---- Pillar mini-visuals: thin line drawings, no fills, no glow ---- */
.viz {
  position: relative;
  height: 96px;
  margin-bottom: 6px;
}

.viz--perimeter {
  display: grid;
  place-items: center;
}

.ring,
.ring-core {
  position: absolute;
  border-radius: 999px;
}

.ring {
  border: 1px solid var(--line-2);
}

.ring--a { width: 88px; height: 88px; border-style: dashed; }
.ring--b { width: 56px; height: 56px; }

.ring-core {
  width: 14px;
  height: 14px;
  background: var(--ink);
}

.ring-dot {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--ink-3);
  transform: rotate(var(--a)) translateX(44px);
}

/* gate: action → lock → approved */
.viz--gate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.gate-pill {
  padding: 5px 9px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.gate-pill--ok {
  border-color: var(--line-2);
  color: var(--ink-3);
}

.gate-link {
  width: 18px;
  height: 1px;
  background: var(--line-2);
}

.gate-lock {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--signal);
  color: #fff;
}

.gate-lock svg {
  width: 17px;
  height: 17px;
}

/* audit: a decision timeline */
.viz--audit {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
  padding-bottom: 10px;
}

.audit-bar {
  width: 8px;
  height: calc(var(--h) * 0.72);
  border-radius: 2px;
  background: var(--line-2);
}

.audit-bar--on {
  background: var(--ink);
}

/* ---- Deployment ---- */
.section-lead {
  max-width: 44ch;
  margin-top: 16px;
  color: var(--ink-2);
}

.deploy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  margin-top: 52px;
  border-top: 1px solid var(--line);
}

.deploy-card {
  padding: 34px 32px 32px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.deploy-card:first-child {
  border-left: 1px solid var(--line);
}

.deploy-viz {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin-bottom: 20px;
  /* --in is driven by the scroll; the fallback keeps the figure solid if the
     script never runs. */
  opacity: calc(0.25 + 0.75 * var(--in, 1));
  transition: opacity 0.2s linear;
}

.deploy-tag {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.deploy-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.deploy-card > p {
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink-2);
}

.deploy-card ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  font-size: 14.5px;
  color: var(--ink-2);
}

.deploy-card li {
  position: relative;
  padding-left: 18px;
}

.deploy-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 1px;
  background: var(--ink-3);
}

.deploy-note {
  margin-top: 26px;
  max-width: 62ch;
  font-size: 14.5px;
  color: var(--ink-3);
}

/* ---- Steps ---- */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.step {
  counter-increment: step;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
}

.step:not(.step--gate) {
  border-top-color: var(--line-2);
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}

.step--gate {
  border-top-color: var(--signal);
}

.step--gate::before {
  color: var(--signal);
}

.step h3 {
  font-size: 1.06rem;
  margin-bottom: 8px;
}

.step p {
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink-2);
}

/* ==========================================================================
   Isometric stack — technical drawing, not a light show
   ========================================================================== */

.iso {
  position: relative;
  margin-top: 24px;
  display: grid;
  grid-template-columns: 210px minmax(340px, 1fr) 165px;
  gap: 32px;
  align-items: start;
}

.iso-legend,
.iso-notes {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  height: var(--iso-height);
}

.iso-legend li,
.iso-notes li {
  position: absolute;
  top: calc(14.2857% + var(--i) * 17.8571%);
  /* --open is driven by the scroll; the fallback keeps labels visible if the
     script never runs. */
  opacity: var(--open, 1);
  transform: translateY(-50%) translateX(calc((1 - var(--open, 1)) * -12px));
  width: 100%;
}

.iso-legend li {
  padding-left: 16px;
  border-left: 1px solid var(--line-2);
}

.iso-legend strong {
  display: block;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.iso-legend span {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-3);
}

.iso-legend .is-key {
  border-left-color: var(--signal);
}

.iso-legend .is-key strong {
  color: var(--signal);
}

.iso-notes li {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.iso-stage {
  display: block;
  width: 100%;
  height: var(--iso-height);
  overflow: visible;
}

/* ---- FAQ / definition ---- */
.definition {
  display: grid;
  gap: 18px;
  max-width: 62ch;
  margin-top: 32px;
  font-size: 1.02rem;
  line-height: 1.72;
  color: var(--ink-2);
}

.definition strong {
  color: var(--ink);
  font-weight: 600;
}

.definition code,
.faq-item p code {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
}

.faq-list {
  margin-top: 56px;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  padding: 22px 2px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  color: var(--ink-3);
  font-weight: 400;
  flex: none;
}

.faq-item[open] summary::after {
  content: '–';
}

.faq-item p {
  padding: 0 2px 24px;
  max-width: 62ch;
  font-size: 15px;
  line-height: 1.72;
  color: var(--ink-2);
}

/* ---- Booking ---- */
.booking-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: start;
}

/* section h2 is capped at 17em; without this its box stays left and the
   centred text inside it reads as misaligned. */
.booking-pitch h2 {
  max-width: 12em;
}

.booking-sub {
  margin-top: 16px;
  max-width: 40ch;
  color: var(--ink-2);
}

.booking-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  font-size: 15.5px;
  color: var(--ink-2);
}

.booking-points li {
  position: relative;
  padding-left: 26px;
}

.booking-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 12px;
  height: 6px;
  border-left: 1.5px solid var(--signal);
  border-bottom: 1.5px solid var(--signal);
  transform: rotate(-45deg);
}

.booking-fallback {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
  font-size: 14.5px;
  color: var(--ink-3);
}

.booking-fallback a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.booking-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  overflow: hidden;
}

/* Calendly draws its own card on its own grey page. Keeping a border and a
   radius around it produced a frame inside a frame, so the panel drops its
   chrome once the calendar is in. */
.booking[data-booking='open'] .booking-panel {
  border-color: transparent;
  border-radius: 0;
}

.booking-facade {
  padding: 32px 30px 28px;
  text-align: center;
}

.booking-duration {
  display: grid;
  gap: 2px;
  margin-bottom: 22px;
}

.booking-duration strong {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.booking-duration span {
  font-size: 14px;
  color: var(--ink-3);
}

.booking-facade .btn {
  width: 100%;
  height: 48px;
}

.booking-privacy {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* No widget script means no postMessage resize, so the height is fixed. */
.booking-embed[hidden] {
  display: none;
}

.booking-embed iframe {
  display: block;
  width: 100%;
  height: 780px;
  border: 0;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 56px;
}

.site-footer > * {
  width: var(--shell);
  margin-inline: auto;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
}

.footer-brand span {
  font-size: 14px;
  color: var(--ink-3);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 22px;
  font-size: 14px;
}

.footer-nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ink);
}

.footer-meta {
  margin-top: 26px;
  font-size: 13px;
  color: var(--ink-3);
  max-width: 60ch;
}

/* ==========================================================================
   Chat panel
   ========================================================================== */

.chat-panel {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 24px;
  background: rgba(10, 10, 11, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease);
}

.chat-panel.is-open {
  opacity: 1;
  pointer-events: auto;
}

.chat-card {
  display: flex;
  flex-direction: column;
  width: min(400px, 100%);
  max-height: min(600px, 84vh);
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 30px 70px -24px rgba(10, 10, 11, 0.4);
  transform: translateY(12px);
  transition: transform 0.24s var(--ease);
}

.chat-panel.is-open .chat-card {
  transform: none;
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.chat-title {
  font-weight: 600;
}

.chat-sub {
  font-size: 13px;
  color: var(--ink-3);
}

.chat-close {
  flex: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.chat-close:hover {
  border-color: var(--ink-3);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.msg {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.55;
  max-width: 92%;
}

.msg-assistant {
  background: var(--paper-2);
  border: 1px solid var(--line);
  color: var(--ink);
  justify-self: start;
}

.msg-user {
  background: var(--ink);
  color: #fff;
  justify-self: end;
}

.chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 20px 14px;
}

.chat-chips:empty {
  display: none;
}

.chip {
  padding: 6px 11px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--paper);
  font: inherit;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
}

.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 0 13px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--paper);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}

.chat-form input:focus {
  outline: none;
  border-color: var(--ink);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1080px) {
  .iso {
    grid-template-columns: 200px 1fr;
  }

  .iso-notes {
    display: none;
  }
}

@media (max-width: 1040px) {
  .nav-links {
    display: none;
  }

  .nav-actions {
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  .pillar-grid,
  .deploy-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .booking-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .pillar,
  .deploy-card {
    border-left: 1px solid var(--line);
  }

  .steps {
    gap: 32px;
  }

  .iso {
    grid-template-columns: 1fr;
    gap: 8px;
    /* Stacked layout puts the legend right under the heading. */
    margin-top: 40px;
  }

  .iso-legend {
    height: auto;
    display: grid;
  }

  .iso-legend li {
    position: static;
    padding: 12px 0 12px 16px;
  }

  .iso {
    --iso-height: 430px;
  }
}

@media (max-width: 720px) {
  :root {
    --shell: calc(100% - 36px);
  }

  body {
    font-size: 16px;
  }

  .site-nav {
    padding: 12px 18px;
  }

  .hero {
    height: 340vh;
  }

  .hero-chapters {
    left: 18px;
    right: 18px;
    width: auto;
    bottom: 92px;
  }

  .hero-chapter {
    padding: 20px 22px 22px;
  }

  .hero-chapter-title {
    font-size: 1.3rem;
  }

  .hero-rail {
    left: 18px;
    width: calc(100% - 36px);
    bottom: 48px;
  }

  .hero-cue {
    margin-top: 32px;
  }

  .iso {
    --iso-height: 330px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    padding: 0;
    align-items: stretch;
  }

  .chat-card {
    width: 100%;
    max-height: 100%;
    border-radius: 0;
    border: none;
  }
}

/* ==========================================================================
   Reduced motion — no scrub, no multi-megabyte download, everything readable
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .hero {
    height: auto;
    background: var(--paper);
  }

  .hero-sticky {
    position: static;
    height: auto;
    min-height: 0;
    padding: 110px 0 64px;
    place-items: stretch;
  }

  .hero-video {
    position: relative;
    height: clamp(280px, 46vh, 440px);
  }

  .hero-scrim {
    display: none;
  }

  .hero-title {
    width: var(--shell);
    margin: 0 auto;
    text-align: left;
    padding-bottom: 36px;
  }

  .hero-title h1 {
    color: var(--ink);
  }

  .hero-title .accent {
    color: var(--ink-3);
  }

  .hero-sub {
    margin: 0;
    color: var(--ink-2);
  }

  .hero-cue {
    display: none;
  }

  .hero-chapters {
    position: static;
    width: var(--shell);
    margin: 36px auto 0;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
  }

  .hero-chapter {
    grid-area: auto;
    opacity: 1;
    border-radius: 0;
    box-shadow: none;
  }

  .hero-rail {
    display: none;
  }

  .site-nav {
    position: static;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }

  .site-nav::before {
    display: none;
  }

  .brand,
  .nav-links a {
    color: var(--ink);
  }

  .btn-ghost {
    color: var(--ink);
    border-color: var(--line-2);
  }
}
