/* Hallmark · macrostructure: Long Document · genre: atmospheric · theme: Terminal
 * nav: N8 Terminal command · footer: Ft4 Dense colophon
 * enrichment: none (typography only — Terminal's image treatment is "none",
 *   and no real RasoCMS product screenshots exist to show honestly)
 * motion: none, except the nav caret blink inside the typed prompt line
 *   (Terminal duration scale is 0× per microinteractions.md)
 * diversification: differs from the prior build (Split Studio · studied-DNA ·
 *   light / rounded-sans / cool-navy) on macrostructure AND on all three theme
 *   axes — paper-band dark vs light, display-style mono vs rounded-sans,
 *   accent-hue phosphor-green (chromatic-other) vs cool-navy
 * pre-emit critique: P4 H4 E4 S4 R5 V4
 */

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

.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: var(--space-md);
  top: -3rem;
  background: var(--color-accent);
  color: var(--color-accent-ink);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: var(--z-modal);
  transition: top var(--dur-short) var(--ease-out);
  font-weight: 700;
}
.skip-link:focus { top: var(--space-md); }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------- nav (N8) */

.nav-term {
  border-bottom: var(--rule-hair) solid var(--color-rule);
  background: var(--color-paper);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky-nav);
}
.nav-term__inner {
  max-width: 76rem;
  margin-inline: auto;
  padding: var(--space-sm) var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-width: 0;
}
.nav-term__brand {
  font-weight: 700;
  font-size: var(--text-md);
  text-decoration: none;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-term__brand span[aria-hidden]:first-child { color: var(--color-accent); }
.nav-term__caret {
  display: inline-block;
  width: 0.6ch;
  color: var(--color-accent);
  animation: blink 1.05s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .nav-term__caret { animation: none; } }

.nav-term__menu {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-sm);
  min-width: 0;
}
.nav-term__menu a {
  text-decoration: none;
  color: var(--color-muted);
  white-space: nowrap;
  padding: var(--space-2xs) 0;
}
.nav-term__menu a:hover { color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }
.nav-term__menu-cta { color: var(--color-accent) !important; }
.nav-term__menu-cta:hover { color: var(--color-accent-2) !important; }

.nav-term__toggle {
  display: none;
  background: none;
  border: var(--rule-hair) solid var(--color-rule-2);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 44px;
}
.nav-term__toggle:hover { border-color: var(--color-accent); color: var(--color-accent); }

@media (max-width: 47.9375rem) {
  .nav-term__menu { display: none; }
  .nav-term__toggle { display: inline-flex; align-items: center; }

  /* When open, #nav itself becomes the full-screen sheet — the geometry the
     responsiveness gate measures is #nav's own box, so it must touch every
     edge rather than a child of it (a fixed child of a merely-relative
     header shrink-wraps to the header's own bounds instead of the
     viewport — the exact bug responsive-gate.md warns about). */
  .nav--open {
    position: fixed;
    inset: 0;
    height: 100dvh;
    overflow-y: auto;
  }
  .nav--open .nav-term__inner {
    flex-direction: column;
    align-items: stretch;
    min-height: 100%;
  }
  .nav--open .nav-term__menu {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
    font-size: var(--text-lg);
    padding-top: var(--space-2xl);
  }
}

/* ------------------------------------------------------------- doc / prose */

.doc {
  max-width: 76rem;
  margin-inline: auto;
  padding: 0 var(--page-gutter);
}

.lede-block {
  padding-block: var(--space-3xl) var(--space-2xl);
  max-width: var(--measure);
}
.lede-kicker {
  font-size: var(--text-sm);
  color: var(--color-neutral);
  letter-spacing: 0.08em;
  margin: 0 0 var(--space-md);
}
h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-lg);
  overflow-wrap: anywhere;
  min-width: 0;
}
.lede {
  font-size: var(--text-md);
  color: var(--color-ink);
  line-height: 1.6;
  margin: 0 0 var(--space-md);
}
.lede-promise {
  font-weight: 600;
  color: var(--color-accent);
  margin: 0 0 var(--space-lg);
}
.lede-actions { margin: 0 0 var(--space-md); }
.lede-guarantee {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-muted);
  border-left: 2px solid var(--color-rule);
  padding-left: var(--space-md);
}

.link-cta {
  display: inline-block;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  padding: var(--space-xs) 0;
  border-bottom: 1px solid transparent;
}
.link-cta:hover { border-bottom-color: var(--color-accent); }
.link-cta:active { color: var(--color-accent-2); }

.doc-section {
  padding-block: var(--space-2xl) 0;
  max-width: var(--measure);
}
.doc-section + .doc-section { border-top: var(--rule-hair) solid var(--color-rule); }

.prompt-head {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-lg);
  overflow-wrap: anywhere;
  min-width: 0;
}
.prompt-head span[aria-hidden] { color: var(--color-accent); }

.inline-head {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
  margin: var(--space-lg) 0 var(--space-2xs);
}
.doc-section p { margin: 0 0 var(--space-md); color: var(--color-ink); }
.doc-section p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------- feature list */

.feature-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-lg);
  margin: var(--space-lg) 0 0;
  padding: 0;
}
.feature-list > div {
  border-top: var(--rule-hair) solid var(--color-rule);
  padding-top: var(--space-md);
}
.feature-list dt {
  font-weight: 600;
  color: var(--color-ink);
  margin-bottom: var(--space-2xs);
}
.feature-list dd {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

/* --------------------------------------------------------------- pricing */

.spec-wrap { overflow-x: auto; margin-top: var(--space-lg); }
.spec-sheet {
  border-collapse: collapse;
  width: 100%;
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
}
.spec-sheet th, .spec-sheet td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-sm) var(--space-md) var(--space-sm) 0;
  border-top: var(--rule-hair) solid var(--color-rule);
}
.spec-sheet th {
  color: var(--color-muted);
  font-weight: 500;
  width: 9rem;
  white-space: nowrap;
}
.spec-price {
  font-weight: 700;
  color: var(--color-accent);
  font-size: var(--text-lg);
}

/* -------------------------------------------------------------- references */

.reference-list {
  list-style: none;
  margin: var(--space-lg) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-md);
}
.reference-list li {
  border-top: var(--rule-hair) solid var(--color-rule);
  padding-top: var(--space-sm);
  color: var(--color-muted);
}
.reference-list strong { color: var(--color-ink); font-weight: 600; }
.reference-list a { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }

/* -------------------------------------------------------------------- form */

.contact-section { padding-bottom: var(--space-3xl); }

.lead-form {
  margin-top: var(--space-lg);
  display: grid;
  gap: var(--space-lg);
  max-width: 34rem;
}
.field { display: grid; gap: var(--space-2xs); min-width: 0; }
.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-lg);
}
@media (max-width: 34.9375rem) {
  .field-row { grid-template-columns: minmax(0, 1fr); }
}

.field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-ink);
}
.field input, .field textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-ink);
  background: var(--color-paper);
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-sm);
  padding: 0 var(--space-md);
  min-height: 44px;
  outline: 2px solid transparent;
  outline-offset: 1px;
}
.field textarea { padding-block: var(--space-sm); min-height: 6rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--color-neutral); }

@media (hover: hover) {
  .field input:hover, .field textarea:hover { background: var(--color-paper-2); }
}
.field input:focus-visible, .field textarea:focus-visible {
  outline-color: var(--color-focus);
  border-color: var(--color-rule-2);
}
.field input:disabled, .field textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--color-error);
}

.field-helper {
  min-height: 1lh;
  font-size: var(--text-xs);
  color: var(--color-muted);
  margin: 0;
}
.field-helper[data-error="true"] { color: var(--color-error); }

.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.field-submit { display: grid; gap: var(--space-sm); justify-items: start; }

.btn-term {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  color: var(--color-accent);
  background: none;
  border: 1px solid var(--color-rule-2);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-lg);
  min-height: 44px;
  cursor: pointer;
  outline: 2px solid transparent;
  outline-offset: 2px;
}
@media (hover: hover) {
  .btn-term:hover { border-color: var(--color-accent); background: var(--color-paper-2); }
}
.btn-term:active { color: var(--color-accent-2); transform: translateY(1px); }
.btn-term:focus-visible { outline-color: var(--color-focus); }
.btn-term:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-term[data-busy="true"] [data-state="idle"] { display: none; }
.btn-term:not([data-busy="true"]) [data-state="loading"] { display: none; }

.form-status {
  margin: 0;
  font-size: var(--text-sm);
  min-height: 1lh;
}
.form-status[data-tone="ok"] { color: var(--color-accent); }
.form-status[data-tone="error"] { color: var(--color-error); }

.form-privacy {
  font-size: var(--text-xs);
  color: var(--color-neutral);
  max-width: 48ch;
}

/* -------------------------------------------------------------- agent link */

.agent-links {
  max-width: 76rem;
  margin: var(--space-2xl) auto 0;
  padding: 0 var(--page-gutter);
  font-size: var(--text-xs);
  color: var(--color-neutral);
}
.agent-links a { color: var(--color-neutral); text-decoration: underline; text-underline-offset: 2px; }
.agent-links a:hover { color: var(--color-accent); }

/* ------------------------------------------------------------- footer (Ft4) */

.foot-dense {
  border-top: var(--rule-hair) solid var(--color-rule);
  margin-top: var(--space-lg);
  padding: var(--space-lg) var(--page-gutter) var(--space-2xl);
  max-width: 76rem;
  margin-inline: auto;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-neutral);
  display: grid;
  gap: var(--space-xs);
}
.foot-dense__line { margin: 0; color: var(--color-muted); }
.foot-dense__line a { color: var(--color-muted); text-decoration: underline; text-underline-offset: 2px; }
.foot-dense__links { margin: 0; }
.foot-dense__links a { color: var(--color-neutral); text-decoration: none; }
.foot-dense__links a:hover { color: var(--color-accent); text-decoration: underline; text-underline-offset: 2px; }
.foot-dense__meta { margin: 0; }

/* ----------------------------------------------------------------- 320 floor */

@media (max-width: 22.5rem) {
  :root { --text-display: clamp(2rem, 6vw + 0.5rem, 2.75rem); }
  .nav-term__brand { font-size: var(--text-sm); }
}
