/*
 * The public face of CERTIHASH.
 *
 * External rather than inline, because the site is served under a content
 * security policy that permits no inline style or script. Everything here is
 * first-party: no fonts, scripts or images are fetched from anywhere else, so
 * the page cannot be changed by a third party going down or being compromised.
 */

:root {
  --bg: #06100c;
  --panel: #0d1d16cc;
  --line: #1f3a2e;
  --text: #edf7f1;
  --muted: #98aa9f;
  --green: #55f28c;
  --cyan: #56e3d3;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --max: 1200px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 8%, rgba(54, 255, 137, 0.12), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(86, 227, 211, 0.09), transparent 26%),
    linear-gradient(180deg, #07120d 0%, #07100c 48%, #040906 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: #0b1812;
  border: 1px solid var(--green);
  border-radius: 10px;
}

.wrap { width: min(var(--max), calc(100% - 34px)); margin: auto; }

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

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(6, 16, 12, 0.92), rgba(6, 16, 12, 0.62));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.navin { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 900; letter-spacing: 0.08em; }
/* A shield with a check inside it. The crossed bars it replaced read as an X,
   which is the wrong signal entirely for something that says "verified". */
.mark {
  width: 36px;
  height: 36px;
  border: 1px solid #4af08b;
  border-radius: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 28px rgba(85, 242, 140, 0.18) inset, 0 0 20px rgba(85, 242, 140, 0.14);
  flex: none;
}
.mark svg { width: 22px; height: 22px; display: block; }

.links { display: flex; gap: 24px; color: #b8c8bf; font-size: 14px; }
.links a:hover { color: #fff; }
.navcta {
  border: 1px solid rgba(85, 242, 140, 0.5);
  padding: 10px 14px;
  border-radius: 999px;
  color: #dfffe9;
  background: rgba(85, 242, 140, 0.06);
  white-space: nowrap;
}

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

.hero { padding: 94px 0 82px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 54px; align-items: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(85, 242, 140, 0.28);
  background: rgba(85, 242, 140, 0.06);
  color: #bfffd3;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.dot { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 16px var(--green); }

h1 { font-size: clamp(44px, 7vw, 88px); line-height: 0.98; letter-spacing: -0.05em; margin: 22px 0; max-width: 800px; }
.grad {
  background: linear-gradient(90deg, #fff 0%, #bfffd4 38%, #59eb9b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead { font-size: 20px; line-height: 1.65; color: #b6c8bd; max-width: 720px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.btn.primary {
  background: linear-gradient(180deg, #6cff9e, #39d879);
  color: #03210f;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(85, 242, 140, 0.2);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(85, 242, 140, 0.28); }
.btn.ghost { background: rgba(255, 255, 255, 0.03); color: #e9f4ed; }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.065); }

@media (prefers-reduced-motion: reduce) {
  .btn.primary:hover { transform: none; }
}

.micro { margin-top: 20px; color: #8b9f93; font-size: 13px; }
.micro strong { color: #c0d0c6; }

/* ---- the verifier card -------------------------------------------------- */

.proof-card {
  background: linear-gradient(180deg, rgba(18, 42, 30, 0.88), rgba(8, 20, 14, 0.94));
  border: 1px solid rgba(116, 255, 166, 0.15);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  border-radius: 28px;
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.proof-card::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(85, 242, 140, 0.1);
  filter: blur(55px);
  right: -110px;
  top: -120px;
}
.terminal { border: 1px solid rgba(255, 255, 255, 0.07); border-radius: 18px; background: #06100c; overflow: hidden; }
.terminal-top {
  height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid #13231b;
  background: #0b1812;
}
.ball { width: 9px; height: 9px; border-radius: 50%; background: #30453a; }
.terminal-title { margin-left: 8px; color: #7f968a; font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }

pre {
  margin: 0;
  padding: 22px;
  white-space: pre-wrap;
  font: 13px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #b3c4ba;
}
.cmd { color: #e9fff0; }
.ok { color: #6ff79f; }
.block { color: #7eeada; }

.verified {
  margin: 0 18px 18px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(85, 242, 140, 0.22);
  background: linear-gradient(90deg, rgba(85, 242, 140, 0.09), rgba(85, 242, 140, 0.02));
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.verified b { letter-spacing: 0.15em; color: #aaffc4; }
.seal { font-size: 11px; color: #88998f; }

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

section { padding: 82px 0; }
.section-kicker { color: var(--green); font-size: 12px; text-transform: uppercase; letter-spacing: 0.16em; font-weight: 900; }
h2 { font-size: clamp(32px, 5vw, 58px); line-height: 1.04; letter-spacing: -0.04em; margin: 10px 0 16px; }
.section-lead { color: #9fb3a7; font-size: 18px; line-height: 1.65; max-width: 760px; }

.triptych { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.card {
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 20px;
  padding: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.012));
  min-height: 220px;
}
.card h3 { font-size: 21px; margin: 12px 0 10px; }
.card p { color: #9cafa3; line-height: 1.6; margin: 0; }
.icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(85, 242, 140, 0.08);
  border: 1px solid rgba(85, 242, 140, 0.16);
  color: #7effaa;
  font: 700 13px ui-monospace, monospace;
}

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 34px; }
.step { position: relative; padding: 24px 20px 22px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.06); background: #0a1510; }
.num { color: #4fe98b; font: 700 12px ui-monospace, monospace; letter-spacing: 0.16em; }
.step h3 { margin: 16px 0 8px; }
.step p { color: #8ea296; font-size: 14px; line-height: 1.55; }
.step:not(:last-child)::after { content: ''; position: absolute; top: 50%; right: -15px; width: 16px; height: 1px; background: #294b39; }

.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 42px; align-items: center; }
.proof-layers { display: grid; gap: 12px; }
.layer {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 15px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.layer-index { font: 700 12px ui-monospace, monospace; color: #5ee994; }
.layer-title { font-weight: 800; }
.layer small { color: #8b9e92; }
.pass { color: #58ed91; font-weight: 900; }

.quote { border-left: 2px solid #56ef91; padding: 6px 0 6px 22px; color: #d9e9df; font-size: 22px; line-height: 1.5; margin: 28px 0; }

.origin { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 34px; }
.origin .card { min-height: unset; }
.tag { font-size: 11px; color: #75e99f; border: 1px solid rgba(85, 242, 140, 0.18); padding: 6px 9px; border-radius: 999px; display: inline-block; }

.cta {
  border: 1px solid rgba(95, 255, 151, 0.16);
  border-radius: 28px;
  padding: 44px;
  background:
    radial-gradient(circle at 90% 10%, rgba(85, 242, 140, 0.15), transparent 30%),
    linear-gradient(135deg, #0e2118, #07110c);
  box-shadow: var(--shadow);
}
.cta-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.cta p { color: #a3b8ac; max-width: 720px; line-height: 1.65; }
.email { color: #9dffba; font-weight: 800; }

footer { padding: 38px 0 60px; color: #8b9f93; font-size: 13px; }
.foot { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.tiny-links { display: flex; gap: 18px; flex-wrap: wrap; }
.tiny-links a:hover, .foot a:hover { color: #fff; }

/* ---- reveal on scroll ---------------------------------------------------
   Hidden only once the script has run. Without it — blocked, failed, or
   disabled — every section stays visible, because a page that needs
   JavaScript to show its content is a page that sometimes shows none. */

html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.65s ease, transform 0.65s ease; }
html.js .reveal.show { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- narrow ------------------------------------------------------------- */

@media (max-width: 900px) {
  .links { display: none; }
  .hero { padding-top: 64px; }
  .hero-grid, .split, .origin { grid-template-columns: 1fr; }
  .triptych { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr 1fr; }
  .step:nth-child(2)::after { display: none; }
  .cta-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  h1 { font-size: clamp(38px, 11vw, 50px); }
  .flow { grid-template-columns: 1fr; }
  .step::after { display: none; }
  .cta { padding: 28px 22px; }
  pre { font-size: 11.5px; padding: 16px; }
  .navin { height: 68px; gap: 12px; }
  .navcta { padding: 9px 12px; font-size: 14px; }
}

.links a[aria-current='true'] { color: #fff; }
