/* SpecOCD website
   Palette and rhythm follow Apple's product-page conventions: restrained
   neutrals, one accent, generous vertical space, tight display tracking. */

:root {
  --ink: #1d1d1f;
  --ink-soft: #424245;
  --muted: #6e6e73;
  --ground: #ffffff;
  --ground-alt: #f5f5f7;
  --hairline: #d2d2d7;
  --hairline-soft: #e8e8ed;
  --accent: #0066ff;
  --accent-ink: #ffffff;
  --accent-wash: rgba(0, 102, 255, 0.08);

  --yes: #10804a;
  --partial: #9a6400;
  --no: #86868b;

  /* Terminals stay dark in both themes — a terminal is a dark object. */
  --term-bg: #16161a;
  --term-edge: #2c2c32;
  --term-text: #e8e8ed;
  --term-dim: #8e8e96;
  --term-green: #4ec98a;
  --term-red: #ff7b72;
  --term-blue: #7cb7ff;
  --term-amber: #e3b341;

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
  --radius: 18px;

  --measure: 34rem;
  --page: 1000px;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f5f5f7;
    --ink-soft: #d2d2d7;
    --muted: #98989d;
    --ground: #000000;
    --ground-alt: #0d0d0f;
    --hairline: #38383c;
    --hairline-soft: #1f1f22;
    --accent: #0a84ff;
    --accent-ink: #ffffff;
    --accent-wash: rgba(10, 132, 255, 0.14);

    --yes: #3ddc84;
    --partial: #e3b341;
    --no: #6e6e73;

    --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.6);
  }
}

:root[data-theme="dark"] {
  --ink: #f5f5f7;
  --ink-soft: #d2d2d7;
  --muted: #98989d;
  --ground: #000000;
  --ground-alt: #0d0d0f;
  --hairline: #38383c;
  --hairline-soft: #1f1f22;
  --accent: #0a84ff;
  --accent-ink: #ffffff;
  --accent-wash: rgba(10, 132, 255, 0.14);

  --yes: #3ddc84;
  --partial: #e3b341;
  --no: #6e6e73;

  --shadow-soft: 0 1px 2px rgba(0, 0, 0, 0.5), 0 12px 32px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

p {
  margin: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

/* ---------- structure ---------- */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 22px;
}

section {
  padding-block: clamp(72px, 11vw, 132px);
}

.band {
  background: var(--ground-alt);
}

.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: var(--measure);
  margin-bottom: clamp(40px, 6vw, 64px);
}

h2 {
  font-size: clamp(1.9rem, 4.2vw, 2.9rem);
  line-height: 1.1;
}

h3 {
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.lead {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
}

/* Reachable by keyboard, out of the way otherwise. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 40;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.875rem;
  font-weight: 500;
}

.skip-link:focus {
  left: 0;
  text-decoration: none;
}

/* ---------- faq ---------- */

.faq {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 34px 48px;
}

.qa {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-width: 46ch;
}

.qa h3 {
  font-size: 1rem;
}

.qa p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
}

.qa code {
  font-family: var(--font-mono);
  font-size: 0.8125em;
  color: var(--ink);
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Lifts off the page only once content runs underneath it. */
.nav.is-scrolled {
  border-bottom-color: var(--hairline-soft);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.05);
}

:root[data-theme="dark"] .nav.is-scrolled {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav.is-scrolled {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 66px;
}



.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.version {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 980px;
  padding: 4px 8px 3px;
  font-variant-numeric: tabular-nums;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.brand:hover {
  text-decoration: none;
}

/* Scales with the wordmark it sits beside, so nav and footer stay in proportion.
   Larger than a plain glyph would need: the sheet carries three rows of detail. */
.mark {
  width: 1.6em;
  height: 1.6em;
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.nav-links a {
  position: relative;
  color: inherit;
  padding: 7px 10px;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

/* Underline grows from the centre on hover and stays put for the current section. */
.nav-links a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

.nav-links a:hover::after,
.nav-links a[aria-current="true"]::after {
  transform: scaleX(1);
}

.nav-links a[aria-current="true"] {
  color: var(--ink);
}

.nav-cta {
  margin-left: 12px;
  height: 34px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border-radius: 980px;
  font-weight: 500;
}

/* Beats the shared .nav-links a rules above, which would otherwise repaint it. */
.nav-links a.nav-cta,
.nav-links a.nav-cta:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.nav-links a.nav-cta:hover {
  background: color-mix(in srgb, var(--accent) 86%, #000);
}

.nav-links a.nav-cta::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .nav-links a::after {
    transition: none;
  }
}

/* ---------- theme toggle ---------- */

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

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  padding: 3px;
  border: 1px solid var(--hairline-soft);
  border-radius: 980px;
  background: color-mix(in srgb, var(--ground-alt) 70%, transparent);
}

.theme-toggle button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 980px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.theme-toggle button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle button:hover {
  color: var(--ink);
}

/* The chosen mode is the one carrying the accent, so the state reads at a glance. */
.theme-toggle button[aria-checked="true"] {
  background: var(--ground);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

:root[data-theme="dark"] .theme-toggle button[aria-checked="true"] {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle button[aria-checked="true"] {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  }
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(64px, 10vw, 112px) clamp(56px, 8vw, 96px);
}

.hero h1 {
  font-size: clamp(2.5rem, 6.4vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 17ch;
}

.hero-sub {
  margin-top: 26px;
  max-width: var(--measure);
  font-size: clamp(1.0625rem, 2.1vw, 1.3125rem);
  line-height: 1.5;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding-inline: 24px;
  border-radius: 980px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-primary:hover {
  background: color-mix(in srgb, var(--accent) 86%, #000);
}

.btn-quiet {
  border-color: var(--hairline);
  color: var(--ink);
}

.btn-quiet:hover {
  border-color: var(--ink-soft);
}

.hero-note {
  margin-top: 22px;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ---------- terminal ---------- */

.terminal {
  margin-top: clamp(40px, 6vw, 60px);
  background: var(--term-bg);
  border: 1px solid var(--term-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--term-edge);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3a41;
}

.terminal-title {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  color: var(--term-dim);
}

.terminal-body {
  padding: 20px 18px 22px;
  overflow-x: auto;
}

.terminal pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  color: var(--term-text);
  white-space: pre;
}

.c-prompt,
.c-green {
  color: var(--term-green);
}
.c-dim {
  color: var(--term-dim);
}
.c-red {
  color: var(--term-red);
}
.c-blue {
  color: var(--term-blue);
}
.c-amber {
  color: var(--term-amber);
}

.caption {
  margin-top: 18px;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: var(--measure);
}

/* ---------- failure modes ---------- */

.modes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--hairline-soft);
  border-block: 1px solid var(--hairline-soft);
}

.mode {
  background: var(--ground);
  padding: 32px 26px 34px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.band .mode {
  background: var(--ground-alt);
}

.mode-cmd {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0;
}

.mode p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(28px, 4vw, 48px);
}

.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink);
  background: var(--accent-wash);
  border-radius: 7px;
  padding: 5px 9px;
  align-self: flex-start;
}

.step p {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- comparison ---------- */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius);
  background: var(--ground);
}

.band .table-scroll {
  background: var(--ground-alt);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 720px;
}

/* Small tables sitting in a column, which the comparison table's width would clip. */
.table-scroll.compact table {
  min-width: 0;
}

.table-scroll.compact td {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink);
}

th,
td {
  text-align: left;
  padding: 15px 18px;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
}

thead th {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

thead th.ours {
  color: var(--accent);
}

tbody th {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

td {
  color: var(--muted);
}

td.ours {
  color: var(--ink);
  font-weight: 500;
  background: var(--accent-wash);
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: none;
}

.yes {
  color: var(--yes);
  font-weight: 600;
}
.partial {
  color: var(--partial);
}
.no {
  color: var(--no);
}

.footnote {
  margin-top: 20px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 62ch;
}

/* ---------- jira ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}

.flow {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.flow-step {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 13px 16px;
  border: 1px solid var(--hairline-soft);
  background: var(--ground);
}

.band .flow-step {
  background: var(--ground-alt);
}

.flow-step:first-child {
  border-radius: 12px 12px 0 0;
}

.flow-step:last-child {
  border-radius: 0 0 12px 12px;
}

.flow-step + .flow-step {
  border-top: none;
}

.flow-step span {
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: 0.8125rem;
}

.flow-step.fallback {
  border-color: color-mix(in srgb, var(--partial) 45%, var(--hairline-soft));
  background: color-mix(in srgb, var(--partial) 8%, var(--ground));
}

.band .flow-step.fallback {
  background: color-mix(in srgb, var(--partial) 8%, var(--ground-alt));
}

/* ---------- install ---------- */

.install {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--term-bg);
  border: 1px solid var(--term-edge);
  border-radius: 14px;
  padding: 16px 16px 16px 20px;
  max-width: 560px;
}

.install code {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--term-text);
  overflow-x: auto;
}

.copy {
  flex: none;
  height: 32px;
  padding-inline: 14px;
  border-radius: 980px;
  border: 1px solid var(--term-edge);
  background: transparent;
  color: var(--term-dim);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.copy:hover {
  color: var(--term-text);
  border-color: var(--term-dim);
}

.cmd-list {
  margin-top: 36px;
  display: grid;
  gap: 1px;
  background: var(--hairline-soft);
  border: 1px solid var(--hairline-soft);
  border-radius: 14px;
  overflow: hidden;
}

.cmd {
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) 1.4fr;
  gap: 16px;
  padding: 14px 18px;
  background: var(--ground);
}

.band .cmd {
  background: var(--ground-alt);
}

.cmd code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--ink);
}

.cmd span {
  font-size: 0.875rem;
  color: var(--muted);
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--hairline-soft);
  padding-block: 56px 64px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.foot-top {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  align-items: flex-start;
}

.foot-brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.foot-brand .brand {
  font-size: 1rem;
}

.foot-brand p {
  color: var(--muted);
}

/* Release facts read as data, so they get a label/value grid and lining figures. */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 22px 28px;
  margin: 0;
  padding-block: 30px;
  margin-block: 34px 26px;
  border-block: 1px solid var(--hairline-soft);
}

.fact dt {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact dd {
  margin: 6px 0 0;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.foot-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 40px;
  justify-content: space-between;
  align-items: flex-start;
}

.caveat {
  max-width: 58ch;
  line-height: 1.65;
}

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

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rise {
    animation: rise 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) backwards;
  }

  .rise-2 {
    animation-delay: 0.08s;
  }
  .rise-3 {
    animation-delay: 0.16s;
  }
  .rise-4 {
    animation-delay: 0.24s;
  }

  .cursor {
    animation: blink 1.15s steps(1, end) infinite;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

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

  .nav-cta {
    margin-left: 0;
  }
}

@media (max-width: 600px) {
  .version {
    display: none;
  }

  .cmd {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .terminal pre {
    font-size: 0.75rem;
  }
}
