/* ============================================================
   SANDBOX.AI — design system
   Stripe Blurple. White canvas, navy ink, indigo accent.
   ============================================================ */

/* ---------- TOKENS ---------- */
:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F6F9FC;
  --ink: #0A2540;
  --ink-2: #425466;
  --ink-3: #5A6D84;
  --border: #E3E8EE;
  --border-2: #CBD2D9;

  --accent: #635BFF;
  --accent-light: #8B85FF;
  --accent-dark: #4B44CC;
  --accent-soft: #EFEEFF;
  --accent-soft-border: #DAD6FF;
  --accent-ink: #FFFFFF;

  --dark: #0A2540;
  --dark-2: #12335C;
  --dark-border: #1E3A5F;
  --dark-ink: #FFFFFF;
  --dark-ink-2: #A3ACC2;

  --ok: #1F9D55;
  --warn: #B45309;

  --font-display: 'Manrope', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --shadow-sm: 0 1px 2px rgba(10, 37, 64, .06), 0 1px 6px rgba(10, 37, 64, .05);
  --shadow-md: 0 2px 6px rgba(10, 37, 64, .06), 0 12px 28px rgba(10, 37, 64, .08);
  --shadow-lg: 0 6px 12px rgba(10, 37, 64, .06), 0 28px 60px rgba(10, 37, 64, .14);

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  --container: 1180px;
  --header-h: 68px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -.015em; }

/* fixed grain overlay — breaks the flat-vector "AI template" look */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 998; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .025;
  mix-blend-mode: multiply;
}
::selection { background: var(--accent); color: #fff; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- HEADER (permanent dark glass, same on every page) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 37, 64, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: -.02em; color: #fff; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; flex: none; display: block; }
.logo .dot { color: var(--accent-light); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 13px; border-radius: var(--r-sm);
  font-size: 14.5px; font-weight: 500; color: rgba(255, 255, 255, .78);
  transition: color .15s, background .15s;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.nav-link.active { color: #fff; }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* language switcher */
.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px; height: 36px; box-sizing: border-box;
  padding: 0 10px; border: 1px solid rgba(255, 255, 255, .24); border-radius: var(--r-sm);
  background: rgba(255, 255, 255, .08); font-size: 13px; font-weight: 600; color: #fff;
  transition: border-color .15s, background .15s;
}
.lang-btn:hover { border-color: rgba(255, 255, 255, .46); background: rgba(255, 255, 255, .14); }
.lang-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 120;
  min-width: 150px; padding: 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  display: none;
}
.lang-switch.open .lang-menu { display: block; }
.lang-option {
  display: flex; width: 100%; gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500; color: var(--ink-2);
}
.lang-option:hover { background: var(--surface-2); color: var(--ink); }

/* header plan-picker "cart" dropdown */
.plan-switch { position: relative; }
.plan-switch > .btn { display: inline-flex; align-items: center; gap: 7px; }
.plan-switch .caret { font-size: 10px; opacity: .85; transition: transform .15s; }
.plan-switch.open .caret { transform: rotate(180deg); }
.plan-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 130;
  width: 270px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  display: none;
}
.plan-switch.open .plan-menu { display: block; }
.plan-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 600; color: var(--ink);
  transition: background .15s;
}
.plan-menu-item:hover { background: var(--surface-2); }
.plan-menu-item.popular { background: var(--accent-soft); }
.plan-menu-item.popular:hover { background: var(--accent-soft-border); }
.plan-menu-name em {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  background: var(--accent); color: #fff; font-style: normal; font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; vertical-align: 2px;
}
.plan-menu-price { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); flex: none; }
.plan-menu-price small { font-size: 10px; color: var(--ink-3); }
.plan-menu-all {
  display: block; margin-top: 4px; padding: 10px 12px; text-align: center;
  font-size: 12.5px; font-weight: 700; color: var(--accent-dark); border-top: 1px solid var(--border);
}
.plan-menu-all:hover { color: var(--accent); }
.lang-option.current { color: var(--ink); font-weight: 700; }
.lang-option .code { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); margin-left: auto; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--accent-light), var(--accent) 65%);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -1px 0 rgba(0, 0, 0, .08),
    0 1px 2px rgba(75, 68, 204, .22), 0 10px 22px rgba(99, 91, 255, .28);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--accent), var(--accent-dark) 65%); box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 12px 26px rgba(99, 91, 255, .34); }
.btn-dark { background: linear-gradient(180deg, #1E3A5F, var(--ink) 65%); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.btn-dark:hover { background: linear-gradient(180deg, #244B7A, #06192E 65%); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border-2); }
.btn-ghost:hover { border-color: var(--ink-3); }
.btn-lg { padding: 15px 28px; font-size: 16.5px; border-radius: var(--r-md); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13.5px; box-sizing: border-box; }
.btn-block { width: 100%; }

/* ---------- BADGES / LABELS ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border);
  color: var(--accent-dark);
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
}
.eyebrow .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: pulse 2.4s ease infinite;
}
@keyframes pulse { 0%,100% { opacity: .9; } 50% { opacity: .4; } }
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 11.5px; font-weight: 600; color: var(--ink-2);
  font-family: var(--font-mono); letter-spacing: .01em;
}
.badge.accent { background: var(--accent-soft); border-color: var(--accent-soft-border); color: var(--accent-dark); }

/* ---------- SECTIONS ---------- */
.section { padding: 96px 0; }
.section-sm { padding: 64px 0; }
.section-dark { background: var(--dark); color: var(--dark-ink); }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-alt { background: var(--surface-2); }

/* seam: a quiet glow line marking a dark/light boundary — no hazy fades */
.seam { position: relative; }
.seam::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(640px, 74%); height: 2px; z-index: 3; pointer-events: none; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  box-shadow: 0 0 16px 1px rgba(139, 133, 255, .7);
}
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); margin: 14px 0 16px; }
.section-sub { font-size: 17.5px; color: var(--ink-2); line-height: 1.65; }
.section-dark .section-sub { color: var(--dark-ink-2); }
.accent { color: var(--accent); }

/* ---------- HERO (space) ---------- */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero-space {
  background: var(--dark) url("../video/starplanet_poster.jpg") center/cover;
  margin-top: calc(-1 * var(--header-h));
  padding-top: calc(72px + var(--header-h));
}
.hero-bg-video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .85;
}
.hero-space::after {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(700px 500px at 78% 15%, rgba(99, 91, 255, .2), transparent 65%),
    linear-gradient(180deg, rgba(10, 37, 64, .15) 0%, rgba(10, 37, 64, .55) 100%);
}
.hero-space .hero-grid { position: relative; z-index: 2; }
.hero-space h1 { color: #fff; }
@media (prefers-reduced-motion: reduce) { .hero-bg-video { display: none; } }

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px; align-items: center;
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.7rem);
  font-weight: 500; letter-spacing: -.01em;
  margin: 22px 0 20px;
}
.hero-sub { font-size: 18.5px; color: var(--dark-ink-2); line-height: 1.65; max-width: 520px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-cta .btn-ghost, .section-dark .btn-ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .22); }
.hero-cta .btn-ghost:hover, .section-dark .btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .34); }
.hero-note { margin-top: 14px; font-size: 13.5px; color: var(--dark-ink-2); }
.hero-note strong { color: #6FD99A; font-weight: 600; }
.trust-strip { margin-top: 40px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .14); }
.trust-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--dark-ink-2); margin-bottom: 14px; }
.model-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.model-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .16);
  font-size: 13px; font-weight: 600; color: var(--dark-ink-2);
  transition: border-color .15s, color .15s, background .15s;
}
a.model-chip:hover { border-color: var(--accent-light); color: #fff; background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.model-chip .m-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }

/* ---------- SANDBOX DEMO WIDGET (Windows 11 window chrome) ---------- */
.demo-wrap { position: relative; padding: 18px 30px 84px 6px; }
.demo-wrap::before {
  content: "";
  position: absolute; z-index: -1; inset: -12% -8%;
  background: radial-gradient(closest-side, rgba(99, 91, 255, .2), transparent 72%);
  filter: blur(6px);
}
.demo-widget {
  background: var(--dark); border-radius: 10px;
  border: 1px solid var(--dark-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 28px 60px rgba(0, 0, 0, .45);
  overflow: hidden;
  transform: rotate(.2deg);
}
.hero-space .demo-widget { border-color: rgba(255, 255, 255, .18); }
.section-nebula-static {
  position: relative;
  background: var(--dark) url("../video/starplanet_poster.jpg") center 30%/cover;
}
.section-nebula-static::before {
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(10, 37, 64, .82) 0%, rgba(10, 37, 64, .92) 100%);
}
.section-nebula-static.seam::after {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(640px, 74%); height: 2px; z-index: 2; pointer-events: none; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
  box-shadow: 0 0 16px 1px rgba(139, 133, 255, .7);
}
.section-nebula-static .container { position: relative; z-index: 1; }
.float-badge {
  position: absolute; left: -6px; bottom: 6px; z-index: 2;
  display: flex; align-items: center; gap: 11px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px;
  padding: 12px 16px; box-shadow: var(--shadow-lg);
  transform: rotate(-2.5deg);
  max-width: 250px;
  animation: float-badge-in .6s ease .3s both;
}
.float-badge-icon {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--ok); color: #fff; font-family: var(--font-body); font-weight: 700; font-size: 18px; line-height: 1;
  display: grid; place-items: center;
}
.float-badge strong { display: block; font-family: var(--font-display); font-size: 14.5px; letter-spacing: -.01em; color: var(--ink); }
.float-badge > div span { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.3; margin-top: 1px; }
@keyframes float-badge-in {
  from { opacity: 0; transform: rotate(-2.5deg) translateY(10px) scale(.94); }
  to { opacity: 1; transform: rotate(-2.5deg) translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) { .float-badge, .hero-astronaut, .hero-star { animation: none; } }
.demo-topbar {
  display: flex; align-items: stretch; justify-content: space-between;
  height: 40px;
  border-bottom: 1px solid var(--dark-border);
  background: var(--dark-2);
}
.demo-titlebar-left { display: flex; align-items: center; gap: 9px; padding: 0 0 0 12px; min-width: 0; }
.demo-app-icon { width: 18px; height: 18px; border-radius: 5px; flex: none; display: block; }
.demo-title {
  font-family: 'Segoe UI Variable', 'Segoe UI', var(--font-body);
  font-weight: 500; font-size: 12.5px; color: var(--dark-ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.demo-title .dim { color: var(--dark-border); }
.demo-title .live { color: #6FD99A; }
.win-controls { display: flex; align-items: stretch; flex: none; }
.win-btn {
  width: 42px; display: grid; place-items: center;
  color: var(--dark-ink-2); transition: background .12s, color .12s;
}
.win-btn svg { width: 10px; height: 10px; stroke: currentColor; stroke-width: 1.1; fill: none; }
.win-btn.win-max svg { fill: none; stroke-width: 1; }
.win-btn:hover { background: rgba(255, 255, 255, .07); color: var(--dark-ink); }
.win-btn.win-close:hover { background: #E81123; color: #fff; }
.win-controls .win-btn:last-child { border-top-right-radius: 9px; }
.demo-prompt {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--dark-border);
}
.demo-prompt .prompt-icon {
  width: 26px; height: 26px; border-radius: 7px; flex: none; overflow: hidden;
}
.demo-prompt .prompt-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.demo-prompt .prompt-text { font-size: 13.5px; color: var(--dark-ink); }
.demo-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.demo-col { padding: 12px; border-left: 1px solid var(--dark-border); min-height: 190px; }
.demo-col:first-child { border-left: none; }
.demo-col-head { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.demo-col-head .m-dot { width: 7px; height: 7px; border-radius: 50%; }
.demo-col-head span { font-family: var(--font-body); font-size: 11.5px; font-weight: 600; color: var(--dark-ink-2); letter-spacing: 0; }
.demo-answer { font-size: 12px; line-height: 1.6; color: #C7D2E3; font-family: var(--font-body); white-space: pre-wrap; word-break: break-word; }
.demo-answer .cursor { display: inline-block; width: 5px; height: 12px; background: var(--accent); vertical-align: -1px; border-radius: 1px; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.demo-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; border-top: 1px solid var(--dark-border); background: var(--dark-2);
  font-family: var(--font-body); font-weight: 500; font-size: 12px; color: var(--dark-ink-2);
}
.demo-footer .one-bill { color: #A99DFF; font-weight: 600; }

/* model dot colors */
.m-gpt { background: #10A37F; }
.m-claude { background: #D97757; }
.m-gemini { background: #4285F4; }
.m-llama { background: #7C3AED; }
.m-midjourney { background: #FFD700; }
.m-grok { background: #E1E1E1; }
.m-deepseek { background: #5768FE; }
.m-mistral { background: #FF7000; }
.m-runway { background: #E23F08; }

/* ---------- SAVE MATH (subscription comparison) ---------- */
.math-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: stretch; }
.math-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 32px; box-shadow: var(--shadow-sm);
}
.math-card.us { border: 2px solid var(--accent); box-shadow: var(--shadow-md); position: relative; }
.math-card.us .ribbon {
  position: absolute; top: -13px; left: 32px;
  background: var(--accent); color: #fff;
  padding: 4px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.math-card h3 { font-size: 19px; margin-bottom: 20px; }
.math-list li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px dashed var(--border);
  font-size: 15px; color: var(--ink-2);
}
.math-list li:last-child { border-bottom: none; }
.math-list .price { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--ink); }
.math-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 18px; padding-top: 18px; border-top: 2px solid var(--ink);
}
.math-total .t-label { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.math-total .t-value { font-family: var(--font-display); font-size: 34px; font-weight: 700; letter-spacing: -.02em; }
.math-card.us .math-total { border-top-color: var(--accent); }
.math-card.us .t-value { color: var(--accent); }
.math-save {
  margin-top: 16px; padding: 12px 16px; border-radius: var(--r-md);
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border);
  font-size: 14px; font-weight: 600; color: var(--accent-dark); text-align: center;
}

/* ---------- FEATURE ROWS ---------- */
.feature-row {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center;
  padding: 48px 0;
}
.feature-row + .feature-row { border-top: 1px solid var(--border); }
.feature-row.rev .feature-visual { order: -1; }
.feature-kicker { font-family: var(--font-mono); font-size: 12.5px; font-weight: 600; color: var(--accent); letter-spacing: .06em; text-transform: uppercase; }
.feature-row h3 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin: 10px 0 12px; }
.feature-row p { color: var(--ink-2); font-size: 16px; }
.feature-list { margin-top: 18px; display: grid; gap: 10px; }
.feature-list li { display: flex; gap: 10px; font-size: 15px; color: var(--ink-2); }
.feature-list .check { color: var(--ok); font-weight: 700; flex: none; }
.feature-visual {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: 24px; min-height: 240px;
  display: grid; place-items: center;
}
.visual-mock { width: 100%; }
.vm-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--bg); margin-bottom: 8px; font-size: 13.5px; font-weight: 500;
}
.vm-row .m-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.vm-row .tag { margin-left: auto; }
.vm-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.vm-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }

/* ---------- STEPS ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: step; }
.step-card { position: relative; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.step-num {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--ink); color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 17px; font-weight: 700;
  margin-bottom: 18px;
}
.step-card h3 { font-size: 17.5px; margin-bottom: 8px; }
.step-card p { font-size: 14.5px; color: var(--ink-2); }

/* ---------- PRICING ---------- */
.billing-toggle {
  display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px;
}
.billing-switch, .currency-switch {
  display: inline-flex; padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.billing-switch button, .currency-switch button {
  padding: 9px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  transition: background .15s, color .15s;
}
.currency-switch button { padding: 9px 18px; }
.billing-switch button.active, .currency-switch button.active { background: var(--ink); color: #fff; }
.billing-switch .save-tag { font-size: 11px; font-weight: 700; color: var(--ok); margin-left: 6px; }
.billing-switch button.active .save-tag { color: #7CE3A2; }
.billing-switch button.active .save-tag { color: #7CE3A2; }

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.plan-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 30px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.plan-card.popular {
  border: 2px solid var(--accent);
  background: linear-gradient(165deg, var(--accent-soft) 0%, var(--surface) 42%);
}
.plan-card { cursor: pointer; }
.plan-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 20px 40px rgba(99, 91, 255, .18);
  transform: scale(1.03);
}
.plan-card.selected:hover { transform: scale(1.03) translateY(-3px); }
.plan-card.popular:not(.selected) {
  box-shadow: 0 2px 6px rgba(10, 37, 64, .05);
}
.plan-flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 4px 16px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.plan-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.plan-desc { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.plan-price { margin: 22px 0 4px; display: flex; align-items: baseline; gap: 4px; }
.plan-price .amount { font-family: var(--font-display); font-size: 44px; font-weight: 700; letter-spacing: -.03em; }
.plan-price .period { font-size: 14px; color: var(--ink-3); }
.plan-bill-note { font-size: 12.5px; color: var(--ink-3); min-height: 18px; margin-bottom: 20px; }
.plan-features { display: grid; gap: 10px; margin: 8px 0 26px; }
.plan-features li { display: flex; gap: 9px; font-size: 14px; color: var(--ink-2); }
.plan-features .check { color: var(--ok); font-weight: 700; flex: none; }
.plan-features .dash { color: var(--ink-3); flex: none; }
.plan-card .btn { margin-top: auto; }
.plan-custom {
  background: var(--dark); color: var(--dark-ink);
  border: 1px solid var(--dark-border);
}
.plan-custom h3, .plan-custom .plan-name { color: #fff; }
.plan-custom .plan-desc, .plan-custom .plan-features li { color: var(--dark-ink-2); }
.plan-custom .plan-features .check { color: var(--accent); }
.custom-band {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap;
  background: var(--dark-2); border: 1px solid var(--dark-border); border-radius: var(--r-lg);
  padding: 34px 38px; margin-top: 8px;
}
.custom-band h3 { color: #fff; font-size: 21px; margin-bottom: 6px; }
.custom-band p { color: var(--dark-ink-2); font-size: 15px; max-width: 640px; }
.custom-band .btn-primary { flex: none; }

/* ---------- COMPARE TABLE ---------- */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
table.cmp { width: 100%; border-collapse: collapse; min-width: 760px; }
@media (max-width: 767px) {
  .table-wrap::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 28px;
    background: linear-gradient(90deg, transparent, rgba(10, 37, 64, .08));
    pointer-events: none; border-radius: 0 var(--r-lg) var(--r-lg) 0;
  }
}
.table-scroll-hint {
  display: none;
}
@media (max-width: 767px) {
  .table-scroll-hint {
    display: block; text-align: right; font-size: 11px; color: var(--ink-3);
    font-weight: 600; margin: 0 0 6px;
  }
}
.cmp th, .cmp td { padding: 13px 18px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.cmp thead th {
  font-family: var(--font-display); font-size: 13.5px; font-weight: 700;
  background: var(--surface-2); position: sticky; top: 0;
}
.cmp thead th:not(:first-child), .cmp td:not(:first-child) { text-align: center; }
.cmp tbody th { font-weight: 500; color: var(--ink-2); }
.cmp tr:last-child td, .cmp tr:last-child th { border-bottom: none; }
.cmp .yes { color: var(--ok); font-weight: 700; }
.cmp .no { color: var(--ink-3); }
.cmp .hl { background: var(--accent-soft); }

/* ---------- AGENT / MODEL CARDS ---------- */
.agents-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.agent-card {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.agent-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-2); }
.agent-head { display: flex; align-items: center; gap: 10px; }
.agent-avatar {
  width: 38px; height: 38px; border-radius: 10px; flex: none; overflow: hidden;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px;
  font-family: var(--font-display);
}
.agent-avatar svg { width: 20px; height: 20px; }
.agent-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agent-card h3 { font-size: 16px; }
.agent-card .maker { font-size: 12px; color: var(--ink-3); }
.agent-card p { font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.agent-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-chip {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: all .15s;
}
.filter-chip:hover { border-color: var(--border-2); }
.filter-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: grid; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.faq-question {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  width: 100%; padding: 18px 22px; text-align: left;
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
}
.faq-icon { color: var(--accent); font-size: 20px; font-weight: 400; transition: transform .2s; flex: none; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-answer-inner { overflow: hidden; padding: 0 22px; font-size: 15px; color: var(--ink-2); }
.faq-item.open .faq-answer-inner { padding-bottom: 20px; }

/* ---------- TESTIMONIALS ---------- */
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding: 6px 0; }
.quote-card {
  background: var(--dark-2); border: 1px solid var(--dark-border); border-radius: var(--r-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 18px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.quote-card:nth-child(1) { transform: rotate(-.8deg); }
.quote-card:nth-child(2) { transform: rotate(.5deg) translateY(-6px); }
.quote-card:nth-child(3) { transform: rotate(-.4deg); }
.quote-card:hover { transform: rotate(0) translateY(-4px); box-shadow: 0 16px 34px rgba(0, 0, 0, .28); }
.quote-card p { font-size: 15px; line-height: 1.65; color: var(--dark-ink); }
.quote-card .stars { color: var(--accent-light); letter-spacing: 2px; font-size: 14px; }
.quote-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.quote-avatar {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: var(--dark-border); color: var(--dark-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
}
.quote-author .q-name { font-size: 14px; font-weight: 600; color: #fff; }
.quote-author .q-role { font-size: 12.5px; color: var(--dark-ink-2); }

/* ---------- CTA BAND ---------- */
.cta-band { text-align: center; }
.cta-band h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); margin-bottom: 14px; }
.cta-band p { color: var(--dark-ink-2); font-size: 17px; max-width: 560px; margin: 0 auto 30px; }
.cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cta-note { margin-top: 16px; font-size: 13px; color: var(--dark-ink-2); }

.cta-band-space {
  position: relative; overflow: hidden;
  background: var(--dark) url("../video/starplanet_poster.jpg") center/cover;
}
.cta-band-space .container { position: relative; z-index: 2; }
.cta-bg-video {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .55;
}
.cta-band-space::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(10, 37, 64, .55) 0%, rgba(10, 37, 64, .82) 70%, var(--dark) 100%);
}
@media (prefers-reduced-motion: reduce) { .cta-bg-video { display: none; } }

/* ---------- FORMS ---------- */
.form-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-md); padding: 36px; max-width: 640px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13.5px; font-weight: 600; }
.form-field input, .form-field textarea, .form-field select {
  padding: 12px 14px; border: 1px solid var(--border-2); border-radius: var(--r-sm);
  background: var(--bg); font-size: 15px; transition: border-color .15s, box-shadow .15s;
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 91, 255, .16);
}
.form-success {
  display: none; padding: 16px 20px; border-radius: var(--r-md);
  background: #E9F7EE; border: 1px solid #BDE8CD; color: var(--ok);
  font-weight: 600; font-size: 15px; margin-top: 16px;
}
.form-success.show { display: block; }

/* ---------- ARTICLE TYPOGRAPHY ---------- */
.article-layout { max-width: 760px; margin: 0 auto; padding: 56px 24px 96px; }
.article-body { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.article-body h2 { font-size: 1.55rem; margin: 44px 0 14px; color: var(--ink); }
.article-body h3 { font-size: 1.2rem; margin: 30px 0 10px; color: var(--ink); }
.article-body p { margin-bottom: 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px; display: grid; gap: 8px; }
.article-body ul { list-style: none; }
.article-body ul li { position: relative; padding-left: 22px; }
.article-body ul li::before { content: "—"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.article-body ol { list-style: decimal; padding-left: 22px; }
.article-body ol li { padding-left: 4px; }
.article-body strong { color: var(--ink); }
.article-body code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); padding: 2px 6px; border-radius: 6px; }
.article-body a { color: var(--accent-dark); font-weight: 600; text-decoration: underline; text-decoration-color: #C7C2FF; text-underline-offset: 3px; }
.article-body a.btn { text-decoration: none; color: #fff; }
.article-body a:hover { text-decoration-color: var(--accent); }
.article-body .table-wrap { margin: 24px 0; }
.article-body table { min-width: auto; }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; color: var(--ink-3); margin: 14px 0 30px; }
.article-hero-img {
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface);
  padding: 28px; margin: 26px 0 8px; box-shadow: var(--shadow-sm);
}
.callout {
  padding: 20px 24px; border-radius: var(--r-md);
  background: var(--accent-soft); border: 1px solid var(--accent-soft-border);
  font-size: 15px; color: #3B3599; margin: 24px 0;
}
.callout strong { color: var(--accent-dark); }
.cta-inline {
  margin: 40px 0; padding: 26px 30px; border-radius: var(--r-lg);
  background: var(--dark); color: var(--dark-ink);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cta-inline h4 { color: #fff; font-size: 17px; }
.cta-inline p { font-size: 13.5px; color: var(--dark-ink-2); margin: 4px 0 0; }
.breadcrumbs { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-3); padding: 20px 0 0; }
.breadcrumbs a:hover { color: var(--ink); }
.breadcrumbs .sep { color: var(--border-2); }
.breadcrumbs .current { color: var(--ink-2); }

/* ---------- PAGE HERO (interior pages) ---------- */
.page-hero { position: relative; padding: 56px 0 48px; text-align: center; overflow: hidden; }
.page-hero::before {
  content: "";
  position: absolute; z-index: -1; inset: -30% -10% auto -10%; height: 480px;
  background:
    radial-gradient(520px 320px at 20% 0%, rgba(99, 91, 255, .12), transparent 70%),
    radial-gradient(520px 320px at 80% 0%, rgba(139, 133, 255, .13), transparent 70%);
  filter: blur(10px);
}
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 16px 0 14px; }
.page-hero h1 .accent {
  text-decoration: underline; text-decoration-style: wavy;
  text-decoration-color: var(--accent); text-decoration-thickness: 2.5px;
  text-underline-offset: 8px;
}
.page-hero .section-sub { margin: 0 auto; max-width: 640px; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--dark); color: var(--dark-ink-2); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid var(--dark-border); }
.footer-brand .logo { color: #fff; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; max-width: 300px; line-height: 1.6; }
.footer-col h4 { font-size: 12.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-col a { display: block; padding: 5px 0; font-size: 14px; color: var(--dark-ink-2); transition: color .15s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 26px; font-size: 13px; }
.footer-bottom .legal { display: flex; gap: 20px; }
.footer-bottom a:hover { color: #fff; }
.footer-gdpr { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--dark-border); border-radius: 999px; font-size: 12px; }

/* ---------- MOBILE MENU ---------- */
.mobile-menu-btn { display: none; flex-direction: column; gap: 5px; padding: 10px; }
.mobile-menu-btn span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: .2s; }
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav {
  display: none; position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: var(--bg); padding: 28px 24px;
  flex-direction: column; gap: 6px; overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a { padding: 14px 6px; font-size: 19px; font-weight: 600; font-family: var(--font-display); border-bottom: 1px solid var(--border); }

/* ---------- REVEAL ---------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1); }
[data-reveal].visible { opacity: 1; transform: none; }
/* staggered entrance for card groups */
.steps [data-reveal]:nth-child(2), .plans [data-reveal]:nth-child(2), .quotes [data-reveal]:nth-child(2), .math-grid [data-reveal]:nth-child(2) { transition-delay: .08s; }
.steps [data-reveal]:nth-child(3), .plans [data-reveal]:nth-child(3), .quotes [data-reveal]:nth-child(3), .math-grid [data-reveal]:nth-child(3) { transition-delay: .16s; }
.plans [data-reveal]:nth-child(4) { transition-delay: .24s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .demo-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-col { border-left: 1px solid var(--dark-border); border-top: 1px solid var(--dark-border); min-width: 0; }
  .demo-col:nth-child(odd) { border-left: none; }
  .agents-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: minmax(0, 1fr); max-width: 460px; margin: 0 auto; }
  .quotes { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
  .steps { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .math-grid { grid-template-columns: minmax(0, 1fr); }
  .feature-row { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .feature-row.rev .feature-visual { order: 0; }
  .lang-switch.desktop-only { display: none; }
  .plan-switch .caret { display: none; }
  .plan-switch > .btn { gap: 0; }
  .plan-switch .btn-sm { padding: 0 12px; }
}
@media (max-width: 560px) {
  .demo-columns { grid-template-columns: minmax(0, 1fr); }
  .demo-col { border-left: none; }
  .agents-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 64px 0; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-cta, .cta-actions { flex-direction: column; align-items: stretch; }
  .hero-cta .btn, .cta-actions .btn { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- COOKIE CONSENT BANNER ---------- */
.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: -140px;
  z-index: 999; margin: 0 auto; max-width: 760px;
  background: var(--dark); color: var(--dark-ink);
  border: 1px solid var(--dark-border); border-radius: var(--r-lg);
  box-shadow: 0 20px 50px rgba(10, 37, 64, .35);
  padding: 18px 22px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  transition: bottom .35s ease;
}
.cookie-banner.show { bottom: 20px; }
.cookie-banner p { flex: 1 1 320px; font-size: 13.5px; line-height: 1.5; margin: 0; color: var(--dark-ink); }
.cookie-banner p a { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
@media (max-width: 560px) {
  .cookie-banner { left: 10px; right: 10px; bottom: -200px; padding: 14px; gap: 12px; }
  .cookie-banner.show { bottom: 10px; }
  .cookie-banner p {
    font-size: 12px; flex-basis: 100%;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1; padding: 8px 10px; font-size: 12.5px; }
}

/* ---------- MAC VISITOR WARNING POPOVER ---------- */
.mac-warning-popover {
  position: absolute; z-index: 998; max-width: 320px;
  background: var(--dark); color: var(--dark-ink);
  border: 1px solid var(--dark-border); border-radius: var(--r-lg);
  box-shadow: 0 20px 50px rgba(10, 37, 64, .35);
  padding: 16px; opacity: 0; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}
.mac-warning-popover.show { opacity: 1; transform: translateY(0); }
.mac-warning-popover p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--dark-ink); }
.mac-warning-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 480px) {
  .mac-warning-popover { max-width: calc(100vw - 24px); }
}
