/* VidGrab site. Same palette as the app: warm paper, ink, one orange. Flat on purpose. */

:root {
  --bg: #F4F3EF;
  --surface: #FFFFFF;
  --ink: #111111;
  --muted: #6E6E68;
  --line: #DAD8D0;
  --accent: #E8590C;
  --on-accent: #111111;
  --frame: #111111;
  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --max: 1200px;
  --pad: clamp(20px, 4vw, 48px);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0E0E0E; --surface: #181816; --ink: #F1EFEA; --muted: #9A9890;
  --line: #2C2B27; --accent: #FF7A2F; --on-accent: #111111; --frame: #2A2A27;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0E0E; --surface: #181816; --ink: #F1EFEA; --muted: #9A9890;
    --line: #2C2B27; --accent: #FF7A2F; --on-accent: #111111; --frame: #2A2A27;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background .3s, color .3s;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.035em; line-height: .98; }
p { margin: 0; }
.mono { font-family: var(--mono); font-size: .82em; letter-spacing: 0; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
::selection { background: var(--accent); color: #111; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 24px;
  background: var(--accent); color: #fff;
  border: 2px solid var(--accent);
  border-radius: 14px;
  font: 700 17px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .2s;
}
:root[data-theme="dark"] .btn { color: #111; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #111; } }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: square; }
.btn:hover { transform: translate(-3px, -3px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }
.btn-ghost { background: transparent; color: var(--ink) !important; border-color: var(--ink); }
.btn-small { padding: 10px 16px; font-size: 15px; border-radius: 11px; }
.btn-invert { background: #111; border-color: #111; color: #F4F3EF !important; }
.btn-invert:hover { box-shadow: 3px 3px 0 #F4F3EF; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px var(--pad);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; text-decoration: none; }
.mark { width: 32px; height: 32px; border-radius: 9px; background: var(--accent); display: grid; place-items: center; }
.mark svg { width: 100%; height: 100%; fill: none; stroke: #111; stroke-width: 9; stroke-linecap: square; }
.links { display: flex; gap: 24px; margin-left: auto; }
.links a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--muted); transition: color .15s; }
.links a:hover { color: var(--ink); }
.theme { width: 40px; height: 40px; border-radius: 11px; border: 1.5px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.theme svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.theme .fill { fill: currentColor; stroke: none; }
.theme:hover { border-color: var(--ink); }

/* ------------------------------------------------------------------ hero */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 7vw, 90px) var(--pad) clamp(60px, 8vw, 110px);
  display: grid; grid-template-columns: 1fr minmax(0, 420px); gap: 0 40px; align-items: start;
}
.hero-head { grid-column: 1 / -1; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); margin-bottom: 26px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
h1 { font-size: clamp(50px, 8.4vw, 118px); font-weight: 900; }
h1 em { font-style: normal; color: var(--accent); position: relative; display: inline-block; }
h1 em::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .09em;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  animation: underline .7s cubic-bezier(.7, 0, .2, 1) 1.1s forwards;
}
@keyframes underline { to { transform: scaleX(1); } }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; }
.split .w > span { display: inline-block; transform: translateY(105%); animation: rise .8s cubic-bezier(.2, .8, .2, 1) forwards; animation-delay: calc(var(--i) * 70ms + 100ms); }
@keyframes rise { to { transform: none; } }
.lede { max-width: 36ch; font-size: clamp(18px, 1.6vw, 21px); color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.meta { margin-top: 18px; color: var(--muted); }
.meta a { color: var(--ink); }
.hero-copy > *, .kicker { opacity: 0; animation: fade .7s ease forwards; animation-delay: .55s; }
.kicker { animation-delay: .05s; }
.hero-copy { padding-top: 34px; }
@keyframes fade { from { opacity: 0; transform: translateY(12px) } to { opacity: 1; transform: none } }

.hero-stage { position: relative; display: grid; place-items: center; margin-top: -60px; }
.phone {
  width: min(300px, 100%);
  aspect-ratio: 1080 / 2400;
  padding: 10px;
  border-radius: 44px;
  background: var(--frame);
  position: relative;
  box-shadow: 14px 14px 0 var(--accent);
  animation: phoneIn 1s cubic-bezier(.2, .8, .2, 1) .2s both;
}
@keyframes phoneIn { from { opacity: 0; transform: translateY(40px) rotate(4deg) } to { opacity: 1; transform: none } }
.screen { position: relative; width: 100%; height: 100%; border-radius: 35px; overflow: hidden; background: #F4F3EF; }
.screen video, .screen img { width: 100%; height: 100%; object-fit: cover; }

.float-card {
  position: absolute; left: -40px; bottom: 60px; width: 290px;
  padding: 14px 16px;
  background: var(--surface); border: 1.5px solid var(--ink); border-radius: 16px;
  box-shadow: 6px 6px 0 var(--ink);
  font-size: 14px;
  animation: fade .7s ease 1.2s both, bob 6s ease-in-out 2s infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-8px) } }
.fc-top { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.fc-top b { display: block; font-size: 15px; }
.fc-top .mono { font-size: 11.5px; }
.fc-thumb { width: 46px; height: 34px; border-radius: 7px; background: url(assets/thumb.webp) center / cover; flex: none; }
.fc-pause { margin-left: auto; width: 14px; height: 16px; border-left: 4px solid var(--ink); border-right: 4px solid var(--ink); }
.fc-segs { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; height: 8px; margin-bottom: 10px; }
.fc-segs i { background: var(--line); border-radius: 2px; overflow: hidden; position: relative; }
.fc-segs i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: left; }
.fc-row { display: flex; justify-content: space-between; font-size: 12px; line-height: 1.7; }
.fc-row b { font-weight: 700; color: var(--ink); }

.float-tag {
  position: absolute; right: -6px; top: 70px;
  background: var(--ink); color: var(--bg);
  padding: 8px 12px; border-radius: 8px; font-size: 13px;
  transform: rotate(6deg);
  animation: tagIn .6s cubic-bezier(.3, 1.6, .5, 1) 1.5s both;
}
@keyframes tagIn { from { opacity: 0; transform: rotate(6deg) scale(.6) } to { opacity: 1; transform: rotate(6deg) } }

/* ------------------------------------------------------------------ ticker */
.ticker { border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); overflow: hidden; padding: 16px 0; background: var(--surface); }
.ticker-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.ticker span { display: inline-flex; align-items: center; font-size: 17px; padding-right: 34px; white-space: nowrap; }
.ticker span::after { content: ""; width: 8px; height: 8px; background: var(--accent); margin-left: 34px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ sections */
section { scroll-margin-top: 70px; }
.section-head { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }
.label { color: var(--accent); margin-bottom: 18px; font-weight: 500; }
h2 { font-size: clamp(40px, 5.6vw, 76px); font-weight: 900; }
.sub { max-width: 52ch; margin-top: 20px; font-size: 19px; color: var(--muted); }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ how */
.how { padding: clamp(80px, 10vw, 140px) 0 40px; }
.how-grid {
  max-width: var(--max); margin: 50px auto 0; padding: 0 var(--pad);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 6vw, 90px);
}
.how-phone { align-self: start; position: sticky; top: 12vh; height: 76vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.phone-sm { width: auto; height: min(100%, 620px); animation: none; box-shadow: 12px 12px 0 var(--accent); }
.how .layer { position: absolute; inset: 0; opacity: 0; transform: scale(1.03); transition: opacity .45s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.how .layer.active { opacity: 1; transform: none; }
.dots { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; }
.dots li { width: 22px; height: 4px; border-radius: 2px; background: var(--line); transition: background .3s, width .3s; }
.dots li.on { background: var(--accent); width: 36px; }

.steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; opacity: .22; transition: opacity .4s; }
.step.on { opacity: 1; }
.step .num { color: var(--accent); font-size: 15px; margin-bottom: 14px; }
.step h3 { font-size: clamp(28px, 3.4vw, 46px); }
.step p { margin-top: 16px; max-width: 40ch; font-size: 19px; color: var(--muted); }

/* the animated share sheet inside the phone */
.share { background: #0D0D0D; }
.player { position: absolute; left: 0; right: 0; top: 12%; height: 30%; background: url(assets/thumb.webp) center / cover; }
.player::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .35); }
.play { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: translate(-30%, -50%); border-left: 24px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.player-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .3); }
.player-bar i { display: block; width: 38%; height: 100%; background: #E8590C; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 14px 26px; background: #F4F3EF; border-radius: 22px 22px 0 0; color: #111; transform: translateY(100%); }
.share.active .sheet { animation: sheetUp 4.2s cubic-bezier(.2, .8, .2, 1) infinite; }
@keyframes sheetUp { 0% { transform: translateY(100%) } 14%, 86% { transform: none } 100% { transform: translateY(100%) } }
.grip { display: block; width: 34px; height: 4px; border-radius: 2px; background: #C9C7BF; margin: 0 auto 10px; }
.sheet-title { font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.apps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; text-align: center; }
.app { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 9.5px; color: #444; }
.app i { width: 40px; height: 40px; border-radius: 50%; background: var(--c); display: grid; place-items: center; }
.app.vg i { background: #E8590C; border-radius: 12px; }
.app.vg svg { width: 100%; height: 100%; fill: none; stroke: #111; stroke-width: 9; stroke-linecap: square; }
.tap { position: absolute; right: 10%; top: 58px; width: 46px; height: 46px; margin-right: -2px; border-radius: 50%; border: 3px solid #111; opacity: 0; }
.share.active .tap { animation: tap 4.2s ease infinite; }
@keyframes tap { 0%, 40% { opacity: 0; transform: scale(1.8) } 50% { opacity: 1; transform: scale(1) } 62% { opacity: 0; transform: scale(.8) } 100% { opacity: 0 } }

/* ------------------------------------------------------------------ speed */
.speed { padding: clamp(80px, 10vw, 140px) 0; }
.race {
  max-width: var(--max); margin: 56px auto 0; padding: clamp(24px, 4vw, 44px);
  width: calc(100% - 2 * var(--pad));
  background: var(--surface); border: 1.5px solid var(--ink); border-radius: 22px;
  box-shadow: 8px 8px 0 var(--ink);
}
.race-row { display: grid; grid-template-columns: 190px 1fr 74px; gap: 22px; align-items: center; padding: 16px 0; }
.race-row + .race-row { border-top: 1px dashed var(--line); }
.race-label b { display: block; font-size: 19px; }
.race-label .mono { font-size: 12.5px; }
.bar { height: 30px; border-radius: 8px; background: var(--bg); border: 1.5px solid var(--line); overflow: hidden; }
.bar.single i { display: block; height: 100%; width: 0; background: var(--muted); }
.bar.multi { display: grid; grid-template-columns: repeat(16, 1fr); gap: 2px; padding: 2px; }
.bar.multi i { border-radius: 4px; background: var(--line); position: relative; overflow: hidden; }
.bar.multi i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform: scaleY(var(--p, 0)); transform-origin: bottom; }
.time { font-size: 22px; font-weight: 700; text-align: right; }
.race-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.race-foot p { font-size: 12.5px; max-width: 60ch; }

.stats { max-width: var(--max); margin: 60px auto 0; padding: 0 var(--pad); display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stat { border-top: 2px solid var(--ink); padding-top: 18px; }
.big { display: block; font-size: clamp(64px, 8vw, 110px); font-weight: 700; line-height: 1; letter-spacing: -0.05em; }
.big small { font-size: .4em; color: var(--accent); margin-left: 4px; }
.stat p { margin-top: 12px; color: var(--muted); max-width: 30ch; }

/* ------------------------------------------------------------------ features */
.features { padding: clamp(60px, 8vw, 110px) 0; }
.grid { max-width: var(--max); margin: 50px auto 0; padding: 0 var(--pad); display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  padding: 28px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px;
  transition: transform .2s, box-shadow .2s, border-color .2s, opacity .8s ease;
}
.card.in:hover { transform: translate(-4px, -4px); box-shadow: 6px 6px 0 var(--ink); border-color: var(--ink); }
.tag { display: inline-block; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; margin-bottom: 40px; }
.card h3 { font-size: 26px; letter-spacing: -0.03em; }
.card p { margin-top: 10px; color: var(--muted); font-size: 16px; }
.grid .card:nth-child(3n+2) { transition-delay: 0s, 0s, 0s, .1s; }
.grid .card:nth-child(3n) { transition-delay: 0s, 0s, 0s, .2s; }

/* ------------------------------------------------------------------ gallery */
.gallery { padding: clamp(40px, 6vw, 80px) 0 clamp(80px, 10vw, 130px); }
.strip {
  display: flex; gap: 22px; margin-top: 50px;
  padding: 10px var(--pad) 30px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  scroll-padding-inline: calc(var(--pad) + max(0px, (100vw - var(--max)) / 2));
  cursor: grab;
}
.strip::-webkit-scrollbar { display: none; }
.strip.drag { cursor: grabbing; scroll-snap-type: none; }
.strip figure { margin: 0; flex: none; width: 230px; scroll-snap-align: start; }
.strip img { border-radius: 26px; border: 7px solid var(--frame); aspect-ratio: 1080/2400; object-fit: cover; pointer-events: none; transition: transform .3s; }
.strip figure:hover img { transform: translateY(-8px) rotate(-1deg); }
.strip figcaption { margin-top: 12px; color: var(--muted); }
.strip figure:first-child { margin-left: max(0px, calc((100vw - var(--max)) / 2)); }

/* ------------------------------------------------------------------ download */
.get { background: var(--accent); color: #111; padding: clamp(80px, 10vw, 130px) 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.get-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 80px); align-items: start; }
.get .label { color: #111; }
.get-copy > p { margin-top: 18px; font-size: 19px; max-width: 38ch; }
.get .btn-invert { margin-top: 30px; font-size: 19px; padding: 20px 28px; }
.small { font-size: 13px; margin-top: 12px !important; }
.alt { list-style: none; padding: 0; margin: 30px 0 0; border-top: 1.5px solid #111; }
.alt li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1.5px solid #111; font-size: 14px; }
.alt a { font-weight: 700; }
.alt span { opacity: .7; }
.install { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.install li { display: flex; gap: 18px; padding: 22px; background: #F4F3EF; border: 1.5px solid #111; border-radius: 18px; box-shadow: 5px 5px 0 #111; }
.install li > span { flex: none; width: 34px; height: 34px; border-radius: 10px; background: #111; color: #F4F3EF; display: grid; place-items: center; font-weight: 700; }
.install b { font-size: 19px; }
.install p { margin-top: 4px; color: #55554F; font-size: 15.5px; }
.install .cert { display: block; background: transparent; box-shadow: none; border-style: dashed; font-size: 12.5px; line-height: 1.8; }
.install .cert code { font-weight: 700; font-size: 14px; }

/* ------------------------------------------------------------------ faq */
.faq { padding: clamp(80px, 10vw, 130px) 0; }
.qa { max-width: var(--max); margin: 44px auto 0; padding: 0 var(--pad); display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
details { border-top: 1.5px solid var(--ink); padding: 22px 0; }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); font-weight: 400; color: var(--accent); font-size: 24px; line-height: 1; transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 12px; color: var(--muted); max-width: 52ch; animation: fade .35s ease; }

/* ------------------------------------------------------------------ footer */
.foot { max-width: var(--max); margin: 0 auto; padding: 50px var(--pad) 60px; border-top: 1.5px solid var(--ink); }
.foot-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.fine { margin-top: 26px; font-size: 13.5px; color: var(--muted); max-width: 80ch; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .links { display: none; }
  .theme { margin-left: auto; }
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero-stage { margin-top: 50px; }
  .phone { width: min(270px, 70vw); }
  .float-card { left: 0; bottom: 30px; width: 250px; }
  .float-tag { right: 6%; }
  .grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr; gap: 34px; }
  .get-inner, .qa { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .nav { gap: 12px; }
  .how-grid { grid-template-columns: 40% 1fr; gap: 18px; }
  .how-phone { top: 90px; height: auto; }
  .phone-sm { width: 100%; height: auto; border-radius: 26px; padding: 6px; box-shadow: 6px 6px 0 var(--accent); }
  .phone-sm .screen { border-radius: 21px; }
  .dots { display: none; }
  .step { min-height: 64vh; }
  .step p { font-size: 15.5px; }
  .sheet { padding: 6px 8px 14px; }
  .app i { width: 22px; height: 22px; }
  .app { font-size: 6.5px; gap: 3px; }
  .sheet-title { font-size: 9px; margin-bottom: 8px; }
  .tap { top: 34px; width: 28px; height: 28px; right: 9%; border-width: 2px; }
  .grid { grid-template-columns: 1fr; }
  .race-row { grid-template-columns: 1fr 64px; gap: 10px 14px; }
  .race-label { grid-column: 1 / -1; display: flex; gap: 10px; align-items: baseline; }
  .race-label b { font-size: 16px; }
  .time { font-size: 18px; }
  .float-card { left: -4px; width: 230px; bottom: 20px; }
  .strip figure { width: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .split .w > span { transform: none; }
}
