/* ==========================================================================
   global.css — reset, document typography, layout primitives, bands
   ========================================================================== */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

::selection {
  background: var(--accent);
  color: #fff;
}

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

/* ---- Headings ---------------------------------------------------------- */

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

h1 {
  font-size: var(--fs-h1);
  letter-spacing: -0.04em;
}

h2 {
  font-size: var(--fs-h2);
}

h3 {
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
}

p {
  text-wrap: pretty;
}

/* The serif is used for one accent phrase at a time, never for body copy. */
.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.accent {
  color: var(--accent);
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
}

.section--tight {
  padding-block: calc(var(--section-y) * 0.66);
}

/* Contrast bands ---------------------------------------------------------- */

.band {
  position: relative;
  padding-block: var(--section-y);
}

.band--surface {
  background: var(--bg-warm);
  border-block: 1px solid var(--line);
}

.band--dark {
  background: var(--ink-deep);
  color: var(--ink-text);
}

.band--dark h2,
.band--dark h3 {
  color: var(--ink-text);
}

/* Fine grain + a single rose glow: texture without illustration. */
.band--dark::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(
      900px 520px at 82% -10%,
      rgba(122, 38, 58, 0.34),
      transparent 70%
    ),
    radial-gradient(760px 420px at 4% 108%, rgba(122, 38, 58, 0.16), transparent 72%);
  opacity: 0.9;
}

.band--dark > * {
  position: relative;
  z-index: 1;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-strong);
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.eyebrow--light {
  color: var(--ink-muted);
}

.eyebrow--light::before {
  background: var(--accent-rose);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--muted-strong);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: var(--muted-strong);
  max-width: 58ch;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink);
  transition: color var(--dur) var(--ease), gap var(--dur) var(--ease);
}

.arrow-link svg {
  transition: transform var(--dur) var(--ease);
}

.arrow-link:hover {
  color: var(--accent);
  gap: 11px;
}

.arrow-link:hover svg {
  transform: translateX(2px);
}

.link {
  color: var(--ink);
  background-image: linear-gradient(var(--accent-line), var(--accent-line));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: background-size var(--dur) var(--ease), color var(--dur) var(--ease);
}

.link:hover {
  background-image: linear-gradient(var(--accent), var(--accent));
  color: var(--accent);
}

/* ---- Accessibility ---------------------------------------------------- */

.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;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--ink-deep);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  transform: translateY(-160%);
  transition: transform var(--dur) var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---- Motion preferences ----------------------------------------------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---- Responsive collapse ---------------------------------------------- */

@media (max-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: var(--gap-lg);
  }
}
