:root {
  --world-ink: #17201c;
  --world-paper: #eee9dd;
  --world-moss: #173f35;
  --world-line: rgba(23, 32, 28, 0.16);
}

.surface-world {
  margin: 0;
  color: var(--world-ink);
  background: var(--world-paper);
  font-family: Arial, Helvetica, sans-serif;
}

.surface-world::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.24;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
  z-index: 20;
}

.world-header,
.world-footer,
.world-intro,
.material-guide,
.choice-bridge {
  width: min(1240px, calc(100% - 2rem));
  margin-inline: auto;
}

.world-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 5.5rem;
  border-bottom: 1px solid var(--world-line);
}

.world-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: inherit;
  text-decoration: none;
  font-weight: 800;
}

.world-mark {
  display: grid;
  place-items: center;
  width: 2.7rem;
  aspect-ratio: 1;
  border-radius: 50%;
  color: #fff;
  background: var(--world-moss);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.world-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

.world-nav a {
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.world-nav a:hover,
.world-nav a:focus-visible,
.material-link:hover,
.material-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.world-intro {
  min-height: min(760px, calc(100vh - 5.5rem));
  display: grid;
  align-content: center;
  justify-items: start;
  padding-block: 5rem;
}

.world-kicker,
.beat-kicker {
  margin: 0 0 1rem;
  color: #5f655e;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.world-intro h1 {
  max-width: 10ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.7rem, 9vw, 8.7rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.88;
}

.world-deck {
  max-width: 55ch;
  margin: 2rem 0;
  color: #4f5651;
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  line-height: 1.65;
}

.world-start {
  color: var(--world-moss);
  font-weight: 800;
  text-decoration: none;
}

.material-guide {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
  padding-block: 5rem 8rem;
  border-top: 1px solid var(--world-line);
}

.material-stage {
  position: sticky;
  top: 1.5rem;
  height: calc(100vh - 3rem);
  max-height: 700px;
}

.court-frame {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 0.4rem 3rem 0.4rem 0.4rem;
  background: #49765b;
  box-shadow: 0 28px 80px rgba(20, 34, 28, 0.22);
  isolation: isolate;
  transition: background-color 500ms ease;
}

.court-frame::before,
.court-frame::after,
.court-grain {
  content: "";
  position: absolute;
  inset: 0;
}

.court-frame::before {
  z-index: -2;
  transition: opacity 450ms ease, background 450ms ease;
}

.court-frame::after {
  z-index: -1;
  background: linear-gradient(130deg, rgba(255,255,255,0.13), transparent 38%, rgba(0,0,0,0.18));
}

.court-grain {
  z-index: -1;
  opacity: 0.42;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence baseFrequency='.36' numOctaves='4' seed='8'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='.38'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.court-frame[data-stage-material="turf"] { background-color: #376f4c; }
.court-frame[data-stage-material="turf"]::before { background: repeating-linear-gradient(92deg, transparent 0 8px, rgba(210,245,199,0.13) 9px 11px); }
.court-frame[data-stage-material="shell"] { background-color: #d8cfb9; }
.court-frame[data-stage-material="shell"]::before { background: radial-gradient(ellipse at 30% 20%, #f4efe1 0 3px, transparent 4px), radial-gradient(ellipse at 70% 60%, #a99d84 0 2px, transparent 3px); background-size: 28px 23px, 19px 21px; }
.court-frame[data-stage-material="sand"] { background-color: #b49361; }
.court-frame[data-stage-material="sand"]::before { background: radial-gradient(circle, rgba(255,244,205,.4) 0 1px, transparent 1.5px); background-size: 8px 8px; }
.court-frame[data-stage-material="granite"] { background-color: #a7785d; }
.court-frame[data-stage-material="granite"]::before { background: radial-gradient(circle at 20% 30%, #d7b69d 0 2px, transparent 2.5px), radial-gradient(circle at 70% 60%, #735745 0 1.5px, transparent 2px); background-size: 22px 24px, 17px 19px; }
.court-frame[data-stage-material="concrete"] { background-color: #657069; }
.court-frame[data-stage-material="concrete"]::before { background: linear-gradient(90deg, transparent 49.7%, rgba(255,255,255,.14) 50%, transparent 50.3%), repeating-linear-gradient(92deg, rgba(48,90,60,.3) 0 7px, rgba(95,140,101,.25) 8px 10px); }
.court-frame[data-stage-material="hybrid"] { background-color: #3e7351; }
.court-frame[data-stage-material="hybrid"]::before { background: linear-gradient(115deg, transparent 0 48%, #d6c7a7 48.5% 68%, #9e7154 68.5% 100%); }

.court-line {
  position: absolute;
  inset: 9% 10%;
  border: 1px solid rgba(255,255,255,0.48);
  border-radius: 999px;
  transform: perspective(700px) rotateX(63deg) rotateZ(-4deg);
}

.bocce-ball,
.pallino {
  position: absolute;
  border-radius: 50%;
  box-shadow: inset -10px -12px 18px rgba(0,0,0,.34), 0 14px 22px rgba(0,0,0,.25);
  transition: transform 650ms cubic-bezier(.2,.75,.2,1);
}

.bocce-ball { width: clamp(3rem, 6vw, 5.5rem); aspect-ratio: 1; }
.bocce-ball--one { top: 31%; left: 23%; background: #a32d26; }
.bocce-ball--two { top: 47%; left: 57%; background: #214e73; }
.pallino { width: 1.7rem; aspect-ratio: 1; top: 38%; left: 48%; background: #eee5cb; }
.court-frame[data-stage-material="shell"] .bocce-ball--one { transform: translate(28px, 5px); }
.court-frame[data-stage-material="sand"] .bocce-ball--two { transform: translate(-25px, 26px); }
.court-frame[data-stage-material="granite"] .bocce-ball--one { transform: translate(40px, 36px); }
.court-frame[data-stage-material="concrete"] .bocce-ball--two { transform: translate(-38px, -24px); }
.court-frame[data-stage-material="hybrid"] .bocce-ball--one { transform: translate(70px, 20px); }

.stage-vignette {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(transparent, rgba(10,18,14,.78));
}

.stage-copy {
  position: absolute;
  inset: auto 2rem 2rem;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.4);
}

.stage-count { margin: 0 0 0.6rem; font-size: 0.78rem; letter-spacing: 0.14em; }
.stage-name { margin: 0; font: 500 clamp(2rem, 4vw, 3.7rem)/1 Georgia, serif; }
.stage-caption { max-width: 30ch; margin: 0.8rem 0 0; color: rgba(255,255,255,.82); line-height: 1.5; }

.material-stories { min-width: 0; }
.material-beat {
  min-height: 78vh;
  display: grid;
  align-content: center;
  padding: 4rem clamp(0rem, 2vw, 2rem);
  opacity: 0.76;
  transition: opacity 300ms ease, transform 300ms ease;
}
.material-beat.is-active { opacity: 1; transform: translateX(-0.75rem); }
.material-beat h2 {
  margin: 0 0 1.2rem;
  max-width: 10ch;
  font: 500 clamp(2.8rem, 6vw, 5.5rem)/0.95 Georgia, serif;
  letter-spacing: -0.045em;
}
.beat-lead { max-width: 38ch; font-size: 1.25rem; font-weight: 700; line-height: 1.45; }
.material-beat > p:not(.beat-kicker) { max-width: 58ch; color: #4d554f; line-height: 1.72; }
.material-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 2rem 0; border-block: 1px solid var(--world-line); }
.material-facts div { padding: 1rem; border-right: 1px solid var(--world-line); }
.material-facts div:first-child { padding-left: 0; }
.material-facts div:last-child { border-right: 0; }
.material-facts dt { margin-bottom: 0.45rem; color: #6b716c; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.material-facts dd { margin: 0; font-weight: 700; line-height: 1.35; }
.material-link { color: var(--world-moss); font-weight: 800; text-underline-offset: 0.25em; }
.affiliate-note { font-size: 0.78em; font-weight: 500; }

.choice-bridge {
  margin-bottom: 6rem;
  padding: clamp(2rem, 6vw, 5rem);
  color: #fff;
  background: var(--world-moss);
  border-radius: 0.4rem 4rem 0.4rem 0.4rem;
}
.choice-bridge h2 { max-width: 12ch; margin: 0; font: 500 clamp(3rem, 7vw, 6.5rem)/0.94 Georgia, serif; letter-spacing: -0.05em; }
.choice-bridge > p:not(.world-kicker) { max-width: 66ch; margin: 2rem 0; color: rgba(255,255,255,.76); font-size: 1.08rem; line-height: 1.7; }
.choice-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.world-button { display: inline-flex; align-items: center; min-height: 3rem; padding: 0.7rem 1.1rem; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: #fff; text-decoration: none; font-weight: 800; }
.world-button--primary { color: var(--world-moss); background: #fff; }
.world-footer { display: flex; justify-content: space-between; gap: 1rem; padding-block: 2rem 3rem; border-top: 1px solid var(--world-line); color: #59605b; font-size: 0.9rem; }
.world-footer a { color: inherit; }

@media (max-width: 820px) {
  .world-header { align-items: flex-start; padding-block: 1rem; }
  .world-nav { justify-content: flex-end; gap: 0.7rem; }
  .world-nav a:nth-child(-n+2) { display: none; }
  .world-intro { min-height: 82vh; padding-block: 4rem; }
  .material-guide { display: block; padding-top: 1rem; }
  .material-stage { top: 0; z-index: 4; height: 35vh; min-height: 250px; padding-top: 0.75rem; background: var(--world-paper); }
  .court-frame { border-radius: 0.4rem 1.8rem 0.4rem 0.4rem; }
  .stage-copy { inset: auto 1.1rem 1rem; }
  .stage-caption { display: none; }
  .material-beat { min-height: 0; padding: 4rem 0 3rem; opacity: 1; transform: none !important; }
  .material-beat h2 { font-size: clamp(2.8rem, 14vw, 4.4rem); }
  .material-facts { grid-template-columns: 1fr; }
  .material-facts div, .material-facts div:first-child { padding: 0.8rem 0; border-right: 0; border-bottom: 1px solid var(--world-line); }
  .material-facts div:last-child { border-bottom: 0; }
  .choice-bridge { border-radius: 0.4rem 2.3rem 0.4rem 0.4rem; }
}

@media (max-width: 430px) {
  .world-header, .world-footer, .world-intro, .material-guide, .choice-bridge { width: min(100% - 1.25rem, 1240px); }
  .world-brand > span:last-child { display: none; }
  .world-intro h1 { font-size: clamp(3.4rem, 20vw, 5.3rem); }
  .material-stage { height: 32vh; min-height: 220px; }
  .stage-name { font-size: 1.8rem; }
  .choice-bridge { padding: 2rem 1.35rem; }
  .world-footer { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
