/* ============================================================
   AlgorithmBD — design system & custom styles
   Tailwind handles layout/utilities; this file adds the
   brand-specific pieces Tailwind can't express cleanly.
   ============================================================ */

:root {
  --ink: #08152c;
  --ink-soft: #42506a;
  --brand: #0b6bff;
  --brand-deep: #0b57d9;
  --brand-light: #35a7ff;
  --line: rgba(8, 21, 44, 0.08);
  --radius: 1.25rem;
  --header-h: 4.75rem;
  --mist-op: 0.6;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

.font-display {
  font-family: "Sora", "Inter", ui-sans-serif, system-ui, sans-serif;
}

::selection {
  background: var(--brand);
  color: #ffffff;
}

/* ---------- Focus ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 200;
  background: var(--brand);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* ---------- Backgrounds ---------- */
.hero-bg {
  background:
    radial-gradient(900px 520px at 78% -10%, rgba(11, 107, 255, 0.28), transparent 65%),
    radial-gradient(700px 500px at 8% 110%, rgba(53, 167, 255, 0.16), transparent 60%),
    linear-gradient(160deg, #07132a 0%, #081a36 55%, #061225 100%);
}

.grid-bg {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 58px 58px;
  background-position: center;
}

/* ---------- Type helpers ---------- */
.text-gradient {
  background: linear-gradient(100deg, #7ad9ff 0%, #3b9bff 48%, #5c8cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-deep);
}
.eyebrow::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 1px;
  background: var(--brand);
}
.eyebrow-light {
  color: #8fc8ff;
}

/* ---------- Header ---------- */
.site-header {
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(8, 21, 44, 0.07);
  box-shadow: 0 10px 40px -24px rgba(8, 21, 44, 0.35);
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  gap: 0.3rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #26334d;
  padding: 0.55rem 0.15rem;
  transition: color 0.2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.2rem;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--brand);
  transition: width 0.25s ease;
}
.nav-link:hover {
  color: var(--brand-deep);
}
.nav-link:hover::after {
  width: 100%;
}
.nav-link[aria-current="page"],
.nav-link.is-active {
  color: var(--brand-deep);
  font-weight: 600;
}
.nav-link[aria-current="page"]::after,
.nav-link.is-active::after {
  width: 100%;
}

.dropdown-panel {
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}
.nav-drop:hover .dropdown-panel,
.nav-drop:focus-within .dropdown-panel,
.nav-drop.is-open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.nav-drop:hover .nav-caret,
.nav-drop:focus-within .nav-caret,
.nav-drop.is-open .nav-caret {
  transform: rotate(180deg);
}
.nav-caret {
  transition: transform 0.2s ease;
}

.dropdown-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.7rem 0.75rem;
  border-radius: 0.75rem;
  transition: background 0.18s ease;
}
.dropdown-item:hover {
  background: #f2f7ff;
}

/* Mobile menu */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
#mobile-menu.is-open {
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}
#mobile-menu .menu-group {
  border-bottom: 1px solid rgba(8, 21, 44, 0.07);
}
.mobile-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-sub.is-open {
  max-height: 20rem;
}
.mobile-sub-toggle[aria-expanded="true"] .mobile-caret {
  transform: rotate(180deg);
}
.mobile-caret {
  transition: transform 0.2s ease;
}

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.925rem;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: 0.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background-image:
    radial-gradient(
      140px circle at var(--spot-x, -999px) var(--spot-y, -999px),
      rgba(255, 255, 255, 0.24),
      transparent 62%
    ),
    linear-gradient(135deg, #0b84ff 0%, #0b5cf6 100%);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(11, 107, 255, 0.55);
}
.btn-primary:hover {
  box-shadow: 0 18px 38px -12px rgba(11, 107, 255, 0.7);
  transform: translateY(-2px);
}
.btn-dark {
  background-color: var(--ink);
  background-image: radial-gradient(
    140px circle at var(--spot-x, -999px) var(--spot-y, -999px),
    rgba(255, 255, 255, 0.18),
    transparent 62%
  );
  color: #fff;
}
.btn-dark:hover {
  background-color: #0e2244;
  transform: translateY(-2px);
}
.btn-ghost {
  background-color: rgba(255, 255, 255, 0.06);
  background-image: radial-gradient(
    140px circle at var(--spot-x, -999px) var(--spot-y, -999px),
    rgba(255, 255, 255, 0.16),
    transparent 62%
  );
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.btn-ghost:hover {
  background-color: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}
.btn-outline {
  border: 1px solid rgba(8, 21, 44, 0.14);
  color: var(--ink);
  background-color: #fff;
  background-image: radial-gradient(
    140px circle at var(--spot-x, -999px) var(--spot-y, -999px),
    rgba(11, 107, 255, 0.12),
    transparent 62%
  );
}
.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
  transform: translateY(-2px);
}
.btn-outline[aria-current="page"] {
  border-color: var(--brand);
  color: var(--brand-deep);
  background-color: rgba(11, 107, 255, 0.04);
}
.btn-sm {
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
  border-radius: 0.65rem;
}

.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brand-deep);
  transition: gap 0.2s ease, color 0.2s ease;
}
.arrow-link:hover {
  gap: 0.7rem;
  color: var(--brand);
}
.arrow-link-light {
  color: #fff;
}
.arrow-link-light:hover {
  color: #7ad9ff;
}

/* ---------- Editorial ledger ---------- */
.bg-paper {
  background: #f6f7f4;
}

.mono-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ledger {
  border-top: 1px solid var(--line);
}
.ledger-row {
  position: relative;
  transition: background 0.25s ease, color 0.25s ease;
}
.ledger-row::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 1px;
  width: 100%;
  background: var(--line);
}
.ledger-row:hover {
  background: rgba(11, 107, 255, 0.035);
}
.ledger-row:hover .ledger-title {
  color: var(--brand-deep);
}
.ledger-row:hover .ledger-arrow {
  transform: translateX(4px);
  color: var(--brand-600);
}
.ledger-title,
.ledger-arrow {
  transition: color 0.25s ease, transform 0.25s ease;
}

.sector-row {
  transition: background 0.25s ease, color 0.25s ease;
}
.sector-row:hover {
  background: rgba(11, 107, 255, 0.035);
}
.sector-row:hover .sector-name {
  color: var(--brand-deep);
}
.sector-name {
  transition: color 0.25s ease;
}

/* ---------- Cards ---------- */
.card-lift {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}
.card-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px -40px rgba(8, 21, 44, 0.45);
  border-color: rgba(11, 107, 255, 0.22);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  background: linear-gradient(145deg, #eef6ff, #dcecff);
  color: var(--brand-deep);
  border: 1px solid rgba(11, 107, 255, 0.12);
}
.feature-icon-sm {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
}
.feature-icon-lg {
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
}

/* ---------- Reveal on scroll (progressive: visible without JS) ---------- */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(var(--reveal-y, 24px));
    clip-path: inset(0 0 var(--reveal-clip, 0%) 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}
@keyframes reveal-mask {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
    clip-path: inset(0 0 100% 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}
@keyframes reveal-left {
  from {
    opacity: 0;
    transform: translateX(-32px);
    clip-path: inset(0 100% 0 0);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}
@keyframes reveal-right {
  from {
    opacity: 0;
    transform: translateX(32px);
    clip-path: inset(0 0 0 100%);
  }
  to {
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
  }
}
@keyframes reveal-scale {
  from {
    opacity: 0;
    transform: scale(0.955);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.reveal {
  --reveal-y: 24px;
  --reveal-clip: 0%;
}
html.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(var(--reveal-y));
  will-change: opacity, transform, clip-path;
}
html.js .reveal.is-visible {
  animation: reveal-up 0.78s cubic-bezier(0.22, 1, 0.36, 1) var(--reveal-delay, 0ms) backwards;
}
html.js :is(h1, h2, h3).reveal {
  --reveal-y: 12px;
  --reveal-clip: 100%;
}
html.js .eyebrow.reveal {
  --reveal-y: 8px;
  --reveal-clip: 100%;
}
html.js .reveal.reveal-mask:not(.is-visible) {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  clip-path: none;
}
html.js .reveal.reveal-left:not(.is-visible) {
  opacity: 0;
  transform: translateX(-32px);
  clip-path: none;
}
html.js .reveal.reveal-right:not(.is-visible) {
  opacity: 0;
  transform: translateX(32px);
  clip-path: none;
}
html.js .reveal.reveal-scale:not(.is-visible) {
  opacity: 0;
  transform: scale(0.955);
  clip-path: none;
}
html.js .reveal.reveal-mask.is-visible {
  animation-name: reveal-mask;
  animation-duration: 0.95s;
}
html.js .reveal.reveal-left.is-visible {
  animation-name: reveal-left;
  animation-duration: 0.9s;
}
html.js .reveal.reveal-right.is-visible {
  animation-name: reveal-right;
  animation-duration: 0.9s;
}
html.js .reveal.reveal-scale.is-visible {
  animation-name: reveal-scale;
  animation-duration: 0.85s;
}
.reveal-inline {
  --reveal-y: 14px;
}

@keyframes hero-line-in {
  from {
    transform: translateY(112%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
.hero-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.07em;
  margin-bottom: -0.07em;
}
.hero-line > span {
  display: block;
  animation: hero-line-in 1.02s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(120ms + var(--line-index, 0) * 90ms);
}
.hero-lines {
  padding-bottom: 0.04em;
}

.media-zoom {
  overflow: hidden;
}
.media-zoom img {
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.media-zoom:hover img {
  transform: scale(1.045);
}

.btn-primary.magnetic {
  transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) - 2px), 0);
  transition: transform 0.16s ease-out, box-shadow 0.25s ease;
}

.cursor-ready .cursor-ring,
.cursor-ready .cursor-dot {
  opacity: 1;
}
.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(-100px, -100px, 0);
  will-change: transform;
}
.cursor-ring {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(53, 167, 255, 0.48);
  background: rgba(11, 107, 255, 0.05);
  transition: width 0.24s ease, height 0.24s ease, margin 0.24s ease, border-color 0.24s ease, background 0.24s ease, opacity 0.24s ease;
}
.cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: #35a7ff;
}
.cursor-ring.is-hover {
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-color: rgba(53, 167, 255, 0.85);
  background: rgba(11, 107, 255, 0.12);
}
.cursor-ready,
.cursor-ready a,
.cursor-ready button,
.cursor-ready [role="button"] {
  cursor: none;
}

.proof-item {
  position: relative;
}
.proof-value {
  font-variant-numeric: tabular-nums;
}

.process-layout {
  display: grid;
  gap: 2rem;
}
.process-aside {
  position: relative;
}
.process-rail {
  position: relative;
  display: grid;
  gap: 1rem;
  padding-left: 2.55rem;
}
.process-rail::before {
  content: "";
  position: absolute;
  top: 1.85rem;
  bottom: 1.85rem;
  left: 0.82rem;
  width: 1px;
  background: rgba(255, 255, 255, 0.14);
}
.process-step {
  position: relative;
}
.process-node {
  position: absolute;
  left: -2.55rem;
  top: 1.15rem;
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: #0a1930;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
  transition: background 0.45s ease, border-color 0.45s ease, color 0.45s ease, box-shadow 0.45s ease;
}
.process-step::after {
  content: "";
  position: absolute;
  left: -2.55rem;
  top: 2.6rem;
  bottom: -1.3rem;
  width: 1px;
  background: #35a7ff;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s;
}
.process-step:last-child::after {
  display: none;
}
.process-step.is-reached .process-node {
  border-color: rgba(53, 167, 255, 0.85);
  background: #0b6bff;
  color: #fff;
  box-shadow: 0 0 0 5px rgba(11, 107, 255, 0.14);
}
.process-step.is-reached::after {
  transform: scaleY(1);
}
.process-card {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1.25rem;
  background: rgba(255, 255, 255, 0.045);
  padding: 1.35rem 1.4rem;
  transition: border-color 0.35s ease, background 0.35s ease;
}
.process-step.is-reached .process-card {
  border-color: rgba(53, 167, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

@media (min-width: 1024px) {
  .process-layout {
    grid-template-columns: 0.78fr 1.22fr;
    gap: 4.5rem;
  }
  .process-aside {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
    align-self: start;
  }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-track.reverse {
  animation-direction: reverse;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
.ticker {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #050f21;
}
.ticker .marquee-track {
  animation-duration: 34s;
}
.ticker-group {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding-right: 2.5rem;
  white-space: nowrap;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}
.ticker-item::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 999px;
  background: #35a7ff;
  box-shadow: 0 0 0 4px rgba(53, 167, 255, 0.12);
}
.ticker-item strong {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- Floating mockup bits ---------- */
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-13px);
  }
}
.floaty {
  animation: floaty 7s ease-in-out infinite;
}
.floaty-slow {
  animation: floaty 9s ease-in-out infinite;
}
.floaty-delay {
  animation-delay: -3.5s;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
  }
  50% {
    opacity: 0.7;
    box-shadow: 0 0 0 6px rgba(52, 211, 153, 0);
  }
}
.pulse-dot {
  animation: pulse-dot 2.4s ease-in-out infinite;
}

/* Dashboard mockup helpers */
.mock-shell {
  background: rgba(9, 22, 43, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.65);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

/* ---------- Steps / timeline ---------- */
.step-connector {
  background: linear-gradient(90deg, rgba(11, 107, 255, 0.4), rgba(11, 107, 255, 0.08));
}

/* ---------- FAQ accordion ---------- */
.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
.faq-panel > div {
  overflow: hidden;
}
.faq-item.is-open .faq-panel {
  grid-template-rows: 1fr;
}
.faq-item.is-open .faq-toggle {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  transform: rotate(45deg);
}
.faq-item.is-open {
  border-color: rgba(11, 107, 255, 0.25);
  box-shadow: 0 24px 60px -45px rgba(11, 107, 255, 0.5);
}
.faq-toggle {
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* ---------- Forms ---------- */
.field {
  width: 100%;
  border: 1px solid rgba(8, 21, 44, 0.14);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  font-size: 0.925rem;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field::placeholder {
  color: #6b7c96;
}
.field:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(11, 107, 255, 0.1);
}
.field-error {
  border-color: #e11d48 !important;
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08) !important;
}
.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #33405a;
  margin-bottom: 0.45rem;
}

/* ---------- eCommerce theme switcher ---------- */
.store-preview {
  --sp-bg: #f4f1ea;
  --sp-surface: #ffffff;
  --sp-text: #171512;
  --sp-muted: #736b60;
  --sp-accent: #161411;
  --sp-accent-text: #ffffff;
  --sp-radius: 0.25rem;
  --sp-font: "Inter", sans-serif;
  --sp-hero: #e8dfd0;
  background: var(--sp-bg);
  color: var(--sp-text);
  font-family: var(--sp-font);
  transition: background 0.4s ease, color 0.4s ease;
}
.store-preview[data-theme="mono"] {
  --sp-bg: #f5f5f4;
  --sp-surface: #ffffff;
  --sp-text: #111111;
  --sp-muted: #6b6b6b;
  --sp-accent: #0b6bff;
  --sp-accent-text: #ffffff;
  --sp-radius: 0.9rem;
  --sp-hero: #e7e7e5;
}
.store-preview[data-theme="citrus"] {
  --sp-bg: #fff9ed;
  --sp-surface: #ffffff;
  --sp-text: #241a0c;
  --sp-muted: #8b7355;
  --sp-accent: #f26b1d;
  --sp-accent-text: #ffffff;
  --sp-radius: 1.4rem;
  --sp-hero: #ffe2b8;
  --sp-font: "Sora", sans-serif;
}
.sp-surface {
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
}
.sp-accent {
  background: var(--sp-accent);
  color: var(--sp-accent-text);
  border-radius: var(--sp-radius);
}
.sp-card {
  background: var(--sp-surface);
  border-radius: var(--sp-radius);
  overflow: hidden;
}
.sp-swatch {
  background: var(--sp-hero);
  border-radius: var(--sp-radius);
}
.theme-btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 2px solid transparent;
}
.theme-btn:hover {
  transform: translateY(-2px);
}
.theme-btn[aria-pressed="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(11, 107, 255, 0.12);
}

/* ---------- Footer ---------- */
.footer-link {
  color: #a9b6cc;
  font-size: 0.9rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}
.footer-link:hover {
  color: #ffffff;
  padding-left: 3px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #f2f5fa;
}
::-webkit-scrollbar-thumb {
  background: #c2cddd;
  border-radius: 8px;
  border: 2px solid #f2f5fa;
}
::-webkit-scrollbar-thumb:hover {
  background: #9fb0c8;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal,
  html.js .reveal:not(.is-visible),
  html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
    clip-path: none;
  }
  .marquee-track {
    animation: none;
  }
}

/* ---------- Hero product preview ---------- */
.hero-bg > .grid-bg {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.38) 35%, #000 68%, rgba(0, 0, 0, 0.62) 100%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.38) 35%, #000 68%, rgba(0, 0, 0, 0.62) 100%);
}

.hero-preview .preview-halo {
  background: radial-gradient(closest-side, rgba(11, 107, 255, 0.32), rgba(34, 184, 255, 0.06) 55%, transparent 76%);
  filter: blur(74px);
  transition: background 0.6s ease;
}
.hero-preview[data-preview="ecommerce"] .preview-halo {
  background: radial-gradient(closest-side, rgba(242, 107, 29, 0.22), rgba(232, 223, 208, 0.05) 55%, transparent 76%);
}

.preview-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.preview-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.52);
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.preview-switch-btn:hover {
  color: rgba(255, 255, 255, 0.88);
}
.preview-switch-btn.is-active {
  background: #fff;
  color: #08152c;
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.8);
}
.preview-switch-btn:focus-visible {
  outline: 2px solid #7ad9ff;
  outline-offset: 2px;
}

.preview-viewport {
  display: grid;
}
.preview-pane {
  grid-area: 1 / 1;
  min-width: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.35s;
}
.preview-pane.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

.preview-shell {
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}
.hero-preview[data-preview="ecommerce"] .preview-shell {
  border-color: rgba(242, 107, 29, 0.24);
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(242, 107, 29, 0.05);
}

.preview-pane .store-preview,
.preview-pane .store-preview .sp-swatch,
.preview-pane .store-preview .sp-card,
.preview-pane .store-preview .sp-accent {
  transition: background-color 0.35s ease, color 0.35s ease, border-radius 0.35s ease;
}

.hero-theme-btn {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-theme-btn:hover {
  transform: scale(1.12);
}
.hero-theme-btn.is-active {
  box-shadow: 0 0 0 2px #08152c, 0 0 0 3.5px rgba(255, 255, 255, 0.72);
  transform: scale(1.05);
}
.hero-theme-btn:focus-visible {
  outline: 2px solid #7ad9ff;
  outline-offset: 3px;
}

@keyframes preview-bar-rise {
  from {
    transform: scaleY(0.14);
    opacity: 0.4;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}
.preview-pane.is-active .preview-bar {
  transform-origin: bottom;
  animation: preview-bar-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.preview-pane.is-active .preview-bar:nth-child(2) { animation-delay: 0.04s; }
.preview-pane.is-active .preview-bar:nth-child(3) { animation-delay: 0.08s; }
.preview-pane.is-active .preview-bar:nth-child(4) { animation-delay: 0.12s; }
.preview-pane.is-active .preview-bar:nth-child(5) { animation-delay: 0.16s; }
.preview-pane.is-active .preview-bar:nth-child(6) { animation-delay: 0.2s; }
.preview-pane.is-active .preview-bar:nth-child(7) { animation-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .preview-pane,
  .hero-preview .preview-halo,
  .preview-shell,
  .preview-pane .store-preview,
  .preview-pane .store-preview .sp-swatch,
  .preview-pane .store-preview .sp-card,
  .preview-pane .store-preview .sp-accent {
    transition: none;
  }
  .preview-pane.is-active .preview-bar {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-line > span {
    animation: none;
    transform: none;
    opacity: 1;
  }
  .cursor-ring,
  .cursor-dot {
    display: none;
  }
  .btn-primary.magnetic,
  .btn-primary.magnetic:hover {
    transform: none;
  }
  .media-zoom img,
  .process-step::after,
  .process-node,
  .process-card {
    transition: none;
  }
}
