/* ============================================================
   MANMIND design system / "The Formulation"
   White paper, ink type, mono spec labels.
   The only color on any page comes from the formulation chips.
   ============================================================ */

:root {
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #555555;
  --hairline: #e3e3e3;
  --mm1: #7C1E2E;
  --mm2: #16305E;
  --mm3: #A85B1D;
  --mm4: #16412C;
  --mm5: #A67C2E;
  --mm6: #4B2A59;
  --signal: #FF4D00;
  --font-head: "Archivo", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --gutter: clamp(20px, 4vw, 48px);
}

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

html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-head);
  font-variation-settings: "wdth" 100, "wght" 460;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; }

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

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* --- Type --- */

h1, h2, h3, .display {
  font-family: var(--font-head);
  font-variation-settings: "wdth" 125, "wght" 800;
  font-weight: 800;
  font-stretch: 125%;
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mono-soft { color: var(--ink-soft); }

.hairline-top { border-top: 1px solid var(--hairline); }
.hairline-bottom { border-bottom: 1px solid var(--hairline); }

/* --- Buttons --- */

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 18px 36px;
  border: 1px solid var(--ink);
  text-decoration: none;
  cursor: pointer;
  background: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--paper); color: var(--ink); }

.btn-ghost { background: var(--paper); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

/* Signal: reserved for the primary "Diagnose your mind" CTA only */
/* --cta rotates through the six formulation colours (assets/mm-cta.js), in sync with the homepage specimen */
.btn-signal { background: var(--cta, var(--signal)); border-color: var(--cta, var(--signal)); color: #ffffff; transition: background 0.35s ease, border-color 0.35s ease, color 0.15s ease; }
.btn-signal:hover { background: var(--ink); border-color: var(--ink); color: #ffffff; }

/* --- Site nav (shared across pages) --- */

.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft);
}
.site-nav a:hover, .site-nav a.active { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 960px) { .site-nav { display: none; } }

/* --- Mobile menu (injected by assets/mm-nav.js) --- */
.nav-toggle { display: none; }
@media (max-width: 960px) {
  .nav-toggle { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; padding: 0; margin-left: auto; border: none; background: none; cursor: pointer; }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); }
  .site-header .btn-signal { display: none; } /* the CTA lives inside the menu on mobile */
}
.mobile-menu { position: fixed; inset: 0; z-index: 200; background: var(--paper); flex-direction: column; padding: 18px var(--gutter) 40px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mobile-menu[hidden] { display: none; }
.mobile-menu.open { display: flex; }
.mm-close { align-self: flex-end; width: 44px; height: 44px; font-family: var(--font-mono); font-weight: 300; font-size: 40px; line-height: 1; color: var(--ink); background: none; border: none; cursor: pointer; }
.mm-links { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.mm-links a { font-family: var(--font-head); font-variation-settings: "wdth" 125, "wght" 800; font-stretch: 125%; text-transform: uppercase; font-size: clamp(28px, 9.5vw, 54px); line-height: 1.08; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); overflow-wrap: break-word; }
.mm-links a.active { color: var(--ink-soft); }
.mm-cta { margin-top: auto; text-align: center; }

/* --- Chip component (Pantone anatomy: color block + label strip) --- */

.chip {
  border: 1px solid var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  text-decoration: none;
}

.chip-block {
  aspect-ratio: 5 / 4;
  transition: transform 0.25s ease;
}

.chip:hover .chip-block { transform: scale(0.96); }

.chip-label {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--ink);
  display: grid;
  gap: 3px;
}

.chip-label .code {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.chip-label .name {
  font-family: var(--font-head);
  font-variation-settings: "wdth" 125, "wght" 800;
  font-weight: 800;
  font-stretch: 125%;
  font-size: clamp(18px, 1.6vw, 24px);
  text-transform: uppercase;
  line-height: 1;
  color: var(--ink);
}

.chip-label .mech,
.chip-label .dose {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.chip-label .dose { margin-top: 4px; }

/* --- Ticker marquee --- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

.marquee-track {
  display: inline-block;
  padding: 14px 0;
  animation: mm-marquee 32s linear infinite;
}

.marquee-track span {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 1.5em;
}

@keyframes mm-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* --- Scroll reveal --- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.is-in { opacity: 1; transform: none; }

/* --- Reduced motion --- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .chip:hover .chip-block { transform: none; }
}
