/* Senavante: starter page styles. Dark only. */

/* ---------- Fonts (self-hosted, SIL OFL; see fonts/OFL-*.txt) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: dark;

  --ground: #07060f;
  --panel: #0e0c1b;
  --text: #eceaf7;
  --muted: #b9b5d3;
  --dim: #8c88a6;
  --cyan: #22d3ee;
  --indigo: #6366f1;
  --magenta: #d946ef;

  --line: rgba(139, 132, 200, 0.2);
  --line-strong: rgba(139, 132, 200, 0.3);
  --gradient: linear-gradient(95deg, var(--cyan) 0%, var(--indigo) 45%, var(--magenta) 100%);
  --gradient-btn: linear-gradient(95deg, var(--cyan), var(--indigo) 55%, var(--magenta));

  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --gutter: clamp(20px, 4vw, 32px);
  --section-gap: clamp(96px, 12vw, 180px);
  --radius-card: 20px;
  --radius-field: 12px;
}

/* ALTCHA widget theme. Set on the element (not :root) because altcha.css loads
   later and defines its defaults on :root; derived variables are restated here. */
altcha-widget {
  --altcha-color-base: var(--panel);
  --altcha-color-base-content: var(--text);
  --altcha-color-neutral: var(--line-strong);
  --altcha-color-primary: var(--indigo);
  --altcha-color-primary-content: var(--text);
  --altcha-border-color: var(--line-strong);
  --altcha-border-radius: var(--radius-field);
  --altcha-checkbox-outline-color: var(--cyan);
  --altcha-input-background-color: var(--panel);
  --altcha-input-color: var(--text);
  --altcha-popover-color: var(--line-strong);
  --altcha-spinner-color: var(--text);
  --altcha-max-width: 100%;
}

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

html {
  background: var(--ground);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, p, dl, dd { margin: 0; }

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

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  min-height: 44px;
  border-radius: 999px;
  background: var(--text);
  color: var(--ground);
  font-family: var(--font-mono);
  font-size: 14px;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .skip-link,
  .nav-links a,
  .btn,
  .text-link,
  .site-footer a { transition: color 0.15s ease, filter 0.15s ease, transform 0.15s ease; }
}

/* ---------- Page frame ---------- */
.page {
  position: relative;
  overflow: hidden;
  overflow: clip;
}

/* Ambient glow behind the nav and hero (decorative). */
.page::before {
  content: '';
  position: absolute;
  top: -220px;
  left: 50%;
  width: 1100px;
  height: 900px;
  margin-left: -550px;
  background: radial-gradient(closest-side, rgba(99, 102, 241, 0.32), rgba(139, 92, 246, 0.14) 55%, rgba(7, 6, 15, 0) 100%);
  pointer-events: none;
}

.wrap {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ---------- Nav ---------- */
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding-block: clamp(16px, 2.5vw, 28px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
}
.brand span {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 clamp(16px, 2.4vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.nav-links a:hover { color: var(--cyan); }
.nav-links .nav-cta { color: var(--cyan); }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(24px, 3vw, 36px);
  padding-top: clamp(64px, 10vw, 140px);
  padding-bottom: clamp(96px, 11vw, 160px);
  text-align: center;
}

.hero-mark {
  width: clamp(104px, 12vw, 132px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: 0 18px 60px rgba(99, 102, 241, 0.55), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.wordmark {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(52px, 11vw, 148px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
  padding-bottom: 0.06em; /* keep glyph edges inside the clip */
}
/* Live text with a gradient fill; browsers without text clipping keep solid text. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wordmark {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.tagline {
  max-width: 640px;
  font-family: var(--font-head);
  font-weight: 400;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.3;
}

.lede {
  max-width: 520px;
  font-size: clamp(16px, 1.6vw, 18px);
  font-weight: 300;
  color: var(--muted);
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 14px 34px;
  border: 0;
  border-radius: 999px;
  background: var(--gradient-btn);
  color: var(--ground);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.04em;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}
.btn:hover { filter: brightness(1.12); }
.hero .btn { margin-top: 12px; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--cyan);
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Sections ---------- */
.section { padding-bottom: var(--section-gap); }

.eyebrow {
  margin-bottom: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
}
.eyebrow--magenta { color: var(--magenta); }
.eyebrow--dim { color: var(--dim); }
.eyebrow--light { color: var(--text); }

.section-title {
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 72px);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* ---------- Cards ---------- */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(20px, 3vw, 32px);
}

.card {
  flex: 1 1 440px;
  min-width: 0;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius-card);
  border: 1px solid rgba(139, 132, 200, 0.22);
}

.card--lab {
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.card--cyan { background: linear-gradient(160deg, rgba(34, 211, 238, 0.10), rgba(99, 102, 241, 0.06) 60%, rgba(7, 6, 15, 0)); }
.card--magenta { background: linear-gradient(160deg, rgba(217, 70, 239, 0.10), rgba(99, 102, 241, 0.06) 60%, rgba(7, 6, 15, 0)); }
.card--panel { background: var(--panel); border-color: rgba(139, 132, 200, 0.18); }
.card--glow { background: linear-gradient(135deg, rgba(99, 102, 241, 0.22), rgba(217, 70, 239, 0.14)); }

.card-status {
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.card-title {
  margin-bottom: 16px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 28px);
  line-height: 1.2;
}

.card-body {
  font-size: 17px;
  line-height: 1.65;
  font-weight: 300;
  color: var(--muted);
}

.card-statement {
  margin-bottom: 20px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(22px, 2.2vw, 26px);
  line-height: 1.3;
}

.card--glow .text-link { color: var(--text); }

/* ---------- Services ---------- */
.services { display: flex; flex-direction: column; }

.service {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px 40px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }

.service dt {
  flex: 1 1 320px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(21px, 2.2vw, 24px);
  line-height: 1.3;
}
.service dd {
  flex: 2 1 380px;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 300;
  color: var(--muted);
}

.note {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dim);
}

/* ---------- Introduction form ---------- */
.intro { max-width: 760px; }
.intro .section-title { margin-bottom: 20px; }
.intro-lede {
  margin-bottom: 48px;
  font-size: 18px;
  font-weight: 300;
  color: var(--muted);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.field .optional { text-transform: none; letter-spacing: 0.02em; }

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-field);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
}
.field textarea {
  padding: 14px 16px;
  line-height: 1.5;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--dim); opacity: 1; }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-color: transparent;
}

/* Honeypot: hidden from people, visible to naive bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-check { min-height: 48px; }
/* Give the spam-check label a 44px touch target (it toggles the checkbox). */
.form-check .altcha-checkbox-wrap label {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px 12px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  margin-top: 8px;
}

.form-privacy {
  font-size: 14px;
  line-height: 1.5;
  color: var(--dim);
}

.inline-link {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.inline-link:hover { color: var(--text); }

.noscript-note {
  padding: 14px 16px;
  border-radius: var(--radius-field);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  font-size: 15px;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid rgba(139, 132, 200, 0.16);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
}
.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.site-footer a:hover { color: var(--text); }

/* ---------- Plain pages (privacy, form result) ---------- */
.prose {
  max-width: 720px;
  padding-top: clamp(48px, 8vw, 96px);
  padding-bottom: clamp(72px, 10vw, 140px);
}
.prose h1 {
  margin-bottom: 12px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.prose h2 {
  margin: 44px 0 12px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 26px);
  line-height: 1.25;
}
.prose p,
.prose li {
  font-size: 17px;
  font-weight: 300;
  color: var(--muted);
}
.prose p + p { margin-top: 14px; }
.prose ul { margin: 12px 0 0; padding-left: 1.2em; }
.prose li + li { margin-top: 8px; }
.prose a:not(.btn):not(.text-link) {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose .meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--dim);
}
.prose .btn { margin-top: 32px; }

.result-list { margin-top: 16px; }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .site-header .wrap { justify-content: center; }
  .nav-links { justify-content: center; }
  .service { padding: 24px 0; }
  .btn { width: 100%; }
  .hero .btn { width: auto; }
}
