/* Octodus shared base — Atlas paper/ink/vermilion, matching the homepage
   and Octolabs. Cream paper, ink type, vermilion as the one signal colour. */

@font-face {
  font-family: Geist;
  src: url("../atlas/vendor/geist-latin-400-normal.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  /* Paper backgrounds */
  --bg-deep: #E4E3D8;        /* warmer cream — section dividers, footer */
  --bg: #F1EFE7;             /* the canvas, matches Atlas --paper */
  --bg-elev: #EFE9DC;        /* slightly raised — table headers, nav rest */
  --bg-card: #FFFFFF;        /* cards, clean white */
  --bg-card-hover: #FBF9F3;  /* hover lift */

  /* Borders / rules */
  --border: #CBCBBF;         /* matches Atlas --rule */
  --border-light: #B9B9AB;

  /* Ink */
  --text: #242820;           /* matches Atlas --ink */
  --text-secondary: #565A50;
  --text-muted: #62655B;     /* matches Atlas --muted */

  /* THE accent — vermilion, matches Atlas --signal. */
  --accent: #B63C24;
  --accent-light: #C94B30;    /* brighter — hovers, link colour */
  --accent-deep: #7A2410;     /* deepest — gradient deep stop */
  --accent-soft: rgba(182, 60, 36, 0.10);

  /* Accent tint helpers — derived from the vermilion accent above. */
  --accent-tint-04: rgba(182, 60, 36, 0.04);
  --accent-tint-06: rgba(182, 60, 36, 0.06);
  --accent-tint-08: rgba(182, 60, 36, 0.08);
  --accent-tint-10: rgba(182, 60, 36, 0.10);
  --accent-tint-12: rgba(182, 60, 36, 0.12);
  --accent-tint-15: rgba(182, 60, 36, 0.15);
  --accent-tint-18: rgba(182, 60, 36, 0.18);
  --accent-tint-22: rgba(182, 60, 36, 0.22);
  --accent-tint-25: rgba(182, 60, 36, 0.25);
  --accent-tint-30: rgba(182, 60, 36, 0.30);
  --accent-tint-35: rgba(182, 60, 36, 0.35);
  --accent-tint-40: rgba(182, 60, 36, 0.40);
  --accent-tint-45: rgba(182, 60, 36, 0.45);
  --accent-tint-50: rgba(182, 60, 36, 0.50);
  --accent-tint-60: rgba(182, 60, 36, 0.60);
  --accent-tint-70: rgba(182, 60, 36, 0.70);

  /* Text color on accent backgrounds (i.e. on buttons) */
  --on-accent: #FFFFFF;

  /* Secondary tints used by stories/grants ("planning" violet, "code" blue, etc.).
     In mono-light we soften them so the design stays editorial. */
  --t-code: #2C5A99;
  --t-plan: #6B4FA8;
  --t-research: #B8821C;
  --t-sales: #B63C24;
  --t-auto: #1E7A6F;
  --t-design: #146A3F;

  --font-heading: Geist, Arial, sans-serif;
  --font-sans: Geist, Arial, sans-serif;
  --font-mono: Geist, Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Subtle paper noise — multiply blend so it darkens slightly instead of glowing */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  opacity: 0.045;
  pointer-events: none;
  z-index: 100;
  mix-blend-mode: multiply;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

::selection { background: var(--accent-tint-25); color: var(--text); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

/* Type system */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

/* Section frame */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

section {
  position: relative;
  padding: 120px 0;
}
@media (max-width: 720px) {
  section { padding: 80px 0; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 0;
  font-weight: 400;
  font-size: 15px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 180ms var(--ease-out),
              background 180ms var(--ease-out),
              border-color 180ms var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}
.btn-ghost {
  background: var(--bg-card);
  color: var(--text);
  border-color: var(--border-light);
}
.btn-ghost:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: var(--accent);
}

/* Ambient glow */
.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.15s !important;
  }
}

/* ────── Sub-page hero (shared) ────── */
.page-hero {
  position: relative;
  padding: 120px 0 80px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--accent-tint-08), transparent 65%);
  pointer-events: none;
}
.page-hero-body {
  position: relative;
  z-index: 1;
  max-width: 880px;
}
.page-hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.045em;
  margin: 18px 0 22px;
}
.page-hero h1 em {
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--accent);
}
.page-hero-sub {
  font-size: clamp(16px, 1.7vw, 19px);
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 620px;
  text-wrap: pretty;
}
@media (max-width: 720px) {
  .page-hero { padding: 80px 0 56px; }
}
