/* ==========================================================================
   CoWoNE Redesign - Base (reset, typography, layout primitives)
   ========================================================================== */

*, *::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(--t-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

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

/* --- Layout helpers --- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
.section { padding-block: var(--section-y); }
.section--lg { padding-block: var(--section-y-lg); }       /* generous beat */
.section--sm { padding-block: var(--section-y-sm); }       /* tight beat */
.section--tight { padding-block: var(--section-y-xs); }       /* extra-tight beat */
.surface-1 { background: var(--surface-1); }
.deep { background: var(--deep); color: var(--on-deep); }
.deep h1, .deep h2, .deep h3 { color: var(--on-deep); }

.lead { font-size: var(--t-lead); color: var(--ink-soft); line-height: 1.55; max-width: 60ch; }
.eyebrow {
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-body);
  font-size: var(--t-caption);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.9rem;
  white-space: normal;
  overflow-wrap: break-word;
}
.measure { max-width: var(--maxw-text); }

/* utility */
.muted { color: var(--ink-soft); }
.center { text-align: center; }
.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;
}

/* --- Scroll reveal (MOTION 4, motivated: storytelling on scroll) ---
   Only hidden when JS is active (html.js). Without JS, content stays visible. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
