/* Shared styles for the public landing page (index.html) and the
   login/signup page (login.html). Loaded alongside css/style.css so both
   pages share the same color tokens defined there. */

html, body.landing-body, body.auth-body {
  overflow: auto;
  height: auto;
  min-height: 100vh;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

a { text-decoration: none; }
::selection { background: rgba(114,231,255,.28); color: #fff; }

/* Ambient background shared by both pages */
body.landing-body, body.auth-body {
  background:
    radial-gradient(circle at 74% 8%, rgba(114,231,255,.09), transparent 26%),
    radial-gradient(circle at 20% 82%, rgba(156,124,255,.08), transparent 28%),
    linear-gradient(135deg, #03050a, #070a12 55%, #05070d);
  position: relative;
}
body.landing-body::before, body.auth-body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 65%);
}

/* ---------- Landing page ---------- */
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; border-bottom: 1px solid var(--border);
  background: rgba(5,7,13,.72);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  position: sticky; top: 0; z-index: 20;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.landing-nav.scrolled {
  background: rgba(5,7,13,.92); border-bottom-color: var(--border-bright);
}
.landing-nav .brand { display: flex; align-items: center; gap: 10px; }
.landing-nav-links { display: flex; gap: 30px; }
.landing-nav-links a {
  color: var(--text-2); font-size: 12.5px; position: relative; padding: 4px 0;
  transition: color .15s var(--ease);
}
.landing-nav-links a:hover { color: var(--accent-1); }
.landing-nav-right { display: flex; align-items: center; gap: 12px; }

.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px;
  align-items: center; padding: 76px 32px 60px; max-width: 1280px; margin: 0 auto;
  position: relative; z-index: 1;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .16em;
  color: var(--accent-1); text-transform: uppercase; margin-bottom: 20px;
  border: 1px solid var(--border-bright); padding: 7px 14px; border-radius: 999px;
  background: rgba(114,231,255,.05);
}
.eyebrow .live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 9px var(--success); animation: livePulse 1.8s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.hero h1 {
  font-size: clamp(36px, 4.4vw, 60px); line-height: 1.05; margin: 0 0 20px; font-weight: 700; letter-spacing: -.03em;
  color: var(--text-0);
}
.hero h1 .accent {
  color: var(--accent-1);
}
.hero p.lead { color: var(--text-2); font-size: 14.5px; line-height: 1.8; max-width: 480px; margin-bottom: 30px; }
.hero-ctas { display: flex; gap: 12px; margin-bottom: 30px; flex-wrap: wrap; }
.btn.large { padding: 14px 24px; font-size: 13px; border-radius: 12px; }

/* Landing-only button polish — a diagonal sheen that sweeps across on
   hover, plus a slight lift, layered on top of the shared .btn styles from
   style.css without touching them (scoped to this stylesheet, which only
   the marketing/auth pages load). */
.landing-body .btn.primary, .auth-body .btn.primary {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(114,231,255,.16), rgba(156,124,255,.13));
  border-color: var(--border-bright);
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease);
}
.landing-body .btn.primary::before, .auth-body .btn.primary::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.25) 48%, transparent 66%);
  transform: translateX(-120%); transition: transform .55s var(--ease);
}
.landing-body .btn.primary:hover, .auth-body .btn.primary:hover { transform: translateY(-1.5px); box-shadow: var(--shadow-glow); }
.landing-body .btn.primary:hover::before, .auth-body .btn.primary:hover::before { transform: translateX(120%); }
.landing-body .btn.primary:active, .auth-body .btn.primary:active { transform: translateY(0) scale(.97); }
.hero-mini-features { display: flex; gap: 24px; flex-wrap: wrap; }
.mini-feature { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.mini-feature .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-1); box-shadow: 0 0 7px var(--accent-1); }

.hero-copy {
  transform: translateY(var(--ty, 0px));
  transition: transform .08s linear;
}

.hero-visual {
  border: 1px solid var(--border-bright); border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(circle at 62% 50%, rgba(114,231,255,.1), transparent 45%),
    radial-gradient(circle at 75% 35%, rgba(156,124,255,.09), transparent 48%),
    var(--bg-1);
  aspect-ratio: 16/11; position: relative;
  box-shadow: var(--shadow-lg);
  transform-style: preserve-3d; will-change: transform;
  transform: translateY(var(--ty, 0px)) perspective(1400px)
    rotateX(var(--rot-x, 0deg)) rotateY(var(--rot-y, 0deg)) scale(var(--tilt-scale, 1));
  transition: transform .12s var(--ease);
}
.hero-visual::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  box-shadow: inset 0 0 60px rgba(0,0,0,.42);
  border-radius: 22px;
}
.hero-visual canvas {
  width: 100%; height: 100%; display: block;
  opacity: 0; transition: opacity .5s var(--ease);
}
.hero-visual.preview-ready canvas { opacity: 1; }

/* Skeleton shimmer shown until the first real frame renders (see
   landing-preview.js) — avoids a blank canvas flash on load. */
.hero-visual::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg, transparent 30%, rgba(114,231,255,.12) 48%, transparent 66%),
    var(--bg-1);
  background-size: 200% 100%, 100% 100%;
  animation: heroSkeletonShimmer 1.6s ease-in-out infinite;
  opacity: 1; transition: opacity .4s var(--ease) .1s;
}
.hero-visual.preview-ready::after { opacity: 0; }
@keyframes heroSkeletonShimmer {
  0% { background-position: 130% 0, 0 0; }
  100% { background-position: -30% 0, 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual::after { animation: none; }
}

.hero-chip {
  position: absolute; z-index: 3;
  transform: translateY(var(--chip-ty, 0px));
  transition: transform .08s linear;
}
.hero-chip-inner {
  background: rgba(8,12,20,.88);
  border: 1px solid var(--border-bright); border-radius: 11px; padding: 8px 12px;
  font-size: 11px; color: var(--text-1); backdrop-filter: blur(8px);
  display: flex; align-items: center; gap: 6px;
  box-shadow: var(--shadow-sm);
  opacity: 0; animation: chipIn .5s var(--ease) forwards, chipFloat 4.5s ease-in-out infinite;
}
.hero-chip .spark { color: var(--accent-1); }
.hero-chip.c1 { top: 10%; left: 6%; }
.hero-chip.c1 .hero-chip-inner { animation-delay: .5s, 1s; }
.hero-chip.c2 { top: 62%; right: 7%; }
.hero-chip.c2 .hero-chip-inner { animation-delay: 1s, 1.5s; }
.hero-chip.c3 { bottom: 8%; left: 10%; }
.hero-chip.c3 .hero-chip-inner { animation-delay: 1.5s, 2s; }
@keyframes chipIn { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes chipFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.hero-live-badge {
  position: absolute; bottom: 12px; right: 12px; z-index: 3;
  background: rgba(8,12,20,.88); border: 1px solid var(--border-bright); border-radius: 999px;
  padding: 6px 12px; font-size: 10px; color: var(--text-2); display: flex; align-items: center; gap: 6px;
  backdrop-filter: blur(8px);
}
.hero-live-badge .live-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--success); box-shadow: 0 0 7px var(--success); animation: livePulse 1.8s ease-in-out infinite; }

.section { max-width: 1280px; margin: 0 auto; padding: 46px 32px; position: relative; z-index: 1; }
.section-kicker { font-size: 10.5px; color: var(--accent-1); margin-bottom: 12px; letter-spacing: .1em; text-transform: uppercase; }
.section-title { font-size: 30px; font-weight: 700; margin-bottom: 10px; letter-spacing: -.02em; color: var(--text-0); }
.section-title .accent { color: var(--accent-1); }
.section-sub { color: var(--text-3); font-size: 13px; margin-bottom: 32px; max-width: 600px; line-height: 1.7; }

.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature-card {
  background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px;
  position: relative; overflow: hidden;
  transform-style: preserve-3d; will-change: transform;
  transform: perspective(700px) rotateX(var(--rot-x, 0deg)) rotateY(var(--rot-y, 0deg)) scale(var(--tilt-scale, 1));
  transition: transform .15s var(--ease), border-color .18s var(--ease), background .18s var(--ease), box-shadow .18s var(--ease);
}
.feature-card:hover { border-color: var(--border-bright); background: var(--bg-2); box-shadow: var(--shadow-md); }
.fc-icon-badge {
  width: 36px; height: 36px; border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-bottom: 14px; background: rgba(114,231,255,.06); border: 1px solid var(--border-bright); color: var(--accent-1);
}
.feature-card .fc-title { font-weight: 700; font-size: 13.5px; margin-bottom: 5px; letter-spacing: -.01em; color: var(--text-0); }
.feature-card .fc-sub { color: var(--text-3); font-size: 11.5px; line-height: 1.6; }

.usecase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.usecase-card {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg-1);
  padding: 24px 18px; text-align: center;
  transform-style: preserve-3d; will-change: transform;
  transform: perspective(700px) rotateX(var(--rot-x, 0deg)) rotateY(var(--rot-y, 0deg)) scale(var(--tilt-scale, 1));
  transition: transform .15s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.usecase-card:hover { border-color: var(--border-bright); box-shadow: var(--shadow-md); }
.usecase-card .uc-icon {
  width: 42px; height: 42px; margin: 0 auto 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: rgba(114,231,255,.06); border: 1px solid var(--border-bright); color: var(--accent-1);
}
.usecase-card .uc-title { font-weight: 700; font-size: 12.5px; color: var(--text-0); }
.usecase-card .uc-sub { color: var(--text-3); font-size: 11px; margin-top: 4px; line-height: 1.6; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 8px; }
.stat-card {
  text-align: center; padding: 18px 10px; border-radius: var(--radius-lg); border: 1px solid var(--border-soft);
  background: var(--bg-1);
  transform-style: preserve-3d; will-change: transform;
  transform: perspective(700px) rotateX(var(--rot-x, 0deg)) rotateY(var(--rot-y, 0deg)) scale(var(--tilt-scale, 1));
  transition: transform .15s var(--ease), border-color .18s var(--ease);
}
.stat-card:hover { border-color: var(--border-bright); }
.stat-card .stat-num { font-size: 24px; font-weight: 700; color: var(--accent-1); }
.stat-card .stat-label { font-size: 10.5px; color: var(--text-3); margin-top: 4px; }

.cta-band {
  max-width: 1280px; margin: 20px auto 70px; padding: 56px 32px; text-align: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(114,231,255,.08), transparent 45%),
    radial-gradient(circle at 75% 80%, rgba(156,124,255,.08), transparent 45%),
    var(--bg-1);
  border: 1px solid var(--border-bright); border-radius: 24px;
  position: relative; overflow: hidden; z-index: 1;
  box-shadow: var(--shadow-lg);
}
.cta-band h2 { font-size: 26px; margin: 0 0 10px; font-weight: 700; letter-spacing: -.02em; position: relative; color: var(--text-0); }
.cta-band p { color: var(--text-3); margin-bottom: 26px; position: relative; font-size: 13px; }
.cta-band .btn { position: relative; }

.landing-footer {
  border-top: 1px solid var(--border); padding: 26px 32px; display: flex;
  justify-content: space-between; align-items: center; color: var(--text-4); font-size: 11px;
  flex-wrap: wrap; gap: 10px; position: relative; z-index: 1;
}

/* scroll-reveal (js/reveal.js toggles .in-view) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Per-card cascade inside a grid, observed independently of its parent
   .reveal section — opacity only (not transform) because these children
   already own `transform` for the mouse-tilt effect from tilt.js, and a
   second `transform` declaration here would just replace that one rather
   than combine with it. */
.reveal-stagger > * { opacity: 0; transition: opacity .5s var(--ease); }
.reveal-stagger.in-view > * { opacity: 1; }
.reveal-stagger > *:nth-child(1) { transition-delay: .04s; }
.reveal-stagger > *:nth-child(2) { transition-delay: .11s; }
.reveal-stagger > *:nth-child(3) { transition-delay: .18s; }
.reveal-stagger > *:nth-child(4) { transition-delay: .25s; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 40px 20px; gap: 36px; }
  .hero h1 { font-size: 38px; }
  .feature-grid, .usecase-grid, .stats-row { grid-template-columns: repeat(2, 1fr); }
  .landing-nav-links { display: none; }
  .hero-chip { display: none; }
}

/* ---------- Auth page ---------- */
.auth-body {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.auth-brand {
  position: absolute; top: 24px; left: 28px; display: flex; align-items: center; gap: 10px; color: var(--text-0); z-index: 1;
}
.auth-wrap { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 16px; animation: authIn .4s var(--ease); position: relative; z-index: 1; }
@keyframes authIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.auth-card {
  width: 100%; background: var(--bg-1); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: 1px solid var(--border-bright); border-radius: var(--radius-lg); padding: 0;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.auth-tabs { display: flex; border-bottom: 1px solid var(--border); }
.auth-tab {
  flex: 1; background: transparent; border: none; color: var(--text-3); padding: 14px; border-radius: 0;
  font-size: 11px; font-family: inherit; letter-spacing: .06em; cursor: pointer; font-weight: 700;
  transition: background .15s var(--ease), color .15s var(--ease);
  text-transform: uppercase;
}
.auth-tab.active { background: rgba(114,231,255,.1); color: var(--accent-1); }
.auth-form.hidden { display: none; }
.auth-form { padding: 26px 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 10.5px; color: var(--text-3); margin-bottom: 7px; font-weight: 700; letter-spacing: .03em; }
.field input {
  width: 100%; background: rgba(0,0,0,.22); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text-0); padding: 12px 12px; font-size: 13px; font-family: inherit; outline: none;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input::placeholder { color: var(--text-4); }
.field input:focus { border-color: var(--border-bright); box-shadow: 0 0 0 3px rgba(114,231,255,.08); }
.auth-submit { width: 100%; justify-content: center; margin-top: 6px; }
.auth-submit:disabled { opacity: .6; }
.auth-error { color: var(--danger); font-size: 12px; min-height: 16px; margin-bottom: 4px; }
.auth-hint { text-align: center; font-size: 11.5px; color: var(--text-3); margin-top: 18px; }
.auth-hint a { color: var(--accent-1); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.auth-note { color: var(--text-4); font-size: 11px; text-align: center; max-width: 320px; line-height: 1.7; }
