/* Landing page. Components come from style.css. */

/* ---------- Hero: navy band, the glowing PC is the hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: var(--s-7) 0 var(--s-8);
  background:
    radial-gradient(60% 70% at 72% 55%, rgb(138 99 255 / .28), transparent 70%),
    radial-gradient(40% 50% at 88% 30%, rgb(255 111 192 / .16), transparent 70%),
    radial-gradient(45% 55% at 60% 80%, rgb(79 134 255 / .22), transparent 70%),
    var(--navy);
  color: var(--navy-text);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: var(--s-7);
}
.hero__copy h1 { margin: 0 0 var(--s-4); color: #fff; }
.hero .eyebrow { color: #8FB0FF; }
.hero .lead { color: var(--navy-muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: var(--s-6) 0 var(--s-5); }
.hero__note { margin: 0; font-size: 13.5px; color: var(--navy-muted); }

.btn--on-dark {
  --btn-bg: rgb(255 255 255 / .08);
  --btn-border: rgb(255 255 255 / .18);
  --btn-text: #fff;
  box-shadow: none;
}
.btn--on-dark:hover { --btn-bg: rgb(255 255 255 / .14); --btn-border: rgb(255 255 255 / .32); box-shadow: none; }

/* The 3D stage: a light studio window with a soft RGB glow around it. */
.hero__stage {
  position: relative;
  aspect-ratio: 5 / 4;
  width: 100%;
  border-radius: 28px;
  background: radial-gradient(120% 90% at 50% 35%, #D5D7DB, #BDC0C6);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / .1),
    -40px 30px 90px -20px rgb(79 134 255 / .55),
    40px -10px 90px -20px rgb(255 111 192 / .40),
    0 40px 120px -30px rgb(138 99 255 / .65);
  isolation: isolate;
}
/* Gentle studio vignette over the live render. */
.hero__stage::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 45%, transparent 50%, rgb(26 28 32 / .24) 100%);
  z-index: 0;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  touch-action: pan-y;
}
.hero__meta, .hero__readout {
  position: absolute;
  z-index: 2;
  bottom: 16px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: rgb(243 244 246 / .78);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.hero__meta { left: 16px; }
.hero__readout { right: 16px; font-size: 11px; }
.hero__readout:empty { display: none; }

/* Until the live 3D starts: a still of the same view (img/hero-poster.webp, made by
   tools/render-share.mjs). The first rendered frame covers it. */
.hero__stage[data-mode="loading"] .hero__canvas,
.hero__stage[data-mode="live"] .hero__canvas {
  background: url('../img/hero-poster.webp') center / cover no-repeat;
}
.loader--stage {
  position: absolute;
  z-index: 3;
  border-radius: inherit;
  background: transparent;
  place-items: end center;
  padding-bottom: 64px;
}
.loader--stage .loader__row { color: var(--muted); }

.hero__fallback { display: none; margin: 0; position: absolute; inset: 0; padding: 10%; place-items: center; text-align: center; }
.hero__fallback svg { width: min(60%, 320px); }
.hero__fallback figcaption { margin-top: var(--s-4); font-size: 13px; }
.hero__stage[data-mode="fallback"] .hero__fallback { display: grid; }
.hero__stage[data-mode="fallback"] .hero__canvas,
.hero__stage[data-mode="fallback"] .hero__readout { display: none; }

/* ---------- Section heads ---------- */
.section-head { max-width: 640px; margin-bottom: var(--s-6); }
.section-head h2 { margin: 0; }
.section-head--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.section-head--row > p { max-width: 42ch; margin: 0; }

/* ---------- Feature cards ---------- */
.features { padding-top: var(--s-8); }
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-5);
}
.feature {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.feature__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: radial-gradient(120% 90% at 50% 30%, #DEE0E3, #C9CCD1);
  transition: transform 500ms var(--ease);
}
.feature:hover .feature__img { transform: scale(1.03); }
.feature picture { display: contents; } /* WebP wrapper: the img stays the flex item */
.feature__body { position: relative; padding: var(--s-5); background: var(--panel); }
.feature__body h3 { margin: 0 0 var(--s-2); font-size: 22px; }
.feature__body p { margin: 0 0 var(--s-4); color: var(--muted); }
.feature__link { font-weight: 600; font-size: 15px; color: var(--accent-text); }

/* ---------- Presets ---------- */
.preset-section { padding-top: var(--s-8); }

/* ---------- Small screens: 3D first ---------- */
@media (max-width: 960px) {
  .hero { padding: var(--s-4) 0 var(--s-7); }
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .hero__stage { order: -1; aspect-ratio: 1 / 1; max-height: 70vh; }
  .features__grid { grid-template-columns: 1fr; }
  .features, .preset-section { padding-top: var(--s-7); }
}
/* Tablets: one card per row, picture beside the text, so the section isn't three screens tall. */
@media (min-width: 601px) and (max-width: 960px) {
  .feature { flex-direction: row; align-items: center; }
  .feature__img { width: 46%; height: auto; flex: none; }
  .feature__body { flex: 1; }
}
@media (max-width: 600px) {
  .hero__stage { border-radius: 22px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__meta { display: none; }
}
.hero__stage > :not(canvas) { z-index: 1; }
