/* ==========================================================================
   Alcove Lab — shared base stylesheet
   Source of truth for these values:
   Drive → Marketing and Visibility/01 Assets/Brand 2026/_brand-reference.md

   HARD RULE from that file: five colors, full strength. Never tint, shade,
   lighten, darken, or apply opacity to any of them, and never invent a sixth.
   If a design seems to need a "soft" variant, solve it with a different one of
   the five, or with type weight/size — not a new value.
   ========================================================================== */

/* ---- Fonts -------------------------------------------------------------- */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/InstrumentSans-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
/* Decorative accent face — occasional characterful moments only, not a workhorse. */
@font-face {
  font-family: "PP Right Serif";
  src: url("../fonts/PPRightSerif-TallFine.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---- Tokens ------------------------------------------------------------- */

:root {
  /* The five. Never used other than at full strength. */
  --rest:   #EDEAE6;  /* grey  — background/surface */
  --ground: #494435;  /* brown — ink */
  --glow:   #ECFF6D;  /* yellow— accent/highlight */
  --beam:   #187CFF;  /* blue  — primary brand accent */
  --alert:  #FF512A;  /* red   — loudest; sparingly */

  /* Semantic roles. Light mode: REST surface, GROUND ink. */
  --surface: var(--rest);
  --ink:     var(--ground);
  --rule:    var(--ground);
  --accent:  var(--beam);

  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans:  "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --accent-face: "PP Right Serif", var(--serif);

  --measure: 68ch;
  --gap: 1.5rem;
  --radius-card: 22px;
}

/* Dark mode swaps the canonical pair — it does not invert lightness or
   introduce a dark-tinted REST. GLOW callouts stay identical in both modes. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: var(--ground);
    --ink:     var(--rest);
    --rule:    var(--rest);
  }
}
:root[data-theme="dark"] {
  --surface: var(--ground);
  --ink:     var(--rest);
  --rule:    var(--rest);
}

/* ---- Reset -------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }

/* ---- Type --------------------------------------------------------------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.8rem + 3.4vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); }
p  { margin: 0 0 1em; max-width: var(--measure); text-wrap: pretty; }

/* Signature device: a key phrase bracketed in literal asterisks inside a
   headline. Ties back to the brand mark — it is not a typo. */
.ast { font-style: italic; }

/* Eyebrow / all-caps tracked-out line. Medium weight is specified by the brand
   for this and for buttons, but only Regular/Bold/Italic static cuts exist in
   Brand 2026/Fonts — 500 falls back to Regular. */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 1rem;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
:where(a, button, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875em;
}
pre {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1rem;
  overflow-x: auto;
}

/* ---- Layout ------------------------------------------------------------- */

.wrap {
  width: min(72rem, 100% - 2.5rem);
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 5rem);
}
.stack > * + * { margin-top: var(--gap); }

/* ---- Components --------------------------------------------------------- */

/* Buttons: always a full pill. Uppercase, letter-spaced. Reach for a trailing
   arrow on forward-navigation CTAs. */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.7em 1.5em;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 500;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  cursor: pointer;
}
.btn--filled {
  background: var(--beam);
  border-color: var(--beam);
  color: var(--rest);
}

/* Cards: generously rounded. On a saturated section they take a solid REST
   fill; on a plain REST page they usually aren't needed at all. */
.card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-card);
  padding: 1.5rem;
}
.card h3 { margin-bottom: 0.25rem; }
.card p:last-child { margin-bottom: 0; }

.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Highlight/callout: solid GLOW with GROUND text. Fixed in both modes. */
.callout {
  background: var(--glow);
  color: var(--ground);
  border-radius: var(--radius-card);
  padding: 1.25rem 1.5rem;
}
.callout a { color: var(--ground); }

/* A chip that must always read as a dark label regardless of page mode. */
.chip {
  display: inline-block;
  background: var(--ground);
  color: var(--rest);
  border-radius: 999px;
  padding: 0.2em 0.75em;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* Feature lists use a bold checkmark glyph, not plain bullets. */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { padding-left: 1.6em; text-indent: -1.6em; margin-bottom: 0.4em; }
.checks li::before { content: "✔"; font-weight: 700; margin-right: 0.6em; }

.site-foot {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.25rem;
  font-size: 0.8125rem;
}

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