/* Hidden file-based bed for hero play control (no visible player chrome) */
.hero-ambient-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Homepage: nav sits over hero with transparent bar */
body.is-home .home-hero-stack {
  position: relative;
  /* Same horizontal rails as main.home-main (clamp); wider than mobile nav padding (space-md). */
  --hero-pad-x: clamp(1.25rem, 6.5vw, 6rem);
  /*
    Above main.home-main (z-index: 1). The bridge overlap pulls main up over the hero tail;
    without this, corner readouts + play sit under an opaque main layer and disappear.
  */
  z-index: 2;
}

/*
  Fixed bar over hero; glass treatment only when .site-header--scrolled (or mobile menu open).
*/
/* Direct child of body (not inside .home-hero-stack) so backdrop-filter can sample scrolling main */
body.is-home > .site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

body.is-home > .site-header.site-header--scrolled,
body.is-home > .site-header.is-nav-open {
  background: rgba(5, 8, 20, 0.32);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.045);
}

@supports not (backdrop-filter: blur(1px)) {
  body.is-home > .site-header.site-header--scrolled,
  body.is-home > .site-header.is-nav-open {
    background: rgba(5, 8, 20, 0.86);
  }
}

@media (max-width: 700px) {
  /* Same as global mobile nav fix: parent glass + WebKit compositing hides the drawer fill */
  body.is-home > .site-header.is-nav-open {
    background-color: rgba(5, 8, 20, 0.99);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
  }
}

/* Slight legibility on busy parts of the art */
body.is-home > .site-header a {
  text-shadow: 0 1px 8px rgba(2, 4, 12, 0.75);
}

body.is-home > .site-header a:hover {
  text-shadow: var(--link-hover-glow), 0 1px 8px rgba(2, 4, 12, 0.75);
}

body.is-home .nav-toggle {
  color: #fff;
}

body.is-home .nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Hero: full-screen reference background + mockup-aligned copy */

body.is-home {
  background-color: #050814;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  height: 100vh;
  text-align: left;
  background: #050814;
  /*
    Single 1fr row; hero__content in-flow (end-aligned desktop; centered ≤700px wide).
    Tall portrait phones: flex + vertical center (see max-width 700 + portrait + min-height).
    hero-bg + hero__corners are absolute on .hero.
  */
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  box-sizing: border-box;
  padding-top: clamp(4.5rem, 12vh, 7rem);
  padding-right: var(--hero-pad-x, clamp(1.25rem, 6.5vw, 6rem));
  padding-left: var(--hero-pad-x, clamp(1.25rem, 6.5vw, 6rem));
  padding-bottom: clamp(2rem, 42vh, 52vh);
}

@supports (height: 100dvh) {
  .hero {
    min-height: 100dvh;
    height: 100dvh;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-bg__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(2, 4, 12, 0.15) 0%,
    transparent 35%,
    transparent 50%,
    rgba(2, 4, 12, 0.12) 72%,
    rgba(2, 4, 12, 0.2) 100%
  );
  opacity: 0.82;
}

/* Tall bottom dissolve: grid + horizon melt into page indigo (same field as main) */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(18rem, 68vh, 52rem);
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(5, 8, 20, 0) 18%,
    rgba(5, 8, 20, 0.08) 32%,
    rgba(5, 8, 20, 0.28) 48%,
    rgba(5, 8, 20, 0.52) 62%,
    rgba(5, 8, 20, 0.78) 76%,
    rgba(5, 8, 20, 0.93) 90%,
    #050814 100%
  );
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.038;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.035) 3px,
    rgba(255, 255, 255, 0.035) 4px
  );
  mix-blend-mode: soft-light;
}

.hero__content {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  /* Bottom-align over horizon on tall viewports; safe end falls back when copy would overflow top */
  align-self: end;
  justify-self: start;
  z-index: 3;
  max-width: 100%;
  min-height: 0;
  /* Avoid isolation: isolate — compositing the copy stack can read as a flat panel on the starfield */
}

@supports (align-self: safe end) {
  .hero__content {
    align-self: safe end;
  }
}

/* Subcopy wraps no wider than the headline block (width set in index.html script) */
.hero__copy {
  max-width: 100%;
}

/*
  Bottom instrumentation: horizontal inset = .site-header (space-xl) so edges line up with logo / last link.
  Bottom inset = .site-header vertical padding (space-lg) so the row pins to the corner like the top nav.
*/
.hero__corners {
  --hero-corner-readout-opacity: 0.58;
  --hero-corner-play-opacity: 0.52;

  position: absolute;
  z-index: 5;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  /* end — not baseline: button stacks sublabel + main; baseline was tying the readout to the hidden sublabel row */
  align-items: end;
  align-content: end;
  column-gap: clamp(1rem, 3vw, 1.5rem);
  padding: 0 var(--space-xl) clamp(var(--space-lg), 1.1rem + 1.75vw, 2.125rem);
  pointer-events: none;
  box-sizing: border-box;
}

.hero__readout {
  margin: 0;
  min-width: 0;
  justify-self: start;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(0.78rem, 0.28vw + 0.72rem, 0.9375rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: rgba(220, 228, 245, var(--hero-corner-readout-opacity));
  text-shadow:
    0 0 18px rgba(95, 200, 195, 0.22),
    0 0 28px rgba(160, 110, 175, 0.12),
    0 1px 10px rgba(3, 5, 14, 0.65);
}

.hero__readout-bracket {
  color: rgba(180, 195, 220, 0.55);
  font-weight: 500;
}

.hero__readout-value {
  margin: 0 0.2em;
  color: rgba(200, 235, 230, 0.75);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero__readout-label {
  margin-left: 2ch;
  letter-spacing: 0.05em;
  color: rgba(200, 210, 230, 0.52);
}

/* Instrumentation-style control — same family/weight rhythm as .hero__readout */
.hero__play-easter {
  position: relative;
  pointer-events: auto;
  justify-self: end;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.28em;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(0.78rem, 0.28vw + 0.72rem, 0.9375rem);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  text-align: right;
  color: rgba(220, 228, 245, var(--hero-corner-play-opacity));
  cursor: pointer;
  text-shadow:
    0 0 16px rgba(95, 200, 195, 0.2),
    0 0 26px rgba(160, 110, 175, 0.1),
    0 1px 10px rgba(3, 5, 14, 0.6);
  transition:
    color 0.45s ease,
    text-shadow 0.5s ease,
    opacity 0.45s ease;
}

.hero__play-easter__main {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.42em;
  line-height: 1.45;
  /* Stable footprint: ▸ vs ▌▌ and play vs pause */
  min-width: 9.5ch;
}

.hero__play-easter__glyph {
  display: inline-block;
  flex-shrink: 0;
  box-sizing: content-box;
  min-width: 2.75ch;
  text-align: center;
  /* Match optical weight of pause (▌▌) at same row size */
  font-size: 1em;
  font-weight: 500;
  vertical-align: -0.02em;
  letter-spacing: 0.02em;
  opacity: 0.88;
  color: rgba(200, 235, 230, 0.72);
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.45s ease;
}

.hero__play-easter__verb {
  flex-shrink: 0;
  display: inline-block;
  min-width: 5.5ch;
  text-align: left;
  letter-spacing: 0.06em;
  color: rgba(200, 210, 230, 0.55);
}

.hero__play-easter[data-state="playing"] {
  --hero-corner-play-opacity: 0.62;
}

.hero__play-easter[data-state="playing"] .hero__play-easter__verb {
  color: rgba(210, 225, 238, 0.72);
}

.hero__play-easter[data-state="playing"] .hero__play-easter__glyph {
  color: rgba(215, 245, 240, 0.78);
  letter-spacing: 0.06em;
}

.hero__play-easter__sublabel {
  display: block;
  max-width: 14rem;
  font-size: 0.68em;
  font-weight: 400;
  line-height: 1.35;
  min-height: 1.35em;
  letter-spacing: 0.07em;
  color: rgba(175, 195, 215, 0.42);
  text-shadow:
    0 0 12px rgba(95, 200, 195, 0.12),
    0 1px 8px rgba(3, 5, 14, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, color 0.4s ease;
}

.hero__play-easter[data-state="playing"] .hero__play-easter__sublabel {
  opacity: 1;
}

.hero__play-easter:hover:not([aria-disabled="true"]),
.hero__play-easter:focus-visible:not([aria-disabled="true"]) {
  color: rgba(232, 240, 252, 0.82);
  text-shadow:
    0 0 22px rgba(110, 220, 210, 0.28),
    0 0 38px rgba(175, 130, 195, 0.16),
    0 1px 10px rgba(3, 5, 14, 0.58);
  outline: none;
}

.hero__play-easter:hover:not([aria-disabled="true"]) .hero__play-easter__glyph,
.hero__play-easter:focus-visible:not([aria-disabled="true"]) .hero__play-easter__glyph {
  opacity: 1;
}

@media (hover: hover) {
  .hero__play-easter:not([data-state="playing"]):hover:not([aria-disabled="true"]) .hero__play-easter__glyph {
    animation: hero-play-glyph-pulse 2.8s ease-in-out infinite;
  }
}

.hero__play-easter:focus-visible {
  box-shadow: none;
}

.hero__play-easter:focus-visible::after {
  content: "";
  position: absolute;
  inset: -0.2em -0.35em;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(120, 210, 200, 0.28);
  pointer-events: none;
}

/* After first play: stays available while scrolling (same visual system as hero corners) */
.hero__play-easter--docked {
  position: fixed;
  right: var(--space-xl);
  bottom: max(var(--space-lg), calc(env(safe-area-inset-bottom, 0px) + var(--space-sm)));
  z-index: 150;
  justify-self: auto;
  transition:
    color 0.45s ease,
    text-shadow 0.5s ease,
    opacity 0.35s ease;
}

.hero__play-easter[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.38;
}

@keyframes hero-play-glyph-pulse {
  0%,
  100% {
    opacity: 0.88;
    filter: brightness(1);
  }
  50% {
    opacity: 1;
    filter: brightness(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__play-easter,
  .hero__play-easter__glyph {
    transition-duration: 0.01ms;
  }

  .hero__play-easter:hover:not([aria-disabled="true"]) .hero__play-easter__glyph,
  .hero__play-easter:focus-visible:not([aria-disabled="true"]) .hero__play-easter__glyph {
    animation: none;
  }
}

@media (max-width: 700px) {
  .hero__play-easter--docked {
    right: var(--space-md);
    bottom: max(var(--space-md), calc(env(safe-area-inset-bottom, 0px) + var(--space-sm)));
  }
}

.hero__content::before {
  content: "";
  position: absolute;
  left: -15%;
  top: -25%;
  width: 130%;
  height: 200%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 65% 50% at 30% 35%,
    rgba(4, 6, 14, 0.45) 0%,
    rgba(4, 6, 14, 0.12) 50%,
    transparent 70%
  );
  opacity: 0.95;
  /* Feather so the legibility vignette never shows a hard rect edge */
  -webkit-mask-image: radial-gradient(
    ellipse 78% 62% at 30% 35%,
    #000 0%,
    #000 48%,
    transparent 88%
  );
  mask-image: radial-gradient(
    ellipse 78% 62% at 30% 35%,
    #000 0%,
    #000 48%,
    transparent 88%
  );
}

/*
  Headline glow: text-shadow only. (Blend-mode overlays on the h1 painted a lighter rectangle
  on the starfield — mix-blend-mode + dark bg reads as a visible panel.)
  Tune bloom via custom properties below.
*/
.hero__headline {
  --hero-headline-glow-white: 0.1;
  --hero-headline-glow-cool: 0.078;
  --hero-headline-glow-horizon: 0.055;
  --hero-headline-depth: 0.58;

  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 0;
  font-size: 100px;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.045),
    0 0 36px rgba(230, 236, 255, var(--hero-headline-glow-white)),
    0 0 64px rgba(130, 165, 225, var(--hero-headline-glow-cool)),
    0 12px 56px rgba(155, 110, 185, var(--hero-headline-glow-horizon)),
    0 1px 26px rgba(3, 5, 12, var(--hero-headline-depth));
}

.hero__headline-line {
  display: block;
  white-space: nowrap;
}

.hero__headline-line + .hero__headline-line {
  margin-top: 0.02em;
}

/* Wider screens: “my name is Cam” reads as one line; phones: stack “Cam” alone (see 700px) */
.hero__headline-line--nameplate {
  white-space: nowrap;
}

.hero__headline-line--nameplate .hero__headline-mid,
.hero__headline-line--nameplate .hero__headline-given {
  display: inline;
}

.hero__headline-line--nameplate .hero__headline-given {
  margin-left: 0.2em;
}

/* ~1.5–2× headline line-height before subcopy */
.hero__sub {
  margin: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-family: "Inter", var(--font-sans);
  font-size: 24px;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: var(--color-text-paragraph);
  text-shadow: 0 1px 14px rgba(3, 5, 12, 0.55);
}

.hero__copy .hero__headline + .hero__sub {
  margin-top: clamp(1.35rem, 0.12em + 2.5vw, 2.25rem);
}

.hero__sub + .hero__sub {
  margin-top: 0.55rem;
}

@media (max-width: 900px) {
  .hero__headline {
    font-size: clamp(2.25rem, 9vw + 1rem, 100px);
  }
}

@media (max-width: 900px) {
  .hero__headline-line:not(.hero__headline-line--nameplate) {
    white-space: normal;
  }

  .hero__copy {
    overflow-wrap: break-word;
    word-wrap: break-word;
  }
}

@media (max-width: 700px) {
  .hero__headline-line--nameplate {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    white-space: normal;
  }

  .hero__headline-line--nameplate .hero__headline-mid,
  .hero__headline-line--nameplate .hero__headline-given {
    display: block;
  }

  .hero__headline-line--nameplate .hero__headline-given {
    margin-left: 0;
    margin-top: 0.02em;
  }

  .hero {
    padding-left: var(--hero-pad-x, clamp(1.25rem, 6.5vw, 6rem));
    padding-right: var(--hero-pad-x, clamp(1.25rem, 6.5vw, 6rem));
    padding-top: clamp(3.75rem, 11vw, 6rem);
    /* Less bottom gutter than desktop so copy can sit nearer true vertical center; corners are absolute */
    padding-bottom: clamp(5rem, 22vh, 11rem);
  }

  .hero__content {
    align-self: center;
  }

  .hero__readout-label {
    display: none;
  }

  .hero__corners {
    padding: 0 var(--hero-pad-x, clamp(1.25rem, 6.5vw, 6rem))
      max(var(--space-lg), calc(env(safe-area-inset-bottom, 0px) + var(--space-md)));
  }

  .hero__sub {
    font-size: clamp(16px, 4.2vw + 0.35rem, 18px);
  }
}

/*
  Tall portrait phones (e.g. iPhone 13+): grid + heavy bottom padding visually lifts “centered”
  copy toward the top. Flex + justify-content centers the block in the padded viewport.
  Short phones (e.g. SE) keep the grid rules above — avoids clipping tight viewports.
*/
@media (max-width: 700px) and (orientation: portrait) and (min-height: 700px) {
  .hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: calc(env(safe-area-inset-top, 0px) + clamp(3rem, 8vw, 5rem));
    padding-bottom: clamp(3.5rem, 12vh, 6.5rem);
  }

  .hero__content {
    align-self: stretch;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-height: 0;
  }
}

/*
  Short viewports (landscape phones, small laptop windows): large bottom padding + align-end
  leaves too little grid space; copy overflows upward and clips under overflow:hidden.
  Omit “short” portrait phones — iOS can report a small layout height while the device is tall;
  those should keep portrait centering above.
*/
@media (max-height: 720px) and (orientation: landscape),
  (max-height: 720px) and (min-width: 701px) {
  .hero {
    padding-top: clamp(3.25rem, calc(env(safe-area-inset-top, 0px) + 2.75rem), 5rem);
    padding-bottom: clamp(1rem, 10vh, 5rem);
  }

  .hero__content {
    align-self: start;
  }

  .hero::after {
    height: clamp(8rem, 26vh, 16rem);
  }
}

@media (max-width: 700px) and (max-height: 720px) and (orientation: landscape) {
  .hero {
    padding-top: max(3rem, calc(env(safe-area-inset-top, 0px) + 2.5rem));
    padding-bottom: clamp(0.85rem, 8vh, 4rem);
  }

  .hero__content {
    align-self: start;
  }
}

@media (max-height: 520px) {
  .hero__headline {
    font-size: clamp(1.65rem, 7vw + 0.75rem, 2.75rem);
  }

  .hero__sub {
    font-size: clamp(0.875rem, 2.2vw + 0.65rem, 1.05rem);
  }

  .hero__copy .hero__headline + .hero__sub {
    margin-top: clamp(0.65rem, 2vh, 1rem);
  }

  .hero__sub + .hero__sub {
    margin-top: 0.35rem;
  }
}

@media (max-width: 640px) {
  .hero::before {
    opacity: 0.028;
  }
}

/* —— Continuum below hero: overlap + matched indigo field (no seam / no “panel”) —— */
body.is-home main.home-main {
  --home-continuum-base: #050814;
  --home-continuum-mid: #060a1a;
  --home-continuum-deep: #040818;
  /* Pull main under hero’s lower band so one atmosphere reads edge-to-edge */
  --home-bridge-overlap: clamp(4rem, 12vh, 9rem);
  position: relative;
  z-index: 1;
  isolation: isolate;
  max-width: none;
  margin: calc(-1 * var(--home-bridge-overlap)) 0 0;
  padding: calc(clamp(3rem, 8vw, 5rem) + var(--home-bridge-overlap))
    clamp(1.25rem, 6.5vw, 6rem)
    clamp(2.5rem, 5vw, 4rem);
  background-color: var(--home-continuum-base);
  /* Long top hold on #050814 so the fold never shifts to flat black */
  background-image: linear-gradient(
    180deg,
    #050814 0%,
    #050814 22%,
    #050a17 38%,
    var(--home-continuum-mid) 58%,
    var(--home-continuum-deep) 82%,
    #030612 100%
  );
}

/* Residual horizon bloom — very low contrast, same light as hero tail */
body.is-home main.home-main::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 165% 75% at 50% -42%,
      rgba(96, 44, 102, 0.09) 0%,
      rgba(62, 32, 78, 0.035) 38%,
      transparent 58%
    ),
    radial-gradient(
      ellipse 110% 50% at 50% -8%,
      rgba(148, 68, 122, 0.035) 0%,
      transparent 50%
    );
}

/* VHS continuity: scanlines + noise, quieter than hero */
body.is-home main.home-main::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
  mix-blend-mode: soft-light;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(255, 255, 255, 0.016) 3px,
      rgba(255, 255, 255, 0.016) 4px
    ),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='144' height='144' viewBox='0 0 144 144'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.32'/%3E%3C/svg%3E");
  background-size: auto, 144px 144px;
}

body.is-home .home-main > * {
  position: relative;
  z-index: 1;
}

/* Per-section horizon echo (subtle; sits above main wash) */
body.is-home .home-main > section {
  position: relative;
}

body.is-home .home-main > section::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: min(6rem, 16vw);
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(
    ellipse 85% 130% at 50% 0%,
    rgba(130, 62, 118, 0.045) 0%,
    rgba(72, 36, 88, 0.018) 48%,
    transparent 76%
  );
}

/* First block: lighter echo so it doesn’t read as a new “section slab” */
body.is-home .home-main > section:first-child::before {
  height: min(8rem, 22vw);
  background: radial-gradient(
    ellipse 120% 160% at 50% 0%,
    rgba(110, 52, 105, 0.04) 0%,
    rgba(70, 34, 82, 0.014) 55%,
    transparent 78%
  );
}

body.is-home .home-main > section > * {
  position: relative;
  z-index: 1;
}

body.is-home .selected-stories__positioning {
  margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
  max-width: min(42rem, 100%);
  font-family: "Inter", var(--font-sans);
  font-size: 24px;
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-text-paragraph);
}

/* Same treatment as .hero__headline: diffused text-shadow only (no blend-mode overlays) */
body.is-home .selected-stories__title {
  --stories-title-glow-white: 0.085;
  --stories-title-glow-cool: 0.066;
  --stories-title-glow-horizon: 0.048;
  --stories-title-depth: 0.5;

  margin: 0 0 clamp(2.25rem, 5vw, 3.5rem);
  padding: 0;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.038),
    0 0 24px rgba(230, 236, 255, var(--stories-title-glow-white)),
    0 0 44px rgba(130, 165, 225, var(--stories-title-glow-cool)),
    0 8px 38px rgba(155, 110, 185, var(--stories-title-glow-horizon)),
    0 1px 18px rgba(3, 5, 12, var(--stories-title-depth));
}

/* Below hero headline breakpoint: headline uses clamp(); keep this subordinate, never larger */
@media (max-width: 900px) {
  body.is-home .selected-stories__title {
    font-size: clamp(1.6rem, 6.75vw + 0.65rem, 2.5rem);
    line-height: 1.16;
    margin-bottom: clamp(1.35rem, 4vw, 2.75rem);
  }
}

body.is-home .selected-stories .work-grid--selected {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 2.35rem);
  margin: 0 0 var(--space-3xl);
}

@media (max-width: 700px) {
  body.is-home .selected-stories .work-grid--selected {
    grid-template-columns: 1fr;
  }

  body.is-home .selected-stories__positioning {
    font-size: clamp(16px, 4.2vw + 0.35rem, 18px);
  }
}

/*
  Synth panels: glass + diffused purple/cyan light (no Tailwind — layered box-shadows, ::before wash, backdrop-blur)
*/
body.is-home .selected-stories .work-card.work-card--synth {
  position: relative;
  isolation: isolate;
  padding: 0;
  border: none;
  border-radius: 14px;
  overflow: hidden;
  /* Frosted glass with enough body to carry colored light */
  background: rgba(8, 10, 26, 0.44);
  backdrop-filter: blur(21px);
  -webkit-backdrop-filter: blur(21px);
  /* Restrained ring + depth + diffused purple / cyan / pink atmosphere */
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.055),
    0 4px 26px rgba(0, 0, 0, 0.24),
    0 14px 50px rgba(0, 0, 0, 0.3),
    0 0 76px -6px rgba(125, 78, 185, 0.13),
    0 0 94px -16px rgba(55, 175, 195, 0.078),
    0 0 118px -24px rgba(185, 85, 155, 0.039);
  transition: transform 0.38s cubic-bezier(0.25, 0.8, 0.25, 1),
    box-shadow 0.38s ease;
}

body.is-home .selected-stories .work-card.work-card--synth::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  /* Soft synth wash: violet crown, teal floor, horizon pink — all low alpha, long fades */
  background:
    radial-gradient(ellipse 100% 80% at 18% 0%, rgba(145, 95, 210, 0.065) 0%, transparent 55%),
    radial-gradient(ellipse 95% 75% at 92% 95%, rgba(55, 175, 195, 0.044) 0%, transparent 58%),
    radial-gradient(ellipse 90% 60% at 48% 100%, rgba(195, 95, 165, 0.033) 0%, transparent 65%),
    radial-gradient(ellipse 70% 50% at 72% 18%, rgba(90, 140, 220, 0.025) 0%, transparent 55%);
  opacity: 0.6;
}

body.is-home .selected-stories .work-card.work-card--synth::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

body.is-home .selected-stories .work-card.work-card--synth .work-card__media,
body.is-home .selected-stories .work-card.work-card--synth .work-card__body {
  position: relative;
  z-index: 2;
}

body.is-home .selected-stories .work-card.work-card--synth:hover {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.065),
    0 8px 32px rgba(0, 0, 0, 0.28),
    0 20px 58px rgba(0, 0, 0, 0.34),
    0 0 86px -6px rgba(130, 82, 195, 0.175),
    0 0 104px -14px rgba(60, 190, 205, 0.096),
    0 0 122px -20px rgba(195, 95, 165, 0.048);
}

body.is-home .selected-stories .work-card.work-card--synth .work-card__body {
  padding: clamp(0.75rem, 2.2vw, 1.15rem) clamp(1rem, 2.6vw, 1.45rem) clamp(1rem, 2.6vw, 1.4rem);
}

body.is-home .selected-stories .work-card.work-card--synth .work-card__media {
  margin: clamp(0.6rem, 1.8vw, 0.85rem) clamp(0.6rem, 1.8vw, 0.85rem) 0;
  border-radius: 10px;
  background: rgba(5, 7, 20, 0.45);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 48px rgba(110, 78, 168, 0.078),
    0 0 58px rgba(55, 165, 185, 0.048);
  transition: box-shadow 0.38s ease;
}

body.is-home .selected-stories .work-card.work-card--synth:hover .work-card__media {
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.34),
    0 0 58px rgba(125, 85, 185, 0.105),
    0 0 68px rgba(60, 185, 200, 0.065);
}

body.is-home .selected-stories .work-card.work-card--synth .work-card__media img {
  filter: brightness(0.93) contrast(0.95);
  transition: filter 0.35s ease;
}

/* Disable global thumb zoom on hover; card lift + media glow carry the motion */
body.is-home .selected-stories .work-card.work-card--synth .work-card__media:hover img,
body.is-home .selected-stories .work-card.work-card--synth:hover .work-card__media img {
  transform: none;
}

body.is-home .selected-stories .work-card.work-card--synth .work-card__media--invert img {
  filter: invert(1) brightness(0.93) contrast(0.95);
}

body.is-home .selected-stories .work-card.work-card--synth .work-card__media--placeholder::after {
  border-color: rgba(255, 255, 255, 0.07);
  border-top-color: rgba(120, 200, 215, 0.24);
}

body.is-home .selected-stories .work-card.work-card--synth .category {
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.44);
  margin-bottom: 0.3rem;
  text-shadow: 0 0 28px rgba(160, 120, 210, 0.155);
}

body.is-home .selected-stories .work-card.work-card--synth .category.category--preserve-case {
  text-transform: none;
  letter-spacing: 0.04em;
}

body.is-home .selected-stories .work-card.work-card--synth h3 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.22rem, 2.15vw, 1.48rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.98);
  text-shadow:
    0 0 40px rgba(125, 95, 195, 0.065),
    0 0 54px rgba(70, 160, 195, 0.035);
}

body.is-home .selected-stories .work-card.work-card--synth .work-card__description > p {
  margin: 0 0 0.45rem;
  font-size: 0.9375rem;
  line-height: 1.52;
}

body.is-home .selected-stories .work-card.work-card--synth .work-card__note {
  color: rgba(255, 255, 255, 0.82);
  text-shadow: none;
}

body.is-home .selected-stories .work-card.work-card--synth .work-card__actions .work-card__note {
  margin: 0;
}

body.is-home .selected-stories .work-card.work-card--synth .work-card__cta--primary,
body.is-home .site-footer--outro .site-footer__cta .work-card__cta--primary {
  color: #8ae9dc;
  text-shadow: 0 0 22px rgba(70, 210, 195, 0.175);
}

/* :hover required — long resting selectors above outrank plain a:hover */
body.is-home .selected-stories .work-card.work-card--synth .work-card__cta--primary:hover,
body.is-home .site-footer--outro .site-footer__cta .work-card__cta--primary:hover {
  color: var(--link-hover-color);
  text-shadow: var(--link-hover-glow);
}

/* —— Closing: tight band, same horizontal rails as .home-main / work grid —— */
body.is-home .site-footer.site-footer--outro {
  position: relative;
  isolation: isolate;
  margin-top: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  text-align: left;
  color: rgba(229, 229, 229, 0.82);
  font-size: inherit;
  background: linear-gradient(180deg, #060a1a 0%, #040818 55%, #030612 100%);
}

body.is-home .site-footer--outro::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: min(3.25rem, 9vw);
  z-index: 0;
  pointer-events: none;
  opacity: 0.65;
  background: radial-gradient(
    ellipse 90% 120% at 50% 0%,
    rgba(130, 62, 118, 0.07) 0%,
    transparent 65%
  );
}

/* Matches main.home-main horizontal padding — full width with cards, not a centered narrow column */
body.is-home .site-footer--outro .site-footer__inner {
  position: relative;
  z-index: 1;
  max-width: none;
  margin: 0;
  padding: clamp(1.25rem, 2.5vw, 1.65rem) clamp(1.25rem, 6.5vw, 6rem)
    clamp(1.15rem, 2.2vw, 1.5rem);
}

body.is-home .site-footer--outro .site-footer__closing {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

body.is-home .site-footer--outro .site-footer__statement {
  margin: 0;
  max-width: none;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(0.72rem, 0.15vw + 0.68rem, 0.8125rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.07em;
  text-transform: lowercase;
  color: rgba(210, 218, 235, 0.55);
  text-shadow:
    0 0 14px rgba(95, 200, 195, 0.12),
    0 1px 8px rgba(3, 5, 14, 0.45);
}

body.is-home .site-footer--outro .site-footer__cta {
  margin: 0;
}

/* Same treatment as feature card “Read story →” (synth primary CTA) */
body.is-home .site-footer--outro .site-footer__cta .work-card__cta {
  margin-top: 0;
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

body.is-home .site-footer--outro .site-footer__legal {
  margin-top: clamp(0.85rem, 2vw, 1.15rem);
  padding-top: 0;
  font-size: 0.6rem;
  letter-spacing: 0.07em;
  color: rgba(148, 156, 172, 0.45);
  opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
  }

  body.is-home main.home-main::after {
    opacity: 0.26;
    background-image: repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      rgba(255, 255, 255, 0.014) 3px,
      rgba(255, 255, 255, 0.014) 4px
    );
  }

  body.is-home .selected-stories .work-card.work-card--synth,
  body.is-home .selected-stories .work-card.work-card--synth:hover {
    transform: none;
  }
}
