:root {
  --bg: #0b0b0c;
  --surface: #151517;
  --surface-2: #1d1d20;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #6e6e73;
  --radius: 20px;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.bar {
  max-width: 1080px;
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mark { font-weight: 600; letter-spacing: -0.01em; text-decoration: none; font-size: 15px; }
.mark a { color: inherit; text-decoration: none; }
.crumb { color: var(--muted); font-weight: 500; }
.chip {
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  white-space: nowrap;
  text-decoration: none;
}

main { max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }

.hero {
  display: grid;
  gap: 40px;
  align-items: center;
  padding: 32px 0 56px;
}
@media (min-width: 860px) {
  .hero { grid-template-columns: 1.1fr 0.9fr; padding: 64px 0 88px; }
}
h1 {
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  font-weight: 700;
}
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); margin: 0 0 28px; max-width: 30em; }
.fine { font-size: 13px; color: var(--faint); margin: 14px 0 0; }
.fine a { color: var(--muted); }

.phone {
  margin: 0 auto;
  width: min(300px, 76vw);
  aspect-ratio: 9 / 16;
  border-radius: 34px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -30px rgba(0, 0, 0, 0.8);
  position: relative;
}
.phone video, .phone > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.phone-in {
  position: absolute; left: 14px; bottom: 46px; z-index: 1; width: 56px; height: 56px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.9); object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
@media (min-width: 860px) { .phone { width: 320px; } }
.phone figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 16px 14px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.75);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
}

.btn {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-wide { width: 100%; margin-top: 16px; }
.btn:focus-visible, .drop:focus-within, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.tool {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px var(--gutter);
  max-width: 560px;
  margin: 0 auto 80px;
  scroll-margin-top: 16px;
}
@media (min-width: 600px) { .tool { padding: 36px; } }
h2 { font-size: 24px; letter-spacing: -0.02em; margin: 0 0 20px; font-weight: 650; }
.stage-lead { font-size: 17px; margin: 0 0 18px; color: var(--muted); }

.drop {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  overflow: hidden;
  text-align: center;
  transition: border-color 0.15s ease;
}
.drop:hover, .drop.over { border-color: var(--accent); }
.drop img { width: 100%; max-height: 420px; object-fit: contain; }
.drop-empty { display: grid; gap: 6px; padding: 24px; color: var(--muted); font-size: 15px; }
.drop-empty strong { color: var(--text); font-size: 17px; }

.packs { display: grid; gap: 12px; }
.pack {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 64px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.pack strong { font-size: 17px; }
.pack span { color: var(--muted); font-size: 14px; }
.pack .price { font-weight: 650; font-size: 18px; color: var(--text); }
.pack.primary { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.pack:disabled { opacity: 0.5; }

.spinner {
  width: 40px; height: 40px;
  margin: 12px auto 20px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
[data-stage="wait"] { text-align: center; }

.result video, .result img { width: 100%; max-height: 70vh; aspect-ratio: 9 / 16; object-fit: contain; border-radius: var(--radius); background: #000; }
.result img { aspect-ratio: auto; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.row .btn { flex: 1 1 auto; }

.error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 69, 58, 0.12);
  color: #ff8a80;
  font-size: 15px;
}

.how, .faq { max-width: 640px; margin: 0 auto 72px; }
.how ol { margin: 0; padding-left: 1.3em; color: var(--muted); display: grid; gap: 10px; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--faint); flex: none; }
.faq details[open] summary::after { content: '–'; }
.faq p { margin: 10px 0 0; color: var(--muted); }

.prose { max-width: 680px; padding-top: 24px; padding-bottom: 64px; }
.prose h1 { font-size: clamp(34px, 6vw, 48px); }
.prose h2 { font-size: 20px; margin-top: 32px; }
.prose p, .prose li { color: var(--muted); }
.prose code { font-size: 0.9em; }

.foot {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px var(--gutter) 48px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--faint);
}
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 12px; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.foot p { margin: 0; max-width: 46em; }

/* — Selfiecast hub — */
.hub-hero { padding: 20px 0 64px; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: 'h' 'reel' 'copy'; }
.hub-hero h1 { grid-area: h; margin-bottom: 22px; }
.hub-copy { grid-area: copy; }
.reel { grid-area: reel; margin: 0 calc(-1 * var(--gutter)) 28px; }
.reel-track {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter); scrollbar-width: none;
}
.reel-track::-webkit-scrollbar { display: none; }
.reel-track li { flex: 0 0 min(64vw, 300px); scroll-snap-align: start; }
.shot { position: relative; margin: 0; aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: #161618; }
.shot-out { width: 100%; height: 100%; object-fit: cover; animation: drift 14s ease-in-out infinite alternate; }
.reel-track li:nth-child(2) .shot-out { animation-delay: -5s; }
.reel-track li:nth-child(3) .shot-out { animation-delay: -9s; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.07) translateY(-1.5%); } }
@media (prefers-reduced-motion: reduce) { .shot-out { animation: none; } }
.shot-in {
  position: absolute; left: 12px; bottom: 12px; width: 52px; height: 52px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.9); object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.shot figcaption {
  position: absolute; left: 74px; bottom: 26px; font-size: 14px; font-weight: 600;
  color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.shot::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, rgba(0,0,0,.55)); pointer-events: none; }
.shot-in, .shot figcaption { z-index: 1; }
.reel-note { font-size: 12px; color: var(--faint); margin: 12px var(--gutter) 0; max-width: 40em; }
@media (min-width: 860px) {
  .hub-hero { padding: 72px 0 104px; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); grid-template-areas: 'h reel' 'copy reel'; column-gap: 56px; align-items: start; }
  .hub-hero h1 { align-self: end; }
  .reel { margin: 0; }
  .reel-track { padding: 0; overflow: visible; gap: 14px; }
  .reel-track li { flex: 1 1 0; }
  .reel-track li:nth-child(2) { transform: translateY(40px); }
  .reel-note { margin: 56px 0 0; }
  .shot { border-radius: 18px; }
  .shot-in { width: 40px; height: 40px; left: 10px; bottom: 10px; }
  .shot figcaption { left: 58px; bottom: 20px; font-size: 13px; white-space: nowrap; }
}
.hub-hero h1 { font-size: clamp(44px, 8vw, 88px); }
.band { padding: 0 0 72px; }
.band h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 24px; }
.grid3, .grid2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .grid3 { grid-template-columns: repeat(3, 1fr); } .grid2 { grid-template-columns: repeat(2, minmax(0, 320px)); } }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card p { margin: 6px 0 0; color: var(--muted); }
.card strong { font-size: 17px; }
.num {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-2); color: var(--muted);
  font-size: 14px; font-weight: 600;
}
.price-card .price { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin: 0; }
.price-card.primary { border-color: var(--accent); }
.tools { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tools a {
  display: grid; gap: 4px; padding: 20px 22px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface);
  text-decoration: none;
}
.tools a:hover { border-color: var(--accent); }
.tools span { color: var(--muted); }
.tools em { font-style: normal; color: var(--faint); font-size: 14px; }
.empty { color: var(--muted); max-width: 36em; margin: 0; padding: 22px; border: 1px dashed rgba(255,255,255,0.14); border-radius: var(--radius); }
.about p { color: var(--muted); max-width: 40em; }
.about a, .foot p a { color: var(--text); }
.hub .faq { margin: 0 0 72px; }
