/*
 * styles.css — Corvane
 *
 * Family treatment, shared with the house style: near-black ground, hairline rules
 * (alpha, never solid grey), monospace-forward type, one vivid accent per site.
 * Deliberately unglossy — sharp corners, no soft glow, no decorative gradients.
 *
 * Motion: a short staggered entrance (fade-up, plus a clip-path reveal on the
 * headline), then the page is still. Every animation is disabled under
 * prefers-reduced-motion.
 *
 * Color tokens are fixed; only --accent varies per surface.
 */


:root {
  /* Family palette — matches the house style: near-black ground, one vivid accent. */
  --paper:      #0a0b0d;   /* page ground */
  --paper-2:    #101216;   /* sunken */
  --panel:      #0e1013;   /* raised surface */
  --ink:        #e9ecf1;
  --ink-soft:   #b9c0cb;
  --muted:      #7f8794;
  --faint:      #5b6472;
  --rule:       rgba(255,255,255,0.08);
  --rule-2:     rgba(255,255,255,0.16);
  --accent:     #4b8bff;   /* the one vivid accent */
  --accent-2:   #2563eb;
  --accent-ink: #7fb0ff;   /* accent for text on dark */
  --signal:     #ff6b5a;   /* limits / critical only */
  --warn:       #e0b341;
  --ok:         #4ec9a0;
  --masthead:   #06070a;
  --mark:       #e9ecf1;

  --wrap: 1020px;
  --radius: 3px;

  /* Headings in the family run MONOSPACE, not serif. */
  --serif: 'IBM Plex Mono', ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans:  'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono:  'IBM Plex Mono', ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

::selection { background: #d8e6e0; color: var(--ink); }

a { color: var(--accent-ink); text-decoration: none;
    text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); text-decoration: underline; }

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* ------------------------------------------------------------------ masthead */

.site-header {
  background: var(--masthead);
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--rule-2);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 64px; flex-wrap: wrap;
}

.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: #f4f3ef; font-family: var(--serif);
  font-size: 20px; font-weight: 600; letter-spacing: .005em;
}
.brand:hover { text-decoration: none; color: #fff; }
.brand::before {
  content: ""; width: 10px; height: 10px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(75,139,255,.15);
  transform: rotate(45deg);
}
.brand .brand-note {
  font-family: var(--mono); font-size: 11.5px; font-weight: 400;
  letter-spacing: .12em; text-transform: uppercase; color: #8b929c;
  padding-left: 11px; border-left: 1px solid #2c3038;
}

.site-nav { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.site-nav a {
  color: #b7bcc4; padding: 8px 12px; border-radius: 3px;
  font-size: 14.5px; letter-spacing: .01em;
}
.site-nav a:hover { color: #fff; background: #1b1f25; text-decoration: none; }
.site-nav a[aria-current="page"] { color: #fff; background: #24282f; }

/* --------------------------------------------------------------------- blocks */

main { display: block; counter-reset: sec; }

.section { padding: 62px 0; border-top: 1px solid var(--rule); counter-increment: sec; }
.section:first-of-type { border-top: 0; }
.section h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: 27px; line-height: 1.22; letter-spacing: -.01em;
  margin: 0 0 10px;
}
.section h2::before {
  content: counter(sec, decimal-leading-zero);
  display: block; font-family: var(--mono); font-size: 12px;
  letter-spacing: .16em; color: var(--faint); margin-bottom: 12px;
}
.section .lede { color: var(--muted); margin: 0 0 30px; max-width: 66ch; }

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

.hero {
  background: transparent;            /* the mesh shows through */
  border-bottom: 1px solid var(--rule);
  padding: 84px 0 66px;
}
.hero .hero-tag {
  font-family: var(--mono); font-size: 11.5px; font-weight: 400;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 20px;
}
.hero h1 {
  font-family: var(--mono); font-weight: 300;
  font-size: clamp(2.5rem, 5.4vw, 4.6rem);
  line-height: 1.06; letter-spacing: -.03em;
  margin: 0 0 26px; max-width: 20ch;
}
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero p { font-size: 1.02rem; line-height: 1.75; color: var(--ink-soft); max-width: 54ch; margin: 0 0 16px; }
.hero p:last-child { margin-bottom: 0; }

/* page head (inner pages) --------------------------------------------------- */

.page-head { background: transparent; border-bottom: 1px solid var(--rule); padding: 72px 0 46px; }
.page-head h1 {
  font-family: var(--mono); font-weight: 300;
  font-size: clamp(1.9rem, 3.2vw, 2.85rem);
  line-height: 1.1; letter-spacing: -.03em; margin: 0 0 16px; max-width: 26ch;
}
.page-head h1 em { font-style: normal; color: var(--accent-ink); }
.page-head .lede { font-size: 1rem; color: var(--ink-soft); max-width: 68ch; margin: 0; }
.eyebrow {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent-ink); margin: 0 0 14px;
}

/* ----------------------------------------------------------------- card grid */

.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 24px 22px 20px;
  display: flex; flex-direction: column;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-top-color: var(--accent); transform: translateY(-2px); }
.card h3 {
  font-family: var(--serif); font-size: 21px; font-weight: 600;
  letter-spacing: -.01em; margin: 0 0 9px;
}
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); text-decoration: none; }
.card p { margin: 0 0 12px; color: var(--ink-soft); font-size: 15.5px; }
.card .card-meta {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 14px;
}
.card .card-foot {
  font-size: 14.5px; margin: auto 0 0; padding-top: 14px;
  border-top: 1px solid var(--rule); color: var(--muted);
}
.card .card-foot strong { color: var(--ink); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------- lists */

.tight { margin: 0; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }
.small { font-size: 14.5px; }

ul.plain, ol.plain { margin: 0 0 16px; padding-left: 20px; }
ul.plain li, ol.plain li { margin: 0 0 9px; color: var(--ink-soft); }
ul.plain strong, ol.plain strong { color: var(--ink); }

ul.checks { list-style: none; margin: 0; padding: 0; }
ul.checks li {
  position: relative; padding-left: 26px; margin: 0 0 14px; color: var(--ink-soft);
}
ul.checks li::before {
  content: ""; position: absolute; left: 2px; top: .34em;
  width: 6px; height: 11px;
  border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(40deg);
}
ul.checks strong { color: var(--ink); }

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

ol.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
ol.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 26px 54px; margin-left: 15px;
  border-left: 1px solid var(--rule-2);
}
ol.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: -16px; top: 0;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--rule-2);
  color: var(--accent-ink); font-family: var(--mono); font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
ol.steps h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; margin: 2px 0 4px; }
ol.steps p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }

/* -------------------------------------------------------------------- tables */

table.data {
  width: 100%; border-collapse: collapse; background: var(--panel);
  border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden;
}
table.data th, table.data td {
  text-align: left; padding: 13px 17px; border-bottom: 1px solid var(--rule);
  font-size: 15px; vertical-align: top;
}
table.data th {
  background: var(--paper-2); font-family: var(--mono); font-weight: 500;
  font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
table.data tr:last-child td { border-bottom: 0; }
table.data td.price {
  font-variant-numeric: tabular-nums; white-space: nowrap;
  font-family: var(--mono); font-size: 14px; color: var(--ink);
}

/* ------------------------------------------------------------------ callouts */

.callout {
  border: 1px solid var(--rule-2); border-left: 3px solid var(--warn);
  background: var(--panel); border-radius: var(--radius); padding: 20px 22px;
}
.callout.limits { border-left-color: var(--signal); }
.callout.fact { border-left-color: var(--ok); }
.callout h3 { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 0 0 10px; }
.callout p, .callout li { color: var(--ink-soft); font-size: 15.5px; }
.callout p:last-child { margin-bottom: 0; }

/* ---------------------------------------------------------------------- code */

code, pre { font-family: var(--mono); }
code {
  background: #14171c; border: 1px solid var(--rule);
  border-radius: 3px; padding: 1px 6px; font-size: 13.5px; color: var(--ink);
}
pre {
  background: #06070a; color: #dfe3e8; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 18px 20px; overflow-x: auto; font-size: 13.5px; line-height: 1.58;
}
pre code { background: none; border: 0; padding: 0; color: inherit; }

/* --------------------------------------------------------------------- price */

.price-line { display: flex; align-items: baseline; gap: 10px; margin: 0 0 6px; }
.price-line .amount {
  font-family: var(--serif); font-size: 27px; font-weight: 600;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
}
.price-line .unit { color: var(--muted); font-size: 14.5px; }

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

.site-footer {
  background: var(--masthead); color: var(--muted);
  padding: 46px 0 54px; font-size: 14.5px; border-top: 1px solid var(--rule-2);
}
.site-footer .wrap {
  display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.site-footer a { color: #c3c8d0; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-note { max-width: 58ch; line-height: 1.66; }

/* ------------------------------------------------------------------- checker */

.checker label {
  display: block; font-family: var(--mono); font-size: 11.5px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 9px;
}
.checker-row { display: flex; flex-wrap: wrap; gap: 10px; max-width: 780px; }
.checker input[type="text"],
.checker select,
.checker button {
  font-size: 15px; border-radius: var(--radius); padding: 12px 14px;
  border: 1px solid var(--rule-2); background: var(--panel); color: var(--ink);
}
.checker input[type="text"] {
  flex: 1 1 380px; min-width: 0; font-family: var(--mono); font-size: 14px;
}
.checker select { font-family: var(--sans); }
.checker button {
  font-family: var(--sans); font-weight: 600; color: #fff;
  background: var(--accent); border-color: var(--accent-ink); cursor: pointer;
}
.checker button:hover { background: var(--accent-ink); }
.checker input:focus, .checker select:focus, .checker button:focus {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
.checker-out { margin-top: 28px; max-width: 880px; }
.checker-out .callout { margin: 0 0 16px; }
.checker-out table.data { margin: 0; }
.checker-out table.data th { width: 34%; white-space: nowrap; }

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

@media (max-width: 860px) {
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .hero { padding: 58px 0 46px; }
  .hero h1 { font-size: 33px; }
  .page-head h1 { font-size: 28px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
  ol.steps > li { padding-left: 46px; }
  .brand .brand-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ─── MOTION ─────────────────────────────────────────────────────────────
   Entrance choreography: the page assembles. Staggered, short, and every
   piece killed by prefers-reduced-motion above. */
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes reveal  { 0% { opacity: 0; clip-path: inset(0 0 100% 0); } 55% { opacity: 1; } 100% { opacity: 1; clip-path: inset(0 0 0 0); } }
@keyframes pulse-dot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.75); } }

.hero-tag     { animation: fade-up .4s 0s    ease both; }
.hero h1      { animation: reveal  .5s .05s  steps(1) both; }
.hero p       { animation: fade-up .4s .20s  ease both; }
.page-head .eyebrow { animation: fade-up .4s 0s ease both; }
.page-head h1 { animation: reveal  .5s .05s steps(1) both; }
.page-head .lede { animation: fade-up .4s .20s ease both; }
.section h2   { animation: fade-up .4s ease both; }
.card         { transition: border-color .15s, transform .15s, background .15s; }
.card:hover   { transform: translateY(-2px); border-color: var(--rule-2); }
.site-nav a   { transition: color .15s, background .15s; }
a             { transition: color .15s; }
table.data tr { transition: background .15s; }
table.data tbody tr:hover { background: rgba(255,255,255,0.02); }
button, .btn  { transition: background .15s, color .15s, border-color .15s; }
.status-dot   { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); animation: pulse-dot 2.5s ease-in-out infinite; }

/* ─── BACKGROUND MESH ────────────────────────────────────────────────────
   Fixed canvas behind everything. Content sits above it; the field is faint
   by design. Static single frame under prefers-reduced-motion. */
.mesh-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; display: block; }
main, .site-header, .site-footer, footer { position: relative; z-index: 1; }

/* ─── FAMILY COMPONENTS ──────────────────────────────────────────────────
   The shared vocabulary: boxed outline buttons with a hard offset shadow on
   hover, a status readout strip, '//' section labels, badges, shape marks.
   Sharp corners throughout — nothing here is rounded or glowed. */

/* Buttons */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 400;
  letter-spacing: .04em; padding: 11px 20px; text-decoration: none;
  border-radius: 0; cursor: pointer;
  transition: transform .12s, background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--accent); color: #06070a; border: 1px solid var(--accent); font-weight: 500; }
.btn-primary:hover { transform: translate(2px,-2px); box-shadow: -2px 2px 0 0 var(--accent-2); }
.btn-ghost { color: var(--muted); border: 1px solid var(--rule-2); background: transparent; }
.btn-ghost:hover { color: var(--ink); border-color: var(--muted); }

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

/* Status readout strip */
.status-bar {
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em; color: var(--muted);
}
.status-item { display: inline-flex; align-items: center; gap: 7px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); flex: none; }
.status-dot.warn { background: var(--warn); }
.status-dot.signal { background: var(--signal); }

/* Shape marks — tiny inline glyphs from the family's geometry kit */
.shape-mark { width: 8px; height: 8px; display: inline-block; flex: none; }
.shape-mark.tri { background: var(--accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.shape-mark.sq  { background: transparent; border: 1px solid var(--muted); }
.shape-mark.dia { background: var(--accent); transform: rotate(45deg); }

/* '//' section label */
.section-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 10px;
}
.section-label::before { content: '// '; color: var(--accent); }

/* Badges */
.product-badge, .badge {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  letter-spacing: .09em; text-transform: uppercase;
  padding: 3px 9px; border: 1px solid var(--rule-2); color: var(--muted);
  border-radius: 0;
}
.badge.ok   { border-color: rgba(78,201,160,.35); color: var(--ok); }
.badge.wip  { border-color: rgba(224,179,65,.35); color: var(--warn); }
.badge.bad  { border-color: rgba(255,107,90,.40); color: var(--signal); }
.card-badges { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }

/* Footer columns */
.site-footer .foot-cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.site-footer .foot-brand { max-width: 34ch; color: var(--muted); font-size: 14px; }
.site-footer h4 {
  font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .12em;
  text-transform: uppercase; color: var(--faint); margin: 0 0 12px;
}
.foot-links a { display: block; font-size: 14px; margin-bottom: 8px; }

/* Craft details: selection, focus, scrollbar */
::selection { background: rgba(75,139,255,.30); color: #fff; }
a:focus-visible, button:focus-visible, .btn-primary:focus-visible, .btn-ghost:focus-visible {
  outline: 1px solid var(--accent-ink); outline-offset: 3px;
}
* { scrollbar-width: thin; scrollbar-color: #2a313a var(--paper); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: #232a33; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: #2f3944; }

@media (max-width: 720px) {
  .hero-actions { flex-direction: column; align-items: stretch; }
  .site-footer .foot-cols { gap: 28px; }
}
