/* ---------- Home page progressive disclosure ---------- */
/* Explicitly hidden promotions take no space, including section padding/borders. */
[data-home-section][hidden],
[data-home-copy][hidden] { display: none !important; }

/* Photography + AI Imagery share one visual archive section on Home. */
.home-visuals-section:not(:has([data-home-section]:not([hidden]))) { display: none; }
.home-visuals-head { margin-bottom: 28px; }
.home-visual-block:not([hidden]) + .home-visual-block:not([hidden]) { margin-top: 56px; }
.home-visual-subhead {
  margin: 0 0 22px;
  font-family: var(--font-mono);
  font-size: clamp(22px, 3vw, 28px);
  letter-spacing: -0.01em;
}

.home-perspectives-list,
.home-videos-list { display: grid; gap: 32px; }
.home-perspectives-list > *,
.home-videos-list > * { min-width: 0; }
.home-perspective-card h2 { overflow-wrap: anywhere; }

/* Featured photography keeps the full composition visible instead of cropping it. */
.home-photography-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}
.home-photography-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-alt);
}
.home-photography-image {
  display: block;
  background: var(--bg-raised);
}
.home-photography-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 760px;
  object-fit: contain;
}
.home-photography-copy { padding: 22px 24px 24px; }
.home-photography-meta {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-photography-copy h3 { margin: 8px 0; font-size: 22px; overflow-wrap: anywhere; }
.home-photography-copy h3 a { color: var(--ink); text-decoration: none; }
.home-photography-copy p { margin: 10px 0 0; color: var(--muted); font-size: 15px; white-space: pre-line; }
.home-photography-image:focus-visible,
.home-photography-copy a:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.home-photography-grid.is-single { grid-template-columns: minmax(0, 1fr); }

/* Imagery follows the same quiet borders, reading width, and mobile breakpoints. */
.home-imagery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
}
.home-imagery-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-alt);
}
.home-imagery-image {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--bg-raised);
}
.home-imagery-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.home-imagery-copy { padding: 22px 24px; }
.home-imagery-category {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.home-imagery-copy h3 { margin: 8px 0; font-size: 20px; overflow-wrap: anywhere; }
.home-imagery-copy h3 a { color: var(--ink); text-decoration: none; }
.home-imagery-copy p { margin: 10px 0 0; color: var(--muted); font-size: 15px; white-space: pre-line; }
.home-imagery-image:focus-visible,
.home-imagery-copy a:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; }
.home-imagery-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.home-imagery-grid.is-single .home-imagery-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
}
.home-video-poster {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000;
  color: var(--ink);
  cursor: pointer;
}
.home-video-poster img { display: block; width: 100%; height: 100%; object-fit: contain; }
.home-video-poster span {
  position: absolute;
  bottom: 20px;
  left: 20px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  font-family: var(--font-mono);
}
.home-video-poster:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; }
.home-video-summary { white-space: pre-line; }
@media (max-width: 900px) {
  .home-imagery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .home-visuals-head { margin-bottom: 24px; }
  .home-visual-block:not([hidden]) + .home-visual-block:not([hidden]) { margin-top: 44px; }
  .home-visual-subhead { margin-bottom: 18px; }
  .home-photography-grid,
  .home-imagery-grid,
  .home-imagery-grid.is-single .home-imagery-card { grid-template-columns: minmax(0, 1fr); }
  .home-photography-copy,
  .home-imagery-copy { padding: 20px; }
}

/* Keep Home's major sections on the same horizontal grid as the standard shell.
   Individual reading blocks stay narrow, but their section anchors no longer drift inward. */
.manifesto-shell,
.home-perspective-shell {
  max-width: 1080px;
}

.manifesto-fold {
  margin: 4px 0 0;
}

.manifesto-fold summary {
  list-style: none;
  width: fit-content;
  margin: 6px 0 30px;
  padding: 9px 13px;
  border: 1px solid var(--cyan-dim);
  border-radius: var(--radius);
  background: rgba(79, 216, 216, 0.035);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.025em;
  cursor: pointer;
  user-select: none;
  transition: color .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.manifesto-fold summary::-webkit-details-marker { display: none; }
.manifesto-fold summary::marker { display: none; content: ''; }

.manifesto-fold summary:hover,
.manifesto-fold summary:focus-visible {
  color: var(--green);
  border-color: var(--green-dim);
  background: rgba(118, 244, 82, 0.055);
  box-shadow: 0 0 14px rgba(118, 244, 82, 0.05);
  outline: none;
}

.manifesto-fold .fold-open { display: none; }
.manifesto-fold[open] .fold-closed { display: none; }
.manifesto-fold[open] .fold-open { display: inline; }

.manifesto-fold[open] summary {
  color: var(--green);
  border-color: var(--green-dim);
  margin-bottom: 28px;
}

/* ---------- Fiction preview ---------- */
.home-fiction-section {
  background: linear-gradient(180deg, rgba(118,244,82,.014), rgba(118,244,82,0));
}

.home-fiction-list {
  display: grid;
  gap: 28px;
}

.home-fiction-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 2px solid var(--green);
  background: var(--bg-alt);
}

.home-fiction-card.has-image {
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(0, 1.35fr);
  align-items: stretch;
}

.home-fiction-cover {
  display: flex;
  min-height: 340px;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  background: #0e0d0c;
}

.home-fiction-cover img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 520px;
  object-fit: contain;
}

.home-fiction-copy {
  min-width: 0;
  padding: 30px 32px;
  align-self: center;
}

.home-fiction-meta {
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.home-fiction-copy h3 {
  margin: 8px 0 5px;
  font-family: var(--font-mono);
  font-size: clamp(25px, 3.6vw, 36px);
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.home-fiction-copy h3 a {
  color: var(--ink);
  text-decoration: none;
}

.home-fiction-series {
  margin: 0 0 20px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 12px;
}

.home-fiction-teaser {
  max-width: 680px;
  color: var(--muted);
}

.home-fiction-teaser p {
  margin: 0 0 12px;
}

.home-fiction-teaser p:first-child {
  color: var(--ink);
}

.home-fiction-copy h3 a:focus-visible,
.home-fiction-cover:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -2px;
}

@media (max-width: 720px) {
  .home-fiction-card.has-image {
    grid-template-columns: 1fr;
  }

  .home-fiction-cover {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .home-fiction-cover img {
    height: auto;
    max-height: 480px;
  }

  .home-fiction-copy {
    padding: 24px 22px;
  }

  .home-fiction-copy h3 {
    font-size: 27px;
  }
}

/* ---------- Perspectives preview ---------- */
.home-perspective-section {
  background: linear-gradient(180deg, rgba(79,216,216,.018), rgba(79,216,216,0));
}

.home-perspective-label {
  display: block;
  margin-bottom: 12px;
}

.home-perspective-card {
  max-width: 820px;
  padding: 30px 32px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--cyan);
  background: var(--bg-alt);
}

.home-perspective-card.has-image {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.home-perspective-card.has-image .home-perspective-copy {
  padding: 30px 32px;
  min-width: 0;
}

.home-perspective-image {
  display: flex;
  min-height: 320px;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--line);
  background: #0e0d0c;
}

.home-perspective-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 430px;
  object-fit: contain;
}

.home-perspective-card h2 {
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: clamp(26px, 3.8vw, 38px);
  line-height: 1.16;
}

.home-perspective-deck {
  margin: 0 0 26px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 13px;
}

.home-perspective-excerpt {
  max-width: 700px;
  color: var(--muted);
}

.home-perspective-excerpt p {
  margin: 0 0 13px;
}

.home-perspective-excerpt p:first-child {
  color: var(--ink);
  font-weight: 600;
}

.home-perspective-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--cyan-dim);
}

.home-perspective-link:hover,
.home-perspective-link:focus-visible {
  color: var(--green);
  border-color: var(--green-dim);
  outline: none;
}

/* ---------- Compact video notes on Home only ---------- */
.home-video-caption {
  max-width: 760px;
}

.home-video-caption .featured-video-byline {
  margin-bottom: 8px;
}

.home-video-caption .home-video-summary {
  margin-bottom: 0;
}

/* ---------- Final Home gateway ---------- */
.home-final-gateway {
  padding: 0 0 18px;
}

.home-final-gateway .project-gateway {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 0;
}

@media (max-width: 900px) {
  .home-final-gateway .project-gateway {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .manifesto-fold summary {
    width: 100%;
    text-align: center;
    margin-bottom: 24px;
  }

  .home-perspective-card {
    padding: 24px 22px;
  }

  .home-perspective-card.has-image {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .home-perspective-card.has-image .home-perspective-copy {
    padding: 24px 22px;
    order: 2;
  }

  .home-perspective-image {
    min-height: 0;
    max-height: none;
    border-left: 0;
    border-bottom: 1px solid var(--line);
    order: 1;
  }

  .home-perspective-image img {
    height: auto;
    max-height: 420px;
  }

  .home-perspective-card h2 {
    font-size: 27px;
  }
}

@media (max-width: 430px) {
  .home-final-gateway .project-gateway {
    grid-template-columns: 1fr;
  }
}

/* A quiet homepage-only trail to the author's journal. */
.home-journal-whisper {
  margin: 2px auto 38px;
  padding: 0 20px;
  text-align: center;
}
.home-journal-whisper a {
  color: var(--magenta); /* CMS Signal Red / section-label color: #ff4d7d */
  font-size: 12px;
  letter-spacing: .10em;
  text-decoration: none;
  transition: text-decoration-color .2s ease;
}
.home-journal-whisper a:hover,
.home-journal-whisper a:focus-visible {
  color: var(--magenta);
  text-decoration: underline;
  text-underline-offset: 5px;
}

/* ---------- Home Local Node Synchronization ---------- */

.hero {
  padding-top: 24px;
}

.hero-boot {
  margin-bottom: 14px;
}

.node-sync.node-sync-home {
  --clock-primary: #747983;
  --clock-muted: #656a75;
  width: min(480px, 50%);
  margin: 0 0 34px auto;
  border: 0;
  background: transparent;
}

.node-sync-home .node-sync-shell {
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "label status"
    "time time"
    "date date"
    "meta meta";
  gap: 5px 16px;
  justify-content: stretch;
  text-align: right;
}

.node-sync-home .node-sync-label {
  grid-area: label;
  color: var(--clock-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
}

.node-sync-home .node-sync-status {
  color: var(--clock-primary);
  grid-area: status;
  justify-self: end;
  align-self: center;
  font-size: 9px;
  letter-spacing: .08em;
}

.node-sync-home .node-sync-primary {
  display: contents;
}

.node-sync-home .node-sync-time {
  grid-area: time;
  color: var(--clock-primary);
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: .08em;
  text-shadow: none;
}

.node-sync-home .node-sync-date {
  grid-area: date;
  color: var(--clock-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .07em;
}

.node-sync-home .node-sync-meta {
  grid-area: meta;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 9px;
  margin-top: 3px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.045);
  color: var(--muted-dim);
  font-size: 9px;
  letter-spacing: .07em;
}

.node-sync-home .node-sync-meta-label {
  color: var(--muted-dim);
}

.node-sync-home .node-sync-zone {
  color: var(--clock-muted);
}

/* Keep Home's compact replacement clock in the same stealth palette.
   The synchronization dot intentionally stays on the shared green pulse. */
.node-sync-home-compact .node-sync-status,
.node-sync-home-compact .node-sync-time {
  color: #747983;
}

.node-sync-home-compact .node-sync-date,
.node-sync-home-compact .node-sync-zone {
  color: #656a75;
}

.node-sync-home-compact .node-sync-separator {
  color: rgba(139,143,163,.18);
}

@media (max-width: 720px) {
  .hero {
    padding-top: 18px;
  }

  .hero-boot {
    margin-bottom: 18px;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    font-size: clamp(8px, 2.5vw, 10.5px);
    letter-spacing: 0;
  }

  .node-sync.node-sync-home {
    width: 100%;
    margin: 0 0 30px;
  }

  .node-sync-home .node-sync-shell {
    grid-template-columns: 1fr;
    grid-template-areas:
      "label"
      "time"
      "date"
      "meta"
      "status";
    text-align: left;
    gap: 6px;
  }

  .node-sync-home .node-sync-label,
  .node-sync-home .node-sync-status {
    justify-self: start;
  }

  .node-sync-home .node-sync-time {
    font-size: clamp(22px, 7.1vw, 28px);
  }

  .node-sync-home .node-sync-meta {
    justify-content: flex-start;
  }

  .node-sync-home .node-sync-status {
    margin-top: 2px;
  }
}


/* ---------- Single-clip responsive CID hero experiment ---------- */
.hero-cid-host { isolation: isolate; }
.hero-support {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  column-gap: 20px;
  align-items: start;
}
.hero-support-stage { display: contents; }
.hero-support-copy {
  grid-area: 1 / 1;
  min-width: 0;
}
.hero-support .hero-welcome { margin: 0 0 14px; }
.hero-welcome-followup { display: block; }
.hero-support .hero-whisper { margin: 0; }
.hero-support > .hero-cta {
  grid-area: 2 / 1;
  margin-top: 26px;
}
.hero-cid {
  grid-area: 1 / 2 / 3 / 3;
  align-self: center;
  width: 118%;
  transform: translateX(-90px);
  aspect-ratio: 16 / 9;
  min-width: 0;
  position: relative;
  pointer-events: none;
  user-select: none;
  /* Preserve the approved feathering on all four frame boundaries. */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28%, #000 76%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000 76%, transparent);
}
.hero-cid-idle,
.hero-cid-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 24%, #000 72%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 24%, #000 72%, transparent);
}
.hero-cid-idle {
  z-index: 0;
  opacity: .30;
  /* Return near the tail of the CID fade so the slot never sits visually empty. */
  transition: opacity .65s ease-in-out 1.05s;
  filter: saturate(.75) brightness(.77);
}
.hero-cid-video {
  z-index: 1;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
  filter: saturate(.65) brightness(.50);
}
.hero-cid.is-active .hero-cid-idle {
  opacity: 0;
  /* Clear the idle mark immediately so it cannot show through the active CID. */
  transition: opacity .12s linear 0s;
}
.hero-cid.is-active .hero-cid-video { opacity: 1; }
@media (max-width: 999px) {
  .hero-support { display: block; }
  .hero-support-stage {
    display: grid;
    isolation: isolate;
  }
  /* Both layers stay in the same grid cell. The taller layer reserves the
     space even while transparent, so neither headline nor CTA moves. */
  .hero-support-copy,
  .hero-cid {
    grid-area: 1 / 1;
    align-self: center;
  }
  .hero-support-copy { position: relative; z-index: 1; }
  .hero-cid {
    width: 100%;
    max-width: 560px;
    transform: none;
    justify-self: center;
  }
  .hero-cid-idle { display: none; }
  .hero-cid.is-active .hero-cid-video { opacity: .46; }
  .hero-welcome-followup { display: inline; }
  .hero-support > .hero-cta { margin-top: 26px; }
  .hero-support-stage.is-yielding .hero-support-copy {
    animation: cid-copy-yield .48s linear both;
  }
  .hero-support-stage.is-cid .hero-support-copy {
    opacity: 0;
    pointer-events: none;
  }
  .hero-support-stage.is-cid .welcome-glow,
  .hero-support-stage.is-yielding .welcome-glow { animation-play-state: paused; }
  .hero-support-stage.is-returning .hero-welcome {
    animation: cid-copy-return .42s ease-out both;
  }
  .hero-support-stage.is-returning .hero-whisper {
    animation: cid-copy-return .42s .16s ease-out both;
  }
}
/* One low-contrast signal dip, then the copy yields. No flashing white,
   displacement, text mutation, or repeated high-frequency glitching. */
@keyframes cid-copy-yield {
  0% { opacity: 1; }
  28% { opacity: .65; }
  48% { opacity: .9; }
  100% { opacity: 0; }
}
@keyframes cid-copy-return {
  from { opacity: 0; clip-path: inset(0 100% 0 0); }
  to { opacity: 1; clip-path: inset(0 0 0 0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-cid { visibility: hidden; opacity: 0; transition: none; }
  .hero-support-stage .hero-support-copy { opacity: 1; animation: none; }
  .hero-support-stage .hero-welcome,
  .hero-support-stage .hero-whisper { animation: none; clip-path: none; }
}

@media (max-width: 640px) {
  .hero-cid.is-active { opacity: .80; }
  .hero-cid-video { filter: saturate(.65) brightness(1); }
}

/* Let mobile card artwork determine its own height. */
@media (max-width: 640px) {
  .home-imagery-image, .home-fiction-cover, .home-perspective-image {
    aspect-ratio: auto;
    min-height: 0;
  }
  .home-imagery-image img, .home-photography-image img,
  .home-fiction-cover img, .home-perspective-image img {
    width: 100%;
    height: auto;
    max-height: none;
  }
}
