/* VIV — vivpak.com
   Brand tokens mirror the app (lib/core/theme/app_colors.dart). */
:root {
  --bg: #090909;
  --surface: #171717;
  --raised: #202020;
  --yellow: #ffd600;
  --on-yellow: #090909;
  --blue: #287bff;
  --text: #ffffff;
  --muted: #a8a8a8;
  --danger: #ff4d4f;
  --success: #2ecc71;
  --line: #2a2a2a;
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --max: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--yellow); color: var(--on-yellow); }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--on-yellow); padding: 8px 14px; border-radius: 999px; z-index: 100; font-weight: 700; }
.skip:focus { left: 12px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 9, 9, .72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 900; font-size: 22px; letter-spacing: -.04em; }
.logo:hover { text-decoration: none; }
.logo img { width: 34px; height: 34px; border-radius: 10px; }
.logo span { color: var(--yellow); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.btn, .nav-links a.btn:hover { color: var(--on-yellow); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 999px; width: 44px; height: 44px; font-size: 18px; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-weight: 800; font-size: 16px; letter-spacing: -.01em;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--yellow); color: var(--on-yellow); box-shadow: 0 6px 0 #b39600; }
.btn-primary:hover { box-shadow: 0 8px 0 #b39600; }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #b39600; }
.btn-ghost { color: var(--text); border-color: var(--line); background: rgba(255,255,255,.03); }
.btn-ghost:hover { border-color: #444; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; box-shadow: 0 4px 0 #b39600; }
.btn svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 40px; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 auto; height: 760px; z-index: -1;
  background:
    radial-gradient(520px 380px at 78% 30%, rgba(255,214,0,.16), transparent 70%),
    radial-gradient(460px 360px at 12% 70%, rgba(40,123,255,.16), transparent 70%);
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--muted); font-weight: 700; font-size: 13px; letter-spacing: .02em;
}
.eyebrow b { color: var(--yellow); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(46,204,113,.18); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(46,204,113,0); } }
h1.mega {
  font-size: clamp(48px, 8.4vw, 104px);
  line-height: .92; letter-spacing: -.055em; font-weight: 900;
  margin: 22px 0 22px;
}
.hl { position: relative; color: var(--on-yellow); white-space: nowrap; z-index: 0; padding: 0 .08em; }
.hl::before { content: ""; position: absolute; inset: .08em -.02em .02em; background: var(--yellow); border-radius: .14em; transform: rotate(-1.6deg); z-index: -1; }
.blue { color: var(--blue); }
.lead { color: var(--muted); font-size: clamp(17px, 1.6vw, 20px); max-width: 560px; margin: 0 0 32px; }
.lead strong { color: var(--text); }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.tiny { color: var(--muted); font-size: 13px; margin-top: 18px; }

/* Phone mockup */
.phone-stage { position: relative; display: grid; place-items: center; min-height: 600px; }
.phone {
  position: relative; width: 300px; height: 610px; border-radius: 46px;
  background: #000; border: 10px solid #1d1d1d;
  box-shadow: 0 0 0 2px #2c2c2c, 0 40px 120px rgba(0,0,0,.7), 0 0 80px rgba(255,214,0,.12);
  overflow: hidden; transform: rotate(3deg);
}
.phone::before { content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 92px; height: 26px; background: #000; border-radius: 20px; z-index: 5; }
.screen { position: absolute; inset: 0; background: var(--bg); padding: 46px 12px 0; display: flex; flex-direction: column; gap: 10px; }
.appbar { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.appbar .w { font-weight: 900; font-size: 22px; letter-spacing: -.05em; color: var(--yellow); }
.appbar .icons { display: flex; gap: 10px; }
.appbar .icons i { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); display: block; }
.tabs { display: flex; gap: 6px; padding: 0 2px; }
.tabs span { font-size: 11px; font-weight: 800; padding: 5px 11px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.tabs span.on { background: var(--yellow); color: var(--on-yellow); }
.card { background: var(--surface); border-radius: 18px; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 8px; padding: 10px; }
.av { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--yellow); background: linear-gradient(135deg, #ff7a59, #ffd600); flex: none; }
.av.b { background: linear-gradient(135deg, #287bff, #8f5bff); }
.card-head .n { font-size: 12px; font-weight: 800; line-height: 1.2; }
.card-head .n small { display: block; color: var(--muted); font-weight: 600; font-size: 10px; }
.timer { margin-left: auto; font-size: 10px; font-weight: 800; color: var(--on-yellow); background: var(--yellow); padding: 3px 8px; border-radius: 999px; }
.media { height: 238px; position: relative; background:
  radial-gradient(circle at 30% 30%, #ffb347 0, transparent 45%),
  radial-gradient(circle at 75% 65%, #ff3cac 0, transparent 50%),
  linear-gradient(160deg, #2b1055, #7597de); }
.media::after { content: "sunset run w the gang 🌅"; position: absolute; left: 10px; bottom: 10px; font-size: 12px; font-weight: 700; background: rgba(0,0,0,.55); padding: 4px 9px; border-radius: 999px; }
.actions { display: flex; gap: 14px; padding: 9px 12px; font-size: 12px; color: var(--muted); font-weight: 700; }
.text-post { padding: 0 12px 12px; font-size: 13px; font-weight: 600; }
.text-post .tag { color: var(--blue); }
.nav-bar { margin-top: auto; height: 62px; background: var(--surface); margin-inline: -12px; display: flex; align-items: center; justify-content: space-around; padding-bottom: 6px; }
.nav-bar i { width: 22px; height: 22px; border-radius: 7px; background: #333; display: block; }
.nav-bar i.plus { width: 42px; height: 30px; border-radius: 12px; background: var(--yellow); }

.sticker {
  position: absolute; z-index: 6;
  background: var(--raised); color: var(--text);
  border: 1px solid #333; border-radius: 16px;
  padding: 10px 14px; font-weight: 800; font-size: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,.55);
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
  animation: float 6s ease-in-out infinite;
}
.sticker small { display: block; color: var(--muted); font-weight: 600; font-size: 11px; }
.sticker.y { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow); }
.sticker.bl { background: var(--blue); border-color: var(--blue); }
.s1 { top: 170px; left: -20px; transform: rotate(-7deg); }
.s2 { top: 300px; right: -24px; transform: rotate(6deg); animation-delay: -2s; }
.s3 { bottom: 150px; left: -36px; transform: rotate(4deg); animation-delay: -4s; }
.s4 { bottom: 40px; right: -6px; transform: rotate(-5deg); animation-delay: -1s; }
@keyframes float { 50% { translate: 0 -10px; } }

.screen.shot { padding: 0; display: block; background: #000; }
.screen.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

/* ---------- Screenshot gallery ---------- */
.screens { padding-bottom: 64px; }
.screens-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.screens-nav { display: flex; gap: 10px; flex: none; }
.arrow { width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: 20px; font-weight: 800; cursor: pointer; transition: background .2s, color .2s, transform .2s; }
.arrow:hover { background: var(--yellow); color: var(--on-yellow); transform: translateY(-2px); }
.screens-track {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 6px max(20px, calc((100vw - var(--max)) / 2)) 28px;
  scroll-padding-inline: max(20px, calc((100vw - var(--max)) / 2));
  scrollbar-width: none; -ms-overflow-style: none; outline: none;
}
.screens-track::-webkit-scrollbar { display: none; }
.screen-card {
  flex: 0 0 auto; width: clamp(230px, 23vw, 290px); margin: 0;
  scroll-snap-align: start; border-radius: var(--r-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  transition: transform .3s ease;
}
.screen-card:nth-child(odd) { transform: rotate(-1.2deg); }
.screen-card:nth-child(even) { transform: rotate(1.2deg) translateY(14px); }
.screen-card:hover { transform: rotate(0) translateY(-6px); }
.screen-card img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; }

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: var(--yellow); color: var(--on-yellow); overflow: hidden; transform: rotate(-1.2deg); margin: 48px -20px; }
.marquee-track { display: flex; width: max-content; animation: scroll 28s linear infinite; }
.marquee span { font-weight: 900; font-size: clamp(20px, 2.6vw, 30px); letter-spacing: -.03em; padding: 14px 0; white-space: nowrap; }
.marquee span::after { content: "✦"; margin: 0 26px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.sec-head { max-width: 760px; margin-bottom: 48px; }
.kicker { color: var(--yellow); font-weight: 800; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; }
h2 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1; letter-spacing: -.045em; font-weight: 900; margin: 12px 0 16px; }
.sec-head p { color: var(--muted); font-size: 19px; margin: 0; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.tile {
  grid-column: span 2; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; min-height: 260px; display: flex; flex-direction: column;
  transition: transform .25s ease, border-color .25s ease;
}
.tile:hover { transform: translateY(-4px); border-color: #3a3a3a; }
.tile.wide { grid-column: span 4; }
.tile.half { grid-column: span 3; }
.tile .emoji { font-size: 34px; line-height: 1; margin-bottom: 18px; }
.tile h3 { font-size: 26px; letter-spacing: -.03em; line-height: 1.1; margin: 0 0 10px; font-weight: 900; }
.tile p { color: var(--muted); margin: 0; font-size: 16px; }
.tile.yellow { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow); }
.tile.yellow p { color: #3a3200; }
.tile.blue-t { background: var(--blue); border-color: var(--blue); }
.tile.blue-t p { color: #dce8ff; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 22px; }
.pill { font-size: 13px; font-weight: 800; padding: 7px 13px; border-radius: 999px; background: rgba(0,0,0,.12); border: 1px solid rgba(0,0,0,.18); }
.tile:not(.yellow) .pill { background: var(--raised); border-color: #333; color: var(--text); }
.pill.on { background: var(--on-yellow) !important; color: var(--yellow) !important; border-color: var(--on-yellow) !important; }
.tile .corner { position: absolute; right: -18px; bottom: -26px; font-size: 130px; opacity: .14; transform: rotate(-12deg); pointer-events: none; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; }
.step::before { counter-increment: s; content: "0" counter(s); display: block; font-size: 56px; font-weight: 900; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 2px var(--yellow); line-height: 1; margin-bottom: 18px; }
.step h3 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--muted); }

/* Safety */
.safety-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 20px; }
.checks li::before { content: "✓"; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); color: var(--on-yellow); font-weight: 900; display: grid; place-items: center; font-size: 15px; }
.checks b { display: block; }
.checks span { color: var(--muted); font-size: 15px; }
.safety-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 0; font-weight: 800; font-size: 18px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--yellow); font-size: 26px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 20px; }

/* Final CTA */
.final { padding: 40px 0 100px; }
.final-box {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  background: var(--yellow); color: var(--on-yellow);
  padding: clamp(40px, 7vw, 88px); text-align: center;
}
.final-box h2 { font-size: clamp(40px, 7vw, 88px); margin: 0 0 14px; }
.final-box p { font-size: 19px; margin: 0 auto 30px; max-width: 520px; color: #3a3200; font-weight: 600; }
.final-box .btn-dark { background: var(--on-yellow); color: var(--yellow); box-shadow: 0 6px 0 #000; }
.final-box .bg-word { position: absolute; inset: auto -40px -60px; font-size: 260px; font-weight: 900; letter-spacing: -.06em; opacity: .07; line-height: 1; pointer-events: none; white-space: nowrap; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; color: var(--muted); font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
footer h4 { color: var(--text); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 14px; }
footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer ul a { color: var(--muted); }
footer ul a:hover { color: var(--text); }
.foot-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; }

/* ---------- Legal pages ---------- */
.legal-hero { padding: 64px 0 28px; border-bottom: 1px solid var(--line); }
.legal-hero h1 { font-size: clamp(40px, 6vw, 68px); line-height: 1; letter-spacing: -.045em; font-weight: 900; margin: 14px 0 14px; }
.legal-hero p { color: var(--muted); margin: 0; max-width: 720px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.meta span { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.legal { display: grid; grid-template-columns: 250px 1fr; gap: 56px; padding: 48px 0 96px; align-items: start; }
.toc { position: sticky; top: 92px; font-size: 14px; }
.toc b { display: block; color: var(--text); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 12px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; border-left: 2px solid var(--line); }
.toc a { display: block; color: var(--muted); padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); border-left-color: var(--yellow); text-decoration: none; }
.prose { max-width: 760px; }
.prose h2 { font-size: clamp(26px, 3vw, 32px); letter-spacing: -.03em; margin: 48px 0 14px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; letter-spacing: -.01em; }
.prose p, .prose li { color: #d6d6d6; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--yellow); }
.prose strong { color: var(--text); }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: var(--r-md); padding: 18px 22px; margin: 22px 0; }
.callout.danger { border-left-color: var(--danger); }
.callout.blue { border-left-color: var(--blue); }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }
.tldr { background: var(--yellow); color: var(--on-yellow); border-radius: var(--r-lg); padding: 24px 26px; margin-bottom: 40px; }
.tldr b { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.tldr ul { margin: 10px 0 0; padding-left: 20px; }
.tldr li { color: #2a2400; margin: 5px 0; font-weight: 600; }
.tldr li::marker { color: var(--on-yellow); }
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface); color: var(--text); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
td { color: #d6d6d6; }
tr:last-child td { border-bottom: 0; }
.steps-list { counter-reset: st; list-style: none; padding: 0 !important; }
.steps-list li { counter-increment: st; position: relative; padding: 14px 16px 14px 60px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); margin: 10px 0; }
.steps-list li::before { content: counter(st); position: absolute; left: 16px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); color: var(--on-yellow); font-weight: 900; display: grid; place-items: center; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: left; }
  .phone-stage { min-height: 560px; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile, .tile.wide, .tile.half { grid-column: span 2; min-height: 0; }
  .tile.sm2 { grid-column: span 1; }
  .steps { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .legal { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 20px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav-links .btn { margin-top: 14px; border-bottom: 0; }
  .hero { padding-top: 44px; }
  .phone { transform: scale(.9) rotate(3deg); }
  .s1 { left: 0; } .s2 { right: 0; } .s3 { left: 0; }
  .screens-head { flex-direction: column; align-items: flex-start; }
  .screens-nav { display: none; }
  .screen-card { width: 72vw; }
  section { padding: 64px 0; }
  .tile.sm2 { grid-column: span 2; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
.foot-bottom a { color: var(--yellow); font-weight: 700; }
