/* Richdale Security — public site.
   Design system inherited verbatim from the Sigilex admin console (apps/cap-console
   src/styles/theme.css): orange-on-black, glassmorphism, Geist display / Inter UI /
   JetBrains Mono for data. Token NAMES match the console so the two surfaces stay in
   lockstep — change a value here only if it changed there too.

   Zero JS, zero external requests: fonts are bundled locally and every graphic is inline
   SVG, so the strict CSP (default-src 'self') holds with nothing relaxed. A security
   company's own site should pass the bar it sells. */

/* ---- Bundled brand faces (font-src 'self') ---- */
@font-face {
  font-family: 'Geist';
  src: url('./fonts/geist-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Geist';
  src: url('./fonts/geist-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('./fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('./fonts/inter-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('./fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('./fonts/jbm-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --color-bg: #060606;
  --color-surface: #101013;
  --color-surface-2: #17171b;
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-strong: rgba(255, 255, 255, 0.14);
  --color-glass: rgba(255, 255, 255, 0.035);

  --color-text: #f4f4f5;
  --color-text-muted: #a1a1aa;

  --color-primary: #f97316;
  --color-primary-hover: #ea580c;
  --color-on-primary: #0a0a0a;
  --color-primary-text: #fb923c; /* orange AS TEXT — ~9.6:1 on the black ground */

  --color-success: #34d399; /* emerald: reserved for cryptographic "verified" */
  --color-danger: #f87171;

  --grad-brand: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  --color-glow: rgba(249, 115, 22, 0.3);
  --color-glow-soft: rgba(249, 115, 22, 0.14);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', 'SFMono-Regular', Consolas, monospace;
  --font-display: 'Geist', 'Inter', system-ui, 'Segoe UI', sans-serif;

  --maxw: 1120px;
  --gutter: 24px;
}

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Ambient brand glow behind the fold — pure CSS, no image request. */
body::before {
  content: '';
  position: fixed;
  inset: -20% -20% auto -20%;
  height: 70vh;
  background:
    radial-gradient(60% 60% at 20% 0%, var(--color-glow-soft) 0%, transparent 70%),
    radial-gradient(45% 45% at 85% 10%, rgba(249, 115, 22, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

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

main {
  position: relative;
  z-index: 1;
}

/* ---- Skip link (a11y) ---- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-surface-2);
  color: var(--color-text);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  z-index: 100;
}
.skip:focus {
  left: 16px;
  top: 16px;
}

/* Standard sr-only pattern: present for screen readers/heading-order structure, invisible on
   screen — used where a section needs a real h2 for correct heading hierarchy but the design
   doesn't call for visible section-title text. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:where(a, button):focus-visible {
  outline: 2px solid var(--color-primary-text);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 6, 6, 0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.brand__mark {
  flex: none;
  display: block;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.wordmark__co {
  color: var(--color-text);
}
.wordmark__suffix {
  color: var(--color-text-muted);
  font-weight: 600;
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s ease;
}
.nav a:hover {
  color: var(--color-text);
}
.nav a[aria-current='page'] {
  color: var(--color-text);
}
@media (max-width: 780px) {
  .nav {
    display: none;
  }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad-brand);
  color: var(--color-on-primary);
  box-shadow: 0 6px 22px -8px var(--color-glow);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px -8px var(--color-glow);
}
.btn--ghost {
  background: var(--color-glass);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}
.btn--lg {
  padding: 14px 26px;
  font-size: 15px;
}

/* ---- Sections ---- */
.section {
  padding: 92px 0;
  position: relative;
}
.section--tight {
  padding: 68px 0;
}
.section + .section {
  border-top: 1px solid var(--color-border);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-text);
  margin: 0 0 18px;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--color-primary-text);
}
/* Centred variant for the CTA. A class, not an inline style — `style-src 'self'` blocks
   inline styles outright, so a style attribute here would silently not apply. */
.eyebrow--center {
  justify-content: center;
}
/* Reusable spacing/alignment utilities — classes, not inline styles: strict CSP has no
   'unsafe-inline' on style-src, so a style="" attribute is silently dropped, not "small". */
.lede--center {
  margin-left: auto;
  margin-right: auto;
}
.lede--spaced {
  margin-top: 32px;
}
.hero--compact {
  padding-bottom: 24px;
  text-align: center;
}

/* ---- Contact channels (contact.html) ---- */
/* A <style> BLOCK is still "inline style" under CSP — style-src 'self' blocks it exactly like a
   style="" attribute, silently, with no visible breakage to notice by eye. Verification caught
   this (the whole .channels block was never applying) — moved here where the CSP actually
   permits it, same as everything else on the site. */
.channels {
  display: grid;
  gap: 14px;
  max-width: 620px;
  margin: 0 auto;
}
.channel {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-glass);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}
.channel:hover {
  border-color: var(--color-border-strong);
  background: rgba(255, 255, 255, 0.05);
}
.channel__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.22);
  color: var(--color-primary-text);
}
.channel h3 {
  margin: 0 0 4px;
}
.channel p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
}
.channel__addr {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--color-primary-text);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin: 0;
}
h1 {
  font-size: clamp(2.4rem, 6vw, 3.9rem);
  font-weight: 700;
}
h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  font-weight: 700;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

.lede {
  font-size: clamp(1.02rem, 1.6vw, 1.18rem);
  color: var(--color-text-muted);
  max-width: 62ch;
  margin: 20px 0 0;
}
.section__intro {
  max-width: 66ch;
  margin-bottom: 48px;
}

/* ---- Hero ---- */
.hero {
  padding: 104px 0 88px;
}
.hero h1 .accent {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.hero__note {
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--color-text-muted);
}

/* ---- Cards ---- */
.grid {
  display: grid;
  gap: 18px;
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 940px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.card {
  background: linear-gradient(180deg, var(--color-glass) 0%, rgba(255, 255, 255, 0.012) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.22);
  color: var(--color-primary-text);
  margin-bottom: 18px;
}
.card h3 {
  margin-bottom: 8px;
}
.card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14.5px;
}

/* ---- Problem list ---- */
.breaks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.breaks li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border: 1px solid var(--color-border);
  border-left: 2px solid rgba(248, 113, 113, 0.5);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(255, 255, 255, 0.014);
}
.breaks strong {
  color: var(--color-text);
  font-weight: 600;
}
.breaks span {
  color: var(--color-text-muted);
  font-size: 14.5px;
}

/* ---- Flow diagram ---- */
.flow {
  margin: 0 0 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  padding: 28px 24px;
  overflow-x: auto;
}
.flow:focus-visible {
  outline: 2px solid var(--color-primary-text);
  outline-offset: 2px;
}
.flow svg {
  display: block;
  width: 100%;
  min-width: 660px;
  height: auto;
}

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }
}
.steps li {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--color-glass);
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--grad-brand);
  color: var(--color-on-primary);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 14px;
}
.steps h3 {
  margin-bottom: 8px;
}
.steps p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14.5px;
}

/* ---- Split feature ---- */
.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
}
.split ul {
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
.split ul li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  color: var(--color-text-muted);
  font-size: 15px;
}
.split ul svg {
  flex: none;
  margin-top: 3px;
  color: var(--color-success);
}

/* Terminal-ish proof panel */
.panel {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}
.panel__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-2);
}
.panel__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}
.panel__title {
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--color-text-muted);
}
.panel__body {
  padding: 20px 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.85;
  color: var(--color-text-muted);
  white-space: pre-wrap;
  word-break: break-word;
}
.panel__body .k {
  color: var(--color-text);
}
.panel__body .ok {
  color: var(--color-success);
}
.panel__body .br {
  color: var(--color-primary-text);
}

/* ---- Products ---- */
.product {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product__tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 16px;
}
.product h3 {
  font-size: 1.32rem;
  font-family: var(--font-display);
  margin-bottom: 10px;
}
.product h3 .sig {
  color: var(--color-primary-text);
}

/* ---- CTA ---- */
.cta {
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(70% 140% at 50% 0%, rgba(249, 115, 22, 0.1) 0%, transparent 70%),
    var(--color-surface);
  padding: 60px 40px;
  text-align: center;
}
.cta .lede {
  margin-left: auto;
  margin-right: auto;
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 44px 0;
  position: relative;
  z-index: 1;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.site-footer p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 13.5px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.site-footer nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 13.5px;
}
.site-footer nav a:hover {
  color: var(--color-text);
}
