/* Social-coding-first homepage: centered axial hero, paired showcase, 3-row strip.
   Spacing uses a 0.25rem (4px) scale with macro gaps >= 2.5x intra-group gaps.
   Elevation steps from recessed #120b1b wells through top-lit #251832 -> #1b1124
   cards to #493052 active pill indicators under a warm-zenith Tyrian twilight field. */
.pitch-home {
  background:
    radial-gradient(50% 24% at 50% 0%, rgba(230, 196, 128, .085), transparent 72%),
    radial-gradient(64% 40% at 50% 21%, rgba(132, 38, 102, .29), transparent 74%),
    radial-gradient(46% 34% at 68% 49%, rgba(88, 46, 134, .21), transparent 72%),
    radial-gradient(68% 30% at 50% 94%, rgba(74, 34, 88, .18), transparent 76%),
    var(--purple);
}
.home-main {
  flex: 1;
  width: min(1120px, 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: clamp(2.75rem, 6.5svh, 4.75rem) 0 clamp(3.5rem, 7.5svh, 5.75rem);
}

/* ---------- Centered Axial Hero ---------- */
.home-hero {
  max-width: 54rem;
  margin-inline: auto;
  text-align: center;
}
.home-hero h1 {
  max-width: 24ch;
  margin-inline: auto;
  margin-block: 0;
  color: var(--text);
  font-size: clamp(2.125rem, 4.4vw, 3.25rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -.032em;
  text-wrap: balance;
}
.home-lede {
  max-width: 52rem;
  margin: 1rem auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.125rem);
  line-height: 1.5;
  text-wrap: balance;
}
.home-lede code {
  color: var(--gold-high);
  font-size: .88em;
}

/* ---------- Install switcher ---------- */
.home-install {
  margin: 1.75rem auto 0;
  padding: 0;
  border: 0;
  min-width: 0;
  max-width: 39rem;
}
.os-tabs {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, 23.5rem);
  margin-bottom: .625rem;
  padding: 3px;
  border: 1px solid #523b5b;
  border-radius: 100px;
  background: #120b1b;
  box-shadow: inset 0 1px 2px rgba(6, 3, 12, .7);
}
.os-tabs::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border: 1px solid rgba(230, 196, 128, .3);
  border-radius: 100px;
  background: linear-gradient(180deg, #493052, #382442);
  box-shadow: inset 0 1px 0 rgba(245, 220, 169, .18), 0 4px 12px rgba(6, 3, 12, .45);
  transition: transform .2s cubic-bezier(.22, 1, .36, 1);
}
.os-tabs label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 100px;
  color: var(--muted);
  font-size: .875rem;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s;
}
.os-tabs label:hover { color: var(--text); }
#os-windows:checked ~ .os-tabs::before { transform: translateX(100%); }
#os-npm:checked ~ .os-tabs::before { transform: translateX(200%); }
#os-unix:checked ~ .os-tabs [for="os-unix"],
#os-windows:checked ~ .os-tabs [for="os-windows"],
#os-npm:checked ~ .os-tabs [for="os-npm"] { color: var(--gold-high); font-weight: 500; }
#os-unix:focus-visible ~ .os-tabs [for="os-unix"],
#os-windows:focus-visible ~ .os-tabs [for="os-windows"],
#os-npm:focus-visible ~ .os-tabs [for="os-npm"] { outline: 2px solid var(--gold); outline-offset: 2px; }
#os-unix:checked ~ .command:not([data-os="unix"]),
#os-windows:checked ~ .command:not([data-os="windows"]),
#os-npm:checked ~ .command:not([data-os="npm"]) { display: none; }
.pitch-home .command {
  max-width: 100%;
  margin-inline: auto;
  gap: 12px;
  min-height: 56px;
  padding: 5px 6px 5px 16px;
  border-color: rgba(230, 196, 128, .28);
  background: linear-gradient(180deg, #251832 0%, #1b1124 100%);
  box-shadow:
    inset 0 1px 0 rgba(245, 220, 169, .12),
    0 20px 48px -26px rgba(6, 3, 12, .9),
    0 16px 42px -28px rgba(132, 38, 102, .5);
  text-align: left;
  transition: border-color .18s, box-shadow .18s;
}
.pitch-home .command:hover,
.pitch-home .command:focus-within {
  border-color: rgba(230, 196, 128, .5);
  box-shadow:
    inset 0 1px 0 rgba(245, 220, 169, .18),
    0 22px 52px -24px rgba(6, 3, 12, .92),
    0 18px 46px -26px rgba(230, 196, 128, .18);
}
.pitch-home .command.is-copied { border-color: rgba(207, 227, 176, .5); }
.pitch-home .command code::before {
  content: "$ ";
  color: var(--gold);
  opacity: .82;
  user-select: none;
}
.pitch-home .copy {
  min-width: 76px;
  border-color: rgba(230, 196, 128, .28);
  background: rgba(230, 196, 128, .09);
  color: var(--gold-high);
  font-size: .875rem;
  transition: background-color .16s, border-color .16s, color .16s;
}
.pitch-home .copy:hover {
  border-color: rgba(230, 196, 128, .48);
  background: rgba(230, 196, 128, .18);
  color: var(--text);
}
.pitch-home .copy:active { background: #493052; }
.pitch-home .copy.is-copied {
  border-color: rgba(207, 227, 176, .48);
  background: rgba(207, 227, 176, .14);
  color: #cfe3b0;
}
.pitch-home .copy.is-failed {
  border-color: #9c5a73;
  background: rgba(156, 90, 115, .16);
  color: #e8a9ba;
}

.home-meta {
  max-width: 50rem;
  margin: .875rem auto 0;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.5;
  text-wrap: balance;
}
.home-meta a, .row-copy a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 4px;
  transition: color .16s, text-decoration-color .16s;
}
.home-meta a:hover, .row-copy a:hover { color: var(--gold); text-decoration-color: var(--gold); }

/* ---------- Paired Showcase: Daily Goals -> Harbour ---------- */
.home-showcase {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  align-items: stretch;
  margin-top: clamp(2.75rem, 5.5vw, 4.5rem);
}
.terminal-panel, .harbour-panel { margin: 0; min-width: 0; display: flex; flex-direction: column; }

/* Illustrative daily-goals card */
.terminal-card {
  flex: 1;
  display: flex; flex-direction: column;
  border: 1px solid #563d5f;
  border-radius: 14px;
  background: linear-gradient(180deg, #251832 0%, #1b1124 100%);
  box-shadow:
    inset 0 1px 0 rgba(245, 220, 169, .1),
    0 30px 80px -44px rgba(126, 38, 102, .68),
    0 18px 40px -24px rgba(6, 3, 12, .82);
  overflow: hidden;
}
.term-prompt {
  display: flex; align-items: baseline; justify-content: space-between;
  flex-wrap: wrap; gap: 4px 12px;
  padding: .8125rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #120b1b;
  font: 400 .8125rem/1.45 var(--mono);
}
.term-title { color: var(--text); font-weight: 500; }
.term-sub { color: var(--muted); font-size: .75rem; }
.term-goals {
  flex: 1;
  display: flex; flex-direction: column;
  padding: .9375rem 1rem;
  font-family: var(--mono);
}
.goal-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  flex: 1; gap: .625rem;
}
.goal-item {
  display: flex; flex-direction: column; justify-content: center;
  flex: 1;
  padding: .8125rem .875rem;
  border: 1px solid #43304b;
  border-radius: 8px;
  background: #140c1e;
}
.goal-item.is-done {
  border-color: rgba(207, 227, 176, .26);
  background: linear-gradient(90deg, rgba(207, 227, 176, .055), #140c1e 46%);
}
.goal-item:not(.is-done):not(.is-idle) {
  border-color: rgba(230, 196, 128, .28);
  background: linear-gradient(90deg, rgba(230, 196, 128, .065), #140c1e 50%);
}
.goal-head {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 4px 10px;
}
.goal-title { color: var(--text); font-size: .78125rem; font-weight: 500; line-height: 1.4; }
.goal-item.is-done .goal-title { color: #cfe3b0; }
.goal-tier {
  font-style: normal;
  color: var(--gold);
  font-size: .71875rem;
  margin-left: 4px;
}
.goal-reward { color: var(--muted); font-size: .71875rem; white-space: nowrap; }
.goal-meter {
  display: flex; align-items: center; gap: 10px;
  margin-top: .375rem;
  font-size: .75rem; line-height: 1.3;
}
.goal-bar { color: var(--gold); letter-spacing: .04em; font-size: .6875rem; }
.goal-item.is-done .goal-bar, .goal-item.is-done .goal-progress { color: #cfe3b0; }
.goal-item.is-idle .goal-bar { color: var(--faint); }
.goal-progress { color: var(--muted); font-size: .71875rem; }

/* True-grid harbour stage card with docked sliding pill & stage-reactive lighting */
.harbour-stages {
  flex: 1;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0; margin: 0; min-width: 0;
  border: 1px solid #563d5f;
  border-radius: 14px;
  background: #120b1b;
  box-shadow:
    inset 0 1px 0 rgba(245, 220, 169, .12),
    0 30px 80px -38px rgba(126, 38, 102, .72),
    0 18px 40px -24px rgba(6, 3, 12, .85);
  overflow: hidden;
  transition: border-color .26s ease, box-shadow .26s ease;
}
.harbour-stages:has(#stage-start:checked) {
  border-color: #463652;
  box-shadow:
    inset 0 1px 0 rgba(192, 179, 202, .08),
    0 28px 72px -40px rgba(38, 28, 68, .85),
    0 18px 40px -24px rgba(6, 3, 12, .88);
}
.harbour-stages:has(#stage-built:checked) {
  border-color: rgba(230, 196, 128, .44);
  box-shadow:
    inset 0 1px 0 rgba(245, 220, 169, .22),
    0 32px 88px -36px rgba(186, 122, 64, .38),
    0 26px 72px -38px rgba(126, 38, 102, .7);
}
.harbour-stages .scene-controls {
  grid-row: 2;
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: .5rem .75rem;
  border-top: 1px solid var(--line);
  background: #120b1b;
}
.stage-labels {
  position: relative;
  isolation: isolate;
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: min(100%, 22rem);
  padding: 3px;
  border: 1px solid #523b5b;
  border-radius: 100px;
  background: #160e20;
  box-shadow: inset 0 1px 2px rgba(6, 3, 12, .7);
}
.stage-labels::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border: 1px solid rgba(230, 196, 128, .3);
  border-radius: 100px;
  background: linear-gradient(180deg, #493052, #382442);
  box-shadow: inset 0 1px 0 rgba(245, 220, 169, .18), 0 4px 12px rgba(6, 3, 12, .45);
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), border-color .22s;
}
.stage-labels label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 100px;
  color: var(--muted);
  font-size: .8125rem;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s;
}
.stage-labels label:hover { color: var(--text); }
#stage-growing:checked ~ .scene-controls .stage-labels::before { transform: translateX(100%); }
#stage-built:checked ~ .scene-controls .stage-labels::before {
  transform: translateX(200%);
  border-color: rgba(230, 196, 128, .48);
}
#stage-start:checked ~ .scene-controls [for="stage-start"],
#stage-growing:checked ~ .scene-controls [for="stage-growing"],
#stage-built:checked ~ .scene-controls [for="stage-built"] {
  color: var(--gold-high);
  font-weight: 500;
}
#stage-start:focus-visible ~ .scene-controls [for="stage-start"],
#stage-growing:focus-visible ~ .scene-controls [for="stage-growing"],
#stage-built:focus-visible ~ .scene-controls [for="stage-built"] {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.scene-view {
  grid-row: 1;
  grid-column: 1;
  align-self: stretch;
  display: flex;
  align-items: stretch;
  background: #140c1e;
  opacity: 1;
  visibility: visible;
  transition: opacity .22s ease, visibility .22s;
}
#stage-start:checked ~ .scene-view:not([data-stage="start"]),
#stage-growing:checked ~ .scene-view:not([data-stage="growing"]),
#stage-built:checked ~ .scene-view:not([data-stage="built"]) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.scene-view img {
  display: block; width: 100%; height: auto;
  image-rendering: pixelated;
}

/* ---------- Compact 3-Item Strip + Actions (matches site.css .rows rhythm) ---------- */
.home-strip { margin-top: clamp(3rem, 6vw, 4.75rem); }
.home-rows {
  border-top-color: #523b5b;
}
.home-rows > li {
  grid-template-columns: 44px minmax(170px, .65fr) minmax(0, 2fr);
  min-height: 92px;
  padding: 1.375rem 0;
  border-bottom-color: #523b5b;
}
.row-copy {
  max-width: 74ch;
  margin: 0;
  color: var(--muted);
  font-size: .9375rem;
  line-height: 1.55;
}
.row-copy code {
  color: var(--gold-high);
  font-size: .88em;
}
.home-actions {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: .75rem .875rem;
  margin-top: clamp(2.25rem, 4.5vw, 3.25rem);
}
.home-actions .button {
  min-height: 48px;
  padding: 10px 26px;
  font-size: .875rem;
  transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s;
}
.home-actions .button:not(.is-secondary) {
  box-shadow: inset 0 1px 0 rgba(255, 248, 232, .42), 0 14px 34px -14px rgba(230, 196, 128, .34);
}
.home-actions .button:not(.is-secondary):hover {
  box-shadow: inset 0 1px 0 rgba(255, 250, 238, .55), 0 16px 38px -12px rgba(245, 220, 169, .44);
}
.home-actions .button.is-secondary {
  border-color: #6a5475;
  background: rgba(18, 11, 27, .55);
}
.home-actions .button.is-secondary:hover {
  border-color: var(--gold);
  background: rgba(230, 196, 128, .08);
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .home-showcase { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .home-rows > li {
    grid-template-columns: 32px 1fr;
    grid-template-areas: "no name" "copy copy";
    row-gap: .625rem;
    min-height: 0;
    padding: 1.375rem 0;
  }
  .row-copy { grid-area: copy; }
}
@media (max-width: 700px) {
  .home-main { padding-block: 2rem 3.25rem; }
  .home-hero h1 { font-size: clamp(2rem, 8.5vw, 2.75rem); }
  .home-actions .button { width: 100%; }
}
@media (max-width: 520px) {
  .pitch-home .command { gap: 8px; padding-left: 12px; }
  .pitch-home .command code { font-size: .75rem; overflow-wrap: anywhere; word-break: normal; }
  .pitch-home .copy { min-width: 64px; padding-inline: 10px; font-size: .8125rem; }
  .os-tabs { width: 100%; }
  .os-tabs label { padding: 0 6px; font-size: .8125rem; }
  .stage-labels { width: 100%; min-width: 0; }
  .stage-labels label { min-height: 44px; padding: 0 6px; font-size: .8125rem; }
  .term-prompt, .term-goals { padding-inline: .875rem; }
}
