/* Hallmark · genre: atmospheric · macrostructure: Workbench · theme: Terminal · enrichment: real product screenshots · nav: N8 Terminal command · footer: Ft4 Dense typographic · tone: technical · anchor hue: phosphor · critique: P4 H4 E4 S4 R4 V4 */

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  color: var(--color-ink);
  background: var(--color-paper);
  font-family: var(--font-body);
  letter-spacing: 0;
  overflow-x: clip;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -44px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--color-ink);
  color: var(--color-surface);
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--color-link);
  outline-offset: 3px;
}

.topbar {
  position: fixed;
  top: var(--space-sm);
  left: 50%;
  width: min(920px, calc(100% - 32px));
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 58px;
  padding: var(--space-xs) var(--space-sm);
  border: var(--rule-hair) solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: var(--color-nav-bg);
  box-shadow: 0 18px 48px var(--color-shadow-soft);
  transform: translateX(-50%);
  backdrop-filter: blur(18px) saturate(120%);
}

.terminal-line {
  display: flex;
  align-items: center;
  width: 100%;
  gap: var(--space-xs);
  min-width: 0;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1;
  white-space: nowrap;
}

.prompt,
.caret {
  color: var(--color-accent);
}

.caret {
  display: inline-block;
  width: 1ch;
  animation: blink 1.05s steps(2) infinite;
}

.topbar.is-scrolled {
  background: var(--color-nav-bg-scrolled);
}

.brand,
.nav-links,
.footer-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 8px;
  min-width: max-content;
  font-family: var(--font-wordmark);
  font-weight: 700;
  color: var(--color-ink);
}

.brand-mark {
  display: block;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-input);
  box-shadow: 0 10px 22px color-mix(in oklch, var(--color-link) 16%, transparent);
}

.nav-links {
  gap: var(--space-sm);
  color: var(--color-muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: 780;
  white-space: nowrap;
  box-shadow: 0 1px 0 var(--color-inset) inset;
  transition: transform var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out), background var(--dur-short) var(--ease-out);
}

.button.small {
  min-height: 38px;
  padding: 0 15px;
  font-size: 14px;
}

.button.primary {
  border-color: var(--color-primary-border);
  color: var(--color-paper);
  background: var(--color-primary);
  box-shadow: 0 18px 36px var(--color-primary-shadow);
}

.button:hover,
.text-link:hover,
.nav-links a:hover {
  transform: translateY(-1px);
  color: var(--color-accent);
}

.button:active,
.text-link:active,
.nav-links a:active {
  transform: translateY(0);
}

.button[aria-disabled="true"],
.button:disabled {
  cursor: not-allowed;
  opacity: .58;
  transform: none;
}

.nav-links a,
.footer-links a,
.text-link {
  white-space: nowrap;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(390px, 0.78fr) minmax(560px, 1.22fr);
  grid-template-areas:
    "copy visual";
  align-items: center;
  gap: clamp(28px, 5vw, 76px);
  min-height: min(860px, 100vh);
  padding: clamp(118px, 12vw, 138px) clamp(26px, 6vw, 88px) clamp(42px, 6vw, 62px);
  overflow: hidden;
  border-bottom: 1px solid var(--color-rule);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, var(--color-hero-left), var(--color-hero-mid) 46%, var(--color-hero-right));
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--color-grid-rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid-rule) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, transparent, var(--color-mask) 42%, transparent 95%);
  opacity: .45;
}

.hero-copy-block {
  grid-area: copy;
  max-width: 620px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--color-link);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  max-width: 680px;
  font-family: var(--font-display);
  font-size: var(--text-display);
  line-height: 1.03;
  font-weight: 800;
  letter-spacing: -0.055em;
  min-width: 0;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 18px;
  max-width: 760px;
  font-family: var(--font-display);
  font-size: var(--text-display-s);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.045em;
  min-width: 0;
  overflow-wrap: anywhere;
}

h3 {
  margin-bottom: 9px;
  font-size: 18px;
}

p {
  color: var(--color-muted);
  line-height: 1.65;
}

.hero-copy {
  max-width: 580px;
  margin-bottom: 28px;
  color: var(--color-copy);
  font-size: clamp(18px, 2vw, 22px);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.chai-button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
}

.chai-button img {
  display: block;
  width: 172px;
  height: auto;
}

.hero-visual {
  grid-area: visual;
  min-width: 0;
}

.hero-shot {
  position: relative;
  width: min(100%, var(--hero-shot-width));
  height: auto;
  margin: var(--hero-shot-top) auto 0;
  aspect-ratio: 2168 / 1512;
  transform: translateX(var(--hero-shot-shift));
  overflow: hidden;
  border: 1px solid var(--color-rule-strong);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
  filter: saturate(.88) contrast(.98);
}

.hero-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.install-strip {
  max-width: 650px;
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-glass);
  backdrop-filter: blur(14px);
}

.download-note {
  margin: 0;
  color: var(--color-note);
  font-size: 13px;
  line-height: 1.55;
}

.proof-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(var(--max), calc(100% - 40px));
  margin: -34px auto 0;
  position: relative;
  z-index: 4;
  overflow: hidden;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-glass-strong);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-mono);
}

.proof-band div {
  padding: 18px 22px;
  border-left: 1px solid var(--color-rule);
}

.proof-band div:first-child {
  border-left: 0;
}

.proof-band strong {
  display: block;
  font-size: 28px;
}

.proof-band span {
  color: var(--color-muted);
  font-size: 14px;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(70px, 10vw, 120px) 0;
}

.section-heading {
  max-width: 780px;
}

.section-lede {
  max-width: 560px;
  font-size: 18px;
}

.steps,
.tool-grid,
.safety-grid {
  display: grid;
  gap: 14px;
}

.steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.steps article,
.tool-grid article,
.safety-grid article,
details {
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-surface);
}

.steps article {
  min-height: 250px;
  padding: 26px;
}

.steps span {
  display: block;
  margin-bottom: 56px;
  color: var(--color-link);
  font-size: 13px;
  font-weight: 850;
}

.tools {
  padding-top: clamp(34px, 5vw, 72px);
}

.tools-layout {
  display: grid;
  grid-template-columns: minmax(240px, var(--product-shot-width)) minmax(0, 1fr);
  align-items: center;
  gap: clamp(42px, 7vw, 96px);
  margin-bottom: 38px;
}

.tour-shell {
  position: relative;
  width: min(100%, var(--product-shot-width));
  height: var(--product-shot-height);
  margin: var(--product-shot-top) 0 0;
  transform: translateX(var(--product-shot-shift));
  overflow: hidden;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.app-screenshot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: var(--color-surface);
}

.tool-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tool-grid article {
  min-height: 190px;
  padding: 22px;
}

.tool-grid span {
  display: block;
  margin-bottom: 40px;
  font-size: 15px;
  font-weight: 850;
}

.tool-grid p {
  margin-bottom: 0;
  font-size: 14px;
}

.safety {
  border-top: 1px solid var(--color-rule);
  border-bottom: 1px solid var(--color-rule);
}

.safety-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
}

.safety-grid article {
  min-height: 210px;
  padding: 22px;
}

.safety-grid strong {
  display: block;
  margin-bottom: 44px;
}

.install {
  display: grid;
  grid-template-columns: .72fr 1fr;
  gap: clamp(28px, 6vw, 76px);
  align-items: start;
}

.install ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: install;
}

.install li {
  counter-increment: install;
  position: relative;
  min-height: 64px;
  padding: 18px 18px 18px 58px;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-copy);
}

.install li::before {
  content: counter(install);
  position: absolute;
  left: 18px;
  top: 17px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 850;
}

.attribution {
  display: grid;
  grid-template-columns: .6fr 1fr auto;
  align-items: center;
  gap: 28px;
  border-top: 1px solid var(--color-rule);
  border-bottom: 1px solid var(--color-rule);
}

.text-link {
  color: var(--color-link);
  font-weight: 800;
}

.faq {
  max-width: 860px;
}

.faq-list {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 800;
}

details p {
  padding: 0 20px 18px;
}

.footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  padding: 34px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--color-rule);
  background: var(--color-footer);
  font-family: var(--font-mono);
}

.footer p {
  margin: 0;
  color: var(--color-muted);
  max-width: 110ch;
  font-size: var(--text-sm);
}

.footer-links {
  flex-wrap: wrap;
  gap: 18px;
  color: var(--color-muted);
}

body[data-box-mode="true"] {
  padding-bottom: 180px;
}

body[data-box-mode="true"] [data-box-target] {
  outline: 2px solid var(--color-action);
  outline-offset: 4px;
  overflow: visible;
}

body[data-box-mode="true"] .hero-shot,
body[data-box-mode="true"] .tour-shell {
  z-index: 8;
}

body[data-box-mode="true"] .hero-shot {
  height: var(--hero-shot-height);
  aspect-ratio: auto;
}

.box-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  border: 2px dashed var(--color-action-strong);
  pointer-events: none;
}

.box-label {
  position: absolute;
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--color-box-border-strong);
  border-radius: 6px;
  color: var(--color-box-ink);
  background: color-mix(in oklch, var(--color-box-paper) 96%, transparent);
  box-shadow: 0 10px 28px var(--color-box-border);
  cursor: move;
  font-size: 12px;
  font-weight: 820;
  line-height: 1;
  pointer-events: auto;
  user-select: none;
}

.box-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-box-paper);
  border-radius: 50%;
  background: var(--color-action);
  box-shadow: 0 4px 12px var(--color-box-border-strong);
  pointer-events: auto;
}

.box-handle[data-dir="n"] { top: -8px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.box-handle[data-dir="s"] { bottom: -8px; left: 50%; transform: translateX(-50%); cursor: ns-resize; }
.box-handle[data-dir="e"] { right: -8px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.box-handle[data-dir="w"] { left: -8px; top: 50%; transform: translateY(-50%); cursor: ew-resize; }
.box-handle[data-dir="ne"] { right: -8px; top: -8px; cursor: nesw-resize; }
.box-handle[data-dir="nw"] { left: -8px; top: -8px; cursor: nwse-resize; }
.box-handle[data-dir="se"] { right: -8px; bottom: -8px; cursor: nwse-resize; }
.box-handle[data-dir="sw"] { left: -8px; bottom: -8px; cursor: nesw-resize; }

.box-readout {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  width: min(520px, calc(100vw - 36px));
  padding: 14px;
  border: 1px solid var(--color-box-border);
  border-radius: var(--radius);
  background: color-mix(in oklch, var(--color-box-paper) 98%, transparent);
  box-shadow: 0 24px 56px var(--color-box-shadow);
}

.box-readout strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.box-readout pre {
  max-height: 94px;
  margin: 0;
  overflow: auto;
  color: var(--color-box-muted);
  font: 12px/1.45 var(--font-mono);
  white-space: pre-wrap;
}

.box-readout button {
  min-height: 32px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid var(--color-box-border);
  border-radius: 6px;
  color: var(--color-surface);
  background: var(--color-link);
  font-weight: 760;
  cursor: pointer;
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "visual";
  }

  .hero-copy-block {
    max-width: 780px;
  }

  h1 {
    max-width: 820px;
    font-size: clamp(48px, 8vw, 68px);
  }

  .tool-grid,
  .safety-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .install,
  .attribution {
    grid-template-columns: 1fr;
  }
}

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

  .topbar {
    min-height: 52px;
    gap: var(--space-xs);
    padding-inline: var(--space-xs) var(--space-2xs);
  }

  .terminal-line {
    gap: var(--space-2xs);
  }

  .topbar .button {
    width: auto;
    min-height: 38px;
    padding-inline: var(--space-sm);
  }

  .hero {
    padding: 120px 20px 44px;
  }

  h1 {
    font-size: clamp(40px, 11vw, 47px);
  }

  .hero-copy {
    font-size: 17px;
  }

  .hero .install-strip {
    display: none;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .chai-button {
    justify-self: center;
    width: min(100%, 260px);
  }

  .chai-button img {
    width: 100%;
  }

  .proof-band,
  .steps,
  .tool-grid,
  .safety-grid,
  .tools-layout {
    grid-template-columns: 1fr;
  }

  .proof-band div {
    border-left: 0;
    border-top: 1px solid var(--color-rule);
  }

  .proof-band div:first-child {
    border-top: 0;
  }

  .steps article,
  .tool-grid article,
  .safety-grid article {
    min-height: auto;
    padding: 22px;
  }

  .steps span,
  .tool-grid span,
  .safety-grid strong {
    margin-bottom: 24px;
  }

  .section {
    width: min(100% - 32px, var(--max));
    padding-block: 64px;
  }

  .tour-shell {
    margin-inline: auto;
  }

  .footer {
    display: grid;
  }

  .footer-links {
    margin-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }

  .caret {
    animation: none;
    opacity: 1;
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}
