/* ==========================================================================
   Cosmos Aesthetics — Base: reset, typography, band layout system
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-weight: var(--weight-body);
  color: var(--text);
  background: var(--bg);
  text-underline-offset: 0.2em;   /* global: underlines sit a bit lower (inherited) */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-wrap: pretty;
  text-rendering: optimizeLegibility;
}

img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
ul, ol { padding: 0; list-style-position: inside; }

:where(a, button, input, select, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* --- Heading system ------------------------------------------------------
   h1, h2  = serif display (elegant, not bold)
   h3-h5   = body font, UPPERCASE + letter-spacing, decreasing size (labels). */
h1, h2 {
  font-family: var(--font-display);
  color: var(--heading-soft);            /* muted plum heading */
  font-weight: var(--weight-display);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
}
h1 { font-size: var(--step-5); color: var(--heading); }   /* h1 stays strong near-black */
h2 { font-size: var(--step-4); }
/* h3 = body font, sentence case, a clear readable subheading */
h3 {
  font-family: var(--font-body);
  color: var(--heading-soft);
  font-weight: var(--weight-bold);
  font-size: var(--step-2);
  line-height: var(--leading-snug);
  letter-spacing: -0.005em;
}
/* h4 onwards = body font, UPPERCASE + 8% tracking, decreasing size */
h4, h5, h6 {
  font-family: var(--font-label);
  color: var(--heading-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: var(--weight-bold);
  line-height: 1.3;
}
h4 { font-size: var(--step-0); }       /* ~16px */
h5 { font-size: var(--step--1); }      /* ~13px */
h6 { font-size: 0.72rem; color: var(--text-muted); }

p { max-width: 68ch; }
/* .prose typographic defaults live in components.css (shared with .prose--rich) */

/* eyebrow: small, uppercase, tracked, muted warm gray (premium minimal) */
.eyebrow {
  font-family: var(--font-label);
  font-size: 0.875rem;
  font-weight: var(--weight-bold);
  line-height: 1.5;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent-deep);
  display: inline-block;
  margin-bottom: var(--space-2xs);   /* tight to the heading it labels */
}

/* --- Band layout system --------------------------------------------------
   One idea per band. Alternating contained vs full-bleed. Generous y-padding.
   <section class="band [band--alt] [band--bleed]"> <div class="band__inner"> */
.band { padding-block: var(--band-pad-y); }
.band--alt { background: var(--bg-alt); }
.band--sunken { background: var(--surface-sunken); }
.band--ink { background: var(--color-ink-900); color: var(--color-greige-200); }
.band--ink h1, .band--ink h2, .band--ink h3 { color: var(--color-white); }

.band__inner {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
}
.band__inner--narrow { width: min(var(--container-narrow), 100% - 2 * var(--gutter)); }
.band--bleed > .band__inner { width: 100%; }

/* section heading cluster (eyebrow + heading + optional subheading) */
.section-head { max-width: var(--container-narrow); margin-bottom: clamp(2rem, 4vw, 3.25rem); }
/* A section-head alone in its band is a page header — the band's own padding already
   spaces it from the next section, so the bottom margin is redundant dead space. */
.band__inner > .section-head:only-child { margin-bottom: 0; }
.section-head > * + * { margin-top: var(--space-2xs); }   /* tight eyebrow -> title */
.section-head--center { margin-inline: auto; text-align: center; }
/* Prevent the "centered text, left-pinned block" bug: any max-width child of a
   centered head (lede, sub, etc.) must auto-center, or it sits flush-left while
   its text reads centered. Applies to every child so it can never recur. */
.section-head--center > * { margin-inline: auto; }
.section-head .eyebrow { margin-bottom: 0; }
.section-head__sub { font-size: var(--step-1); color: var(--text-muted); line-height: 1.6; max-width: 54ch; margin-top: var(--space-sm); }
/* Give the hero lede real breathing room under the title (not the tight owl gap). */
.section-head .hero__lede { margin-top: var(--space-sm); }
/* an eyebrow always hugs the heading that follows it, in ANY container */
.eyebrow + :is(h1, h2, h3) { margin-top: var(--space-sm); }
/* the standard centered "see more" link below a grid (consistent rhythm).
   Flex-centres across the FULL band width so it never drifts off-centre. */
.section-foot { display: flex; justify-content: center; width: 100%; max-width: none; margin: clamp(2rem, 4vw, 3rem) 0 0; }

/* utility */
.stack > * + * { margin-top: var(--space-md); }
.muted { color: var(--text-muted); }
.center { text-align: center; }
/* uppercase label style: clean 5% tracking, sans (use in headers/labels) */
.u-caps { font-family: var(--font-label); text-transform: uppercase; letter-spacing: var(--tracking-caps); font-weight: var(--weight-bold); }
.visually-hidden {
  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: absolute; left: var(--space-sm); top: -3rem; z-index: var(--z-modal);
  background: var(--accent-cta); color: var(--on-accent);
  padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm);
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: var(--space-sm); }

/* --- Per-role image frames (fixed aspect ratios, object-fit cover) -------- */
.media { overflow: hidden; border-radius: var(--radius-md); background: var(--surface-sunken); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); }
.media > img { width: 100%; height: 100%; object-fit: cover; }
.media--portrait { aspect-ratio: var(--ratio-portrait); }
.media--content  { aspect-ratio: var(--ratio-content); }
.media--card     { aspect-ratio: var(--ratio-card); }
