/* site.css — Lacunae Designs studio hub.

   THE TRIAD RULE. Three sibling surfaces, one warm metal/ink each:
   Perpetūra gold #c9a96e on warm brown-black, Pantheon oxidised brass
   #a98554 on cool carbon, and this hub takes CRIMSON on an oxblood-tinted
   near-black. Shared grammar across all three: dark ground, accent as a
   line-and-mark colour (never a flood, never body text), parchment reading
   text, thin rule-lines, faint accent borders, themed thin scrollbars.

   CONTRAST DISCIPLINE, inherited from Pantheon's theme-classified.css,
   which measured its proof red at 2.7:1 on carbon: dark red FAILS as text
   on dark grounds. --crimson and --oxblood never carry text. Anywhere
   crimson must be read uses --rose-300 or --rose-200. Every pairing below
   was checked against its real ground during the build.

   Fonts are requested from the page <head> with preconnect, never @import:
   an @import inside a stylesheet cannot be discovered until this file has
   downloaded and parsed, so it serialises into a render-blocking chain.
   House rule from both sibling sites. Families: Fraunces (display),
   Crimson Pro (body, Perpetūra's face), IBM Plex Mono (meta, Pantheon's). */

:root {
  /* grounds */
  --bg:             #120b0d;
  --surface:        #1c1114;
  --surface-raised: #261619;

  /* text */
  --text:       #e8ddd0;
  --text-dim:   #c9b8a9;
  --text-faint: #9c8878;   /* meta only, never body */

  /* the accent: crimson. A line and mark colour. */
  --crimson:        #a63d47;
  --crimson-bright: #c25560;
  --rose-300:       #d98f95;   /* readable step: small text on dark */
  --rose-200:       #ecc4c7;   /* readable step: emphasis on dark   */
  --oxblood:        #6e2830;
  --crimson-faint:  rgba(166, 61, 71, 0.14);
  --border:         rgba(166, 61, 71, 0.28);
  --border-hover:   rgba(166, 61, 71, 0.62);
  --divider:        rgba(232, 221, 208, 0.12);

  /* sibling metals: used ONLY on each work's own panel */
  --gold:        #c9a96e;
  --gold-faint:  rgba(201, 169, 110, 0.14);
  --gold-border: rgba(201, 169, 110, 0.32);
  --brass:        #b28e5c;  /* Pantheon's #a98554, one step up for this darker ground */
  --brass-faint:  rgba(169, 133, 84, 0.14);
  --brass-border: rgba(169, 133, 84, 0.36);

  /* type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Crimson Pro', Georgia, serif;
  --font-mono:    'IBM Plex Mono', 'Consolas', monospace;

  /* rhythm */
  --measure: 62ch;
  --radius: 4px;           /* one radius for every box on the site */
  --pad: clamp(1.25rem, 4vw, 2.5rem);

  /* layers */
  --z-nav: 100;
  --z-grain: 200;
}

/* ── reset & base ─────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.1875rem;              /* Crimson Pro runs small; 19px reads as 16 */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--rose-300); text-decoration-color: var(--border); text-underline-offset: 3px; }
a:hover { color: var(--rose-200); text-decoration-color: var(--border-hover); }

::selection { background: var(--oxblood); color: var(--rose-200); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 550;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: var(--text);
  text-wrap: balance;
}

p { max-width: var(--measure); }

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

/* themed thin scrollbar, the family signature */
* { scrollbar-width: thin; scrollbar-color: rgba(166, 61, 71, 0.35) transparent; }
::-webkit-scrollbar { width: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(166, 61, 71, 0.32);
  border-radius: 6px; border: 2px solid transparent; background-clip: content-box;
}

/* grain: fixed, pointer-blind, cheap. Never on a scrolling container. */
.grain {
  position: fixed; inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
}

/* ── layout shell ─────────────────────────────────────────────────────── */

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

/* ── navigation ───────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0;
  z-index: var(--z-nav);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}
.nav__row {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.nav__mark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}
.nav__mark:hover { color: var(--rose-200); }
.nav__mark b { color: var(--crimson-bright); font-weight: 600; }
.nav__links { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }
.nav__links a {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.5rem 0.25rem;          /* target ≥ 44px with row height */
  border-bottom: 1px solid transparent;
}
.nav__links a:hover { color: var(--rose-200); border-bottom-color: var(--border-hover); }
.nav__links a[aria-current="page"] { color: var(--rose-300); border-bottom-color: var(--border); }

/* ── buttons: marks, not floods ───────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 0.8rem 1.4rem;
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--crimson-faint);
  color: var(--rose-200);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 200ms ease-out, background 200ms ease-out,
              transform 150ms ease-out;
}
.btn:hover { border-color: var(--border-hover); background: rgba(166, 61, 71, 0.22); color: var(--rose-200); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--crimson-bright); outline-offset: 3px; }

.btn--gold { border-color: var(--gold-border); background: var(--gold-faint); color: var(--gold); }
.btn--gold:hover { border-color: rgba(201, 169, 110, 0.65); background: rgba(201, 169, 110, 0.22); color: #ddb87a; }

.btn--brass { border-color: var(--brass-border); background: var(--brass-faint); color: var(--brass); }
.btn--brass:hover { border-color: rgba(169, 133, 84, 0.68); background: rgba(169, 133, 84, 0.22); color: #c6a36f; }

.textlink {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; min-height: 44px;
}

/* ── signup ───────────────────────────────────────────────────────────── */

.signup__form { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.signup__input {
  flex: 1 1 260px;
  min-height: 44px;
  padding: 0.7rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
}
.signup__input::placeholder { color: var(--text-faint); }
.signup__input:focus-visible { outline: 2px solid var(--crimson-bright); outline-offset: 2px; border-color: var(--border-hover); }
.signup__note { font-size: 0.9375rem; color: var(--text-faint); margin-top: 1rem; }
.signup__status { color: var(--rose-300); margin-top: 1rem; font-size: 1rem; }

/* ── footer ───────────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--divider); margin-top: clamp(4rem, 10vw, 7rem); }
.footer__row {
  display: flex; flex-wrap: wrap; gap: 1.5rem 3rem;
  align-items: baseline; justify-content: space-between;
  padding-block: 2.5rem;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer__links a {
  font-family: var(--font-mono); font-size: 0.8125rem;
  color: var(--text-faint); text-decoration: none;
}
.footer__links a:hover { color: var(--rose-300); }
.footer__legal { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-faint); }

/* ── entrance motion: one orchestrated load, CSS only ─────────────────── */

@media (prefers-reduced-motion: no-preference) {
  .rise { opacity: 0; transform: translateY(18px); animation: rise 700ms cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  .rise-1 { animation-delay: 60ms; }
  .rise-2 { animation-delay: 160ms; }
  .rise-3 { animation-delay: 260ms; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}
