/* ==========================================================================
   Rendify — global styles
   ========================================================================== */

:root {
  --bg: #0b0f19;
  --bg-2: #0e1424;
  --bg-3: #111827;
  --card: #111827;
  --card-2: #151e32;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.26);
  --text: #f8fafc;
  --muted: #a3b1c9;
  --faint: #6b7a93;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
  --grad: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(139, 92, 246, 0.18));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --font: "Inter", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(59, 130, 246, 0.12), transparent 60%),
    radial-gradient(800px 500px at 90% 4%, rgba(139, 92, 246, 0.1), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

::selection {
  background: rgba(139, 92, 246, 0.4);
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.container-wide {
  width: min(1440px, calc(100% - 40px));
  margin: 0 auto;
}

.mono {
  font-family: var(--mono);
}

.muted {
  color: var(--muted);
}

.faint {
  color: var(--faint);
}

.gradient-text {
  background: linear-gradient(100deg, #60a5fa 10%, #a78bfa 55%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   Buttons, pills, badges
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease,
    border-color 160ms ease, color 160ms ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  background: var(--grad);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 14px 40px rgba(99, 102, 241, 0.4);
}

.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(17, 24, 39, 0.5);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.65);
}

.btn-soft {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
}

.btn-soft:hover {
  background: rgba(99, 102, 241, 0.2);
}

.btn-lg {
  min-height: 52px;
  padding: 0 26px;
  font-size: 15px;
  border-radius: 14px;
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: linear-gradient(90deg, #60a5fa, transparent);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(96, 165, 250, 0.26);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #bfdbfe;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-violet {
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(139, 92, 246, 0.14);
  color: #ddd6fe;
}

.badge-green {
  border-color: rgba(52, 211, 153, 0.28);
  background: rgba(52, 211, 153, 0.1);
  color: #a7f3d0;
}

/* ==========================================================================
   Header / footer
   ========================================================================== */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 80;
  border-bottom: 1px solid transparent;
  transition: background 220ms ease, border-color 220ms ease, backdrop-filter 220ms ease;
}

.site-header.scrolled,
.site-header.solid {
  border-bottom-color: var(--line);
  background: rgba(11, 15, 25, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: conic-gradient(from 210deg, #22d3ee, #3b82f6, #8b5cf6, #22d3ee);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 8px 24px rgba(59, 130, 246, 0.35);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 5px;
  background: #0b0f19;
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  z-index: 1;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
}

.nav a {
  padding: 8px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
  background: rgba(148, 163, 184, 0.09);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(17, 24, 39, 0.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.balance-pill strong {
  color: var(--text);
  font-size: 13px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--grad-soft);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.user-menu {
  position: relative;
}

.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 240px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0f172a;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms;
}

.user-menu.open .user-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-head {
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.user-menu-head .email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--muted);
}

.user-menu-panel a,
.user-menu-panel button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--text);
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
}

.site-footer {
  margin-top: 100px;
  border-top: 1px solid var(--line);
  background: rgba(8, 11, 19, 0.6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding: 56px 0 40px;
}

.footer-brand p {
  max-width: 320px;
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 13px;
}

.footer-col h4 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-col a {
  display: block;
  margin: 9px 0;
  color: var(--faint);
  font-size: 13px;
  transition: color 150ms ease;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 12px;
}

.footer-bottom .legal {
  display: flex;
  gap: 18px;
}

/* ==========================================================================
   Hero / landing
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 118px 0 72px;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
}

.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.95;
  filter: saturate(1.18) brightness(1.22);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(760px 480px at 68% 38%, rgba(59, 130, 246, 0.2), transparent 62%),
    radial-gradient(620px 380px at 88% 18%, rgba(139, 92, 246, 0.2), transparent 62%),
    linear-gradient(90deg, rgba(11, 15, 25, 0.94) 0%, rgba(11, 15, 25, 0.68) 38%, rgba(11, 15, 25, 0.16) 72%, rgba(11, 15, 25, 0.52) 100%),
    linear-gradient(180deg, rgba(11, 15, 25, 0.28) 0%, transparent 35%, rgba(11, 15, 25, 0.86) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 180px;
  z-index: -1;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 380px;
  gap: 64px;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
}

.hero h1 {
  margin: 22px 0 0;
  font-size: clamp(44px, 5.4vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.hero h1 .line-2 {
  display: block;
}

.hero-sub {
  max-width: 600px;
  margin: 24px 0 0;
  color: #b6c2d9;
  font-size: 17px;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-trust svg {
  width: 15px;
  height: 15px;
  color: var(--green);
}

.login-card {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 22px;
  background: rgba(13, 19, 33, 0.82);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(22px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 22px;
  padding: 1px;
  background: linear-gradient(150deg, rgba(96, 165, 250, 0.55), rgba(139, 92, 246, 0.12) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-card h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.login-card .sub {
  margin: 6px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.login-card .field {
  margin-bottom: 12px;
}

.login-card .divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.login-card .divider::before,
.login-card .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.login-card .fine {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: center;
}

.login-card .fine a {
  color: #93c5fd;
}

.logged-in-card .balance-large {
  margin: 18px 0 6px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.logged-in-card .email {
  color: var(--muted);
  font-size: 13px;
}

/* field primitives */

.field {
  display: block;
}

.field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.input,
.textarea,
.select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 12, 22, 0.65);
  color: var(--text);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.input,
.select {
  height: 44px;
  padding: 0 13px;
}

.textarea {
  min-height: 120px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.55;
}

.input::placeholder,
.textarea::placeholder {
  color: #586780;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: rgba(96, 165, 250, 0.65);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
  background: rgba(8, 12, 22, 0.9);
}

.form-error {
  display: none;
  margin: 10px 0 0;
  color: #fda4af;
  font-size: 12px;
}

.form-error.show {
  display: block;
}

/* stats / logos strip */

.proof-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 24, 0.55);
}

.proof-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.proof-inner .proof-label {
  color: var(--muted);
  font-weight: 700;
}

.proof-logos {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.proof-logos span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a9b6cc;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
}

.proof-logos svg {
  width: 17px;
  height: 17px;
  opacity: 0.8;
}

/* sections */

.section {
  padding: 104px 0;
}

.section-tight {
  padding: 76px 0;
}

.section-head {
  max-width: 720px;
  margin-bottom: 48px;
}

.section-head h2 {
  margin: 14px 0 0;
  font-size: clamp(32px, 3.4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
}

.section-head p {
  max-width: 620px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-head.center .eyebrow {
  justify-content: center;
}

.section-head.center p {
  margin-left: auto;
  margin-right: auto;
}

/* comparison */

.compare-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.compare-card {
  position: relative;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(21, 30, 50, 0.7), rgba(13, 19, 33, 0.6));
}

.compare-card.featured {
  border-color: rgba(99, 102, 241, 0.5);
  background:
    radial-gradient(500px 220px at 50% -30%, rgba(99, 102, 241, 0.2), transparent 70%),
    linear-gradient(180deg, rgba(24, 33, 56, 0.9), rgba(13, 19, 33, 0.75));
  box-shadow: 0 24px 80px rgba(59, 130, 246, 0.12);
}

.compare-card h3 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.compare-card .who {
  margin: 5px 0 18px;
  color: var(--faint);
  font-size: 12px;
}

.compare-card .price-anchor {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
}

.compare-card .price-anchor strong {
  font-size: 26px;
  letter-spacing: -0.03em;
}

.compare-card .price-anchor span {
  color: var(--faint);
  font-size: 12px;
}

.compare-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.compare-list svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.compare-list .yes svg {
  color: var(--green);
}

.compare-list .no svg {
  color: var(--red);
}

/* model cards */

.model-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.model-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  transition: transform 220ms ease, border-color 220ms ease;
}

.model-card:hover {
  transform: translateY(-3px);
  border-color: rgba(148, 163, 184, 0.32);
}

.model-art {
  position: relative;
  height: 230px;
  overflow: hidden;
  background:
    radial-gradient(500px 240px at 20% 10%, rgba(59, 130, 246, 0.55), transparent 60%),
    radial-gradient(420px 260px at 90% 90%, rgba(139, 92, 246, 0.55), transparent 60%),
    #0a0f1c;
}

.model-card:nth-child(2) .model-art {
  background:
    radial-gradient(500px 240px at 80% 0%, rgba(34, 211, 238, 0.4), transparent 60%),
    radial-gradient(480px 260px at 10% 100%, rgba(59, 130, 246, 0.48), transparent 60%),
    #08101c;
}

.model-art::before,
.model-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.8;
  animation: drift 14s ease-in-out infinite alternate;
}

.model-art::before {
  width: 280px;
  height: 280px;
  left: 8%;
  top: 18%;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.5), rgba(139, 92, 246, 0.12));
}

.model-art::after {
  width: 220px;
  height: 220px;
  right: 10%;
  bottom: -10%;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.35), rgba(59, 130, 246, 0.12));
  animation-delay: -6s;
}

@keyframes drift {
  from {
    transform: translate3d(-2%, -2%, 0) scale(1);
  }
  to {
    transform: translate3d(4%, 3%, 0) scale(1.1);
  }
}

.model-art .film-lines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.022) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
}

.model-art .model-label {
  position: absolute;
  left: 24px;
  bottom: 22px;
  right: 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.model-art .model-label h3 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.model-art .model-label .model-sub {
  margin-top: 4px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 12px;
}

.model-body {
  padding: 22px 24px 24px;
}

.model-body p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.spec {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 12, 22, 0.45);
}

.spec .k {
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spec .v {
  margin-top: 3px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

/* showcase */

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.showcase-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0b1120;
  aspect-ratio: 4 / 3;
}

.showcase-card video,
.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease, opacity 300ms ease;
}

.showcase-card:hover video {
  transform: scale(1.04);
}

.showcase-card .scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 10, 18, 0.05) 20%, rgba(7, 10, 18, 0.9) 100%);
}

.showcase-meta {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
}

.showcase-meta .cat {
  color: #93c5fd;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.showcase-meta h3 {
  margin: 4px 0 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.showcase-meta .prompt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 6px 0 0;
  color: rgba(203, 213, 225, 0.72);
  font-size: 12px;
  line-height: 1.45;
}

.showcase-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.showcase-actions .aspect {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.45);
}

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.12);
  color: #c7d2fe;
  font-size: 13px;
  font-weight: 800;
}

.step h3 {
  margin: 18px 0 8px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

/* pricing */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

.price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(21, 30, 50, 0.7), rgba(13, 19, 33, 0.6));
}

.price-card.popular {
  border-color: rgba(99, 102, 241, 0.55);
  background:
    radial-gradient(500px 240px at 50% -20%, rgba(99, 102, 241, 0.22), transparent 70%),
    linear-gradient(180deg, rgba(24, 33, 56, 0.92), rgba(13, 19, 33, 0.78));
  box-shadow: 0 30px 90px rgba(59, 130, 246, 0.14);
}

.price-card .tag {
  min-height: 22px;
  color: #a5b4fc;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.price-card h3 {
  margin: 8px 0 0;
  font-size: 18px;
}

.price-line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 18px 0 6px;
}

.price-line .amount {
  font-size: 46px;
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}

.price-line .period {
  color: var(--faint);
  font-size: 12px;
  padding-bottom: 6px;
}

.price-card .credits {
  color: var(--muted);
  font-size: 12px;
}

.price-features {
  display: grid;
  gap: 10px;
  margin: 24px 0;
  padding: 0;
  list-style: none;
  flex: 1;
}

.price-features li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.price-features svg {
  width: 15px;
  height: 15px;
  color: var(--green);
  flex: 0 0 auto;
  margin-top: 2px;
}

.price-note {
  margin: 18px 0 0;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

/* faq */

.faq {
  max-width: 860px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  color: var(--text);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .plus {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.faq summary .plus::before,
.faq summary .plus::after {
  content: "";
  position: absolute;
  inset: 8px 0 auto;
  height: 2px;
  border-radius: 2px;
  background: var(--muted);
  transition: transform 180ms ease;
}

.faq summary .plus::after {
  transform: rotate(90deg);
}

.faq details[open] summary .plus::after {
  transform: rotate(0);
}

.faq details p {
  margin: -6px 0 22px;
  padding-right: 40px;
  color: var(--muted);
  font-size: 14px;
}

/* CTA band */

.cta-band {
  position: relative;
  overflow: hidden;
  padding: 56px;
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: 26px;
  background:
    radial-gradient(700px 300px at 15% 0%, rgba(59, 130, 246, 0.28), transparent 65%),
    radial-gradient(600px 320px at 90% 100%, rgba(139, 92, 246, 0.3), transparent 65%),
    #0e1526;
}

.cta-band h2 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.cta-band p {
  max-width: 580px;
  margin: 14px 0 26px;
  color: var(--muted);
}

/* ==========================================================================
   Auth modal + toast
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #0e1526;
  box-shadow: var(--shadow);
  transform: translateY(8px) scale(0.99);
  transition: transform 180ms ease;
}

.modal-backdrop.open .modal {
  transform: translateY(0) scale(1);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.modal-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.08);
}

.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #0f172a;
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 13px;
  animation: toast-in 220ms ease;
}

.toast.error {
  border-color: rgba(251, 113, 133, 0.45);
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.45);
}

.toast .t-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.toast.error .t-icon {
  color: var(--red);
}

.toast.success .t-icon {
  color: var(--green);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Sub-page heroes
   ========================================================================== */

.page-hero {
  padding: 132px 0 46px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 300px at 20% 0%, rgba(59, 130, 246, 0.14), transparent 65%),
    radial-gradient(700px 300px at 90% 20%, rgba(139, 92, 246, 0.12), transparent 65%);
}

.page-hero h1 {
  max-width: 760px;
  margin: 14px 0 0;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.page-hero .hero-cta {
  margin-top: 24px;
}

/* ==========================================================================
   Studio
   ========================================================================== */

.studio-body {
  background: #080c15;
}

.studio-main {
  padding: 96px 0 40px;
}

.studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.studio-topbar h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.studio-topbar .sub {
  margin: 3px 0 0;
  color: var(--faint);
  font-size: 12px;
}

.studio-grid {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0d1320;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.panel-body {
  padding: 18px;
}

.composer {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  max-height: calc(100svh - 104px);
  overflow: hidden;
}

.composer .panel-body {
  min-height: 0;
  overflow-y: auto;
  padding-bottom: 0;
  scrollbar-width: thin;
}

.composer .panel-body::-webkit-scrollbar {
  width: 6px;
}

.composer .panel-body::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.2);
  border-radius: 999px;
}

.composer .generate-box {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0 -18px;
  padding: 14px 18px 16px;
  border-top: 1px solid var(--line);
  background: #0d1320;
}

.prompt-wrap {
  position: relative;
}

.prompt-wrap .textarea {
  min-height: 156px;
  padding-bottom: 34px;
}

.prompt-count {
  position: absolute;
  right: 12px;
  bottom: 10px;
  color: var(--faint);
  font-size: 10.5px;
}

.prompt-tools {
  display: flex;
  gap: 7px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(8, 12, 22, 0.5);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.studio-field {
  margin-top: 18px;
}

.studio-field > label,
.studio-field > .label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.studio-field .hint {
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 500;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 12, 22, 0.55);
}

.segmented button {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  transition: background 140ms ease, color 140ms ease;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button.active {
  background: rgba(99, 102, 241, 0.2);
  color: #e0e7ff;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.25) inset;
}

.segmented button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.model-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.model-option {
  position: relative;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(8, 12, 22, 0.45);
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease;
}

.model-option:hover {
  border-color: var(--line-strong);
}

.model-option.active {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.1);
}

.model-option .m-name {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 750;
}

.model-option .m-meta {
  margin-top: 4px;
  color: var(--faint);
  font-size: 10.5px;
}

.duration-row {
  display: flex;
  gap: 6px;
}

.duration-row button {
  flex: 1;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.45);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.duration-row button.active {
  border-color: rgba(99, 102, 241, 0.55);
  background: rgba(99, 102, 241, 0.14);
  color: #e0e7ff;
}

.duration-row button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 12, 22, 0.45);
}

.toggle-row .t-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.toggle-row .t-sub {
  color: var(--faint);
  font-size: 10.5px;
}

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
  z-index: 2;
}

.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.4);
  transition: background 160ms ease;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: transform 160ms ease;
}

.switch input:checked + .track {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.switch input:checked + .track::after {
  transform: translateX(18px);
}

.dropzones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 86px;
  padding: 10px;
  border: 1px dashed rgba(148, 163, 184, 0.3);
  border-radius: 11px;
  background: rgba(8, 12, 22, 0.35);
  color: var(--faint);
  font-size: 10.5px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: rgba(96, 165, 250, 0.6);
  color: var(--muted);
  background: rgba(59, 130, 246, 0.06);
}

.dropzone input {
  display: none;
}

.dropzone .dz-icon {
  width: 20px;
  height: 20px;
  color: #7c8ca8;
}

.dropzone img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropzone .dz-clear {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 2;
  display: none;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(7, 10, 18, 0.75);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.dropzone.has-image .dz-clear {
  display: block;
}

.dropzone.has-image .dz-label,
.dropzone.has-image .dz-icon {
  display: none;
}

.generate-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.cost-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11.5px;
}

.cost-row strong {
  color: var(--text);
  font-size: 13px;
}

.cost-row .balance {
  color: var(--faint);
  font-size: 10.5px;
}

.generate-btn {
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 12px 34px rgba(59, 130, 246, 0.28);
  transition: opacity 150ms ease, transform 150ms ease;
}

.generate-btn:hover {
  transform: translateY(-1px);
}

.generate-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* preview / queue / library */

.preview-panel {
  min-height: 520px;
}

.preview-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  margin: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(500px 260px at 30% 10%, rgba(59, 130, 246, 0.1), transparent 65%),
    radial-gradient(500px 260px at 80% 100%, rgba(139, 92, 246, 0.1), transparent 65%),
    #070b13;
}

.preview-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 30px;
  color: var(--faint);
  text-align: center;
}

.preview-empty .empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(148, 163, 184, 0.05);
  color: #7c8ca8;
}

.preview-empty h3 {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.preview-empty p {
  max-width: 320px;
  margin: 0;
  font-size: 12px;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 16px;
}

.preview-meta .prompt-line {
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.preview-actions {
  display: flex;
  gap: 7px;
}

.queue-panel {
  position: sticky;
  top: 88px;
  max-height: calc(100svh - 104px);
  overflow: auto;
}

.queue-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.queue-empty {
  padding: 22px 14px;
  color: var(--faint);
  font-size: 11.5px;
  text-align: center;
}

.task-card {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(8, 12, 22, 0.45);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}

.task-card:hover,
.task-card.active {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.08);
}

.task-card .task-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-card .task-model {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.task-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.task-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.task-status.queued {
  color: var(--amber);
}

.task-status.running {
  color: #60a5fa;
}

.task-status.success {
  color: var(--green);
}

.task-status.failed {
  color: var(--red);
}

.task-card .task-prompt {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 5px 0 8px;
  color: var(--faint);
  font-size: 10.5px;
}

.progress {
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  transition: width 400ms ease;
}

.task-card .task-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  color: var(--faint);
  font-size: 9.5px;
}

.library {
  margin-top: 16px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
}

.library-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #070b13;
  aspect-ratio: 1;
  cursor: pointer;
}

.library-item video,
.library-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-item .li-label {
  position: absolute;
  inset: auto 0 0;
  padding: 14px 6px 5px;
  background: linear-gradient(transparent, rgba(7, 10, 18, 0.9));
  color: #cbd5e1;
  font-size: 8.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-gate {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 14, 0.85);
  backdrop-filter: blur(12px);
}

.studio-gate .gate-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #0e1526;
  box-shadow: var(--shadow);
  text-align: center;
}

.studio-gate h2 {
  margin: 0 0 8px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.studio-gate p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

/* ==========================================================================
   API access
   ========================================================================== */

.api-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.key-card {
  padding: 22px;
}

.key-reveal {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.6);
  font-family: var(--mono);
  font-size: 11.5px;
  color: #c7d2fe;
  word-break: break-all;
}

.key-reveal .key-text {
  flex: 1;
}

.code-card {
  overflow: hidden;
}

.code-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 14px 0;
}

.code-tabs button {
  padding: 8px 12px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 650;
}

.code-tabs button.active {
  background: #070b13;
  color: #e2e8f0;
}

.code-block {
  position: relative;
  margin: 0;
  padding: 18px;
  overflow: auto;
  background: #070b13;
  color: #cbd5e1;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  max-height: 520px;
}

.code-block .copy-code {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted);
  font-size: 10px;
  font-family: var(--font);
}

.code-block .tok-key {
  color: #93c5fd;
}

.code-block .tok-str {
  color: #a7f3d0;
}

.code-block .tok-com {
  color: #64748b;
}

.endpoint-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 12, 22, 0.6);
  font-family: var(--mono);
  font-size: 12px;
  color: #bfdbfe;
}

.endpoint-row .copy {
  margin-left: auto;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-family: var(--font);
  font-size: 10.5px;
}

/* ==========================================================================
   Utility / responsive
   ========================================================================== */

.fade-up {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.fade-up.visible {
  opacity: 1;
  transform: none;
}

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  padding: 40px 20px;
  color: var(--faint);
  text-align: center;
  font-size: 13px;
}

@media (max-width: 1180px) {
  .studio-grid {
    grid-template-columns: 360px minmax(0, 1fr);
  }
  .queue-panel {
    position: static;
    max-height: none;
    grid-column: 1 / -1;
  }
  .queue-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .library-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 38px;
  }
  .login-card {
    max-width: 420px;
  }
  .compare-grid,
  .steps,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .compare-card.featured {
    order: -1;
  }
  .model-grid {
    grid-template-columns: 1fr;
  }
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
  .api-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav {
    position: fixed;
    inset: 72px 16px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0e1526;
    box-shadow: var(--shadow);
  }
  .nav.open {
    display: flex;
  }
  .nav a {
    padding: 12px 14px;
  }
  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }
  .header-actions .balance-pill {
    display: none;
  }
  .header-inner {
    gap: 12px;
  }
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .composer {
    position: static;
    max-height: none;
  }
  .queue-list {
    grid-template-columns: 1fr 1fr;
  }
  .library-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .preview-meta {
    flex-direction: column;
    align-items: flex-start;
  }
  .preview-meta .prompt-line {
    max-width: 100%;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .cta-band {
    padding: 34px 26px;
  }
}

@media (max-width: 600px) {
  .container {
    width: calc(100% - 28px);
  }
  .container-wide {
    width: calc(100% - 24px);
  }
  .hero {
    padding-top: 104px;
  }
  .hero h1 {
    font-size: 40px;
  }
  .hero-sub {
    font-size: 15px;
  }
  .hero-cta .btn {
    flex: 1 1 100%;
  }
  .login-card {
    padding: 20px;
  }
  .showcase-grid,
  .queue-list {
    grid-template-columns: 1fr;
  }
  .library-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .section {
    padding: 72px 0;
  }
  .page-hero {
    padding-top: 112px;
  }
  .studio-main {
    padding-top: 86px;
  }
  .studio-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}
