/* Yolly Ads — shared stylesheet. Token names mirror web.yolly's styles.css
   so the two properties read as one family; values match its light theme. */

:root {
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-muted: #f0f1f5;
  --surface: #ffffff;
  --text: #20222b;
  --text-soft: #676b76;
  --text-faint: #9ea3af;
  --line: #ececf2;
  --line-strong: #e0e2ea;
  --accent: #e60000;
  --accent-strong: #ff3b30;
  --yolly-pink: #eb1990; /* sampled from Yolly-Logo10.png */
  --shadow-soft: 0 12px 28px rgba(24, 32, 56, 0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --left-rail: 230px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.button--primary { background: var(--accent); color: #fff; }
.button--primary:hover { background: var(--accent-strong); }
.button--primary:disabled { background: var(--bg-muted); color: var(--text-faint); cursor: not-allowed; }
.button--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.button--ghost:hover { border-color: var(--text-soft); }
.button--ghost:disabled { color: var(--text-faint); border-color: var(--line); cursor: not-allowed; }
.button--inverse { background: #fff; color: var(--accent); }
.button--danger { background: #12141b; color: #ff6b5e; border-color: #12141b; }
.button--danger:hover { background: #000; }
.topbar__actions { display: flex; gap: 10px; align-items: center; }
.button--big { padding: 14px 28px; font-size: 16px; }

/* ---------- Landing: header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-brand { display: inline-flex; align-items: center; gap: 10px; }
.site-brand__logo { width: 30px; height: 30px; border-radius: 8px; }
.site-brand__text { font-size: 17px; font-weight: 600; }
.site-brand__text strong { font-weight: 800; }
.site-nav { display: flex; gap: 22px; margin-left: 12px; }
.site-nav__link { font-size: 14px; font-weight: 600; color: var(--text-soft); }
.site-nav__link:hover { color: var(--text); }
.site-header__actions { margin-left: auto; display: flex; gap: 10px; }

/* ---------- Landing: hero ---------- */

.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 72px 24px 56px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero__eyebrow, .section__eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.hero__title {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  /* Reserve two lines so alternating titles never reflow the hero. */
  min-height: 2.16em;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.hero__title--swapping { opacity: 0; transform: translateY(10px); }
.hero__title-yolly { color: var(--yolly-pink); }
.hero__sub { font-size: 18px; color: var(--text-soft); margin: 0 0 26px; max-width: 34em; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__note { margin: 16px 0 0; font-size: 13px; color: var(--text-faint); }

/* Scroll-driven by landing.js: follows the scroll down while fading out,
   gone by #why-yolly. pointer-events off so the ghost never blocks clicks
   on content scrolling up beneath it. */
.hero__panel {
  will-change: transform, opacity;
  pointer-events: none;
}

.hero-mock {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: center;
}
.hero-mock__phone {
  width: 190px;
  height: 380px;
  border-radius: 28px;
  background: linear-gradient(160deg, #1a1a2e, #2e2040);
  border: 6px solid #12141b;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
/* TikTok-style vertical reel: three phone-height slides (A, B, copy of A)
   swiped upward on a loop. The last frame of the animation shows the A-copy,
   and the loop restart shows the real A — visually identical, so the scroll
   reads as endless. */
.hero-mock__reel {
  position: absolute;
  inset: 0;
  height: 300%;
  display: flex;
  flex-direction: column;
  animation: hero-reel 14s ease-in-out infinite;
}
.hero-mock__video {
  flex: 0 0 33.3333%;
  width: 100%;
  height: 33.3333%;
  object-fit: cover;
  /* Painted ground while the video loads (and if it fails). */
  background:
    radial-gradient(120px 120px at 70% 30%, rgba(230, 0, 0, 0.35), transparent),
    radial-gradient(160px 160px at 25% 75%, rgba(94, 53, 177, 0.5), transparent);
}
@keyframes hero-reel {
  0%, 42%   { transform: translateY(0); }        /* hold on video A */
  50%, 92%  { transform: translateY(-33.3333%); } /* swipe up, hold on B */
  100%      { transform: translateY(-66.6667%); } /* swipe up to A-copy, loop */
}
@media (prefers-reduced-motion: reduce) {
  .hero-mock__reel { animation: none; }
}
.hero-mock__pill {
  position: absolute;
  top: 14px;
  left: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}
.hero-mock__caption { position: absolute; left: 12px; bottom: 16px; display: grid; gap: 6px; }
.hero-mock__line { display: block; height: 8px; width: 90px; border-radius: 4px; background: rgba(255, 255, 255, 0.35); }
.hero-mock__line--wide { width: 130px; }
.hero-mock__stats { display: grid; gap: 14px; }
.hero-mock__stat strong { display: block; font-size: 12px; color: var(--text-soft); margin-bottom: 6px; }
.hero-mock__bar {
  display: block;
  width: 150px;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent) var(--w, 50%), var(--bg-muted) var(--w, 50%));
}

/* ---------- Landing: sections ---------- */

.strip { border-block: 1px solid var(--line); background: var(--bg-soft); }
.strip__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.strip__item strong { display: block; font-size: 15px; }
.strip__item span { font-size: 13px; color: var(--text-soft); }

.section { padding: 72px 0; }
.section--tinted { background: var(--bg-soft); }
.section__inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section__inner--narrow { max-width: 760px; }
.section__title { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 34px; letter-spacing: -0.01em; }

.steps, .formats, .why {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.step-card, .format-card, .why-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-soft);
}
.step-card__num {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
}
.step-card h3, .format-card h3, .why-card h3 { margin: 0 0 8px; font-size: 18px; }
.step-card p, .format-card p, .why-card p { margin: 0; color: var(--text-soft); font-size: 14.5px; }

.format-card__art {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.format-card__art--billboard { background: linear-gradient(135deg, #5e35b1, #1a1a2e); }
.format-card__art--boost { background: linear-gradient(135deg, var(--accent), #7a0b2e); }
.format-card__art--clips { background: linear-gradient(135deg, #12141b, #4a3a6a); }
.format-card__tag {
  display: inline-block;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
  background: var(--bg-muted);
  border-radius: 999px;
  padding: 4px 12px;
}
.format-card__tag--soon { color: var(--accent); background: rgba(230, 0, 0, 0.08); }

.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 4px 18px;
  margin-bottom: 12px;
}
.faq__item summary { font-weight: 700; padding: 12px 0; cursor: pointer; }
.faq__item p { margin: 0 0 16px; color: var(--text-soft); }

.cta-band { background: linear-gradient(120deg, var(--accent), #8e0c0c); color: #fff; }
.cta-band__inner { max-width: 760px; margin: 0 auto; padding: 64px 24px; text-align: center; }
.cta-band h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 0 0 10px; }
.cta-band p { margin: 0 0 24px; opacity: 0.9; }

.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-footer__links { display: flex; gap: 18px; font-size: 13px; color: var(--text-soft); }
.site-footer__links a:hover { color: var(--text); }
.site-footer__copy { margin-left: auto; font-size: 13px; color: var(--text-faint); }

/* ---------- App shell ---------- */

.page-app { background: var(--bg-soft); }
.app-layout { display: flex; min-height: 100vh; }

.left-rail {
  width: var(--left-rail);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.site-brand--rail { padding: 4px 8px; }
.rail-badge {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 13px;
}
.rail-badge__eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.rail-badge p { margin: 4px 0 0; color: var(--text-soft); }
.rail-nav { display: grid; gap: 4px; }
.rail-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
}
.rail-nav__item:hover { background: var(--bg-soft); color: var(--text); }
.rail-nav__item--active { background: rgba(230, 0, 0, 0.08); color: var(--accent); }
.rail-nav__item--disabled { color: var(--text-faint); cursor: default; }
.rail-nav__item--disabled:hover { background: transparent; color: var(--text-faint); }
.rail-nav__icon { width: 20px; text-align: center; }
.rail-soon { font-style: normal; font-size: 11px; color: var(--text-faint); }
.rail-footer { margin-top: auto; font-size: 12px; color: var(--text-faint); padding: 0 8px; }
.rail-footer p { margin: 0 0 4px; }
.rail-footer__link { color: var(--text-soft); font-weight: 600; }

.main-stage { flex: 1; min-width: 0; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar__eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.topbar__title { margin: 2px 0 0; font-size: 24px; }

.app-main { padding: 26px 28px 48px; display: grid; gap: 22px; }
.preview-note { margin: 0; font-size: 13px; color: var(--text-faint); }

.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}
.stat-tile__label { margin: 0; font-size: 13px; color: var(--text-soft); }
.stat-tile__value { margin: 6px 0 4px; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.stat-tile__delta { margin: 0; font-size: 12px; color: var(--text-faint); }
.stat-tile__delta--up { color: #1d8a4a; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-soft);
}
.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.panel__header h3 { margin: 2px 0 0; font-size: 18px; }

.mini-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 12px;
  height: 180px;
  padding: 8px 4px 0;
}
.mini-chart span {
  display: block;
  height: var(--h, 40%);
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  opacity: 0.85;
}
.mini-chart__labels {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 8px;
}

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-strong);
}
.data-table td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
.data-table tbody tr:hover { background: var(--bg-soft); }

.pill {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 12px;
}
.pill--active { background: rgba(29, 138, 74, 0.12); color: #1d8a4a; }
.pill--review { background: rgba(230, 148, 0, 0.14); color: #a56a00; }
.pill--draft { background: var(--bg-muted); color: var(--text-soft); }
.pill--ended { background: var(--bg-muted); color: var(--text-faint); }

/* ---------- Campaign wizard ---------- */

.wizard-steps {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.wizard-steps__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-faint);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.wizard-steps__item::before {
  content: attr(data-step-label);
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-muted);
  font-size: 11px;
}
.wizard-steps__item--active { color: var(--accent); border-color: rgba(230, 0, 0, 0.35); }
.wizard-steps__item--active::before { background: var(--accent); color: #fff; }
.wizard-steps__item--done { color: var(--text-soft); }
.wizard-steps__item--done::before { content: "✓"; background: #1d8a4a; color: #fff; }

.wizard-panel__title { margin: 0 0 16px; font-size: 20px; }
.wizard-panel__hint { margin: -8px 0 16px; font-size: 13px; color: var(--text-soft); }

.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.choice-card {
  text-align: left;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  font: inherit;
  display: grid;
  gap: 6px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.choice-card strong { font-size: 15px; }
.choice-card span { font-size: 13px; color: var(--text-soft); }
.choice-card:hover { border-color: var(--text-soft); }
.choice-card--selected { border-color: var(--accent); background: rgba(230, 0, 0, 0.04); }
.choice-card--disabled { opacity: 0.55; cursor: not-allowed; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
}
.chip:hover { border-color: var(--text-soft); }
.chip--selected { border-color: var(--accent); color: var(--accent); background: rgba(230, 0, 0, 0.06); }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; max-width: 640px; }
.form-field--wide { grid-column: 1 / -1; }
.form-field select {
  font: inherit;
  font-weight: 500;
  color: var(--text);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
}
.upload-state { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 600; color: #1d8a4a; }
.rail-footer__link { display: inline-block; margin-right: 12px; }

/* ---------- Operator console ---------- */

.rail-badge--admin { border-color: rgba(230, 0, 0, 0.35); }
.rail-count {
  font-style: normal;
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.review-card { display: flex; gap: 18px; }
.review-card__media {
  width: 130px;
  height: 231px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #12141b;
  flex-shrink: 0;
}
.review-card__body { min-width: 0; display: flex; flex-direction: column; }
.review-card__body h3 { margin: 0 0 8px; font-size: 17px; }
.review-card__meta { margin: 0 0 14px; font-size: 13px; color: var(--text-soft); overflow-wrap: anywhere; }
.review-card__meta a { color: var(--accent); }
.review-card__actions { margin-top: auto; display: flex; gap: 10px; }
.review-note { color: var(--accent); font-size: 12px; }
.form-field { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-soft); }
.form-field input {
  font: inherit;
  font-weight: 500;
  color: var(--text);
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
}
.form-field input:focus { outline: none; border-color: var(--accent); }

.review-list { margin: 0; display: grid; gap: 0; }
.review-list > div {
  display: grid;
  grid-template-columns: 160px 1fr;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.review-list dt { font-size: 13px; font-weight: 700; color: var(--text-soft); }
.review-list dd { margin: 0; font-size: 14px; }

.wizard-nav { display: flex; justify-content: space-between; }

/* ---------- Auth pages ---------- */

.page-auth { background: var(--bg-soft); }
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 48px 24px;
}
.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 34px 32px 28px;
  box-shadow: var(--shadow-soft);
}
.auth-card__title { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.01em; }
.auth-card__sub { margin: 0 0 22px; font-size: 14px; color: var(--text-soft); }
.auth-form { display: grid; gap: 14px; }
.auth-form .button { width: 100%; margin-top: 4px; }
.auth-error {
  display: none;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(230, 0, 0, 0.07);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.auth-error--visible { display: block; }
.auth-meta { display: flex; justify-content: flex-end; font-size: 13px; }
.auth-link, .auth-alt a { color: var(--accent); font-weight: 700; }
.auth-terms { margin: 2px 0 0; font-size: 12.5px; color: var(--text-faint); }
.auth-terms a { color: var(--text-soft); font-weight: 600; text-decoration: underline; }
.auth-alt {
  margin: 20px 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-soft);
  text-align: center;
}
.auth-note { margin: 0; max-width: 430px; font-size: 13px; color: var(--text-faint); text-align: center; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 48px; }
  .hero__panel { display: none; }
  .steps, .formats, .why, .strip__inner { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .choice-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .left-rail { display: none; }
}
