/* ============================================================
   AI Creates Reels — light editorial theme
   Paper + ink + REC-red. Fraunces display / Schibsted Grotesk body.
   ============================================================ */
:root {
  --paper: #FAF7F1;
  --paper-deep: #F3EEE4;
  --card: #FFFFFF;
  --ink: #16130E;
  --ink-soft: #433D33;
  --muted: #6B645A;
  --line: #E8E2D8;
  --red: #E0331F;
  --red-deep: #C02A18;
  --red-tint: #FCEAE7;
  --success: #1E7B3C;
  --success-tint: #E5F4EA;
  --shadow-lg: 0 24px 60px -18px rgba(22, 19, 14, 0.22);
  --shadow-md: 0 10px 30px -12px rgba(22, 19, 14, 0.16);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Schibsted Grotesk", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16.5px/1.65 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
/* subtle paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: radial-gradient(rgba(22,19,14,0.045) 1px, transparent 1px);
  background-size: 22px 22px;
}
main { flex: 1; width: 100%; position: relative; z-index: 1; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; }
a { color: var(--ink); text-decoration: none; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.center { text-align: center; }
em { font-style: italic; }
h1 em, h2 em { color: var(--red); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px clamp(20px, 5vw, 56px);
  background: rgba(250, 247, 241, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header nav { display: flex; gap: 26px; align-items: center; font-weight: 500; }
.site-header nav a:not(.btn):hover { color: var(--red); }
.brand {
  font-family: var(--font-display); font-weight: 700; font-size: 21px;
  display: inline-flex; align-items: center; gap: 9px; letter-spacing: -0.02em;
}
.brand-sm { font-size: 17px; }

.rec-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--red);
  display: inline-block; animation: pulse 1.6s ease-in-out infinite;
}
.rec-dot-static { animation: none; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 51, 31, 0.45); }
  50% { box-shadow: 0 0 0 7px rgba(224, 51, 31, 0); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px;
  border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; font-size: 15.5px; font-weight: 600; font-family: var(--font-body);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 6px 18px -6px rgba(224, 51, 31, 0.5);
}
.btn-primary:hover { background: var(--red-deep); border-color: var(--red-deep); box-shadow: 0 10px 24px -6px rgba(224, 51, 31, 0.55); }
.btn-outline { background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-paper { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.btn-paper:hover { background: #fff; }
.btn-lg { padding: 16px 34px; font-size: 17.5px; }
.linklike { background: none; border: none; color: var(--ink); cursor: pointer; font-size: 15px; padding: 0; font-family: var(--font-body); font-weight: 500; }
.linklike:hover { color: var(--red); }
.inline-form { display: inline; }

/* ---------- alerts ---------- */
.alert { max-width: 1140px; margin: 18px auto 0; padding: 13px 20px; border-radius: 10px; font-size: 15px; }
.alert-error { background: var(--red-tint); border: 1px solid var(--red); color: var(--red-deep); }
.alert-success { background: var(--success-tint); border: 1px solid var(--success); color: var(--success); }

/* ---------- reveal animation ---------- */
.reveal { animation: rise .7s cubic-bezier(.22,.8,.36,1) both; }
.reveal-2 { animation-delay: .12s; }
.reveal-3 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- hero ---------- */
.hero {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(48px, 8vw, 96px) 24px clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-soft); background: var(--card); border: 1px solid var(--line);
  padding: 7px 14px; border-radius: 999px;
}
.hero h1 {
  font-size: clamp(40px, 5.4vw, 68px); line-height: 1.04; margin: 22px 0 18px;
  font-weight: 640;
}
.lede { font-size: 19px; color: var(--ink-soft); max-width: 34em; }
.hero-cta { margin: 28px 0 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-note { font-size: 14px; color: var(--muted); max-width: 16em; line-height: 1.45; }
.platform-chips { list-style: none; display: flex; gap: 10px; padding: 0; margin: 8px 0 0; flex-wrap: wrap; }
.platform-chips li {
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--line); background: var(--paper-deep);
  padding: 5px 13px; border-radius: 999px;
}

/* hero mockup */
.hero-visual { position: relative; }
.script-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px; box-shadow: var(--shadow-lg);
  transform: rotate(1.4deg);
}
.script-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.rec-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--red);
}
.script-date { font-size: 13px; color: var(--muted); font-weight: 600; }
.script-hook { font-family: var(--font-display); font-size: 21px; line-height: 1.35; font-style: italic; margin-bottom: 18px; }
.script-lines i { display: block; height: 9px; border-radius: 5px; background: var(--paper-deep); margin: 9px 0; }
.script-asset {
  display: flex; gap: 13px; align-items: center; margin: 18px 0 14px;
  background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 15px;
  font-size: 13.5px; line-height: 1.4;
}
.asset-thumb {
  width: 42px; height: 42px; border-radius: 9px; background: var(--red-tint);
  display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
}
.script-cta-row { display: flex; gap: 16px; font-size: 12.5px; font-weight: 700; color: var(--success); flex-wrap: wrap; }
.floating-tag {
  position: absolute; background: var(--ink); color: var(--paper);
  font-size: 12.5px; font-weight: 700; padding: 8px 14px; border-radius: 999px;
  box-shadow: var(--shadow-md);
}
.tag-1 { top: -14px; right: 6%; transform: rotate(-2deg); }
.tag-2 { bottom: -12px; left: 4%; transform: rotate(1.5deg); }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); padding: 13px 0; }
.marquee-track {
  display: flex; gap: 22px; width: max-content;
  animation: scroll 36s linear infinite;
  font-family: var(--font-display); font-style: italic; font-size: 17px; color: var(--ink-soft);
}
.marquee-track .dot { color: var(--red); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section-title {
  text-align: center; font-size: clamp(28px, 3.6vw, 42px); margin: 0 0 14px; font-weight: 620;
}
.steps, .features, .pricing-teaser { max-width: 1140px; margin: 0 auto; padding: clamp(56px, 7vw, 96px) 24px 0; }

.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 38px; }
.step {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 30px 26px;
  position: relative;
}
.step-num {
  font-family: var(--font-display); font-size: 52px; font-weight: 300; font-style: italic;
  color: var(--red); line-height: 1; display: block; margin-bottom: 12px;
}
.step h3 { margin: 0 0 8px; font-size: 21px; }
.step p { color: var(--muted); font-size: 15.5px; margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 38px; }
.feature {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature h3 { margin: 0 0 8px; font-size: 18.5px; }
.feature p { color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- pricing ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 24px; max-width: 760px; margin: 38px auto 18px; }
.plan-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px;
  display: flex; flex-direction: column; position: relative;
}
.plan-card h3 { margin: 0; font-size: 22px; }
.plan-card .price { font-family: var(--font-display); font-size: 46px; font-weight: 640; margin: 10px 0 4px; }
.plan-card .price span { font-size: 15px; color: var(--muted); font-weight: 400; font-family: var(--font-body); }
.plan-card ul { padding: 0 0 0 2px; margin: 14px 0 26px; list-style: none; color: var(--ink-soft); font-size: 15.5px; }
.plan-card li { padding: 6px 0 6px 26px; position: relative; }
.plan-card li::before { content: "✓"; position: absolute; left: 0; color: var(--red); font-weight: 800; }
.plan-card .btn { margin-top: auto; text-align: center; }
.plan-featured { border: 2px solid var(--ink); box-shadow: var(--shadow-md); }
.plan-flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; padding: 5px 16px; border-radius: 999px;
}
.pricing-page { max-width: 1140px; margin: 0 auto; padding: clamp(48px, 6vw, 80px) 24px; }

/* ---------- final CTA ---------- */
.final-cta { margin-top: clamp(64px, 8vw, 110px); background: var(--ink); }
.final-cta-inner { max-width: 820px; margin: 0 auto; text-align: center; padding: clamp(64px, 8vw, 110px) 24px; color: var(--paper); }
.final-cta h2 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.12; margin: 0 0 14px; color: var(--paper); }
.final-cta p { color: rgba(250, 247, 241, 0.75); font-size: 18px; margin-bottom: 30px; }
.cta-note-light { display: block; margin-top: 16px; font-size: 14px; color: rgba(250, 247, 241, 0.6); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--paper); position: relative; z-index: 1; }
.footer-inner {
  max-width: 1140px; margin: 0 auto; padding: 26px 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
  font-size: 14.5px;
}
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner nav a:hover { color: var(--red); }

/* ---------- auth & app ---------- */
.auth-card {
  max-width: 430px; margin: clamp(40px, 7vw, 80px) auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: 40px 36px;
  box-shadow: var(--shadow-md);
}
.auth-card h1 { margin: 0 0 6px; font-size: 28px; }
/* Honeypot: off-screen rather than display:none, which bots learn to skip. */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
label { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 600; color: var(--ink-soft); }
input[type=text], input[type=email], input[type=password], input[type=url], select {
  width: 100%; padding: 12px 15px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink); font-size: 15.5px; font-family: var(--font-body);
  transition: border-color .15s ease;
}
.lang-form { margin-top: 10px; max-width: 280px; }
.lang-form .lang-label { margin: 0; font-size: 13px; }
.lang-form select { padding: 8px 12px; font-size: 14px; margin-top: 4px; }
input:focus { outline: none; border-color: var(--ink); }
form .btn { margin-top: 24px; width: 100%; }

.app-main { max-width: 1080px; margin: 0 auto; padding: 32px 24px; }
.banner { padding: 13px 20px; border-radius: 10px; margin-bottom: 26px; font-size: 15px; background: var(--card); }
.banner a { margin-left: 10px; font-weight: 700; color: var(--red); }
.banner-info { border: 1px solid var(--line); }
.banner-warn { background: var(--red-tint); border: 1px solid var(--red); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; margin: 14px 0;
}
.card h3 { margin-top: 0; }
.empty-state { text-align: center; padding: 70px 20px; }
.empty-state h2 { font-size: 26px; }

/* ---------- settings ---------- */
.setting-card { max-width: 720px; }
.setting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.setting-text h3 { margin: 0 0 4px; }
.setting-text p { margin: 0; font-size: 14.5px; }
.setting-control { display: flex; align-items: center; gap: 12px; margin: 0; flex-shrink: 0; }
.setting-status {
  margin: 16px 0 0; padding: 11px 16px; border-radius: 10px; font-size: 14.5px;
  background: var(--red-tint); border: 1px solid var(--red); color: var(--red-deep);
}
/* toggle switch */
.switch { position: relative; display: inline-block; width: 52px; height: 30px; margin: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; inset: 0; border-radius: 999px; background: var(--line);
  border: 1px solid var(--line); transition: background .18s ease;
}
.switch .slider::before {
  content: ""; position: absolute; height: 24px; width: 24px; left: 3px; top: 2px;
  border-radius: 50%; background: #fff; box-shadow: var(--shadow-md); transition: transform .18s ease;
}
.switch input:checked + .slider { background: var(--red); border-color: var(--red); }
.switch input:checked + .slider::before { transform: translateX(22px); }
.switch input:focus-visible + .slider { outline: 2px solid var(--ink); outline-offset: 2px; }
@media (max-width: 560px) {
  .setting-row { flex-direction: column; gap: 14px; }
}

/* ---------- script page & teleprompter ---------- */
.script-page { max-width: 860px; margin: 0 auto; }
.script-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin: 8px 0 18px; }
.script-header h1 { margin: 10px 0 6px; font-size: clamp(26px, 3.5vw, 38px); }
.news-card { border-left: 4px solid var(--red); }
.script-hook-line { font-family: var(--font-display); font-style: italic; font-size: 22px; line-height: 1.4; }
.script-section { display: flex; gap: 16px; padding: 13px 0; border-top: 1px solid var(--line); }
.script-time {
  flex-shrink: 0; width: 52px; font-weight: 800; font-size: 13px; color: var(--red);
  font-variant-numeric: tabular-nums; padding-top: 3px;
}
.script-say { font-size: 17.5px; margin: 0 0 6px; }
.script-note { font-size: 13.5px; color: var(--muted); margin: 0; }
.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.asset-card img { width: 100%; border-radius: 10px; display: block; }
.asset-card h4 { margin: 12px 0 4px; }
.asset-card p { font-size: 13.5px; margin: 0; }
.asset-placeholder {
  aspect-ratio: 9/16; max-height: 300px; border-radius: 10px; background: var(--paper-deep);
  display: grid; place-items: center; color: var(--muted); font-weight: 600;
}
.asset-loading { animation: shimmer 1.4s ease-in-out infinite alternate; }
@keyframes shimmer { from { opacity: .55; } to { opacity: 1; } }

.teleprompter { position: fixed; inset: 0; background: #000; color: #fff; z-index: 200; display: flex; flex-direction: column; }
.teleprompter[hidden] { display: none; }
.tp-controls { display: flex; gap: 14px; align-items: center; padding: 14px 18px; background: rgba(255,255,255,0.06); }
.tp-controls input[type=range] { flex: 1; accent-color: var(--red); }
.tp-scroll { flex: 1; overflow-y: auto; padding: 8vh 8vw; scroll-behavior: auto; }
.tp-text { font-family: var(--font-display); font-size: clamp(28px, 5vw, 46px); line-height: 1.5; margin: 0 0 1.2em; }

/* ---------- admin ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; margin: 20px 0; }
.stat-card { text-align: center; padding: 18px 10px; margin: 0; }
.stat-num { display: block; font-family: var(--font-display); font-size: 30px; font-weight: 700; }
.table-wrap { overflow-x: auto; padding: 10px 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-visual { max-width: 460px; margin: 10px auto 0; }
  .step-grid, .feature-grid { grid-template-columns: 1fr; }
  .site-header nav { gap: 14px; }
  .site-header nav a:not(.btn):first-child { display: none; }
}
@media (max-width: 640px) {
  .site-header { padding: 11px 14px; }
  .site-header .brand { font-size: 16px; white-space: nowrap; gap: 6px; }
  .site-header .rec-dot { width: 8px; height: 8px; }
  .site-header nav { gap: 12px; }
  .site-header nav .btn { padding: 8px 14px; font-size: 13.5px; white-space: nowrap; }
  .hero h1 { font-size: 36px; }
  .lede { font-size: 17px; }
  .floating-tag { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-2, .reveal-3, .rec-dot, .marquee-track { animation: none !important; }
}
