/* 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.10);
  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;
}
.eyebrow .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.7);
  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 h1 .cursor {
  display: inline-block;
  width: 0.08em;
  height: 0.85em;
  background: var(--accent);
  margin-left: 0.05em;
  vertical-align: -0.05em;
  animation: blink 1s steps(2) infinite;
  box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.6);
  /* The parent uses background-clip: text to render its gradient.
     That clipping inherits to children unless we explicitly opt out;
     this empty span needs to render as a real gold block, not be
     clipped to its (zero) text content. */
  -webkit-background-clip: border-box;
  background-clip: border-box;
}
@keyframes blink { 50% { opacity: 0; } }

.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);
}
.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.20);
  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.30);
}
@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; }
}

/* --- 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.10em;
  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; }

/* --- next-steps tile grid ------------------------------------- */
.grid {
  display: grid;
  /* Discrete 4 / 2 / 1 column states — auto-fit produced an awkward
     3+1 layout at iPad widths. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 32px;
}
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
}
.tile {
  position: relative;
  display: block;
  padding: 20px 22px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(var(--accent-rgb), 0.10), transparent 50%);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.tile:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  transform: translateY(-2px);
  color: var(--text);
}
.tile:hover::before { opacity: 1; }
.tile.featured {
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.10) 0%, var(--surface) 100%);
  border-color: rgba(var(--accent-rgb), 0.40);
}
.tile.featured .arrow { color: var(--accent); }
.tile .label {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tile .what {
  font-size: 17px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.tile .arrow {
  color: var(--text-soft);
  transition: transform 0.18s ease, color 0.18s ease;
}
.tile:hover .arrow { transform: translateX(2px); color: var(--accent); }
.tile .desc {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 8px;
}

/* --- 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; }
