/* ==========================================================================
   C.Lab — Design System
   Zen garden meets cosmic revelation.
   Phase 1 prototype — Iris Cocreative, April 2026
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Grounding */
  --color-ground-deep:   #0A0A0A;
  --color-ground-dark:   #141311;
  --color-ground-mid:    #2C2826;
  --color-ground-light:  #F7F5F2;
  --color-ground-white:  #FDFCFB;
  --color-ground-warm:   #F0ECE6;

  /* Prismatic */
  --color-prism-red:     #E84040;
  --color-prism-orange:  #F08030;
  --color-prism-yellow:  #F0C020;
  --color-prism-green:   #30B060;
  --color-prism-blue:    #3060D0;
  --color-prism-indigo:  #4030A0;
  --color-prism-violet:  #8030C0;

  /* Text */
  --color-text-primary:   #1A1A1A;
  --color-text-secondary: #5A5652;
  --color-text-muted:     #8A8580;
  --color-text-inverse:   #F7F5F2;
  --color-text-inverse-mute: #B8B3AC;

  /* Borders */
  --color-border-subtle:   rgba(26,26,26,0.08);
  --color-border-emphasis: rgba(26,26,26,0.18);
  --color-border-inverse:  rgba(247,245,242,0.12);

  /* Gradients */
  --gradient-prism: conic-gradient(
    from 120deg,
    #E84040, #F08030, #F0C020, #30B060,
    #3060D0, #4030A0, #8030C0, #E84040
  );
  --gradient-prism-linear: linear-gradient(
    92deg,
    #E84040 0%, #F08030 17%, #F0C020 33%,
    #30B060 50%, #3060D0 67%, #4030A0 83%, #8030C0 100%
  );
  --gradient-cosmos: radial-gradient(
    ellipse 120% 80% at 50% 0%,
    #1F1B2E 0%, #141311 50%, #0A0A0A 100%
  );
  --gradient-warm: linear-gradient(
    168deg,
    var(--color-ground-light) 0%,
    var(--color-ground-warm) 100%
  );

  /* Spacing — 8px grid */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   40px;
  --space-2xl:  64px;
  --space-3xl:  96px;
  --space-4xl:  140px;
  --space-5xl:  200px;

  /* Motion */
  --ease-gentle:  cubic-bezier(0.25, 0.1, 0.25, 1.0);
  --ease-reveal:  cubic-bezier(0.0, 0.0, 0.2, 1.0);
  --ease-breathe: cubic-bezier(0.4, 0.0, 0.6, 1.0);
  --duration-quick:  200ms;
  --duration-medium: 400ms;
  --duration-slow:   800ms;

  /* Layout */
  --container-max: 1280px;
  --prose-max:     680px;
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;

  /* Type — Josefin Sans throughout */
  --font-display: "Josefin Sans", system-ui, -apple-system, sans-serif;
  --font-body:    "Josefin Sans", system-ui, -apple-system, sans-serif;

  /* Button gradient — subtler 3-color sunset */
  --gradient-btn: linear-gradient(100deg, #F08030 0%, #E84040 50%, #8030C0 100%);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--color-text-primary);
  background: var(--color-ground-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
::selection { background: var(--color-prism-yellow); color: var(--color-ground-deep); }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-lg);
  color: var(--color-text-primary);
}
h1 { font-size: clamp(2.5rem, 5.5vw, 4.75rem); font-weight: 300; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.75rem); font-weight: 500; }
h4 { font-size: 1.15rem; font-weight: 500; letter-spacing: 0; }
p  { margin: 0 0 var(--space-md); max-width: var(--prose-max); }
em { font-style: italic; }
.prose p { font-size: 1.125rem; line-height: 1.7; color: var(--color-text-secondary); }
.prose p + p { margin-top: var(--space-md); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}
.eyebrow--prism { color: var(--color-prism-orange); }
.eyebrow--red    { color: var(--color-prism-red); }
.eyebrow--green  { color: var(--color-prism-green); }
.eyebrow--blue   { color: var(--color-prism-blue); }
.eyebrow--violet { color: var(--color-prism-violet); }
.lede {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.4;
  color: var(--color-text-primary);
  max-width: 720px;
  letter-spacing: -0.005em;
}

/* ---------- Layout primitives ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 80px);
}
.container--narrow { max-width: 920px; }
.section { padding-block: clamp(var(--space-3xl), 12vw, var(--space-4xl)); }
.section--tight { padding-block: var(--space-3xl); }
.section--hero { padding-block: var(--space-5xl) var(--space-4xl); }
.section--dark {
  background: var(--gradient-cosmos);
  color: var(--color-text-inverse);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: var(--color-text-inverse); }
.section--dark p { color: var(--color-text-inverse-mute); }
.section--warm { background: var(--gradient-warm); }

.stack > * + * { margin-top: var(--space-md); }
.stack-lg > * + * { margin-top: var(--space-lg); }
.stack-xl > * + * { margin-top: var(--space-xl); }

.grid { display: grid; gap: var(--space-xl); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-asym {
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-3xl);
  align-items: start;
}
@media (max-width: 820px) {
  .grid-asym { grid-template-columns: 1fr; gap: var(--space-xl); }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--space-lg) 0;
  transition: background var(--duration-medium) var(--ease-gentle),
              backdrop-filter var(--duration-medium) var(--ease-gentle),
              border-color var(--duration-medium) var(--ease-gentle),
              padding var(--duration-medium) var(--ease-gentle);
  border-bottom: 1px solid transparent;
}
.nav--scrolled {
  background: rgba(253, 252, 251, 0.82);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom-color: var(--color-border-subtle);
  padding: var(--space-md) 0;
}
.nav--on-dark {
  color: var(--color-text-inverse);
}
.nav--on-dark.nav--scrolled {
  background: rgba(10, 10, 10, 0.72);
  border-bottom-color: var(--color-border-inverse);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  color: inherit;
}
.nav__mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-prism);
  position: relative;
  flex-shrink: 0;
  --mx: 0px;
  --my: 0px;
  transition: filter 400ms var(--ease-gentle);
}
.nav__mark:hover,
.nav__brand:hover .nav__mark {
  filter: saturate(1.15) brightness(1.05);
}
/* The "iris" — inner hole, moves subtly with the pointer */
.nav__mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--color-ground-white);
  transform: translate(calc(var(--mx) * 0.5), calc(var(--my) * 0.5));
  transition: transform 400ms var(--ease-gentle), background 300ms ease;
}
.nav--on-dark .nav__mark::after { background: var(--color-ground-deep); }
.footer .nav__mark::after,
.footer__brand .nav__mark::after { background: var(--color-ground-deep); }

/* The "pupil" — tiny center dot, moves a little more */
.nav__mark-eye {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-ground-deep);
  transform: translate(
    calc(-50% + (var(--mx) * 1)),
    calc(-50% + (var(--my) * 1))
  );
  transition: transform 400ms var(--ease-gentle), background 300ms ease;
  pointer-events: none;
  z-index: 2;
}
.nav--on-dark .nav__mark-eye,
.footer .nav__mark-eye,
.footer__brand .nav__mark-eye { background: var(--color-ground-white); }
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  list-style: none;
  margin: 0; padding: 0;
}
.nav__link {
  font-size: 1rem;
  color: inherit;
  opacity: 0.85;
  position: relative;
  padding: 4px 0;
  letter-spacing: 0.01em;
  transition: opacity var(--duration-quick) var(--ease-gentle),
              color var(--duration-medium) var(--ease-gentle);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-prism-linear);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 400ms var(--ease-gentle);
}
.nav__link:hover { opacity: 1; }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { opacity: 1; }

/* Per-item gradient accents — each nav item gets its own slice of the spectrum */
.nav__links > li:nth-child(1) .nav__link::after {
  background: linear-gradient(90deg, #E84040 0%, #F08030 100%);
}
.nav__links > li:nth-child(2) .nav__link::after {
  background: linear-gradient(90deg, #F0C020 0%, #30B060 100%);
}
.nav__links > li:nth-child(3) .nav__link::after {
  background: linear-gradient(90deg, #30B060 0%, #3060D0 100%);
}
.nav__links > li:nth-child(4) .nav__link::after {
  background: linear-gradient(90deg, #4030A0 0%, #8030C0 100%);
}
.nav__toggle {
  display: none;
  width: 32px; height: 32px;
  position: relative;
}
.nav__toggle span {
  position: absolute;
  left: 4px; right: 4px;
  height: 1.5px;
  background: currentColor;
  transition: transform var(--duration-medium) var(--ease-gentle),
              opacity var(--duration-quick);
}
.nav__toggle span:nth-child(1) { top: 10px; }
.nav__toggle span:nth-child(2) { top: 16px; }
.nav__toggle span:nth-child(3) { top: 22px; }
body.nav-open .nav__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav__toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .nav__toggle { display: block; z-index: 101; }
  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--color-ground-white);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: var(--space-4xl) var(--space-xl);
    gap: var(--space-xl);
    transform: translateX(100%);
    transition: transform var(--duration-medium) var(--ease-gentle);
  }
  body.nav-open .nav__links { transform: translateX(0); }
  .nav__link { font-family: var(--font-display); font-size: 2rem; opacity: 1; }
  .nav--on-dark .nav__links { background: var(--color-ground-deep); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-ground-white);
  background: var(--color-ground-deep);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-quick) var(--ease-gentle),
              color var(--duration-medium) var(--ease-gentle);
  isolation: isolate;
}
.btn::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--gradient-btn);
  opacity: 0;
  transition: opacity var(--duration-medium) var(--ease-gentle);
  z-index: -1;
}
.btn:hover::before { opacity: 1; }
.btn:hover { transform: translateY(-1px); }
.btn__arrow {
  display: inline-block;
  transition: transform var(--duration-medium) var(--ease-gentle);
}
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--ghost {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  opacity: 0.85;
}
.btn--ghost::before { display: none; }
.btn--ghost:hover {
  opacity: 1;
  background: currentColor;
  color: var(--color-ground-white);
}
/* On dark contexts the button text is light; hover bg becomes light; swap text to dark */
.section--dark .btn--ghost:hover,
.hero .btn--ghost:hover { color: var(--color-ground-deep); }

.link-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--color-border-emphasis);
  transition: border-color var(--duration-quick), gap var(--duration-medium) var(--ease-gentle);
}
.section--dark .link-inline { border-color: var(--color-border-inverse); }
.link-inline:hover { gap: 12px; border-color: var(--color-prism-orange); }

/* ---------- Cards ---------- */
.card {
  background: var(--color-ground-white);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  transition: transform var(--duration-medium) var(--ease-gentle),
              border-color var(--duration-medium) var(--ease-gentle),
              box-shadow var(--duration-medium) var(--ease-gentle);
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-emphasis);
  box-shadow: 0 20px 50px -30px rgba(0,0,0,0.15);
}
.card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}
.card__meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.5; }
.card__image {
  margin: calc(-1 * var(--space-xl)) calc(-1 * var(--space-xl)) var(--space-lg);
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  background: var(--color-ground-warm);
  position: relative;
}
.card h3 { margin-bottom: var(--space-sm); }
.card p { font-size: 0.97rem; color: var(--color-text-secondary); }

/* Image placeholder treatment */
.img-placeholder {
  position: relative;
  width: 100%;
  background: var(--color-ground-warm);
  overflow: hidden;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
}
.img-placeholder::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(232,64,64,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(48,96,208,0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(240,192,32,0.05) 0%, transparent 60%);
}
.img-placeholder__label {
  position: relative;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
  padding: 6px 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
}
.img-placeholder--dark { background: #1a1a1a; color: rgba(247,245,242,0.55); }
.img-placeholder--dark::before {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(232,64,64,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(48,96,208,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(128,48,192,0.10) 0%, transparent 60%);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background: var(--gradient-cosmos);
  color: var(--color-text-inverse);
  overflow: hidden;
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-3xl);
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero__bg::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 20% 30%, rgba(232,64,64,0.14) 0%, transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(48,96,208,0.15) 0%, transparent 45%),
    radial-gradient(circle at 60% 20%, rgba(240,192,32,0.08) 0%, transparent 40%),
    radial-gradient(circle at 30% 85%, rgba(128,48,192,0.12) 0%, transparent 40%);
  filter: blur(40px);
  animation: drift 20s var(--ease-breathe) infinite alternate;
}
.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(247,245,242,0.6), transparent),
    radial-gradient(1px 1px at 30% 70%, rgba(247,245,242,0.5), transparent),
    radial-gradient(1px 1px at 60% 40%, rgba(247,245,242,0.7), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(247,245,242,0.4), transparent),
    radial-gradient(1px 1px at 90% 85%, rgba(247,245,242,0.6), transparent),
    radial-gradient(1.5px 1.5px at 45% 15%, rgba(247,245,242,0.5), transparent),
    radial-gradient(1px 1px at 15% 90%, rgba(247,245,242,0.4), transparent);
  opacity: 0.8;
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-4%, 3%) scale(1.06); }
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  gap: var(--space-2xl);
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: center;
}
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; }
}
.hero__title {
  font-size: clamp(2.8rem, 6vw, 5.25rem);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-xl);
  color: var(--color-text-inverse);
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--color-prism-orange);
}
.hero__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  color: var(--color-text-inverse-mute);
  max-width: 560px;
  margin-bottom: var(--space-2xl);
  line-height: 1.5;
}
.hero__actions { display: flex; gap: var(--space-md); flex-wrap: wrap; }

.hero__mandala {
  width: min(100%, 480px);
  aspect-ratio: 1;
  margin-inline: auto;
  position: relative;
  animation: breathe 10s var(--ease-breathe) infinite;
}
.hero__mandala svg { overflow: visible; }
.hero__mandala .layer-d1,
.hero__mandala .layer-d2,
.hero__mandala .layer-d3,
.hero__mandala .layer-d4,
.hero__mandala .layer-spokes {
  transform-origin: 200px 200px;
  transform-box: fill-box;
}
.hero__mandala .layer-d1     { animation: mandala-spin 180s linear infinite; }
.hero__mandala .layer-d2     { animation: mandala-spin 120s linear infinite reverse; }
.hero__mandala .layer-d3     { animation: mandala-spin  90s linear infinite; }
.hero__mandala .layer-d4     { animation: mandala-spin  60s linear infinite reverse; }
.hero__mandala .layer-spokes { animation: mandala-spin 240s linear infinite; }
@keyframes mandala-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50%      { transform: scale(1.02); opacity: 1; }
}
.hero__mandala::before {
  content: "";
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: var(--gradient-prism);
  filter: blur(60px);
  opacity: 0.35;
  animation: rotate 40s linear infinite;
}
@keyframes rotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Scroll hint */
.hero__scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--color-text-inverse-mute);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  z-index: 2;
}
.hero__scroll::after {
  content: "";
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, currentColor, transparent);
  animation: scrollHint 2.4s var(--ease-breathe) infinite;
}
@keyframes scrollHint {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; }
  50%      { transform: scaleY(1); }
}

/* ---------- Testimonials ---------- */
.quote {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.35;
  color: var(--color-text-primary);
  letter-spacing: -0.005em;
  max-width: 820px;
}
.section--dark .quote { color: var(--color-text-inverse); }
.quote__mark {
  display: block;
  font-size: 3rem;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1;
  margin-bottom: var(--space-md);
  color: var(--color-prism-orange);
}
.quote__attr {
  margin-top: var(--space-lg);
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.section--dark .quote__attr { color: var(--color-text-inverse-mute); }

/* ---------- Form ---------- */
.form {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
}
@media (max-width: 720px) {
  .form { grid-template-columns: 1fr; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.section--dark .field label { color: var(--color-text-inverse-mute); }
.field input,
.field textarea,
.field select {
  font: inherit;
  padding: 12px 16px;
  border: 1px solid var(--color-border-subtle);
  background: var(--color-ground-white);
  border-radius: var(--radius-sm);
  color: inherit;
  transition: border-color var(--duration-quick) var(--ease-gentle);
}
.section--dark .field input,
.section--dark .field textarea,
.section--dark .field select {
  background: rgba(247,245,242,0.05);
  border-color: var(--color-border-inverse);
  color: var(--color-text-inverse);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-prism-orange);
}
.field textarea { min-height: 140px; resize: vertical; }

/* ---------- Pathway cards ---------- */
.pathway {
  display: flex;
  flex-direction: column;
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  background: var(--color-ground-white);
  border: 1px solid var(--color-border-subtle);
  transition: transform var(--duration-medium) var(--ease-gentle),
              border-color var(--duration-medium) var(--ease-gentle);
  min-height: 320px;
  position: relative;
  overflow: hidden;
}
.pathway::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-prism-linear);
  opacity: 0;
  transition: opacity var(--duration-medium) var(--ease-gentle);
}
.pathway:hover { transform: translateY(-4px); border-color: var(--color-border-emphasis); }
.pathway:hover::before { opacity: 1; }
.pathway__prompt {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}
.pathway h3 { font-size: 1.65rem; font-weight: 400; margin-bottom: var(--space-md); }
.pathway p { flex: 1; }
.pathway .link-inline { margin-top: var(--space-md); align-self: flex-start; }

/* ---------- Movements list ---------- */
.movements { display: grid; gap: 0; }
.movement {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: var(--space-xl);
  align-items: baseline;
  padding: var(--space-xl) 0;
  border-bottom: 1px solid var(--color-border-subtle);
  transition: padding-inline var(--duration-medium) var(--ease-gentle);
}
.section--dark .movement { border-color: var(--color-border-inverse); }
.movement:hover { padding-inline: var(--space-lg); }
.movement__num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--color-prism-orange);
}
.movement:nth-child(1) .movement__num { color: var(--color-prism-red); }
.movement:nth-child(2) .movement__num { color: var(--color-prism-orange); }
.movement:nth-child(3) .movement__num { color: var(--color-prism-green); }
.movement:nth-child(4) .movement__num { color: var(--color-prism-blue); }
.movement:nth-child(5) .movement__num { color: var(--color-prism-violet); }
.movement__body h3 { font-size: 1.5rem; font-weight: 400; margin-bottom: var(--space-sm); }
.movement__body p { margin: 0; color: var(--color-text-secondary); font-size: 1rem; }
.section--dark .movement__body p { color: var(--color-text-inverse-mute); }
.movement__icon {
  width: 44px; height: 44px;
  opacity: 0.5;
  color: var(--color-text-muted);
}
@media (max-width: 720px) {
  .movement { grid-template-columns: 60px 1fr; }
  .movement__icon { display: none; }
}

/* ---------- Lineage grid ---------- */
.lineage {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-xl);
}
.lineage__item {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border-subtle);
}
.section--dark .lineage__item { border-color: var(--color-border-inverse); }
.lineage__item h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}
.lineage__item p {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  margin: 0;
}
.section--dark .lineage__item p { color: var(--color-text-inverse-mute); }

/* ---------- Timeline ---------- */
.timeline { display: grid; gap: var(--space-xl); }
.timeline__item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border-subtle);
}
.section--dark .timeline__item { border-color: var(--color-border-inverse); }
.timeline__year {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--color-text-muted);
  letter-spacing: -0.01em;
}
.timeline__content h4 { font-size: 1.2rem; font-weight: 500; margin-bottom: var(--space-sm); }
.timeline__content p { margin: 0; color: var(--color-text-secondary); }
.section--dark .timeline__content p { color: var(--color-text-inverse-mute); }
@media (max-width: 720px) {
  .timeline__item { grid-template-columns: 1fr; gap: var(--space-sm); }
}

/* ---------- Stat row ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-xl);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border-subtle);
  border-bottom: 1px solid var(--color-border-subtle);
}
.section--dark .stats { border-color: var(--color-border-inverse); }
.stat__value {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.5rem, 4.5vw, 3.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}
.stat__label {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.section--dark .stat__label { color: var(--color-text-inverse-mute); }

/* ---------- Footer ---------- */
.footer {
  background: var(--color-ground-deep);
  color: var(--color-text-inverse);
  padding: var(--space-3xl) 0 var(--space-xl);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}
@media (max-width: 820px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
}
.footer h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-inverse-mute);
  font-weight: 500;
  margin-bottom: var(--space-md);
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}
.footer__tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--color-text-inverse-mute);
  max-width: 320px;
  font-size: 1rem;
}
.footer__nav ul { list-style: none; padding: 0; margin: 0; }
.footer__nav li { margin-bottom: var(--space-sm); }
.footer__nav a {
  color: var(--color-text-inverse-mute);
  font-size: 0.95rem;
  transition: color var(--duration-quick) var(--ease-gentle);
}
.footer__nav a:hover { color: var(--color-text-inverse); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border-inverse);
  font-size: 0.82rem;
  color: var(--color-text-inverse-mute);
}
.footer__credit a { color: inherit; border-bottom: 1px solid var(--color-border-inverse); }
.footer__credit a:hover { color: var(--color-text-inverse); }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 900ms var(--ease-reveal), transform 900ms var(--ease-reveal);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--delay-1 { transition-delay: 100ms; }
.reveal--delay-2 { transition-delay: 200ms; }
.reveal--delay-3 { transition-delay: 300ms; }
.reveal--delay-4 { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Utility ---------- */
.center-text { text-align: center; }
.center-block { margin-inline: auto; }
.max-prose    { max-width: var(--prose-max); }
.max-narrow   { max-width: 820px; }
.divider {
  width: 60px;
  height: 2px;
  background: var(--gradient-prism-linear);
  border: 0;
  margin: var(--space-xl) 0;
}
.divider.center-block { margin-inline: auto; }

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--color-prism-orange);
  outline-offset: 3px;
  border-radius: 4px;
}
.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;
}
