/* ==========================================================================
   PINWHEEL — Core stylesheet (2026 redesign)
   Premium editorial system: black + off-white + electric lime accent.
   ========================================================================== */

:root {
  /* Color */
  --ink: #0a0a0a;
  --ink-soft: #151515;
  --paper: #ffffff;
  --white: #ffffff;
  --accent: #b8ff3d;
  --accent-ink: #0a0a0a;
  --text: #171717;
  --text-dim: #686868;
  --border: #ddddd6;

  /* Dark-section inversions (Why Pinwheel, final CTA, footer) */
  --text-on-dark: #f7f7f2;
  --text-dim-on-dark: #9a9a92;
  --border-on-dark: #2a2a2a;

  /* Type */
  --font-display: "Manrope", "Plus Jakarta Sans", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Fluid type scale */
  --step--1: clamp(0.86rem, 0.83rem + 0.15vw, 0.95rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.1rem);
  --step-1: clamp(1.15rem, 1.08rem + 0.35vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.75vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.4rem + 1.5vw, 2.6rem);
  --step-4: clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem);
  --hero: clamp(2.375rem, 1.4rem + 4.8vw, 6rem); /* 38px mobile -> 96px desktop */

  /* Layout */
  --container: 100%;
  --radius-sm: 8px;
  --radius-md: 16px;
  --gutter: clamp(1.125rem, 5vw, 4.5rem);

  /* Spacing (section rhythm) */
  --space-section: clamp(3.75rem, 6vw + 1rem, 10rem);   /* 60px -> 160px */
  --space-section-sm: clamp(3rem, 4vw + 1rem, 6rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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; }
}

body, h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Skip link ------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

/* Focus states ---------------------------------------------------------- */
a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 3px;
}
:where(.dark-section, .site-footer, .final-cta) a:focus-visible,
:where(.dark-section, .site-footer, .final-cta) button:focus-visible {
  outline-color: var(--accent);
}

/* Typography -------------------------------------------------------------*/
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}
h1 { font-size: var(--hero); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); font-weight: 700; }

p { max-width: 62ch; color: var(--text-dim); overflow-wrap: break-word; }
.lede { font-size: var(--step-1); color: var(--text); max-width: 44ch; font-weight: 500; }

.eyebrow {
  font-size: var(--step--1);
  color: var(--text-dim);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.eyebrow::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
}
.dark-section .eyebrow, .final-cta .eyebrow { color: var(--text-dim-on-dark); }

/* Layout helpers ---------------------------------------------------------*/
.wrap {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--space-section); }
.section-tight { padding-block: var(--space-section-sm); }
.section-border-top { border-top: 1px solid var(--border); }
.dark-section.section-border-top, .final-cta.section-border-top { border-top: 1px solid var(--border-on-dark); }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2.5rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.stack { display: flex; flex-direction: column; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; }
.gap-xs { gap: 0.5rem; }
.gap-sm { gap: 0.9rem; }
.gap-md { gap: 1.5rem; }
.gap-lg { gap: 2.5rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.text-paper { color: var(--text); }
.text-dim { color: var(--text-dim); }
.max-prose { max-width: 68ch; }

hr.rule { border: 0; border-top: 1px solid var(--border); margin-block: 2rem; }
.scroll-x { overflow-x: auto; }
img { border-radius: var(--radius-md); }

/* Dark section base (Why Pinwheel, final CTA, footer) --------------------*/
.dark-section, .final-cta {
  background: var(--ink);
  color: var(--text-on-dark);
}
.dark-section h1, .dark-section h2, .dark-section h3, .dark-section h4,
.final-cta h1, .final-cta h2, .final-cta h3, .final-cta h4 { color: var(--text-on-dark); }
.dark-section p, .final-cta p { color: var(--text-dim-on-dark); }
.dark-section .lede, .final-cta .lede { color: var(--text-on-dark); }
