/* Brand wordmark font — Playfair Display (700), a cinematic high-contrast serif,
   loaded from Google Fonts and applied ONLY to the .brand-wordmark logo element. */
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap");

/* VIZORA landing page — dark premium marketing aesthetic.
   Shares the studio palette (see studio.css) for visual continuity, and layers
   in three display fonts: Italiana (logo), Cormorant Garamond (headlines),
   Josefin Sans (body). */

:root {
  --bg: #07070b;
  --bg-2: #0d0d14;
  --panel: rgba(255, 255, 255, 0.04);
  --panel-border: rgba(255, 255, 255, 0.08);
  --fg: #f4f4f8;
  --muted: #8a8aa0;
  --accent: #b14bff;
  --accent-2: #38e8ff;
  --pink: #ff4bd0;
  --radius: 18px;
  --max: 1140px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --body: "Josefin Sans", system-ui, -apple-system, sans-serif;
  --logo: "Italiana", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* Guard against any wide child (the navbar's spaced-out logo, hero media)
     pushing a horizontal scrollbar on narrow phones. */
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--body);
  font-size: 1rem;
  letter-spacing: 0.04em;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: var(--bg-2);
  color: var(--fg);
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, border-color 0.15s ease;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--pink) 55%, var(--accent-2));
  color: #08080c;
  font-weight: 700;
  border-color: transparent;
}
.btn.primary:hover {
  filter: brightness(1.08);
}
.btn.ghost {
  background: transparent;
}
.btn.ghost:hover {
  border-color: var(--accent-2);
}
.btn.small {
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}

/* Header ------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 7, 11, 0.72);
  border-bottom: 1px solid var(--panel-border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--logo);
  font-size: 1.7rem;
  letter-spacing: 0.32em;
  padding-left: 0.32em;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* The Kraveo brand wordmark ONLY — a cinematic high-contrast serif. Overrides just
   the typeface + tracking on the logo element; the gradient fill and size are
   inherited unchanged from .logo / .dash-header .logo. `!important` keeps this a
   SINGLE dedicated class (never a change to any other rule) while still winning over
   the more-specific `.dash-header .logo` / `.auth-card .logo` font declarations in
   auth.css. It only ever applies to the wordmark element itself. */
.brand-wordmark {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif !important;
  font-weight: 700 !important;
  letter-spacing: 0.09em !important;
  padding-left: 0.09em !important;
}
/* The Kraveo K play-mark, set inline to the LEFT of the wordmark inside the .logo
   lockup. Sized in `em` so it scales WITH the wordmark's font-size on every header;
   this is a NEW class only — it never alters .logo / .brand-wordmark or the layout. */
.brand-mark {
  height: 0.95em;
  width: auto;
  margin-right: 0.34em;
  vertical-align: -0.13em;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hero --------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  /* Purple gradient fallback — shown if the hero video fails to load. */
  background:
    radial-gradient(900px 520px at 78% -8%, rgba(177, 75, 255, 0.28), transparent 60%),
    radial-gradient(820px 480px at 12% 18%, rgba(255, 75, 208, 0.20), transparent 58%),
    radial-gradient(900px 600px at 50% 120%, rgba(56, 232, 255, 0.16), transparent 60%),
    var(--bg);
}
/* Fullscreen background video. Sits below the overlay and hero content; the
   .hero gradient above shows through if the video element fails to render. */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
}
/* Dark overlay keeps the white hero text readable over the video. */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
/* Floating gradient orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
}
.orb.one {
  width: 360px; height: 360px;
  top: 8%; right: 6%;
  background: radial-gradient(circle, var(--accent), transparent 70%);
}
.orb.two {
  width: 300px; height: 300px;
  bottom: 6%; left: 4%;
  background: radial-gradient(circle, var(--pink), transparent 70%);
  animation-delay: -4s;
}
.orb.three {
  width: 260px; height: 260px;
  top: 38%; left: 46%;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  animation-delay: -8s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(0, -28px) scale(1.06); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 7rem 0 5rem;
}
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 1.02;
  margin: 0 0 1.5rem;
  letter-spacing: -0.01em;
}
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent), var(--pink) 50%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.sub {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted);
  line-height: 1.6;
  font-weight: 300;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Section scaffolding ------------------------------------------------------ */
section.block {
  padding: 6rem 0;
}
.section-head {
  text-align: center;
  margin-bottom: 3.5rem;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 0.75rem;
}
.section-head p {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 300;
  margin: 0;
}
.kicker {
  display: block;
  font-size: 0.76rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1rem;
}

/* Category cards ----------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 2.25rem 1.9rem;
  backdrop-filter: blur(10px);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(177, 75, 255, 0.18);
}
.card .icon {
  font-size: 2.4rem;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  margin-bottom: 1.4rem;
  background: linear-gradient(135deg, rgba(177, 75, 255, 0.2), rgba(56, 232, 255, 0.16));
  border: 1px solid var(--panel-border);
}
.card h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}
.card p {
  color: var(--muted);
  font-weight: 300;
  line-height: 1.6;
  margin: 0 0 1.6rem;
  flex: 1;
}

/* Ambient looping card backgrounds (pre-seeded fixed assets, never generated
   per visit). The card's own dark gradient background IS the fallback: if the
   loop isn't seeded, fails, or autoplay is blocked, the video is removed and
   the gradient shows — no black box, no broken player. */
.card-live {
  /* Positioned + clipped parent (rounded corners intact); the gradient here is
     the bottom fallback layer under the card image. */
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(177, 75, 255, 0.14), rgba(0, 0, 0, 0.6)),
    var(--panel);
}
/* Base layer — the premium AI card image painted OVER the gradient via
   multiple backgrounds: if the image 404s (unseeded) only the gradient shows.
   A static image always paints — nothing here can go black. */
.card-img-create {
  background-image: url("/api/dashboard/card-image/create"),
    linear-gradient(160deg, rgba(177, 75, 255, 0.14), rgba(0, 0, 0, 0.6));
  background-size: cover;
  background-position: center;
}
.card-img-stories {
  background-image: url("/api/dashboard/card-image/stories"),
    linear-gradient(160deg, rgba(177, 75, 255, 0.14), rgba(0, 0, 0, 0.6));
  background-size: cover;
  background-position: center;
}
.card-img-ads {
  background-image: url("/api/dashboard/card-image/ads"),
    linear-gradient(160deg, rgba(56, 232, 255, 0.18), rgba(0, 0, 0, 0.62));
  background-size: cover;
  background-position: center;
}
.card-img-pro {
  background-image: url("/api/dashboard/card-image/pro"),
    linear-gradient(150deg, rgba(177, 75, 255, 0.26), rgba(56, 232, 255, 0.12), rgba(0, 0, 0, 0.66));
  background-size: cover;
  background-position: center;
}
.card-img-trends {
  background-image: url("/api/dashboard/card-image/trends"),
    linear-gradient(160deg, rgba(255, 75, 208, 0.18), rgba(0, 0, 0, 0.62));
  background-size: cover;
  background-position: center;
}
.card-img-shortfilm {
  background-image: url("/api/dashboard/card-image/shortfilm"),
    linear-gradient(160deg, rgba(177, 75, 255, 0.16), rgba(0, 0, 0, 0.62));
  background-size: cover;
  background-position: center;
}
.card-img-library {
  background-image: url("/api/dashboard/card-image/library"),
    linear-gradient(160deg, rgba(56, 232, 255, 0.14), rgba(0, 0, 0, 0.62));
  background-size: cover;
  background-position: center;
}
/* Layer 1 — TRANSLUCENT dark shade over the image, under the text.
   NEVER opaque (rgba alphas <= 0.75). */
.card-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.55) 100%
  );
}
/* Layer 2 — the card text/content, above video + shade. */
.card-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-content p {
  flex: 1;
}

/* How it works ------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}
.step-item {
  text-align: center;
  padding: 1rem;
}
.step-item .num {
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 700;
  width: 76px;
  height: 76px;
  margin: 0 auto 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08080c;
}
.step-item h4 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.step-item p {
  color: var(--muted);
  font-weight: 300;
  margin: 0;
}

/* Pricing ------------------------------------------------------------------ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}
.price-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.price-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-2);
}
.price-card.recommended {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 24px 70px rgba(177, 75, 255, 0.25);
  background: linear-gradient(180deg, rgba(177, 75, 255, 0.10), var(--panel));
}
.badge {
  position: absolute;
  top: -0.85rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08080c;
  white-space: nowrap;
}
.price-card .tier-name {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.price-card .tier-tag {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 300;
  min-height: 2.4em;
  margin-bottom: 1rem;
}
.price-card .price {
  font-family: var(--serif);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
}
.price-card .price .per {
  font-family: var(--body);
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 300;
}
.price-card .credits {
  margin: 0.75rem 0 1.25rem;
  font-weight: 600;
  color: var(--accent-2);
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
  flex: 1;
}
.price-card li {
  font-size: 0.92rem;
  font-weight: 300;
  color: var(--fg);
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
}
.price-card li::before {
  content: "✦";
  position: absolute;
  left: 0;
  color: var(--accent);
}
.price-card .btn {
  width: 100%;
}

/* PAYG packs */
.payg {
  margin-top: 3.5rem;
  text-align: center;
}
.payg h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.payg .payg-sub {
  color: var(--muted);
  font-weight: 300;
  margin: 0 0 2rem;
}
.packs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  max-width: 760px;
  margin: 0 auto;
}
.pack {
  background: var(--bg-2);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 1.5rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.pack:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.pack .pack-credits {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.pack .pack-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 300;
  margin: 0.2rem 0 0.75rem;
}
.pack .pack-price {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Footer ------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--panel-border);
  padding: 4rem 0 2.5rem;
  background: var(--bg-2);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-brand {
  max-width: 320px;
}
.footer-brand .logo {
  font-size: 2rem;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.footer-brand p {
  color: var(--muted);
  font-weight: 300;
  line-height: 1.6;
  margin: 0;
}
.footer-col h5 {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
}
.footer-col a {
  display: block;
  color: var(--fg);
  font-weight: 300;
  padding: 0.3rem 0;
  opacity: 0.85;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.footer-col a:hover {
  opacity: 1;
  color: var(--accent-2);
}
.footer-bottom {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 300;
  padding-top: 2rem;
  border-top: 1px solid var(--panel-border);
}

/* Responsive --------------------------------------------------------------- */
@media (max-width: 960px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .cards,
  .steps,
  .packs {
    grid-template-columns: 1fr;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  /* Keep the navbar on one line: drop the secondary links, tighten the wrap
     padding and the logo's wide tracking so the logo + primary CTA always fit. */
  .nav-actions .btn:not(.primary) {
    display: none;
  }
  .site-header .wrap {
    padding: 0 1rem;
    gap: 0.6rem;
  }
  .nav-actions {
    gap: 0.5rem;
  }
  .logo {
    font-size: 1.35rem;
    letter-spacing: 0.2em;
  }
}

@media (max-width: 380px) {
  /* Very narrow phones: shrink the logo tracking further so it never overflows. */
  .logo {
    font-size: 1.15rem;
    letter-spacing: 0.12em;
  }
  .btn.small {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
  }
}

/* Landing showcase — curated public demo videos in phone-style frames. Compact
   by design: a bounded-height row, not full-height stacked clips. ----------- */
.showcase-grid {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  max-width: 860px;
  margin: 0 auto;
}
.demo-frame {
  position: relative;
  margin: 0;
  flex: 0 0 auto;
  height: 340px;              /* desktop cap ~340px */
  aspect-ratio: 9 / 16;       /* width follows from the height */
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  /* Gradient fallback under the video/poster — never a black frame. */
  background: linear-gradient(160deg, rgba(177, 75, 255, 0.18), rgba(0, 0, 0, 0.6));
}
.demo-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
.demo-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0.9rem 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
}
/* Tap-to-play button, shown only when autoplay is blocked / reduced-motion. */
.demo-play-btn {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: auto;
  width: 56px;
  height: 56px;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.3rem;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.demo-play-btn:hover {
  background: rgba(177, 75, 255, 0.75);
}
/* Mobile: a single horizontally-scrollable row, each frame ≤ 40vh (~220px), so
   the whole showcase fits within roughly one viewport — no endless scroll. */
@media (max-width: 760px) {
  .showcase-grid {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0.25rem 1rem 0.75rem;
    gap: 0.9rem;
    max-width: 100%;
  }
  .demo-frame {
    height: 40vh;
    max-height: 220px;
    scroll-snap-align: center;
  }
}

/* Short-film demo slot (a single larger 9:16 player, only when seeded). ------ */
.film-frame {
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  background: linear-gradient(160deg, rgba(177, 75, 255, 0.18), rgba(0, 0, 0, 0.6));
}
.film-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Centred CTA row (bottom of landing / pricing header). */
.cta-center {
  justify-content: center;
}
.cta-block {
  text-align: center;
}
