:root {
  --bg: #05060b;            /* near-black, matches the video void */
  --surface: #0b0e18;       /* raised panel */
  --glass: rgba(255, 255, 255, 0.035);
  --glass-strong: rgba(255, 255, 255, 0.06);
  --ink: #e9eefb;           /* primary text */
  --muted: #94a1c4;         /* secondary text */
  --accent: #2fd4ff;        /* electric cyan */
  --accent-2: #3b86ff;      /* electric blue */
  --accent-strong: #00b6ee;
  --border: rgba(120, 170, 255, 0.14);
  --border-strong: rgba(120, 190, 255, 0.30);
  --radius: 16px;
  --maxw: 1140px;
  --glow: 0 0 36px rgba(47, 212, 255, 0.28);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 600px at 78% -8%, rgba(47, 212, 255, 0.10), transparent 60%),
    radial-gradient(900px 600px at 10% 12%, rgba(59, 134, 255, 0.08), transparent 60%),
    linear-gradient(rgba(120, 170, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 56px 56px, 56px 56px, auto;
  background-attachment: fixed;
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 104px 0; position: relative; }
h1, h2, h3 { line-height: 1.14; letter-spacing: -0.02em; margin: 0 0 16px; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.22rem; }
p { color: var(--muted); }
p.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }

/* nav: dark glass */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 16, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: 0.01em; color: var(--ink); display: inline-flex; align-items: center; text-decoration: none; }
.brand span { color: var(--accent); text-shadow: 0 0 18px rgba(47, 212, 255, 0.5); }
.brand-logo { height: 34px; width: auto; display: block; }
.nav a { color: var(--muted); text-decoration: none; margin-left: 26px; font-weight: 500; transition: color .18s ease; }
.nav a:hover { color: var(--accent); }
.nav a.btn-primary { color: #03121a; }

/* buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer; font: inherit; font-weight: 700;
  padding: 14px 26px; border-radius: 999px; text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #03121a;
  box-shadow: 0 8px 30px rgba(47, 212, 255, 0.30), inset 0 0 0 1px rgba(255,255,255,0.15);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 42px rgba(47, 212, 255, 0.5); }
.btn-ghost {
  background: rgba(255,255,255,0.02); color: var(--accent);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--glow); border-color: var(--accent); }

/* legacy static hero (unused by the canvas landing, kept for safety) */
.hero { background: radial-gradient(1200px 500px at 70% -10%, rgba(47,212,255,0.10), transparent), var(--bg); text-align: center; }
.hero .pill { display: inline-block; }
.hero .cta-row { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.pill {
  display: inline-block; background: var(--glass); border: 1px solid var(--border);
  color: var(--muted); padding: 6px 14px; border-radius: 999px; font-size: .9rem; margin-bottom: 22px;
  backdrop-filter: blur(8px);
}

/* grids + glass cards */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
/* Floating + cursor-tilting cards. transform is composed from registered
   custom properties so the perpetual float, the hover lift, and the 3D tilt
   (driven by card-fx.js on mousemove) never clobber each other. */
@property --card-float { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --card-lift  { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --card-rx    { syntax: "<angle>";  inherits: false; initial-value: 0deg; }
@property --card-ry    { syntax: "<angle>";  inherits: false; initial-value: 0deg; }
@property --card-tx    { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --card-ty    { syntax: "<length>"; inherits: false; initial-value: 0px; }
@keyframes card-float { 0%, 100% { --card-float: 0px; } 50% { --card-float: -9px; } }

.card {
  --card-float: 0px; --card-lift: 0px; --card-rx: 0deg; --card-ry: 0deg;
  --card-tx: 0px; --card-ty: 0px;
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  /* slow, gentle hover/float */
  animation: card-float 12s ease-in-out infinite;
  transition: box-shadow .25s ease, border-color .25s ease,
              --card-lift .25s ease, --card-rx .18s ease, --card-ry .18s ease,
              --card-tx .18s ease, --card-ty .18s ease;
  will-change: transform;
}
/* Authoritative composed transform — the extra specificity keeps it winning
   over .reveal.in { transform: none } once the card scrolls into view.
   translate3d shifts the card TOWARD the cursor; rotateX/Y tilt it toward the
   cursor; the float/lift add the vertical hover. */
.card,
.grid-3 .card,
.grid-3 .card.reveal.in {
  transform:
    perspective(800px)
    translate3d(var(--card-tx), calc(var(--card-float) + var(--card-lift) + var(--card-ty)), 0)
    rotateX(var(--card-rx)) rotateY(var(--card-ry));
}
/* Stagger the bob across columns so the row doesn't float as one block. */
.grid-3 .card:nth-child(2) { animation-delay: -2.3s; }
.grid-3 .card:nth-child(3) { animation-delay: -4.6s; }
.card:hover {
  --card-lift: -8px;
  border-color: var(--border-strong);
  box-shadow: var(--glow), 0 28px 60px rgba(0, 0, 0, 0.5);
}
@media (prefers-reduced-motion: reduce) { .card { animation: none; } }
.card h3 { color: var(--ink); }
.card p { color: var(--muted); margin-bottom: 0; }

/* steps */
.steps { counter-reset: step; }
.steps .card::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #03121a;
  font-weight: 800; margin-bottom: 16px; box-shadow: var(--glow);
}

/* pricing */
.pricing-grid { align-items: stretch; }
/* Floating plan cards. The card's transform is composed from three registered
   custom properties so they never clobber each other:
     --tier-float : continuous gentle bob (the "floating" look), animated
     --tier-hover : extra lift on hover
     --tier-scale : the featured card's scale-up
   @property makes each interpolate smoothly; where @property is unsupported the
   cards still lift on hover, they just don't bob. */
@property --tier-float { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --tier-hover { syntax: "<length>"; inherits: false; initial-value: 0px; }
@property --tier-scale { syntax: "<number>"; inherits: false; initial-value: 1; }
@keyframes tier-float {
  0%, 100% { --tier-float: 0px; }
  50%      { --tier-float: -12px; }
}
.tier {
  --tier-hover: 0px; --tier-scale: 1;
  background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  transform: translateY(calc(var(--tier-float) + var(--tier-hover))) scale(var(--tier-scale));
  animation: tier-float 6s ease-in-out infinite;
  transition: box-shadow .25s ease, border-color .25s ease,
              --tier-hover .25s ease, --tier-scale .25s ease;
}
/* Stagger the bob so the cards float independently, not as one synced block. */
.tier:nth-child(2) { animation-delay: -2s; }
.tier:nth-child(3) { animation-delay: -4s; }
.tier:hover { --tier-hover: -10px; border-color: var(--border-strong); box-shadow: var(--glow); }
.tier.featured {
  --tier-scale: 1.03;
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(47,212,255,0.07), var(--glass));
  box-shadow: 0 0 0 1px rgba(47,212,255,0.35), 0 24px 70px rgba(0,0,0,0.6), var(--glow);
}
.tier.featured:hover { --tier-hover: -10px; }
/* Respect reduced-motion: keep the hover lift, drop the perpetual bob. */
@media (prefers-reduced-motion: reduce) { .tier { animation: none; } }
.tier .badge {
  align-self: flex-start;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #03121a;
  font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.tier h3 { color: var(--ink); }
.tier .price { font-size: 2.7rem; font-weight: 800; color: var(--ink); }
.tier .price small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.tier .maint { color: var(--muted); font-size: .95rem; margin: 4px 0 16px; }
.tier .value-note {
  color: var(--ink); background: rgba(47, 212, 255, 0.09);
  border: 1px solid rgba(47, 212, 255, 0.28); border-radius: 10px;
  padding: 9px 12px; font-size: .85rem; font-weight: 600; margin: 0 0 18px;
}
.tier .inherits { color: var(--accent); font-weight: 700; font-size: .92rem; margin: 0 0 12px; }
.badge.badge-best { box-shadow: 0 0 22px rgba(47, 212, 255, 0.55); }
.tier ul { list-style: none; padding: 0; margin: 0 0 26px; flex: 1; }
.tier li { padding: 8px 0 8px 28px; position: relative; color: var(--ink); }
.tier li::before { content: "\2713"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.tier .btn { width: 100%; text-align: center; }

/* faq */
.faq details {
  background: var(--glass); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px;
  backdrop-filter: blur(8px);
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary { font-weight: 600; cursor: pointer; color: var(--ink); }
.faq summary::marker { color: var(--accent); }
.faq p { margin-bottom: 0; }

/* footer */
footer { background: rgba(3, 4, 8, 0.7); color: var(--muted); padding: 52px 0; border-top: 1px solid var(--border); }
footer a { color: var(--ink); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* reveal */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .grid-3 { grid-template-columns: 1fr; }
  .tier.featured { --tier-scale: 1; }
  section { padding: 70px 0; }
}

.error-banner {
  background: rgba(255, 80, 90, 0.12); color: #ff9aa2; border: 1px solid rgba(255, 90, 100, 0.35);
  border-radius: 10px; padding: 12px 16px; margin-top: 16px; display: none;
}
.error-banner.show { display: block; }

/* =============================================================
   Interactive 3D (Spline) panel — vanilla port of the shadcn
   "Interactive 3D" card: gradient headline + spotlight on the
   left, a live <spline-viewer> scene on the right.
   ============================================================= */
#interactive-3d { padding: 40px 0; }
.spline-card {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.96);
  box-shadow: var(--shadow);
}
.spline-grid { display: flex; height: 100%; }
.spline-copy {
  flex: 1; min-width: 0;
  padding: 40px;
  position: relative; z-index: 10;
  display: flex; flex-direction: column; justify-content: center;
}
.spline-title {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800; line-height: 1.04;
  background: linear-gradient(180deg, #fafafa 0%, #a3a3a3 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.spline-sub { margin: 16px 0 0; color: #d4d4d4; max-width: 32rem; font-size: 1.02rem; line-height: 1.6; }
.spline-scene { flex: 1; min-width: 0; position: relative; }
.spline-scene spline-viewer,
.spline-scene canvas { width: 100% !important; height: 100% !important; display: block; }

/* Spotlight (aceternity): blurred ellipse SVG that sweeps in from top-left. */
.spotlight {
  position: absolute;
  top: -20%; left: -10%;
  width: 80%; height: 130%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  animation: agen-spotlight 2.4s ease 0.25s forwards;
}
@keyframes agen-spotlight {
  0%   { opacity: 0; transform: translate(-6%, -8%) scale(0.6); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .spotlight { animation: none; opacity: 1; }
}
@media (max-width: 820px) {
  .spline-card { height: auto; }
  .spline-grid { flex-direction: column; }
  .spline-copy { padding: 32px 28px; }
  .spline-scene { height: 320px; }
}
