/* Chudware public site.
   Hand-written CSS. No framework, no build step, no external requests.
   A strict CSP (default-src 'none') is applied by _headers, so this file
   is the only styling channel — there are no inline styles and no scripts. */

/* ---------------------------------------------------------------- tokens */

:root {
  /* The site is dark in every browser setting; declare it so form controls,
     scrollbars and the canvas under our background all render dark too. */
  color-scheme: dark;

  /* Brand palette (shared with the app portal). */
  --bg: #0f1418;
  --bg-2: #12181c;
  --panel: #161d23;
  --text: #e6edf3;
  --muted: #8b93a3;
  --accent: #4f8cff;
  --accent-hi: #6fa2ff;
  --teal: #2fd4a7;
  --teal-hi: #42ecce;

  /* Derived. --line is decorative only; --line-ui is used wherever a border
     is the sole boundary of a control (>= 3:1 against --bg and --panel).
     --ink is the label colour on bright fills (5.76:1 on --accent). */
  --line: #202a33;
  --line-ui: #616d7a;
  --ink: #0b1015;

  --sans: ui-sans-serif, system-ui, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", "IBM Plex Mono", Menlo, Consolas, monospace;

  /* 4px spacing scale. */
  --s1: 0.25rem;
  --s2: 0.5rem;
  --s3: 0.75rem;
  --s4: 1rem;
  --s5: 1.5rem;
  --s6: 2rem;
  --s7: 3rem;
  --s8: 4rem;
  --s9: 6rem;
  --s10: 8rem;

  --maxw: 1120px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 4px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ------------------------------------------------------------------ base */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 640;
  letter-spacing: -0.021em;
  line-height: 1.12;
  text-wrap: balance;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; }

a { color: var(--accent-hi); }

a:hover { color: var(--text); }

code {
  font-family: var(--mono);
  font-size: 0.875em;
  color: var(--text);
}

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

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

.skip {
  position: absolute;
  left: var(--s4);
  top: var(--s4);
  z-index: 20;
  transform: translateY(-200%);
  background: var(--accent);
  color: var(--ink);
  font: 600 0.875rem/1 var(--sans);
  padding: var(--s3) var(--s4);
  border-radius: var(--radius);
  text-decoration: none;
}

.skip:focus-visible {
  transform: none;
  color: var(--ink);
}

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

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main { flex: 1 0 auto; }

section { border-top: 1px solid var(--line); }

section:first-child { border-top: 0; }

.eyebrow {
  margin: 0 0 var(--s4);
  font: 500 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}

.lede {
  max-width: 60ch;
  font-size: 1.0625rem;
  color: var(--muted);
}

.lede strong { color: var(--text); font-weight: 560; }

/* ---------------------------------------------------------------- header */

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: var(--s5);
  min-height: 60px;
  padding-block: var(--s3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}

.brand img { width: 26px; height: 26px; }

.brand b {
  font-weight: 650;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s5);
  list-style: none;
}

.site-nav a {
  font: 500 0.6875rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding-block: var(--s2);
  transition: color 0.15s var(--ease);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

.site-nav a[aria-current="page"] { color: var(--teal); }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 0.8125rem 1.375rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font: 600 0.9375rem/1 var(--sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}

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

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

.btn-ghost {
  border-color: var(--line-ui);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--text);
  color: var(--text);
}

.btn .arrow { font-family: var(--mono); font-weight: 400; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}

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

.hero { padding: clamp(3rem, 9vw, 6rem) 0 var(--s8); }

.hero h1 {
  max-width: 20ch;
  font-size: clamp(2.125rem, 5vw, 3.25rem);
}

.hero .lede { margin-top: var(--s5); }

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

/* Datasheet-style key/value table. Sits beside the hero copy on wide screens,
   below it on narrow ones. */
.specs {
  display: grid;
  grid-template-columns: 1fr;
  margin: var(--s7) 0 0;
  list-style: none;
}

.specs > div {
  padding: var(--s4) 0;
  border-top: 1px solid var(--line);
}

.specs > div:last-child { border-bottom: 1px solid var(--line); }

.specs dt {
  font: 500 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.specs dd {
  margin: var(--s2) 0 0;
  font-size: 0.9375rem;
  color: var(--text);
  max-width: 40ch;
}

/* ------------------------------------------------------------ screenshot */

.shot-section { padding: var(--s8) 0; }

figure.shot { margin: 0; }

.shot-frame {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg-2);
  overflow: hidden;
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  font: 400 0.75rem/1.4 var(--mono);
  color: var(--muted);
}

.shot-bar::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  flex: none;
}

/* Placeholder canvas. Replace .shot-slot with <img src="assets/app-screenshot.png" …>. */
.shot-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: var(--s5);
  text-align: center;
  background-color: var(--bg-2);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0 11px,
    rgba(143, 152, 168, 0.07) 11px 12px
  );
}

.shot-slot span {
  font: 500 0.75rem/1.6 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

figure.shot figcaption {
  margin-top: var(--s3);
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 68ch;
}

/* ---------------------------------------------------------- capabilities */

.caps-section { padding: var(--s8) 0 var(--s9); }

.caps-head {
  display: grid;
  gap: var(--s4);
  margin-bottom: var(--s7);
}

.caps-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); max-width: 20ch; }

.caps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--s8);
  list-style: none;
  counter-reset: cap;
}

.caps li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: var(--s3);
  padding: var(--s5) 0;
  border-top: 1px solid var(--line);
  counter-increment: cap;
}

.caps li::before {
  content: counter(cap, decimal-leading-zero);
  font: 400 0.75rem/1.7 var(--mono);
  color: var(--teal);
  letter-spacing: 0.06em;
}

.caps h3 {
  font-size: 1.0625rem;
  font-weight: 620;
  letter-spacing: -0.012em;
  line-height: 1.35;
}

.caps p {
  margin-top: var(--s2);
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 46ch;
}

/* ------------------------------------------------------------- cta strip */

.cta-strip { padding: var(--s8) 0; background: var(--bg-2); }

.cta-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s6);
}

.cta-strip h2 { font-size: clamp(1.375rem, 2.6vw, 1.75rem); max-width: 22ch; }

.cta-strip p { margin-top: var(--s3); color: var(--muted); max-width: 52ch; font-size: 0.9375rem; }

.cta-strip .btn-row { margin-top: 0; }

/* --------------------------------------------------------------- notices */

.notice {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s3);
  margin-top: var(--s6);
  padding: var(--s4) var(--s5);
  border: 1px solid var(--line-ui);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 0.9375rem;
  color: var(--muted);
}

.notice b {
  font: 600 0.6875rem/1.9 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.notice p + p { margin-top: var(--s2); }

.notice > :not(b) { grid-column: 2; }

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

.page-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 var(--s7); }

.page-head h1 { font-size: clamp(1.875rem, 4.4vw, 2.75rem); max-width: 18ch; }

.page-head .lede { margin-top: var(--s4); }

.tiers-section { padding-bottom: var(--s8); }

.tiers {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5);
  list-style: none;
}

.tier {
  display: flex;
  flex-direction: column;
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.tier-featured { border-color: var(--line-ui); }

.tier-featured .tier-name { color: var(--teal); }

.tier-name {
  font: 600 0.6875rem/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.tier-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}

.tier-price .amount {
  font-size: 2.25rem;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1;
}

.tier-price .per { font-size: 0.875rem; color: var(--muted); }

.ph-tag {
  display: inline-block;
  margin-top: var(--s3);
  padding: 0.125rem 0.4375rem;
  border: 1px dashed var(--line-ui);
  border-radius: 3px;
  font: 500 0.625rem/1.7 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tier-for {
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
}

.tier-list {
  margin: var(--s4) 0 var(--s5);
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--s3);
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Hanging em-dash marker. Deliberately NOT a grid: these list items contain
   inline markup, and every inline child of a grid container would become its
   own grid item and land in the marker column. */
.tier-list li {
  position: relative;
  padding-left: 1.25rem;
}

.tier-list li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.9;
}

.tier-list b { color: var(--text); font-weight: 560; }

.tier .btn {
  margin-top: auto;
  justify-content: center;
}

.tbd {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text);
  border-bottom: 1px dotted var(--line-ui);
}

/* Cost-driver explainer: plain hairline rows, not cards. */
.drivers-section { padding: var(--s8) 0 var(--s9); }

.drivers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 var(--s8);
  margin-top: var(--s6);
  list-style: none;
}

.drivers li {
  padding: var(--s5) 0;
  border-top: 1px solid var(--line);
}

.drivers h3 { font-size: 1rem; font-weight: 620; }

.drivers p { margin-top: var(--s2); font-size: 0.9375rem; color: var(--muted); max-width: 48ch; }

/* ---------------------------------------------------------------- signup */

.steps-section { padding-bottom: var(--s8); }

.steps {
  counter-reset: step;
  list-style: none;
  margin-top: var(--s6);
  display: grid;
  gap: 0;
  max-width: 72ch;
}

.steps li {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: var(--s3);
  padding: var(--s5) 0;
  border-top: 1px solid var(--line);
  counter-increment: step;
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  font: 400 0.75rem/1.7 var(--mono);
  color: var(--teal);
}

.steps h3 { font-size: 1.0625rem; font-weight: 620; line-height: 1.35; }

.steps p { margin-top: var(--s2); font-size: 0.9375rem; color: var(--muted); }

.facts-section { padding: var(--s7) 0 var(--s9); }

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s6) var(--s8);
  margin-top: var(--s5);
}

.facts h3 {
  font: 500 0.6875rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--line);
}

.facts ul { list-style: none; margin-top: var(--s4); display: grid; gap: var(--s3); }

.facts li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.facts li::before {
  content: "\2014";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal);
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.9;
}

.facts .no li::before { color: var(--muted); }

/* ------------------------------------------------------------------- 404 */

.error-page {
  display: flex;
  align-items: center;
  padding: var(--s9) 0;
}

.error-page .code {
  font: 500 0.75rem/1.4 var(--mono);
  letter-spacing: 0.18em;
  color: var(--teal);
  margin-bottom: var(--s4);
}

.error-page h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); max-width: 16ch; }

.error-page p { margin-top: var(--s4); }

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

.site-foot {
  border-top: 1px solid var(--line);
  padding: var(--s6) 0 var(--s7);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s5) var(--s6);
  justify-content: space-between;
  align-items: flex-start;
}

.site-foot p { max-width: 44ch; font-size: 0.8125rem; }

.site-foot .foot-brand {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s3);
  color: var(--text);
  font-weight: 620;
}

.site-foot .foot-brand img { width: 20px; height: 20px; }

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  list-style: none;
}

.foot-links a {
  font: 500 0.6875rem/1.6 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.foot-links a:hover { color: var(--text); }

/* ------------------------------------------------------------ responsive */

@media (min-width: 720px) {
  .caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .drivers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: var(--s9);
    align-items: end;
  }
  .hero .specs { margin-top: 0; }
  .tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .caps-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  .caps-head p { max-width: 46ch; }
}

@media (max-width: 719px) {
  .notice { grid-template-columns: 1fr; gap: var(--s2); padding: var(--s4); }
  .notice > :not(b) { grid-column: 1; }
  .site-head .wrap { flex-wrap: wrap; gap: var(--s3) var(--s4); }
  .brand { margin-right: 0; width: 100%; }
  .site-nav { gap: var(--s4); flex-wrap: wrap; }
  .btn-row .btn { flex: 1 1 14rem; justify-content: center; }
  .hero h1 { max-width: none; }
  .shot-slot { aspect-ratio: 4 / 3; }
}

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