/* Home panel — hero, status strip, install codeblock, next-steps
 * tile grid, footer, and the floating background glyphs.
 *
 * If any subsection grows enough to deserve its own file (status
 * gets graphs, install grows tabs), promote it to its own component
 * file then.
 */

/* --- floating glyphs (decorative) ------------------------------ */
.glyphs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.glyphs span {
  position: absolute;
  color: rgba(var(--accent-rgb), 0.12);
  font-family: var(--font-mono);
  font-size: 14px;
  animation: drift 18s linear infinite;
  will-change: transform, opacity;
}
@keyframes drift {
  from {
    transform: translateY(0);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  to {
    transform: translateY(-120vh);
    opacity: 0;
  }
}

/* --- hero ------------------------------------------------------ */
.hero {
  position: relative;
  display: grid;
  /* Give the copy column more room than the art so the wordmark
     doesn't clip. The art column has a natural max-width on the
     image so it doesn't exceed its share. */
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  padding: 7vh 0 5vh;
}
.hero .copy {
  min-width: 0;
  overflow: visible;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.32);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
/* Lineage nod: the eyebrow "dot" is a 3-band pixel chip echoing the
   Code Puppy wordmark's purple -> cyan -> green gradient banding. Square,
   not round, because the original is gloriously blocky. We know where we
   came from. */
.eyebrow .dot {
  width: 9px;
  height: 9px;
  border-radius: 1px;
  background: linear-gradient(
    180deg,
    #b3a8f0 0%,
    #b3a8f0 33%,
    #7ef0f5 33%,
    #7ef0f5 66%,
    #8ee6a0 66%,
    #8ee6a0 100%
  );
  box-shadow: 0 0 8px rgba(126, 240, 245, 0.55);
  animation: pulse 1.8s ease-in-out infinite;
}
/* `pulse` keyframe is declared in topbar.css and reused here. */

.hero .copy h1 {
  /* Keep the wordmark fully visible inside the copy column at every
     viewport. The previous 9vw / 130px max could overflow past the
     column edge and clip the trailing letter. */
  font-size: clamp(44px, 7vw, 104px);
  line-height: 0.92;
  margin: 22px 0 8px;
  font-family: var(--font-mono);
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-bright) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 30px rgba(var(--accent-rgb), 0.15);
  overflow: visible;
  white-space: nowrap;
}
.hero .copy .tag {
  color: var(--accent);
  font-size: clamp(15px, 1.6vw, 19px);
  margin: 0 0 26px;
  font-family: var(--font-mono);
  opacity: 0.9;
}
.hero .copy p {
  color: var(--text-hero-body);
  line-height: 1.65;
  margin: 0 0 14px;
  max-width: 540px;
  font-size: 16px;
}
.hero .copy .who {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
  color: var(--text-soft);
  font-size: 13px;
  margin-top: 6px;
  font-family: var(--font-mono);
}
/* The one conversion ask: a big primary button straight into /play.
   Everything else on the home page is demoted below this. */
.hero .copy .hero-cta {
  margin: 6px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}
.hero .copy .cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
  color: var(--bg);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.35);
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    filter 0.12s;
}
.hero .copy .cta-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 32px rgba(var(--accent-rgb), 0.45);
}
.hero .copy .cta-primary .arrow {
  transition: transform 0.12s;
}
.hero .copy .cta-primary:hover .arrow {
  transform: translateX(3px);
}
.hero .copy .cta-sub {
  font-size: 13px;
  color: var(--text-soft);
}
.hero .copy .who strong {
  color: var(--accent);
  font-weight: 600;
}

.hero .art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 480px;
}
.hero .art::before {
  content: '';
  position: absolute;
  inset: -8% -8%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.28) 0%, transparent 60%);
  filter: blur(20px);
  z-index: 0;
  animation: halo-pulse 6s ease-in-out infinite;
}
@keyframes halo-pulse {
  0%,
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}
.hero .art .ring {
  position: absolute;
  width: 86%;
  aspect-ratio: 1;
  border: 1px dashed rgba(var(--accent-rgb), 0.2);
  border-radius: 50%;
  animation: spin-slow 60s linear infinite;
  z-index: 0;
}
.hero .art .ring.outer {
  width: 100%;
  animation-direction: reverse;
  animation-duration: 80s;
  border-color: rgba(var(--slate-rgb), 0.3);
}
@keyframes spin-slow {
  to {
    transform: rotate(360deg);
  }
}

.hero .art img.mascot {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  filter: drop-shadow(0 22px 40px var(--shadow-strong));
  animation: gentle-bob 7s ease-in-out infinite;
}
@keyframes gentle-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 4vh 0;
    text-align: center;
  }
  .hero .copy p,
  .hero .copy .who {
    margin-left: auto;
    margin-right: auto;
  }
  .hero .art {
    min-height: 360px;
  }
  .hero .art img.mascot {
    max-width: 320px;
  }
  /* Hide the orbital rings on small screens — they overflow the
     card and add visual noise without aesthetic payoff. */
  .hero .art .ring,
  .hero .art .ring.outer {
    display: none;
  }
}

/* --- status strip --------------------------------------------- */
.status {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 14px 24px;
  margin: 0 0 4vh;
  background: linear-gradient(
    90deg,
    rgba(var(--accent-rgb), 0.06) 0%,
    rgba(var(--accent-rgb), 0.02) 50%,
    rgba(var(--slate-rgb), 0.06) 100%
  );
  border: 1px solid var(--line);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.status .stat {
  padding: 4px 18px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.status .stat:last-child {
  border-right: 0;
}
.status .stat .k {
  color: var(--text-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.status .stat .v {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status .stat .v.ok {
  color: var(--positive);
}
@media (max-width: 880px) {
  .status {
    grid-template-columns: 1fr 1fr;
    row-gap: 10px;
    padding: 14px 18px;
  }
  .status .stat {
    border-right: 0;
    padding: 4px 8px;
  }
}
@media (max-width: 420px) {
  .status {
    grid-template-columns: 1fr;
  }
}

/* --- the turn: from personal win to collective leverage ------- */
.pack-turn {
  padding: 4vh 0 1vh;
  max-width: 760px;
}
.pack-turn h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}
.pack-turn p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}
.pack-turn em {
  color: var(--accent-bright);
  font-style: normal;
  font-weight: 600;
}

/* --- the loop: share what you create (the flywheel beat) ------- */
.share {
  padding: 5vh 0 2vh;
  max-width: 760px;
}
.share h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
}
.share p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0 0 20px;
}
.share-cta {
  margin-bottom: 18px;
}
.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(var(--accent-rgb), 0.5);
  color: var(--accent-bright);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.12s,
    border-color 0.12s;
}
.cta-secondary:hover {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: var(--accent);
}
.cta-secondary .arrow {
  transition: transform 0.12s;
}
.cta-secondary:hover .arrow {
  transform: translateX(3px);
}

/* --- install card --------------------------------------------- */
.install {
  padding: 2vh 0 4vh;
}
.install h2 {
  font-family: var(--font-mono);
  font-size: 13px;
  margin: 0 0 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.install h2 .pill {
  padding: 2px 8px;
  background: rgba(var(--accent-rgb), 0.15);
  border-radius: 4px;
  font-size: 10px;
}
.codeblock {
  position: relative;
  background: linear-gradient(
    180deg,
    var(--surface-codeblock-top) 0%,
    var(--surface-codeblock-bot) 100%
  );
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 24px;
  padding-right: 110px;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text-codeblock);
  overflow-x: auto;
  white-space: pre;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 12px 40px -16px var(--shadow-deep),
    0 0 0 1px rgba(var(--accent-rgb), 0.08);
}
.codeblock::before {
  content: '$ ';
  color: var(--accent);
}
.codeblock .copy {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--line);
  color: var(--text-muted);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 11px;
  cursor: pointer;
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.15s ease;
}
.codeblock .copy:hover {
  background: var(--line-soft);
  color: var(--text);
}
.codeblock .copy.copied {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
@media (max-width: 600px) {
  .codeblock {
    padding: 16px 16px 12px;
    font-size: 13px;
  }
  .codeblock .copy {
    position: static;
    display: block;
    margin-top: 12px;
    width: fit-content;
  }
}
.install p.fine {
  color: var(--text-soft);
  font-size: 13px;
  margin: 14px 0 0;
}

/* --- secondary links (docs / market / source) ----------------
 * Deliberately quiet: the home page has exactly one loud action
 * (Start coding now). These are the "when you're ready" exits, not
 * competing CTAs. */
.more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 22px;
}
.more-link {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s ease;
}
.more-link:hover {
  color: var(--accent);
}

/* --- footer --------------------------------------------------- */
.footer {
  max-width: 1200px;
  margin: 6vh auto 4vh;
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 12px;
  font-family: var(--font-mono);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.footer .left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer .left img {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}
.footer .right {
  color: var(--text-soft);
  opacity: 0.7;
}
