/* ── certicore.tech — stylesheet ─────────────────────────────────────────────
   The tokens are the CertiCore console's dark theme (certibom/ui-lab/src/
   styles/tokens, "The Instrument Printout"): one ground, one card tone, a
   hairline vocabulary, no shadows, Space Mono for every string and Source
   Sans 3 for titles only, one periwinkle accent. Keep the values in step with
   the console when the console changes. */

:root {
  color-scheme: dark;

  /* Ground and surfaces */
  --bg-app: #000000;
  --surface-card: #1A1A1A;
  --surface-hover: rgba(245, 245, 245, 0.06);
  --table-header-bg: rgba(70, 70, 70, 0.5);

  /* Ink */
  --text-primary: #F5F5F5;
  --text-secondary: #969696;
  --text-disabled: #6B6B6B;
  --text-on-accent: #F5F5F5;

  /* Hairlines */
  --border-hairline: #282828;
  --border-hairline-soft: #282828;
  --border-strong: #4A4A4A;

  /* Accent: the one interactive colour */
  --accent: #6E71FF;
  --accent-ink: #8E90FF;
  --accent-fill: #5457EC;
  --accent-hover: #8385FF;
  --accent-tint: rgba(110, 113, 255, 0.20);
  --accent-line: rgba(110, 113, 255, 0.45);

  /* Type */
  --font-mono: "Space Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-display: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fs-data: 15px;
  --fs-label: 16px;
  --fs-body: 17px;
  --fs-body-lg: 18px;
  --fs-emphasis: 16px;
  --fs-title-sm: 26px;
  --fs-title: 44px;
  --fs-headline: 32px;
  --fs-display: 56px;
  --fs-prose: 19px;        /* sentences: the ledes and the step lines */
  --lh-solid: 1;
  --lh-tight: 1.25;
  --lh-prose: 1.55;
  --fw-regular: 400;
  --fw-bold: 700;
  --tracking-mono: 0.03em;
  --tracking-title: -0.01em;
  --measure-prose: 72ch;

  /* Shape and rhythm */
  --radius-chip: 3px;
  --radius-pill: 12px;
  --control-h-md: 38px;
  --control-h-lg: 48px;
  --page-pad: 40px;
  --page-pad-mobile: 14px;
  --header-h: 64px;

  /* Motion: transform and opacity only, exponential ease-out */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 120ms;
  --t-base: 180ms;
  --t-slow: 260ms;
}

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

html {
  background: var(--bg-app);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  line-height: var(--lh-prose);
  letter-spacing: var(--tracking-mono);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-ink); text-decoration: none; text-underline-offset: 0.18em; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-line); color: var(--text-primary); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  letter-spacing: var(--tracking-title);
  line-height: var(--lh-tight);
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; max-width: var(--measure-prose); }

button { font: inherit; letter-spacing: inherit; cursor: pointer; }

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── Header ───────────────────────────────────────────────────────────────── */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 var(--page-pad);
  background: color-mix(in srgb, var(--bg-app) 72%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-hairline);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-title-sm);
  letter-spacing: var(--tracking-title);
  color: var(--text-primary);
}
.wordmark .mark { width: 22px; height: 22px; fill: currentColor; flex: none; }
.wordmark:hover { text-decoration: none; }
.wordmark .lockup { display: block; height: 26px; width: auto; }  /* the brand lockup: mark + name in one file */



/* ── Hero ─────────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  isolation: isolate;
  /* One screen: the hero's bottom edge is the bottom of the viewport, and
     the beam runs down to it. */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: calc(var(--header-h) + 34vh) 6% 48px;
  overflow: hidden;
}

/* The laser: full-bleed behind the body. */
.laser-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* The mark and the title, to the left of the beam. No box. */
.hero-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  align-items: center;
  align-content: start;
  gap: 48px;
  padding: 24px 0 0;
}

/* The mark. The SVG shows at rest; the ASCII print fades in while the
   pointer is near (data-active, set by scripts/ascii-logo.js). */
.logo-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  touch-action: pan-y;
}
.logo-stage[data-mode="gl"], .title-stage[data-mode="gl"] { cursor: crosshair; }

/* The title prints the same way: its canvas lies over the HTML text, which
   fades while the print shows. The negative margin gives the print room. */
.title-stage {
  position: relative;
  margin: -20px -32px;
  padding: 20px 32px;
}
.title-stage .hero-title { transition: opacity var(--t-base) var(--ease-out); }
.title-stage[data-active="true"] .hero-title { opacity: 0; }

.logo-stage canvas, .title-stage canvas {
  display: block;
  position: absolute;
  inset: 0;
  margin: auto;
  z-index: 1;
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
}
.logo-stage[data-active="true"] canvas, .title-stage[data-active="true"] canvas { opacity: 1; }

.logo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14%;
  transition: opacity var(--t-base) var(--ease-out);
}
.logo-fallback img { max-width: 100%; max-height: 100%; }
.logo-stage[data-active="true"] .logo-fallback { opacity: 0; }

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}

.hero-title {
  font-size: clamp(40px, 6vw, 92px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  white-space: nowrap;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: var(--control-h-md);
  padding: 0 13px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-chip);
  background: transparent;
  color: var(--text-primary);
  font-size: var(--fs-label);
  line-height: var(--lh-solid);
  letter-spacing: var(--tracking-mono);
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.btn:hover { background: var(--surface-hover); text-decoration: none; }
.btn-primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--text-on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn .arrow { color: inherit; opacity: 0.7; }

/* ── Sections ─────────────────────────────────────────────────────────────── */

.section {
  width: 100%;
  padding: 64px var(--page-pad);
  border-top: 1px solid var(--border-hairline);
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title { font-size: var(--fs-title); }

/* The sentence under a section head: what the hero title leaves unsaid. */
.section-lede {
  color: var(--text-secondary);
  font-size: var(--fs-body-lg);
  max-width: 62ch;
  margin: -8px 0 28px;
}


.card-grid {
  display: grid;
  align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-chip);
  background: var(--surface-card);
}

.card-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-data);
  color: var(--text-secondary);
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-chip);
  background: var(--accent-tint);
  color: var(--accent-ink);
  font-size: var(--fs-data);
  line-height: var(--lh-solid);
}

.card-title { font-size: var(--fs-title-sm); }




/* ── Contact / footer ─────────────────────────────────────────────────────── */

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-footer {
  width: 100%;
  padding: 24px var(--page-pad) 40px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-data);
  color: var(--text-secondary);
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--text-primary); }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
  :root { --page-pad: var(--page-pad-mobile); }
  .site-header { padding: 0 var(--page-pad-mobile); }
  .hero { padding: calc(var(--header-h) + 12vh) var(--page-pad-mobile) 40px; }
  .hero-body { grid-template-columns: 1fr; gap: 28px; padding: 16px 0 0; }
  .logo-stage { width: min(120px, 34vw); }
  .hero-title { font-size: min(44px, 12vw); }   /* 320px phones: the title line ends clear of the beam */
  .title-stage { margin: 0; padding: 0; }
  .section { padding: 44px var(--page-pad-mobile); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .logo-stage canvas, .title-stage canvas, .logo-fallback, .hero-title { transition: none; }
}

/* ── Copy blocks added with the evidence-first page ───────────────────────── */

/* The category sentence under the hero title. */
.hero-lede {
  color: var(--text-secondary);
  font-size: var(--fs-body-lg);
  max-width: 84%;              /* phones: stops short of the beam */
}
@media (min-width: 768px) {
  .hero-lede { max-width: min(58ch, 40vw); }   /* never under the beam at tablet widths */
}


/* The hero and closing calls to action: one size up from the header control. */
.hero-actions .btn, .contact-row .btn { height: var(--control-h-lg); padding: 0 16px; }



/* Phones: the copy breathes. One column of rows, each row under a hairline with air
   above it, the value a size up from its key; paragraphs a size up with a looser leading. */
@media (max-width: 767px) {
  :root { --fs-prose: 16px; --fs-title: 32px; --fs-title-sm: 24px; }
  .section-lede { margin-bottom: 32px; }
}

/* ── Reading type ─────────────────────────────────────────────────────────────
   One voice, as in the CertiBOM console: Space Mono for every string, Source
   Sans 3 for titles only. The sentences keep the mono and take a size up. */
.hero-lede, .section-lede, .steps p {
  font-family: var(--font-mono);
  font-weight: var(--fw-regular);
  font-size: var(--fs-prose);
  line-height: 1.65;
  letter-spacing: var(--tracking-mono);
}

/* The smallest phones (320px, short viewports): a tighter hero keeps the button on the first screen. */
@media (max-width: 359px) {
  .hero { padding-top: calc(var(--header-h) + 8vh); }
  .logo-stage { width: min(100px, 30vw); }
}
@media (max-width: 359px) {
  .hero-body { gap: 20px; }
  .hero-copy { gap: 20px; }
  .hero-lede { max-width: 88%; }
}

/* Bold phrases inside the grey lede print in the primary ink. */
.section-lede strong { color: var(--text-primary); font-weight: var(--fw-bold); }

/* "No source. No build system. No SDK.": one under the other on a diagonal,
   each with a hand-drawn accent underline. */
.no-needs {
  list-style: none;
  margin: -8px 0 36px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-family: var(--font-mono);
  font-weight: var(--fw-bold);
  font-size: var(--fs-emphasis);
  letter-spacing: var(--tracking-mono);
  color: var(--text-primary);
}
.no-needs li { position: relative; width: max-content; padding-bottom: 6px; }
.no-needs li:nth-child(2) { margin-left: 2.2em; }
.no-needs li:nth-child(3) { margin-left: 4.4em; }
.scribble {
  position: absolute;
  left: -6%;
  bottom: -16px;
  width: 112%;
  height: 22px;
  overflow: visible;
}
.scribble path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* The draw: scripts/site.js adds .will-draw (strokes hidden), then .is-drawn
   when the list is on screen; each stroke draws in its turn (--d, --t).
   Without the script the strokes simply show. */
.no-needs.will-draw .scribble path { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.no-needs.will-draw.is-drawn .scribble path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--t, 0.8s) cubic-bezier(0.65, 0, 0.35, 1) var(--d, 0s);
}

/* ── Centred below the hero ───────────────────────────────────────────────────
   Every section under the hero sits on the page's centre line: titles, lede,
   the no-needs diagonal, the callout, the cards and the demo band. Inside a
   card the head and the intro are centred; the key / value rows stay
   left-aligned, so the values line up and read down the column. */
.section { text-align: center; }
.section-head { justify-content: center; }
.section-lede { margin-left: auto; margin-right: auto; }
.no-needs { align-items: center; }
.no-needs li:nth-child(1) { margin-left: 0; transform: translateX(-2.6em); }
.no-needs li:nth-child(2) { margin-left: 0; }
.no-needs li:nth-child(3) { margin-left: 0; transform: translateX(2.6em); }
.card-grid { max-width: 1480px; margin-left: auto; margin-right: auto; }
.card { align-items: center; }
.card-kicker { justify-content: center; }
.contact-row { flex-direction: column; justify-content: center; text-align: center; }
.site-footer { justify-content: center; gap: 24px; }

/* ── Glass and glow ───────────────────────────────────────────────────────────
   The hero beam's light carries on behind the sections: a fixed glow in the
   accent, under the beam's column, that scripts/site.js turns up (--glow) as
   the page scrolls. The boxes are rounded glass over it: a translucent card
   tone with a backdrop blur, so the light shows through, softened. */
:root { --radius-card: 16px; --glow: 0; --beam-x: 74%; }

.scroll-glow {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--glow);
  background:
    radial-gradient(60% 55% at var(--beam-x) 0%, rgba(110, 113, 255, 0.38), transparent 70%),
    radial-gradient(45% 60% at calc(var(--beam-x) - 40%) 100%, rgba(110, 113, 255, 0.22), transparent 70%),
    radial-gradient(28% 35% at var(--beam-x) 10%, rgba(245, 245, 255, 0.10), transparent 70%);
}
.site-header { z-index: 20; }
main, .site-footer { position: relative; z-index: 1; }

.card, .steps li {
  border-radius: var(--radius-card);
  border-color: rgba(245, 245, 245, 0.10);
  background: rgba(26, 26, 26, 0.55);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}
.btn { border-radius: 10px; }
.tag { border-radius: 6px; }

/* ── Pointer light in the Platform section ────────────────────────────────────
   The hero's lens, carried on: an accent glow that follows the pointer (with
   the same springy lag, scripts/site.js sets --px / --py / --pl-on) and the
   beam's dot grid, shown only under the light. It sits behind the content;
   the glass cards blur it. */
#platform { position: relative; isolation: isolate; }
#platform > :not(.pointer-light) { position: relative; z-index: 1; }
.pointer-light {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: var(--pl-on, 0);
  transition: opacity 450ms var(--ease-out);
  background:
    radial-gradient(420px circle at var(--px, 50%) var(--py, 50%), rgba(110, 113, 255, 0.34), rgba(110, 113, 255, 0.10) 45%, transparent 72%),
    radial-gradient(120px circle at var(--px, 50%) var(--py, 50%), rgba(245, 245, 255, 0.10), transparent 70%);
}
.pointer-light::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(142, 144, 255, 0.55) 1px, transparent 1.6px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(220px circle at var(--px, 50%) var(--py, 50%), #000, transparent 72%);
  mask-image: radial-gradient(220px circle at var(--px, 50%) var(--py, 50%), #000, transparent 72%);
}
@media (hover: none), (prefers-reduced-motion: reduce) {
  .pointer-light { display: none; }
}

/* ── The page below the lede ──────────────────────────────────────────────────
   Few words, large type. Three steps, two product cards with their modules as
   chips (the description shows on hover), the demo band. */
.section { padding-top: 104px; padding-bottom: 104px; }
.section-head { margin-bottom: 32px; }
.section-lede { max-width: 58ch; margin-bottom: 36px; }

.steps {
  list-style: none;
  margin: 72px auto 0;
  padding: 0;
  max-width: 1120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 24px 34px;
  border: 1px solid rgba(245, 245, 245, 0.10);
}
.step-n { color: var(--accent-ink); font-weight: var(--fw-bold); font-size: var(--fs-data); letter-spacing: 0.12em; }
.steps h3 { font-size: 34px; }
.steps p { color: var(--text-secondary); font-size: var(--fs-body); max-width: 24ch; }

.card-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 1120px; align-items: stretch; }
.card {
  align-items: center;
  gap: 26px;
  padding: 44px 32px 40px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(110, 113, 255, 0.16), transparent 65%),
    rgba(26, 26, 26, 0.55);
  transition: border-color var(--t-base) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.card:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.card-kicker { justify-content: center; flex-wrap: wrap; gap: 12px; font-size: var(--fs-data); }
.tag { height: 28px; padding: 0 10px; font-size: var(--fs-data); font-weight: var(--fw-bold); }
.card-title { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.15; }

.chips {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 460px;
}
.chips li {
  padding: 8px 14px;
  border: 1px solid rgba(245, 245, 245, 0.14);
  border-radius: 999px;
  background: rgba(245, 245, 245, 0.04);
  color: var(--text-primary);
  font-size: var(--fs-data);
  line-height: 1.2;
}

.contact-row { gap: 32px; }
#contact { padding-top: 128px; padding-bottom: 128px; }
#contact .section-title { font-size: clamp(34px, 4.4vw, 64px); line-height: 1.08; }
.hero-actions .btn, .contact-row .btn { font-size: var(--fs-label); padding: 0 22px; }

@media (max-width: 767px) {
  .section { padding-top: 64px; padding-bottom: 64px; }
  .steps { grid-template-columns: 1fr; margin-top: 56px; }
  .steps li { padding: 24px 20px 26px; }
  .steps h3 { font-size: 28px; }
  .card-grid { grid-template-columns: 1fr; }
  .card { padding: 32px 18px 30px; }
  #contact { padding-top: 80px; padding-bottom: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}

/* ── Chip descriptions ────────────────────────────────────────────────────────
   Each module chip carries its one-paragraph description. It shows above the
   chip on hover, on keyboard focus, and on a tap (the chip takes focus). */
#products { overflow-x: clip; }
.card { position: relative; }
.card:hover, .card:focus-within { z-index: 2; }
.chips li { position: relative; cursor: help; transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out); }
.chips li:hover, .chips li:focus-visible { border-color: var(--accent-line); background: var(--accent-tint); border-radius: 999px; }
.chips .tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 5;
  width: min(300px, 72vw);
  padding: 14px 16px;
  border: 1px solid var(--accent-line);
  border-radius: 12px;
  background: #14141C;
  color: var(--text-primary);
  font-size: var(--fs-data);
  line-height: 1.5;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out), visibility 0s linear var(--t-base);
}
.chips .tip::after {   /* the pointer under the box */
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-right: 1px solid var(--accent-line);
  border-bottom: 1px solid var(--accent-line);
  background: #14141C;
  transform: rotate(45deg);
}
.chips li:hover .tip, .chips li:focus .tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  transition-delay: 0s;
}
@media (prefers-reduced-motion: reduce) {
  .chips .tip { transition: none; }
}

/* Phones: the hero button sits nearer its sentence, and the hero copy starts a little higher,
   so the button is well inside the first screen. */
@media (max-width: 767px) {
  .hero { padding-top: calc(var(--header-h) + 8vh); }
  .hero-copy { gap: 18px; }
  .hero-body { gap: 22px; }
}
