/* Yapflix brand: lime and purple from the logo, on a near-black background. */
:root {
  --lime: #c1eb4d;
  --lime-strong: #d4f56e;
  --purple: #8c52ff;
  --purple-soft: #b79bff;     /* readable purple for small text on dark */
  --bg: #0b0b12;
  --bg-raised: #14141f;
  --bg-card: #1a1a28;
  --line: #2a2a3d;
  --text: #f4f4fa;
  --text-dim: #a9a9c0;
  --danger: #ff6b81;
  --radius: 16px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--lime); text-underline-offset: 3px; }
a:hover { color: var(--lime-strong); }
:focus-visible { outline: 3px solid var(--purple-soft); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: #0b0b12; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 7vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.dim { color: var(--text-dim); }
.lime { color: var(--lime); }
.purple { color: var(--purple-soft); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11, 11, 18, .86); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a:not(.btn):not(.avatar) { color: var(--text-dim); text-decoration: none; font-weight: 600; }
.nav a:not(.btn):not(.avatar):hover, .nav a[aria-current="page"] { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem var(--font); text-decoration: none; cursor: pointer; transition: transform .12s, background .12s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--lime); color: #0b0b12; }
.btn-primary:hover { background: var(--lime-strong); color: #0b0b12; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: #9d6bff; color: #fff; }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--purple-soft); color: var(--text); }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-small { min-height: 38px; padding: 0 16px; font-size: .92rem; }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 56px; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; filter: blur(110px); opacity: .32; pointer-events: none; }
.hero::before { width: 460px; height: 460px; background: var(--purple); top: -140px; right: -80px; }
.hero::after { width: 380px; height: 380px; background: var(--lime); bottom: -200px; left: -120px; opacity: .18; }
.hero .wrap { position: relative; display: grid; gap: 48px; grid-template-columns: 1.1fr .9fr; align-items: center; }
.eyebrow { color: var(--lime); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; margin-bottom: 14px; }
.hero p.lead { font-size: 1.2rem; color: var(--text-dim); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fine { font-size: .85rem; color: var(--text-dim); margin-top: 14px; }

/* Product preview built from CSS (no fake screenshots) */
.preview { display: grid; gap: 14px; }
.p-hero { aspect-ratio: 4 / 5; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.85)), radial-gradient(120% 90% at 20% 10%, var(--purple), #2a1466 60%, #120a2e); border: 1px solid var(--line); }
.p-hero strong { font-size: 1.4rem; }
.p-hero span { color: var(--text-dim); font-size: .9rem; }
.p-hero .fake-btn { margin-top: 12px; background: var(--lime); color: #0b0b12; font-weight: 800; text-align: center; border-radius: 999px; padding: 10px; }
.p-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.p-row i { aspect-ratio: 2 / 3; border-radius: 10px; background: linear-gradient(160deg, var(--bg-card), #0f0f19); border: 1px solid var(--line); }
.p-row i:nth-child(odd) { background: linear-gradient(160deg, #2c1a63, #130c2c); }
.p-row i:nth-child(3n) { background: linear-gradient(160deg, #3b4a12, #12170a); }

/* Sections */
section.block { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 40em; margin-bottom: 36px; }
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(140, 82, 255, .18); color: var(--purple-soft); font-size: 1.3rem; margin-bottom: 14px; }
.card .icon.lime { background: rgba(193, 235, 77, .15); color: var(--lime); }
.price { font-size: 2.4rem; font-weight: 800; }
.price small { font-size: 1rem; color: var(--text-dim); font-weight: 500; }
.check { list-style: none; padding: 0; margin: 16px 0 24px; }
.check li { padding-left: 28px; position: relative; margin-bottom: 10px; }
.check li::before { content: "✓"; position: absolute; left: 0; color: var(--lime); font-weight: 800; }
.card.featured { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple), 0 20px 60px -30px var(--purple); }
.badge { display: inline-block; background: var(--purple); color: #fff; font-size: .75rem; font-weight: 800; padding: 4px 12px; border-radius: 999px; letter-spacing: .04em; }

details { background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; padding: 14px 0; }
details[open] summary { color: var(--lime); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; color: var(--text-dim); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; max-width: 520px; margin: 18px 0 26px; }
.footer-grid a { color: var(--text-dim); }
.footer-grid a:hover { color: var(--text); }

/* Prose (legal, help) */
.prose { max-width: 46em; padding: 56px 0 72px; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }
.prose li { margin-bottom: .4em; }
.draft { background: rgba(193, 235, 77, .1); border: 1px solid rgba(193, 235, 77, .4); color: var(--lime); border-radius: 12px; padding: 12px 16px; font-size: .92rem; }

/* Open-the-app page */
.open { min-height: 100svh; display: grid; align-content: center; text-align: center; padding: 40px 0; position: relative; overflow: hidden; }
.open::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(60% 40% at 80% 0%, rgba(140,82,255,.45), transparent 70%),
  radial-gradient(50% 35% at 0% 100%, rgba(193,235,77,.18), transparent 70%); }
.open .wrap { position: relative; max-width: 460px; }
.open .app-icon { width: 120px; margin: 0 auto 28px; filter: drop-shadow(0 18px 40px rgba(140,82,255,.5)); }
.open h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
.open .stack { display: grid; gap: 14px; margin: 30px 0 22px; }

/* Responsive */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .nav a:not(.btn) { display: none; }
  .preview { max-width: 420px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Utilities (replace inline styles so the CSP can forbid them) */
.u-center { text-align: center; }
.u-mt-24 { margin-top: 24px; }
.u-mt-32 { margin-top: 32px; }
.u-m0 { margin: 0; }
.u-ml-auto { margin-left: auto; }
.u-maxw { max-width: 46em; }
.u-title-sm { font-size: 2rem; }
.u-plan { margin: 0 0 6px; font-size: 1.1rem; }
.u-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.4em; font-size: .95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--text-dim); font-weight: 600; }
.prose .table-wrap { overflow-x: auto; }
