/* ============================================================
   Sokai Sciences — gate pages (age-gate.ejs, sokai-slim-gate.ejs)

   A trimmed subset of style.css containing only the tokens/rules these
   two standalone pages actually use — extracted so the age gate (the
   first page nearly every visitor hits) doesn't have to ship the full
   site stylesheet just to render a form and a paragraph. Keep this in
   sync by hand if either gate view starts using a class/token that
   isn't already covered here; when in doubt, copy the rule verbatim
   from style.css rather than rewriting it, so the two never drift into
   rendering differently.
   ============================================================ */

/* ---------- Self-hosted fonts (latin subset only — no non-Latin
   content on these pages) ----------
   Replaces the fonts.googleapis.com/fonts.gstatic.com request pair
   (cross-origin DNS + TLS + render-blocking <link>) with same-origin
   files under /fonts, cached the same way as every other static asset
   (see server.js's express.static maxAge). Each family/weight below
   mirrors exactly what Google's own css2 API serves for this weight
   set — including the two font-weight blocks per family that share one
   file, which is normal for a variable font: the browser renders the
   exact declared weight by reading that file's own weight axis, not by
   picking a different file per weight. Don't "deduplicate" those
   repeated src lines — each one is a distinct declared weight the CSS
   below (`.eyebrow`, `.gate-select`, `.btn`, etc.) depends on. */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-400-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-400-600.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/ibm-plex-sans-400-600.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.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.woff2') format('woff2');
}

:root {
  --crystal: #F4F4F4;
  --crystal-2: #ECEEF8;
  --white: #FFFFFF;
  --slate: #161616;
  --beaker: #4D495B;

  --sky: #2132D0;
  --navy: #05106E;
  --indigo: #231DB3;
  --mist: #B7CBF2;

  --origin-navy: #060638;
  --origin-navy-2: #0C0A4A;
  --spark: #FF90A5;
  --accent-amber: #B8781F;
  --danger: #C0392B;

  --line: rgba(5, 16, 110, 0.12);
  --line-strong: rgba(5, 16, 110, 0.24);

  --glass-bg: rgba(9, 9, 58, 0.66);
  --glass-border: rgba(5, 16, 110, 0.14);
  --line-on-dark: rgba(5, 16, 110, 0.08);
  --card-on-dark: rgba(5, 16, 110, 0.035);
  --card-on-dark-hover: rgba(5, 16, 110, 0.06);

  --font-display: 'Fraunces', ui-serif, Georgia, 'Times New Roman', serif;
  --font-body: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --container: 1200px;
  --radius: 4px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(5, 16, 110, 0.06), 0 12px 32px rgba(5, 16, 110, 0.08);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--crystal);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; cursor: pointer; }
input, select { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
}
p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--sky);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Mono / eyebrow ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn--primary {
  background: var(--sky);
  color: var(--white);
}
.btn--primary:hover { background: var(--navy); box-shadow: 0 0 0 4px rgba(255, 144, 165, 0.4); transform: translateY(-1px); }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Age / research-access gate ---------- */
.gate-card { color: var(--slate); }
.gate-card .eyebrow { color: var(--sky); }
.gate-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gate-field-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(5, 16, 110, 0.24);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.gate-field-box:hover { border-color: var(--sky); }
.gate-field-box input[type="checkbox"] {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
  flex-shrink: 0;
}
.gate-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.gate-required-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--accent-amber);
}
.gate-select {
  width: 100%;
  border: 1px solid rgba(5, 16, 110, 0.24);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--slate);
  background: var(--white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%234D495B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.gate-select:focus-visible { outline: 2px solid var(--sky); outline-offset: 2px; }
.gate-select:invalid { color: var(--beaker-on-light, #4D495B); font-weight: 500; }
.gate-btn-primary {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 13.5px;
}

/* ---------- Tactile crop-mark corners (technical/spec-sheet detail) ---------- */
.crop-marked { position: relative; }
.crop-marked::before,
.crop-marked::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--spark);
  opacity: 0.7;
  pointer-events: none;
}
.crop-marked::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.crop-marked::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
