/* ============ Base ============ */
:root {
  --bg: #05060f;
  --bg-soft: #0a0d1f;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-border: rgba(255, 255, 255, 0.1);
  --text: #e8ecf8;
  --text-dim: #9aa3c0;
  --accent: #7c6cff;
  --accent-2: #3ad6ff;
  --accent-glow: rgba(124, 108, 255, 0.45);
  --radius: 18px;
  --font: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.9;
  overflow-x: hidden;
}

img, svg { display: block; }

a { color: inherit; text-decoration: none; }

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

/* ============ Space background ============ */
#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  background: radial-gradient(ellipse at 50% -20%, #131a3a 0%, var(--bg) 55%);
}

.nebula {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  z-index: -2;
  pointer-events: none;
  animation: nebulaDrift 24s ease-in-out infinite alternate;
}
.nebula-1 {
  width: 55vw; height: 55vw;
  top: -20vw; right: -15vw;
  background: radial-gradient(circle, #4231a8 0%, transparent 65%);
}
.nebula-2 {
  width: 45vw; height: 45vw;
  top: 45%; left: -18vw;
  background: radial-gradient(circle, #0f4c68 0%, transparent 65%);
  animation-delay: -8s;
}
.nebula-3 {
  width: 40vw; height: 40vw;
  bottom: -15vw; right: 5vw;
  background: radial-gradient(circle, #5a1e63 0%, transparent 65%);
  animation-delay: -16s;
}

@keyframes nebulaDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(4vw, 3vh, 0) scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .nebula { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============ Header ============ */
.site-header {
  position: fixed;
  top: 0; right: 0; left: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(5, 6, 15, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.35rem;
}

.brand-orb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--accent-2), var(--accent) 70%);
  box-shadow: 0 0 14px var(--accent-glow), 0 0 34px rgba(58, 214, 255, 0.35);
  flex: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-dim);
  font-size: 0.98rem;
  transition: color 0.25s;
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 0.45rem 1.2rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--text) !important;
  background: rgba(124, 108, 255, 0.14);
  transition: background 0.25s, box-shadow 0.25s;
}
.nav-cta:hover {
  background: rgba(124, 108, 255, 0.3);
  box-shadow: 0 0 18px var(--accent-glow);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  padding: 120px 0 80px;
}

.hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.hero-eyebrow {
  color: var(--accent-2);
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid rgba(58, 214, 255, 0.35);
  border-radius: 999px;
  padding: 0.3rem 1.1rem;
  background: rgba(58, 214, 255, 0.07);
  font-size: 0.9rem;
}

.hero-title {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.6;
}

.glow-text {
  background: linear-gradient(120deg, var(--accent-2), var(--accent) 60%, #c86cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 22px rgba(124, 108, 255, 0.55));
}

.hero-sub {
  max-width: 640px;
  color: var(--text-dim);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(120deg, var(--accent), #5a48e8);
  color: #fff;
  box-shadow: 0 8px 30px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 12px 40px var(--accent-glow); }

.btn-ghost {
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }

button.btn {
  font-family: inherit;
  cursor: pointer;
}

.hero-stats {
  display: flex;
  gap: clamp(1.5rem, 5vw, 4rem);
  margin-top: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.stat { text-align: center; }
.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--accent-2);
  text-shadow: 0 0 18px rgba(58, 214, 255, 0.5);
}
.stat-label { color: var(--text-dim); font-size: 0.9rem; }

.scroll-hint {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.scroll-dot {
  width: 4px; height: 9px;
  border-radius: 999px;
  background: var(--accent-2);
  animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}

/* ============ Sections ============ */
.section { padding: 96px 0; }

.section-title {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.8rem;
}

.section-sub {
  color: var(--text-dim);
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ============ Cards ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(124, 108, 255, 0.45);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), 0 0 30px rgba(124, 108, 255, 0.12);
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.card p { color: var(--text-dim); font-size: 0.97rem; }

.card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  margin-bottom: 1.2rem;
  color: var(--accent-2);
  background: linear-gradient(140deg, rgba(58, 214, 255, 0.14), rgba(124, 108, 255, 0.18));
  border: 1px solid rgba(58, 214, 255, 0.25);
  box-shadow: 0 0 22px rgba(58, 214, 255, 0.12);
}
.card-icon svg { width: 26px; height: 26px; }
.card-icon.big { width: 62px; height: 62px; }
.card-icon.big svg { width: 32px; height: 32px; }

/* ============ Products ============ */
.product-card {
  display: flex;
  flex-direction: column;
}

.product-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.product-top .card-icon { margin-bottom: 0; }

.product-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.6;
}

.product-badge.ready {
  color: #7dffc3;
  background: rgba(58, 255, 176, 0.12);
  border: 1px solid rgba(58, 255, 176, 0.38);
  box-shadow: 0 0 14px rgba(58, 255, 176, 0.18);
}

.product-badge.developing {
  color: #ffd28a;
  background: rgba(232, 138, 58, 0.12);
  border: 1px solid rgba(232, 138, 58, 0.38);
}

.product-card.is-ready {
  border-color: rgba(58, 255, 176, 0.32);
  box-shadow: 0 0 28px rgba(58, 255, 176, 0.08);
}

.product-card.is-ready:hover {
  border-color: rgba(58, 255, 176, 0.55);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), 0 0 30px rgba(58, 255, 176, 0.16);
}

.product-lead {
  margin-bottom: 1rem;
  color: var(--text) !important;
  font-weight: 500;
}

.product-cta {
  margin-top: 1.4rem;
  align-self: flex-start;
}

.product-card h3 a:hover { color: var(--accent-2); }

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.93rem;
}

.feature-list li {
  position: relative;
  padding-right: 1.4rem;
}
.feature-list li::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0.72em;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px rgba(58, 214, 255, 0.7);
}

/* ============ Custom systems ============ */
.custom-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
  background: linear-gradient(140deg, rgba(124, 108, 255, 0.1), rgba(58, 214, 255, 0.05));
  border: 1px solid rgba(124, 108, 255, 0.3);
  border-radius: 26px;
  padding: clamp(1.8rem, 5vw, 3.5rem);
  overflow: hidden;
  position: relative;
}

.custom-panel .section-title { text-align: right; }

.custom-text p { color: var(--text-dim); margin-bottom: 1.2rem; }
.custom-text strong { color: var(--text); }
.custom-text .feature-list { margin-bottom: 1.8rem; }

/* orbiting planets visual */
.custom-visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 320px;
  margin-inline: auto;
  display: grid;
  place-items: center;
}

.core-star {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, var(--accent-2) 35%, var(--accent) 75%);
  box-shadow: 0 0 40px var(--accent-glow), 0 0 90px rgba(58, 214, 255, 0.35);
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  animation: orbitSpin 16s linear infinite;
}
.orbit-2 {
  inset: 18%;
  animation-duration: 10s;
  animation-direction: reverse;
}

.planet {
  position: absolute;
  top: -9px;
  left: calc(50% - 9px);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd9a0, #e88a3a 70%);
  box-shadow: 0 0 12px rgba(232, 138, 58, 0.6);
}
.planet.small {
  width: 12px; height: 12px;
  top: -6px;
  left: calc(50% - 6px);
  background: radial-gradient(circle at 35% 35%, #b8f3ff, #3ad6ff 70%);
  box-shadow: 0 0 12px rgba(58, 214, 255, 0.7);
}

@keyframes orbitSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .orbit { animation: none; }
  .scroll-dot { animation: none; }
}

/* ============ Contact ============ */
.contact-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}
.contact-card .card-icon { margin-bottom: 1rem; }

.contact-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-2) !important;
  margin: 0.3rem 0;
}

.contact-note { font-size: 0.85rem; }

/* ============ Footer ============ */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 3rem 0 2.2rem;
  background: rgba(5, 6, 15, 0.6);
  backdrop-filter: blur(10px);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 1.2rem;
}

.footer-about {
  color: var(--text-dim);
  max-width: 520px;
  font-size: 0.93rem;
}

.footer-copy {
  color: rgba(154, 163, 192, 0.6);
  font-size: 0.85rem;
  margin-top: 0.6rem;
}

/* ============ Reveal animation ============ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Inner product page ============ */
.page-hero {
  padding: 140px 0 48px;
  min-height: auto;
}

.page-hero .hero-inner { gap: 1.1rem; }

.section-tight { padding-top: 0; }

.steps-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.step-card { position: relative; }

.step-num {
  display: grid;
  place-items: center;
  width: 36px; height: 36px;
  margin-bottom: 1rem;
  border-radius: 50%;
  font-weight: 800;
  color: var(--accent-2);
  background: rgba(58, 214, 255, 0.12);
  border: 1px solid rgba(58, 214, 255, 0.3);
  box-shadow: 0 0 16px rgba(58, 214, 255, 0.12);
}

.plan-card {
  display: flex;
  flex-direction: column;
  position: relative;
}

.plan-badge {
  align-self: flex-start;
  margin-bottom: 1rem;
}

.plan-name { font-size: 1.35rem !important; }

.plan-tagline {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin-bottom: 0.8rem;
}

.plan-price {
  font-size: 1.45rem !important;
  font-weight: 800;
  color: var(--accent-2) !important;
  margin-bottom: 1.2rem;
  text-shadow: 0 0 18px rgba(58, 214, 255, 0.35);
}

.plan-card .feature-list { flex: 1; }

.plan-cta {
  margin-top: 1.6rem;
  text-align: center;
}

.plan-card.is-featured {
  border-color: rgba(58, 255, 176, 0.38);
  box-shadow: 0 0 32px rgba(58, 255, 176, 0.1);
  background: linear-gradient(180deg, rgba(58, 255, 176, 0.07), var(--surface));
}

.plan-card.is-featured:hover {
  border-color: rgba(58, 255, 176, 0.55);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), 0 0 30px rgba(58, 255, 176, 0.16);
}

/* ============ Comparison frames ============ */
.compare-point { margin-top: 0.5rem; }

.compare-point + .compare-point { margin-top: 4.5rem; }

.compare-point-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.compare-index {
  flex: none;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-2);
  letter-spacing: 0.06em;
  padding-top: 0.15rem;
  text-shadow: 0 0 14px rgba(58, 214, 255, 0.4);
}

.compare-point-head h3 {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  margin-bottom: 0.25rem;
}

.compare-point-head p {
  color: var(--text-dim);
  font-size: 0.97rem;
}

.compare-frames {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.1rem;
  align-items: stretch;
}

.compare-frame {
  display: flex;
  flex-direction: column;
}

.compare-frame:hover { transform: translateY(-4px); }

.compare-frame-head { margin-bottom: 1.3rem; }

.compare-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.7rem;
}

.label-mobile { display: none; }

.compare-time {
  font-size: clamp(1.35rem, 2.6vw, 1.75rem) !important;
  font-weight: 800;
  line-height: 1.5;
  color: var(--text) !important;
}

.compare-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
  font-size: 0.97rem;
  color: var(--text-dim);
}

.compare-steps li {
  position: relative;
  padding-right: 1.7rem;
}

.compare-steps li::before {
  position: absolute;
  right: 0;
  top: 0.15em;
  font-weight: 800;
  font-size: 0.85rem;
}

.compare-frame.is-classic .compare-steps li:nth-child(1)::before { content: "۱"; }
.compare-frame.is-classic .compare-steps li:nth-child(2)::before { content: "۲"; }
.compare-frame.is-classic .compare-steps li:nth-child(3)::before { content: "۳"; }
.compare-frame.is-classic .compare-steps li:nth-child(4)::before { content: "۴"; }
.compare-frame.is-classic .compare-steps li:nth-child(5)::before { content: "۵"; }
.compare-frame.is-classic .compare-steps li:nth-child(6)::before { content: "۶"; }
.compare-frame.is-classic .compare-steps li:nth-child(7)::before { content: "۷"; }

.compare-frame.is-payamesh .compare-steps li::before { content: "✓"; }

.compare-code {
  display: inline-block;
  direction: ltr;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88em;
  letter-spacing: 0.04em;
  padding: 0.05em 0.45em;
  border-radius: 6px;
  color: #ffd28a;
  background: rgba(232, 138, 58, 0.14);
  border: 1px solid rgba(232, 138, 58, 0.28);
}

.compare-outcome {
  margin-top: 1.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.95rem;
  font-weight: 600;
}

.compare-vs {
  align-self: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  padding: 0.6rem 0;
}

.compare-frame.is-classic {
  border-color: rgba(232, 138, 58, 0.32);
  background: linear-gradient(180deg, rgba(232, 138, 58, 0.07), var(--surface));
}
.compare-frame.is-classic:hover {
  border-color: rgba(232, 138, 58, 0.5);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), 0 0 24px rgba(232, 138, 58, 0.1);
}
.compare-frame.is-classic .compare-label {
  color: #ffd28a;
  background: rgba(232, 138, 58, 0.12);
  border: 1px solid rgba(232, 138, 58, 0.38);
}
.compare-frame.is-classic .compare-time { color: #ffd28a !important; }
.compare-frame.is-classic .compare-steps li::before { color: #ffd28a; }
.compare-frame.is-classic .compare-outcome { color: #ffd28a; }

.compare-frame.is-payamesh {
  border-color: rgba(58, 255, 176, 0.38);
  background: linear-gradient(180deg, rgba(58, 255, 176, 0.08), var(--surface));
  box-shadow: 0 0 28px rgba(58, 255, 176, 0.08);
}
.compare-frame.is-payamesh:hover {
  border-color: rgba(58, 255, 176, 0.55);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45), 0 0 30px rgba(58, 255, 176, 0.16);
}
.compare-frame.is-payamesh .compare-label {
  color: #7dffc3;
  background: rgba(58, 255, 176, 0.12);
  border: 1px solid rgba(58, 255, 176, 0.38);
}
.compare-frame.is-payamesh .compare-time { color: #7dffc3 !important; }
.compare-frame.is-payamesh .compare-steps li::before { color: #7dffc3; }
.compare-frame.is-payamesh .compare-outcome { color: #7dffc3; }

.visual-explain-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: 100%;
  margin-top: 1.35rem;
  padding: 0.95rem 1.2rem;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  color: #04140e;
  background: linear-gradient(120deg, #7dffc3 0%, #3ad6ff 100%);
  box-shadow: 0 0 0 0 rgba(125, 255, 195, 0.55), 0 10px 28px rgba(58, 255, 176, 0.28);
  animation: explainPulse 2s ease-in-out infinite;
}
.visual-explain-icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(5, 16, 14, 0.16);
}
.visual-explain-icon svg { width: 24px; height: 24px; }
.visual-explain-copy {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.45;
}
.visual-explain-copy strong {
  font-size: 1.12rem;
  font-weight: 800;
}
.visual-explain-copy span {
  font-size: 0.82rem;
  font-weight: 600;
  opacity: 0.78;
}
.visual-explain-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 0 rgba(125, 255, 195, 0.4), 0 14px 36px rgba(58, 214, 255, 0.4);
  animation: none;
}

@keyframes explainPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(125, 255, 195, 0.55), 0 10px 28px rgba(58, 255, 176, 0.28); }
  50% { box-shadow: 0 0 0 10px rgba(125, 255, 195, 0), 0 10px 32px rgba(58, 214, 255, 0.42); }
}

@media (prefers-reduced-motion: reduce) {
  .visual-explain-btn { animation: none; }
}

/* ============ Image gallery modal ============ */
.gallery-modal {
  width: min(920px, calc(100vw - 1.6rem));
  max-height: calc(100svh - 1.6rem);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(58, 255, 176, 0.28);
  border-radius: 22px;
  background: #0b1020;
  color: var(--text);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.65), 0 0 40px rgba(58, 255, 176, 0.08);
}
.gallery-modal::backdrop {
  background: rgba(5, 6, 15, 0.78);
  backdrop-filter: blur(10px);
}
.gallery-dialog {
  display: flex;
  flex-direction: column;
  max-height: calc(100svh - 1.6rem);
}
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.gallery-toolbar h2 {
  font-size: 1.05rem;
  font-weight: 800;
}
.gallery-close {
  flex: none;
  width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.gallery-close svg { width: 18px; height: 18px; }
.gallery-close:hover { background: rgba(255, 255, 255, 0.1); }

.gallery-stage {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 0.6rem 0.4rem;
}
.gallery-viewport {
  position: relative;
  min-height: 280px;
}
.gallery-slide {
  display: none;
  margin: 0;
}
.gallery-slide.is-active { display: block; }

.gallery-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.gallery-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #070a14;
}
.gallery-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.4rem;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.8;
}

.gallery-slide figcaption {
  padding: 1rem 0.4rem 0.3rem;
  text-align: center;
}
.gallery-slide figcaption h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.gallery-slide figcaption p {
  color: var(--text-dim);
  font-size: 0.97rem;
  max-width: 560px;
  margin-inline: auto;
}

.gallery-nav {
  width: 42px; height: 42px;
  border: 1px solid rgba(58, 255, 176, 0.28);
  border-radius: 50%;
  background: rgba(58, 255, 176, 0.08);
  color: #7dffc3;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.gallery-nav svg { width: 20px; height: 20px; }
.gallery-nav:hover { background: rgba(58, 255, 176, 0.18); }
.gallery-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.gallery-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1rem 1.1rem;
}
.gallery-counter {
  color: var(--text-dim);
  font-size: 0.88rem;
  font-weight: 700;
}
.gallery-dots {
  display: flex;
  gap: 0.4rem;
}
.gallery-dot {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
}
.gallery-dot.is-active {
  background: #7dffc3;
  box-shadow: 0 0 10px rgba(58, 255, 176, 0.55);
}

/* ============ Responsive ============ */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }

  .custom-panel { grid-template-columns: 1fr; }
  .custom-visual { max-width: 240px; margin-top: 1rem; }

  .nav-toggle { display: flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0; left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(5, 6, 15, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .nav-links.open { max-height: 320px; }

  .nav-links li { text-align: center; }
  .nav-links a {
    display: block;
    padding: 0.9rem 0;
  }
  .nav-cta {
    border: none;
    border-radius: 0;
    background: rgba(124, 108, 255, 0.18);
    margin: 0;
  }

  .section { padding: 72px 0; }
  .page-hero { padding: 120px 0 36px; }

  .compare-frames {
    grid-template-columns: 1fr;
  }
  .compare-vs {
    writing-mode: horizontal-tb;
    transform: none;
    letter-spacing: 0.12em;
    text-align: center;
    padding: 0.2rem 0;
  }

  .label-wide { display: none; }
  .label-mobile { display: inline; }

  .compare-label {
    font-size: 1.45rem;
    font-weight: 800;
    padding: 0.4rem 1.05rem;
    margin-bottom: 0.55rem;
    line-height: 1.5;
  }

  .compare-frame.is-classic .compare-label {
    font-size: 1.6rem;
  }

  .gallery-stage {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "viewport viewport"
      "prev next";
    padding-inline: 0.9rem;
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }
  .gallery-viewport { grid-area: viewport; }
  .gallery-nav.prev { grid-area: prev; justify-self: start; align-self: center; }
  .gallery-nav.next { grid-area: next; justify-self: end; align-self: center; }

  .gallery-modal {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: 100vw;
    max-height: 100dvh;
    margin: 0;
    border: none;
    border-radius: 0;
  }
  .gallery-modal[open] {
    display: flex;
    flex-direction: column;
  }
  .gallery-dialog {
    flex: 1;
    height: 100%;
    max-height: none;
    min-height: 0;
  }
  .gallery-toolbar {
    padding-top: calc(0.75rem + env(safe-area-inset-top, 0px));
  }
  .gallery-footer {
    padding-bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px));
  }
  .gallery-viewport {
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
  }
  .gallery-slide.is-active {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
  }
  .gallery-media {
    flex: 1;
    aspect-ratio: auto;
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .steps-grid { grid-template-columns: 1fr; }
}
