/* SplineCommerce - splinecommerce.com */

:root {
  --bg: #04060c;
  --bg-2: #090e1a;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --line: rgba(148, 163, 199, 0.14);
  --line-strong: rgba(148, 163, 199, 0.28);
  --text: #eaf0fb;
  --muted: #a3b1cf;
  --faint: #6b7a9c;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --accent-3: #22d3ee;
  --glow: rgba(56, 189, 248, 0.35);
  --radius: 18px;
  --radius-sm: 12px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(56, 189, 248, 0.3); color: #fff; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: var(--accent);
  color: #04060c;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
}
.skip-link:focus { left: 8px; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

main:focus { outline: none; }

.hero-chips, .suite-meta { list-style: none; padding: 0; margin: 0; }
.suite-meta { margin-bottom: 40px; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- background layers ---------- */

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(148, 163, 199, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 199, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(600px 420px at 18% -8%, rgba(56, 189, 248, 0.11), transparent 70%),
    radial-gradient(700px 480px at 85% 0%, rgba(129, 140, 248, 0.10), transparent 70%),
    var(--bg);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}

.site-header.scrolled {
  background: rgba(4, 6, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.logo:hover { text-decoration: none; }
.logo .mark {
  width: 32px;
  height: 32px;
  flex: none;
  filter: drop-shadow(0 2px 12px rgba(75, 139, 245, 0.35));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo:hover .mark { transform: rotate(-10deg) scale(1.06); }
.logo .word { color: var(--text); letter-spacing: -0.02em; }
.logo .word b { font-weight: 800; color: #7ab2f7; } /* fallback if background-clip: text unsupported */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .logo .word b {
    /* brand gradient sampled from the logo: blue -> violet */
    background: linear-gradient(95deg, #38bdf8 0%, #6d7ff6 60%, #8a5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.main-nav { display: flex; align-items: center; gap: 4px; }

.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}
.main-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}

/* keep CTA styling when it sits inside the nav (specificity guard) */
.main-nav a.btn-primary,
.main-nav a.btn-primary:hover {
  color: #04121e;
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  touch-action: manipulation;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  color: #04121e;
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.4), 0 8px 30px -8px var(--glow);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.7), 0 12px 40px -8px var(--glow); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); }

.btn-lg { min-height: 52px; padding: 14px 30px; font-size: 1.02rem; border-radius: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 48px) 0 72px;
  overflow: hidden;
}

#spline-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.9;
}

.hero-content { position: relative; z-index: 1; max-width: 820px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.hero-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.3rem);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.grad-text {
  background: linear-gradient(100deg, #7dd3fc 0%, var(--accent) 35%, var(--accent-2) 75%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--muted);
  max-width: 620px;
  margin-bottom: 36px;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }

.mono-link {
  font-family: var(--mono);
  font-size: 0.9rem;
}

.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; }

.chip {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.chip b { color: var(--accent); font-weight: 500; }

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--faint);
  animation: floaty 2.6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- sections ---------- */

.section { padding: 104px 0; position: relative; }
.section.alt {
  background: linear-gradient(180deg, transparent, rgba(9, 14, 26, 0.7) 18%, rgba(9, 14, 26, 0.7) 82%, transparent);
}

.section-head { max-width: 680px; margin-bottom: 56px; }

.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}

.section-head h1,
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  margin-bottom: 16px;
}

.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- bento ---------- */

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

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}
.card:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  transform: translateY(-3px);
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px 200px at var(--mx, 50%) var(--my, 0%), rgba(56, 189, 248, 0.08), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }

.card .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.22);
  color: var(--accent);
  margin-bottom: 20px;
}
.card .icon svg { width: 24px; height: 24px; }

.card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.card p { color: var(--muted); font-size: 0.95rem; }

.span-4 { grid-column: span 4; }
.span-2 { grid-column: span 2; }

.card.highlight {
  border-color: rgba(129, 140, 248, 0.4);
  background: linear-gradient(140deg, rgba(56, 189, 248, 0.07), rgba(129, 140, 248, 0.09));
}
.card.highlight .icon {
  background: rgba(129, 140, 248, 0.12);
  border-color: rgba(129, 140, 248, 0.32);
  color: var(--accent-2);
}

.stack-list {
  list-style: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  display: grid;
  gap: 10px;
  margin-top: 4px;
}
.stack-list li { display: flex; align-items: center; gap: 10px; }
.stack-list .tick { color: var(--accent); flex: none; width: 16px; height: 16px; }

/* ---------- plugins ---------- */

.suite-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

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

.plugin-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.plugin-card:hover { border-color: rgba(56, 189, 248, 0.45); }

.plugin-card.core {
  grid-column: 1 / -1;
  background:
    radial-gradient(500px 260px at 12% 0%, rgba(56, 189, 248, 0.1), transparent 65%),
    var(--surface);
  border-color: rgba(56, 189, 248, 0.35);
}

.plugin-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.plugin-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.plugin-name span { color: var(--muted); font-weight: 500; }

.badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid;
}
.badge.free {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.08);
}
.badge.ext {
  color: var(--accent-2);
  border-color: rgba(129, 140, 248, 0.4);
  background: rgba(129, 140, 248, 0.08);
}

.plugin-card p { color: var(--muted); font-size: 0.95rem; }

.plugin-features {
  list-style: none;
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.plugin-features li {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  background: rgba(148, 163, 199, 0.08);
  border: 1px solid var(--line);
  padding: 5px 11px;
  border-radius: 8px;
}

.plugins-cta {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}
.plugins-cta .hint { color: var(--faint); font-size: 0.9rem; }

/* ---------- terminal ---------- */

.terminal {
  margin-top: 56px;
  background: #070b14;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.8);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.terminal-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line-strong);
}
.terminal-bar i:nth-child(1) { background: #f87171; }
.terminal-bar i:nth-child(2) { background: #fbbf24; }
.terminal-bar i:nth-child(3) { background: #4ade80; }
.terminal-bar span {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--faint);
}
.terminal-body {
  padding: 22px 24px;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--muted);
  overflow-x: auto;
}
.terminal-body .prompt { color: var(--accent); }
.terminal-body .ok { color: #4ade80; }
.terminal-body .dim { color: var(--faint); }
.terminal-body .caret {
  display: inline-block;
  width: 8px;
  height: 15px;
  background: var(--accent);
  vertical-align: -2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- support ---------- */

.support-box {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.support-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
}
.support-card h2,
.support-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.015em; }
.support-card p { color: var(--muted); font-size: 0.96rem; margin-bottom: 18px; }
.support-card .mono-note {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  border-left: 2px solid var(--line-strong);
  padding-left: 14px;
  line-height: 1.8;
}

/* ---------- contact ---------- */

.contact-wrap {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.contact-wrap h2 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 18px;
}

.contact-wrap > p { color: var(--muted); font-size: 1.1rem; margin-bottom: 38px; }

.contact-email {
  font-family: var(--mono);
  font-size: clamp(1rem, 3vw, 1.35rem);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  background: rgba(4, 6, 12, 0.6);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.footer-inner .copy { color: var(--faint); font-size: 0.87rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.87rem;
}
.footer-nav a:hover { color: var(--text); }

/* ---------- reveal ---------- */

/* hidden state only applies when JS is confirmed running (html.js set in <head>) */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--d, 0ms);
}
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .scroll-hint, .hero-badge .dot, .terminal-body .caret { animation: none; }
}

/* ---------- sub page (support/) ---------- */

.subpage {
  min-height: 100svh;
  padding: calc(var(--header-h) + 60px) 0 100px;
}
.subpage .section-head { margin-bottom: 40px; }

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .span-4, .span-3, .span-2 { grid-column: span 3; }
}

@media (max-width: 860px) {
  .section { padding: 76px 0; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(4, 6, 12, 0.97);
    border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px;
    gap: 6px;
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 16px; font-size: 1rem; }
  .main-nav .btn { margin-top: 8px; }

  .nav-toggle { display: inline-flex; }

  /* subpages have no toggle button: keep an inline nav, hide the CTA */
  .main-nav.open-static {
    display: flex;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .main-nav.open-static a { padding: 9px 10px; font-size: 0.9rem; min-height: 44px; }
  .main-nav.open-static .btn { display: none; }

  .bento { grid-template-columns: 1fr; }
  .span-4, .span-3, .span-2 { grid-column: auto; }

  .plugin-grid { grid-template-columns: 1fr; }
  .support-box { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .section-head h2 br,
  .contact-wrap h2 br { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 18px; }
  .card, .plugin-card, .support-card { padding: 24px; }
  .hero-ctas .btn { width: 100%; }
}
