/* ============================================================
   macenize.pro — instrument panel
   The products are measurement tools, so the site is built like
   an instrument: hairline rules, tick marks, tabular numerals,
   a live trace. Nothing decorative that isn't also readable.
   ============================================================ */

:root {
  --ink:        #0A0B0E;
  --panel:      #0F1116;
  --panel-2:    #14171E;
  --hairline:   #1E222C;
  --hairline-2: #2A3040;
  --text:       #E8EBF2;
  --muted:      #8992A5;
  --dim:        #5A6376;

  /* Metric identity colours, lifted straight from the app so the
     site and the product agree on what blue means. */
  --cpu:    #4DA3FF;
  --violet: #9B5BFF;
  --signal: #5BFFB0;
  --amber:  #FFB020;
  --pink:   #FF5B8C;
  --danger: #FF453A;

  --grid: rgba(90, 99, 118, 0.10);
  --maxw: 1180px;

  --display: "Instrument Serif", "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Graph paper: the substrate every instrument is read against. */
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  background-position: -1px -1px;
}

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

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

/* ---------- rules and labels ---------- */

.rule { height: 1px; background: var(--hairline); border: 0; }

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}

.label--signal { color: var(--signal); }

/* Tick strip: the ruler edge that runs under section headers. */
.ticks {
  height: 10px;
  background-image: repeating-linear-gradient(90deg,
    var(--hairline-2) 0 1px, transparent 1px 16px);
  opacity: 0.8;
}

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

header.top {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 14, 0.78);
  border-bottom: 1px solid var(--hairline);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 62px; }

.brand {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  display: flex; align-items: baseline; gap: 2px;
}
.brand b { font-weight: 600; }
.brand span { color: var(--signal); }

nav.links { margin-left: auto; display: flex; gap: 22px; }
nav.links a {
  font-family: var(--mono); font-size: 13px;
  color: var(--muted); text-decoration: none;
  padding-bottom: 2px; border-bottom: 1px solid transparent;
  transition: color .18s ease, border-color .18s ease;
}
nav.links a:hover { color: var(--text); border-color: var(--signal); }

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

.hero { padding: 92px 0 64px; position: relative; overflow: hidden; }

.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(46px, 7.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  margin: 18px 0 22px;
  max-width: 15ch;
}
.hero h1 em {
  font-style: italic;
  background: linear-gradient(100deg, var(--cpu), var(--violet) 62%, var(--signal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede {
  font-size: 19px; color: var(--muted); max-width: 60ch; margin-bottom: 34px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.btn {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  text-decoration: none; padding: 12px 20px;
  border: 1px solid var(--hairline-2); color: var(--text);
  background: var(--panel);
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.btn:hover { border-color: var(--signal); transform: translateY(-1px); }
.btn--primary {
  background: linear-gradient(100deg, var(--cpu), var(--violet));
  border-color: transparent; color: #0A0B0E; font-weight: 600;
}
.btn--primary:hover { filter: brightness(1.08); }

/* ---------- live trace ---------- */

.scope {
  margin-top: 54px;
  border: 1px solid var(--hairline);
  background:
    linear-gradient(180deg, rgba(91,255,176,0.04), transparent 60%),
    var(--panel);
  position: relative;
}
.scope__head {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; border-bottom: 1px solid var(--hairline);
}
.scope__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
.scope svg { display: block; width: 100%; height: 190px; }

.trace {
  fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  /* Solid, always. The line used to draw itself in via stroke-dashoffset, which
     meant an invisible chart wherever the animation froze at frame zero — the
     exact failure this product exists to avoid. It brightens instead. */
  stroke-opacity: 1;
  animation: signal 2.6s cubic-bezier(.22,.61,.36,1);
}
.trace--2 { animation-delay: .28s; }
.trace--3 { animation-delay: .52s; }
@keyframes signal {
  from { stroke-opacity: .35; stroke-width: 1 }
  to   { stroke-opacity: 1;   stroke-width: 1.6 }
}

/* ---------- readouts ---------- */

.readouts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--hairline); border-bottom: 0;
}
.readout {
  padding: 20px 18px; border-bottom: 1px solid var(--hairline);
  border-right: 1px solid var(--hairline);
}
.readout:nth-child(4n) { border-right: 0; }
.readout .n {
  font-family: var(--mono); font-size: 26px; font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em; display: block; margin-bottom: 4px;
}
.readout .n small { font-size: 14px; color: var(--dim); margin-left: 3px; }
.readout .k { font-size: 13px; color: var(--muted); }

/* ---------- sections ---------- */

section { padding: 78px 0; }
/* The header is sticky, so an anchor jump would otherwise land with the
   section's own heading hidden behind it. */
section[id] { scroll-margin-top: 84px; }
section > .wrap > .label { display: block; margin-bottom: 10px; }

h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(30px, 4vw, 46px); line-height: 1.06;
  letter-spacing: -0.01em; margin: 14px 0 16px;
}
h3 { font-size: 17px; margin-bottom: 8px; letter-spacing: -0.01em; }
p.body { color: var(--muted); max-width: 68ch; }

/* ---------- product cards ---------- */

.products { display: grid; gap: 18px; grid-template-columns: 1.4fr 1fr; margin-top: 34px; }

.card {
  border: 1px solid var(--hairline); background: var(--panel);
  padding: 26px; text-decoration: none; color: inherit; display: block;
  position: relative; transition: border-color .2s ease, background .2s ease;
}
.card:hover { border-color: var(--hairline-2); background: var(--panel-2); }
.card--live::after {
  content: "SHIPPING"; position: absolute; top: 16px; right: 16px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: var(--signal); border: 1px solid rgba(91,255,176,.3); padding: 3px 7px;
}
.card--soon { opacity: .62; }
.card--soon::after {
  content: "IN DESIGN"; position: absolute; top: 16px; right: 16px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  color: var(--dim); border: 1px solid var(--hairline-2); padding: 3px 7px;
}
.card__icon { width: 56px; height: 56px; border-radius: 13px; margin-bottom: 16px; display: block; }
.card h3 { font-family: var(--display); font-size: 27px; font-weight: 400; margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15px; }

/* ---------- feature grid ---------- */

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); margin-top: 34px; }
.cell { background: var(--panel); padding: 24px 22px; }
.cell .label { display: block; margin-bottom: 12px; }
.cell p { color: var(--muted); font-size: 14.5px; }

/* ---------- shots ---------- */

figure.shot { margin-top: 30px; border: 1px solid var(--hairline); background: var(--panel); }
figure.shot img { display: block; width: 100%; height: auto; }
figure.shot figcaption {
  font-family: var(--mono); font-size: 12px; color: var(--dim);
  padding: 11px 16px; border-top: 1px solid var(--hairline);
  display: flex; gap: 10px;
}
figure.shot figcaption b { color: var(--muted); font-weight: 500; }

/* ---------- spec table ---------- */

table.spec { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 15px; }
table.spec th, table.spec td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--hairline); }
table.spec th { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 400; }
table.spec td:first-child { color: var(--muted); }
table.spec td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
table.spec td.pass { color: var(--signal); font-family: var(--mono); font-size: 13px; }

/* ---------- editions ---------- */

.editions { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 32px; }
.edition { border: 1px solid var(--hairline); background: var(--panel); padding: 26px; }
.edition--pro { border-color: rgba(155,91,255,.34); }
.edition h3 { font-family: var(--display); font-size: 25px; font-weight: 400; }
.edition .price { font-family: var(--mono); font-size: 13px; color: var(--muted); margin: 4px 0 16px; }
.edition ul { list-style: none; margin: 14px 0 20px; }
.edition li { font-size: 14.5px; color: var(--muted); padding: 6px 0 6px 22px; position: relative; }
.edition li::before { content: "+"; position: absolute; left: 0; color: var(--signal); font-family: var(--mono); }
.edition li.no { color: var(--dim); }
.edition li.no::before { content: "−"; color: var(--dim); }

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

.prose { max-width: 74ch; }
.prose h2 { margin-top: 44px; }
.prose h3 { margin-top: 28px; font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.prose p, .prose li { color: var(--muted); margin-bottom: 14px; }
.prose ul { margin: 0 0 18px 20px; }
.prose a { color: var(--cpu); }
/* Every other link in body copy — FAQ answers, the contact line, the licence
   recovery note. Only .prose was covered, so the rest fell back to the browser's
   default blue: the one colour that appears nowhere else in this palette.
   Buttons and cards carry their own treatment and opt out. */
section a:not(.btn):not(.card) { color: var(--cpu); }
section a:not(.btn):not(.card):hover { color: var(--signal); }
.prose code { font-family: var(--mono); font-size: 13.5px; background: var(--panel-2); padding: 2px 6px; border: 1px solid var(--hairline); }

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

footer.bot { border-top: 1px solid var(--hairline); padding: 40px 0 60px; margin-top: 40px; }
footer.bot .wrap { display: flex; flex-wrap: wrap; gap: 20px; align-items: baseline; }
footer.bot a { color: var(--muted); text-decoration: none; font-family: var(--mono); font-size: 13px; }
footer.bot a:hover { color: var(--signal); }
footer.bot .copy { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--dim); }

/* ---------- entrance ---------- */

/* Entrance animations must never be load-bearing. Defaulting to opacity:0 and
   animating up means the page is BLANK anywhere the animation does not run —
   a headless renderer, an offscreen web view, a browser with animations off.
   So the resting state is visible and the animation runs *from* hidden, with
   `backwards` fill holding the start state through the stagger delay. */
/* An animation can be *frozen at frame zero* — a non-windowed web view does
   exactly that — in which case the element renders its from-state forever, no
   matter the fill mode. So the from-state has to be readable on its own: this
   animates position only, never opacity. Frozen, the text is 14px low and
   perfectly legible; running, it rises into place. */
.rise { animation: rise .7s cubic-bezier(.22,.61,.36,1); }
.rise:nth-child(2) { animation-delay: .06s }
.rise:nth-child(3) { animation-delay: .12s }
.rise:nth-child(4) { animation-delay: .18s }
@keyframes rise { from { transform: translateY(14px) } to { transform: none } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .products, .editions, .grid3 { grid-template-columns: 1fr; }
  .readouts { grid-template-columns: 1fr 1fr; }
  .readout:nth-child(2n) { border-right: 0; }
  nav.links a:not(.keep) { display: none; }
}

/* ============================================================
   Additions: longer-form pages
   ============================================================ */

/* Two-column split with a sticky label rail. */
.split { display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: start; }
.split__rail { position: sticky; top: 90px; }
.split__rail .label { display: block; margin-bottom: 8px; }
.split__rail p { font-size: 13px; color: var(--dim); }

/* Key/value spec rows. */
.kv { border-top: 1px solid var(--hairline); }
.kv__row { display: grid; grid-template-columns: 220px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.kv__row dt { font-family: var(--mono); font-size: 12.5px; color: var(--dim); letter-spacing: .04em; }
.kv__row dd { color: var(--muted); font-size: 15px; }
.kv__row dd b { color: var(--text); font-weight: 500; }

/* Numbered steps. */
.steps { counter-reset: step; margin-top: 26px; }
.step { counter-increment: step; position: relative; padding: 0 0 22px 46px; border-left: 1px solid var(--hairline); margin-left: 12px; }
.step:last-child { border-left-color: transparent; }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: -13px; top: -2px; width: 26px; height: 26px;
  display: grid; place-items: center; background: var(--panel);
  border: 1px solid var(--hairline-2); color: var(--signal);
  font-family: var(--mono); font-size: 11px;
}
.step h3 { margin-bottom: 4px; }
.step p { color: var(--muted); font-size: 15px; }

/* Disclosure FAQ. */
details.faq { border-bottom: 1px solid var(--hairline); padding: 16px 0; }
details.faq summary {
  cursor: pointer; list-style: none; font-size: 17px; color: var(--text);
  display: flex; align-items: center; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before {
  content: "+"; font-family: var(--mono); color: var(--signal); font-size: 15px;
  transition: transform .2s ease;
}
details.faq[open] summary::before { content: "−"; }
details.faq p { color: var(--muted); margin-top: 10px; padding-left: 24px; font-size: 15px; }
details.faq code { font-family: var(--mono); font-size: 13px; color: var(--text); }

/* Comparison table. */
table.compare { width: 100%; border-collapse: collapse; margin-top: 26px; font-size: 14.5px; }
table.compare th, table.compare td { padding: 12px 14px; border-bottom: 1px solid var(--hairline); text-align: left; }
table.compare thead th { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 400; }
table.compare td:first-child { color: var(--muted); width: 40%; }
table.compare .y { color: var(--signal); font-family: var(--mono); }
table.compare .n { color: var(--dim); font-family: var(--mono); }
table.compare .num { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
table.compare tbody tr:hover { background: var(--panel); }

/* Pull-quote / engineering note. */
.note {
  border-left: 2px solid var(--signal); background: var(--panel);
  padding: 20px 24px; margin-top: 26px;
}
.note p { color: var(--muted); font-size: 15px; }
.note p + p { margin-top: 12px; }
.note .label { display: block; margin-bottom: 10px; }

/* Release entries. */
.release { border-top: 1px solid var(--hairline); padding: 30px 0; }
.release__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.release__ver { font-family: var(--display); font-size: 30px; }
.release__date { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.release__tag {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  border: 1px solid var(--hairline-2); padding: 3px 7px; color: var(--muted);
}
.release h4 { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin: 20px 0 8px; font-weight: 400; }
.release ul { list-style: none; }
.release li { color: var(--muted); font-size: 15px; padding: 5px 0 5px 20px; position: relative; }
.release li::before { content: "·"; position: absolute; left: 4px; color: var(--dim); }
.release li b { color: var(--text); font-weight: 500; }

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split__rail { position: static; }
  .kv__row { grid-template-columns: 1fr; gap: 4px; }
}
