/* ============================================================
   home.css: the homepage (index.html, generated by shop/build-home.mjs).
   Loads after styles.css. Bump ?v= in shop/_templates/home.html on every change.
   Nothing here waits on JS to become visible: slide 1 and every section render as-is without it.
   ============================================================ */

.home main { padding-top: clamp(4.6rem, 7vw, 6rem); }
.kicker {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--lime); font-weight: 700; line-height: 1.3;
}

/* ---------- spotlight ---------- */
section.spot { padding: clamp(1rem, 2.5vw, 2rem) var(--gutter) clamp(1.2rem, 2.5vw, 2rem); }
.slides { display: grid; }
/* every slide sits in the same cell, so the box is as tall as the tallest slide (no jump on rotate) */
.slide {
  grid-area: 1 / 1; display: grid; grid-template-columns: 1fr 1.3fr; grid-template-areas: "copy media";
  gap: clamp(1.5rem, 3.5vw, 3rem); align-items: center;
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility 0s linear .6s;
}
.slide.on { opacity: 1; visibility: visible; transition: opacity .6s var(--ease), visibility 0s; }
/* the outgoing slide stays visible through its 0.6 s fade: it must not catch a click meant for the new one */
.slide:not(.on) { pointer-events: none; }
.slide .copy { grid-area: copy; min-width: 0; }
.media {
  grid-area: media; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px -30px rgba(198, 244, 50, 0.32);
}
.media img, .media video { width: 100%; height: 100%; object-fit: cover; }

.slide-name {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 0.95;
  font-size: clamp(2.5rem, 5.2vw, 4.4rem); margin: 0.5rem 0 0.8rem;
}
.slide-name a:hover .main { color: var(--lime); }
.slide-name .main { transition: color .25s var(--ease); }
.slide-name .pre {
  display: block; font-size: 0.36em; letter-spacing: -0.01em; line-height: 1.1;
  color: var(--muted); margin-bottom: 0.2em;
}
.newpill {
  display: inline-block; margin-left: 0.5rem; vertical-align: middle; position: relative; top: -0.1em;
  background: var(--lime); color: #0a0a0a; border-radius: 100px; padding: 0.3em 0.75em;
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; line-height: 1;
}
.slide-tag { color: #c9c9c2; max-width: 44ch; margin-bottom: 0.9rem; }
.bundle { color: var(--lime); font-weight: 600; font-size: 0.95rem; margin: -0.2rem 0 0.8rem; }
.slide .price { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 1.1rem; }
.slide .price b { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; letter-spacing: -0.02em; }
.slide .price s { color: var(--muted); font-size: 1.05rem; }
.slide-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.slide-cta .btn, .btn-sm { padding: 0.75rem 1.25rem; font-size: 0.95rem; }
.btn .play { flex: none; }
.fine { color: var(--muted-2); font-size: 0.82rem; margin-top: 0.8rem; }

/* tabs: one per slide, with a progress bar. The bar only animates once home.js turns auto-advance on
   (.is-auto); without JS, or under reduced motion, the active tab just shows a full bar. */
.tabs { display: flex; gap: 0.6rem; margin-top: clamp(1.2rem, 2.5vw, 1.8rem); }
.tab {
  flex: 1 1 0; min-width: 0; position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.7rem;
  background: var(--bg-elev); border: 1px solid transparent; border-radius: 10px;
  color: var(--muted); font: 500 0.85rem var(--font-body); text-align: left; cursor: pointer;
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.tab img { flex: none; width: 46px; height: 32px; object-fit: cover; border-radius: 5px; }
.tab .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tab:hover, .tab.on { color: var(--text); }
.tab.on { border-color: var(--line); }
.tab i {
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--lime);
  transform: scaleX(0); transform-origin: left;
}
.tab.on i { transform: scaleX(1); }
/* only with motion allowed: home.js also drops .is-auto when reduced motion is switched on mid-visit */
@media (prefers-reduced-motion: no-preference) {
  .spot.is-auto .tab.on i { animation: spot-progress var(--slide-ms, 7s) linear forwards; }
  .spot.is-auto.paused .tab.on i { animation-play-state: paused; }
}
@keyframes spot-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.spot-pause {
  flex: none; width: 2.75rem; display: grid; place-items: center; cursor: pointer;
  background: var(--bg-elev); border: 1px solid transparent; border-radius: 10px; color: var(--text);
}
.spot-pause[hidden] { display: none; }
.spot-pause span { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.spot-pause[aria-pressed="true"] span {
  width: 0; height: 0; border-right: 0;
  border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.tab:focus-visible, .spot-pause:focus-visible, .slide a:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

/* ---------- trust strip ---------- */
.trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.8rem;
  padding: 1rem var(--gutter); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: 0.9rem;
}
.trust li { display: inline-flex; align-items: center; gap: 0.5rem; }
.trust li::before {
  content: ""; width: 0.55em; height: 0.3em; margin-top: -0.2em;
  border-left: 2px solid var(--lime); border-bottom: 2px solid var(--lime); transform: rotate(-45deg);
}

/* ---------- section shell ---------- */
section.home-sec { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); }
.home-sec + .home-sec { border-top: 1px solid var(--line); }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.4rem; }
.sec-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin-top: 0.3rem;
}

/* ---------- browse by type ---------- */
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cat {
  display: block; background: var(--bg-elev); border: 1px solid transparent; border-radius: 14px; overflow: hidden;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.cat:hover { border-color: var(--lime); transform: translateY(-4px); }
.cat:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.mos {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2px; aspect-ratio: 16 / 10;
}
.mos img { width: 100%; height: 100%; min-height: 0; object-fit: cover; }
.mos.n3 img:first-child, .mos.n2 img { grid-row: span 2; }
.mos.n1 img { grid-row: span 2; grid-column: span 2; }
.cat-body { padding: 1rem 1.1rem 1.2rem; }
.cat-body h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; margin: 0.25rem 0; }
.cat-body p:last-child { color: var(--muted); font-size: 0.88rem; }

/* ---------- coming soon ---------- */
.soonrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; margin-bottom: 1.4rem; }
.st { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #000; }
.st img, .st video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
a.st:hover img, a.st:hover video { transform: scale(1.04); }
a.st:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.st-label {
  position: absolute; left: 0.6rem; bottom: 0.6rem; padding: 0.2rem 0.6rem; border-radius: 6px;
  background: rgba(14, 14, 16, 0.84); font-size: 0.82rem; font-weight: 700;
}
.signup { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.signup input[type="email"] {
  flex: 1 1 220px; max-width: 360px; padding: 0.8rem 1.1rem; border-radius: 100px;
  background: var(--bg); border: 1px solid #3a3a40; color: var(--text); font: inherit; font-size: 0.95rem;
}
.signup input[type="email"]:focus { outline: none; border-color: var(--lime); }
.signup .btn { padding: 0.8rem 1.3rem; font-size: 0.95rem; }

/* ---------- free side door ---------- */
.free { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.fr { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem; transition: border-color .3s var(--ease); }
.fr:hover, .fr:focus-within { border-color: var(--lime); }
.fr .kicker { color: var(--muted); }
.fr h3 { font-size: 1.05rem; font-weight: 700; margin: 0.4rem 0 0.3rem; }
.fr-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card clicks through */
.fr-link:focus-visible { outline: none; }
.fr p:not(.kicker) { color: var(--muted); font-size: 0.9rem; }
.fr-next { margin-top: 0.6rem; }
.fr-next a { position: relative; z-index: 1; color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- about teaser ---------- */
.about { display: grid; grid-template-columns: 140px 1fr; gap: 1.6rem; align-items: center; }
.pic { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; border: 2px solid var(--line); }
.about p:not(.kicker) { color: #c9c9c2; max-width: 62ch; margin-top: 0.5rem; }
.text-link { display: inline-flex; gap: 0.4rem; margin-top: 0.8rem; color: var(--lime); font-weight: 600; }
.text-link:hover .arrow { transform: translateX(4px); }
.text-link .arrow { transition: transform .3s var(--ease); }

/* ---------- desktop panel for the coming-soon strip ---------- */
@media (min-width: 761px) {
  section.home-sec.soon { background: var(--bg-elev); border-radius: 18px; border-top-color: transparent; }
  .home-sec.soon + .home-sec { border-top-color: transparent; }
}

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  .cats { grid-template-columns: 1fr 1fr; }
  .free { grid-template-columns: 1fr 1fr; }
}

/* ---------- phone: demo on top, then name, price and the button, all above the fold ---------- */
@media (max-width: 760px) {
  .home main { padding-top: 4.4rem; }
  section.spot { padding-top: 0.6rem; padding-bottom: 1rem; }
  .slide { grid-template-columns: 1fr; grid-template-areas: "media" "copy"; gap: 0.9rem; align-items: start; }
  .media { border-radius: 12px; }
  .slide-name { font-size: 2.4rem; margin: 0.3rem 0 0.45rem; }
  .slide-tag { font-size: 0.95rem; line-height: 1.45; margin-bottom: 0.7rem; }
  .bundle { font-size: 0.9rem; margin-bottom: 0.6rem; }
  .slide .price { margin-bottom: 0.7rem; }
  .slide .price b { font-size: 1.75rem; }
  .slide-cta .btn { padding: 0.7rem 1.1rem; }
  .fine { margin-top: 0.6rem; }
  .tabs { gap: 0.4rem; margin-top: 1rem; }
  .tab { padding: 0.3rem; justify-content: center; }
  .tab .nm { display: none; }
  .tab img { width: 100%; height: 34px; }
  .spot-pause { width: 2.4rem; }
  .cats { grid-template-columns: 1fr; }
  .soonrow { grid-template-columns: 1fr 1fr; }
  .about { grid-template-columns: 84px 1fr; gap: 1rem; }
  .pic { width: 84px; height: 84px; }
}
@media (prefers-reduced-motion: reduce) {
  .slide, .slide.on { transition: none; }
  a.st:hover img, a.st:hover video, .cat:hover { transform: none; }
}
