/* AdLibby — shared styles. Dark, premium, warm accent. */
:root {
  --bg: #0c0a14;
  --bg-soft: #15121f;
  --card: #1b1726;
  --line: #2a2438;
  --ink: #f4f1fb;
  --muted: #a79fc0;
  --accent: #ff7a59;          /* warm coral */
  --accent-2: #8b5cf6;        /* violet */
  --good: #34d399;
  --radius: 14px;
  --maxw: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, opacity .12s ease;
  background: var(--card); color: var(--ink);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--accent), #ff9a76); color: #1a0f0a; border: none; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Header */
header.nav {
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px);
  background: rgba(12,10,20,.72); border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--ink); }

/* Hero */
.hero { padding: 96px 0 72px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -40% 0 auto 0; height: 600px;
  background: radial-gradient(60% 60% at 50% 0%, rgba(139,92,246,.22), transparent 70%);
  pointer-events: none;
}
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: rgba(255,122,89,.1); border: 1px solid rgba(255,122,89,.25);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 24px;
}
h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.04; letter-spacing: -.03em; margin: 0 auto 20px; max-width: 16ch; font-weight: 800; }
.hero p.lead { font-size: clamp(17px, 2.2vw, 21px); color: var(--muted); max-width: 56ch; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Hero wallpaper — a slowly drifting, 3D-tilted wall of real ad keyframes behind
   the headline (inspired by photoai's <netflix> effect). */
.hero { background: #0c0a14; }
.hero > .wrap { position: relative; z-index: 2; }
.hero::before { z-index: 1; }                       /* keep the violet glow above the wall */
.hero h1, .hero .lead, .hero .eyebrow, .hero .hero-note { text-shadow: 0 3px 22px rgba(0,0,0,.55); }
.hero-wall { position: absolute; inset: 0; overflow: hidden; z-index: 0; perspective: 700px; background: #0c0a14; }
.hero-wall__plane { position: absolute; inset: -25% -12%; display: grid; place-items: center;
  transform: rotateX(14deg) rotateZ(-8deg) skewX(-9deg) scale(1.3); transform-style: preserve-3d; }
.hero-wall__scroll { display: flex; flex-direction: column; gap: 14px;
  animation: heroDrift 140s ease-in-out infinite alternate; will-change: transform; }
@keyframes heroDrift { from { transform: translateX(-190px); } to { transform: translateX(190px); } }
.hero-row { display: flex; gap: 14px; }
.hero-tile { width: 150px; aspect-ratio: 9 / 16; flex: none; border-radius: 12px;
  background-size: cover; background-position: center; background-color: #15121f;
  box-shadow: 0 14px 34px -16px rgba(0,0,0,.75); }
.hero-wall__overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 30%, rgba(12,10,20,.35), rgba(12,10,20,.78) 70%),
    linear-gradient(180deg, rgba(12,10,20,.55) 0%, rgba(12,10,20,.5) 45%, rgba(12,10,20,.92) 100%); }
@media (max-width: 700px) { .hero-tile { width: 108px; } .hero-wall { perspective: 500px; } }
@media (prefers-reduced-motion: reduce) { .hero-wall__scroll { animation: none; } }

/* Example ads (dogfooded) */
.examples { padding-top: 8px; }
/* Fixed 4-up so the row never leaves a dangling card; 2×2 then 1-col on smaller screens. */
.example-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; max-width: 1040px; margin: 0 auto; align-items: start; }
.example { margin: 0; }
@media (max-width: 880px) { .example-grid { grid-template-columns: repeat(2, 1fr); max-width: 540px; } }
@media (max-width: 460px) { .example-grid { grid-template-columns: 1fr; max-width: 300px; } }
.vid-wrap { position: relative; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: #000; box-shadow: 0 24px 60px -34px rgba(0,0,0,.8); }
.vid-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.example figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; text-align: center; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--accent); background: rgba(255,122,89,.1); border: 1px solid rgba(255,122,89,.25);
  padding: 3px 10px; border-radius: 999px; margin-right: 8px; }

/* Sections */
section { padding: 72px 0; }
.section-head { text-align: center; max-width: 60ch; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; margin: 0 0 14px; }
.section-head p { color: var(--muted); font-size: 18px; margin: 0; }

/* Feature grid */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.card h3 { margin: 14px 0 8px; font-size: 19px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(139,92,246,.25), rgba(255,122,89,.18)); color: var(--ink); }

/* Inline SVG icon system — sizes to the parent font-size, inherits text color. */
svg.ic { width: 1.05em; height: 1.05em; vertical-align: -0.16em; flex: none; }
.ico svg.ic { width: 23px; height: 23px; vertical-align: 0; color: #fff; }
.spec svg.ic { margin-right: 5px; vertical-align: -0.18em; }
.up-ic svg.ic, .fmt-ic svg.ic { vertical-align: -0.2em; }
.ic-good { color: var(--good); }

/* Brand mark in the nav / footer (replaces the old dot) */
.brand .brand-mark { width: 26px; height: 26px; border-radius: 7px; display: block; }
.brand[style*="17px"] .brand-mark { width: 22px; height: 22px; border-radius: 6px; }

/* Auth pages: muted cinematic video behind a frosted card */
.auth-bg { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.auth-bg-overlay { position: fixed; inset: 0; z-index: 0;
  background:
    radial-gradient(70% 55% at 50% 38%, rgba(139,92,246,.20), transparent 72%),
    linear-gradient(180deg, rgba(12,10,20,.80), rgba(12,10,20,.93)); }
.auth-shell .auth-card { position: relative; z-index: 1;
  background: rgba(20,17,30,.74); backdrop-filter: blur(18px);
  border-color: rgba(255,255,255,.10); box-shadow: 0 40px 90px -40px #000; }

/* Steps */
.steps { counter-reset: step; }
.step { display: flex; gap: 20px; align-items: flex-start; padding: 22px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: none; }
.step .num { counter-increment: step; font-weight: 800; font-size: 15px; color: var(--accent);
  border: 1px solid var(--line); border-radius: 50%; width: 40px; height: 40px; display: grid; place-items: center; flex: none; }
.step .num::before { content: counter(step); }
.step h3 { margin: 4px 0 6px; font-size: 19px; }
.step p { margin: 0; color: var(--muted); }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 60px -30px var(--accent); }
.plan .tag { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); font-weight: 700; }
.plan .amt { font-size: 40px; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 2px; }
.plan .amt span { font-size: 16px; color: var(--muted); font-weight: 500; }
.plan .credits { color: var(--ink); font-weight: 600; margin: 6px 0 16px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan li { color: var(--muted); font-size: 15px; padding: 7px 0 7px 26px; position: relative; }
.plan li::before { content: '✓'; color: var(--good); position: absolute; left: 0; font-weight: 700; }
.cost-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 22px; }

/* CTA band */
.cta-band { background: linear-gradient(135deg, rgba(139,92,246,.16), rgba(255,122,89,.12));
  border: 1px solid var(--line); border-radius: 22px; padding: 56px; text-align: center; }
.cta-band h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; letter-spacing: -.02em; }
.cta-band p { color: var(--muted); margin: 0 0 26px; font-size: 18px; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }

/* Auth + app shared */
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 34px; }
.auth-card h1 { font-size: 26px; text-align: left; margin: 0 0 6px; }
.field { margin: 16px 0; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; font-weight: 500; }
.input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--ink); font-size: 15px; font-family: var(--font);
}
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); }
textarea { resize: vertical; min-height: 78px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.toggle { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; cursor: pointer; }
.toggle input { width: auto; }
.error { color: #ff7a7a; font-size: 14px; margin-top: 10px; min-height: 18px; }
.switch-link { font-size: 14px; color: var(--muted); margin-top: 18px; text-align: center; }
.switch-link a { color: var(--accent); }

@media (max-width: 900px) {
  .grid-3, .grid-4, .price-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4, .price-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 36px 22px; }
}

/* Landing capture card (hero + free tool page) — photo + brief before signup */
.try-card { max-width: 640px; margin: 34px auto 0; background: rgba(20,16,32,.82); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; text-align: left; }
.try-head { font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.try-head em { color: var(--accent); font-style: normal; }
.try-row { display: flex; gap: 14px; align-items: stretch; }
.try-drop { flex: 0 0 132px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 12px;
  background: var(--bg-soft); color: var(--muted); font-size: 12.5px; text-align: center; padding: 10px; cursor: pointer;
  position: relative; overflow: hidden; transition: border-color .15s; }
.try-drop.drag, .try-drop:hover { border-color: var(--accent-2); }
.try-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.try-fields { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.try-input { width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--ink); font-size: 14.5px; font-family: var(--font); }
.try-input:focus { outline: none; border-color: var(--accent-2); }
.try-note { color: var(--muted); font-size: 12.5px; margin-top: 12px; min-height: 16px; }
@media (max-width: 560px) { .try-row { flex-direction: column; } .try-drop { flex-basis: 120px; min-height: 120px; } }

/* "See the brief" veil over example ads */
.example .vid-wrap { position: relative; }
.brief-veil { position: absolute; inset: 0; display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 12px; padding: 20px; text-align: center; background: rgba(10,8,18,.92); border-radius: inherit; z-index: 2; }
.brief-veil.show { display: flex; }
.brief-veil p { font-size: 17px; font-weight: 600; line-height: 1.5; margin: 0; color: var(--ink); }
.brief-sub { color: var(--muted); font-size: 12.5px; }
.brief-btn { background: none; border: none; color: var(--accent); font: inherit; font-size: 12.5px; font-weight: 700;
  cursor: pointer; padding: 0; margin-left: 8px; }
.brief-btn:hover { text-decoration: underline; }

/* Graduation ladder section */
.ladder-grid .rung { display: inline-block; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--accent); background: rgba(255,122,89,.1); border: 1px solid rgba(255,122,89,.3); border-radius: 999px;
  padding: 4px 10px; margin-bottom: 12px; }

/* Showcase slider (VEED-style filmstrip) */
.showcase { position: relative; overflow: hidden; padding: 8px 0 4px; }
.sc-track { display: flex; gap: 16px; align-items: center; width: max-content;
  transition: transform .5s cubic-bezier(.22,.8,.3,1); will-change: transform; padding: 10px 0 4px; }
.sc-card { position: relative; flex: 0 0 auto; width: min(300px, 64vw); aspect-ratio: 9 / 16; margin: 0;
  border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: #000; cursor: pointer;
  transform: scale(.92); opacity: .55; transition: transform .5s cubic-bezier(.22,.8,.3,1), opacity .5s; }
.sc-card.active { transform: scale(1); opacity: 1; box-shadow: 0 30px 70px -35px rgba(0,0,0,.9); }
.sc-card video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-chip { position: absolute; top: 12px; left: 12px; font-size: 11.5px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; color: #fff; background: rgba(12,10,20,.72); backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.18); padding: 5px 11px; border-radius: 999px; }
.sc-mute { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); background: rgba(12,10,20,.65); backdrop-filter: blur(4px);
  color: #fff; font-size: 15px; cursor: pointer; display: grid; place-items: center; }
.sc-mute:hover { background: rgba(255,122,89,.85); border-color: transparent; }
.sc-name { position: absolute; left: 14px; right: 14px; bottom: 12px; font-size: 13.5px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.sc-nav { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.sc-arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; transition: border-color .12s, background .12s; }
.sc-arrow:hover { border-color: var(--accent); background: rgba(255,122,89,.1); }

/* Showcase prompt popover */
.sc-pop-backdrop { position: fixed; inset: 0; z-index: 300; background: rgba(8,6,14,.75); backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 20px; animation: fadein .15s ease; }
.sc-pop { position: relative; display: flex; gap: 0; width: min(92vw, 720px); max-height: 86vh; overflow: hidden;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 40px 90px -35px #000; }
.sc-pop-img { width: 42%; object-fit: cover; }
.sc-pop-body { flex: 1; padding: 26px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.sc-pop-body h3 { margin: 0; font-size: 22px; }
.sc-pop-brief { margin: 0; font-size: 16.5px; font-weight: 600; line-height: 1.55; }
.sc-pop-sub { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.sc-pop-body .badge { align-self: flex-start; }
.sc-pop-body .btn { align-self: flex-start; margin-top: 6px; }
.sc-pop-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(12,10,20,.65); color: #fff; font-size: 18px; cursor: pointer; z-index: 1; }
.sc-pop-x:hover { background: #ff5a5a; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) { .sc-pop { flex-direction: column; overflow-y: auto; } .sc-pop-img { width: 100%; max-height: 40vh; } }

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 60px 20px 80px; }
.legal h1 { font-size: 34px; margin: 0 0 6px; }
.legal .updated { color: var(--muted); font-size: 13.5px; margin-bottom: 34px; }
.legal h2 { font-size: 21px; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--ink); font-size: 15px; line-height: 1.75; }
.legal ul { padding-left: 22px; }
.legal a { color: var(--accent); }
.legal .muted { color: var(--muted); }
