/* Behsaa design system — light/dark by device clock + Bootstrap 5 */
:root,
[data-theme="light"] {
  --ink: #0D1B2A;
  --deep: #1B263B;
  --primary: #415A77;
  --muted: #778DA9;
  --surface: #E0E1DD;
  --white: #FFFFFF;
  --bg: #FFFFFF;
  --bg-soft: #f7f7f5;
  --card: #FFFFFF;
  --text: #0D1B2A;
  --text-soft: #778DA9;
  --border: #E0E1DD;
  --header-bg: rgba(255, 255, 255, 0.92);
  --shadow-soft: 0 12px 40px rgba(13, 27, 42, 0.06);
  --hero-glow: rgba(65, 90, 119, 0.08);
  --scene-face: #ffffff;
  --scene-edge: #cfd3cf;
  --scene-accent: #415A77;
  --scene-node: #1B263B;
  --footer-bg: #0D1B2A;
  --footer-text: #E0E1DD;
  --cta-bg: #1B263B;
  --bs-primary: #415A77;
  --bs-primary-rgb: 65, 90, 119;
  --bs-link-color: #415A77;
  --bs-link-hover-color: #1B263B;
  --bs-body-color: #0D1B2A;
  --bs-body-bg: #FFFFFF;
  --bs-border-color: #E0E1DD;
  --bs-secondary-color: #778DA9;
  color-scheme: light;
}

[data-theme="dark"] {
  --ink: #E0E1DD;
  --deep: #E0E1DD;
  --primary: #778DA9;
  --muted: #9aabbf;
  --surface: #243447;
  --white: #0D1B2A;
  --bg: #0D1B2A;
  --bg-soft: #152233;
  --card: #1B263B;
  --text: #E0E1DD;
  --text-soft: #9aabbf;
  --border: #2c3c52;
  --header-bg: rgba(13, 27, 42, 0.92);
  --shadow-soft: 0 16px 48px rgba(0, 0, 0, 0.35);
  --hero-glow: rgba(119, 141, 169, 0.12);
  --scene-face: #1B263B;
  --scene-edge: #415A77;
  --scene-accent: #778DA9;
  --scene-node: #E0E1DD;
  --footer-bg: #080f18;
  --footer-text: #E0E1DD;
  --cta-bg: #152233;
  --bs-primary: #778DA9;
  --bs-primary-rgb: 119, 141, 169;
  --bs-link-color: #9aabbf;
  --bs-link-hover-color: #E0E1DD;
  --bs-body-color: #E0E1DD;
  --bs-body-bg: #0D1B2A;
  --bs-border-color: #2c3c52;
  --bs-secondary-color: #9aabbf;
  color-scheme: dark;
}

@font-face {
  font-family: "Yekan Bakh FaNum";
  src: url("../fonts/YekanBakhFaNum-VF.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: "Yekan Bakh";
  src: url("../fonts/YekanBakh-VF.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}

:root {
  --radius: 0.75rem;
  --font: "Yekan Bakh FaNum", "Yekan Bakh", Tahoma, "Segoe UI", sans-serif;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .scene-3d, .scene-orbit, .scene-card, .scene-pulse { animation: none !important; }
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-variation-settings: "wght" 420;
  transition: background-color .35s ease, color .35s ease;
}

/* Multi-line copy is justified; the last line stays on the start edge. */
p,
blockquote,
main li,
.compare-table th,
.compare-table td {
  text-align: justify;
  text-align-last: start;
  text-justify: inter-word;
}

h1, h2, h3, h4, .navbar-brand, .display-5, .display-6 {
  font-variation-settings: "wght" 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.lead, .text-muted-steel { color: var(--text-soft) !important; }

a { text-decoration: none; color: var(--primary); }
a:hover { color: var(--deep); }

.btn {
  border-radius: 999px;
  padding: 0.7rem 1.35rem;
  font-variation-settings: "wght" 600;
  border: 0;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--deep);
  color: #fff;
}
[data-theme="dark"] .btn-primary {
  color: #0D1B2A;
}
[data-theme="dark"] .btn-primary:hover {
  background: #E0E1DD;
  color: #0D1B2A;
}
.btn-outline-primary {
  color: var(--primary);
  border: 1px solid var(--primary);
  background: transparent;
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: #fff;
}
[data-theme="dark"] .btn-outline-primary:hover {
  color: #0D1B2A;
}
.btn-light {
  background: #E0E1DD;
  color: #0D1B2A;
}

.site-header {
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .navbar-toggler { border-color: var(--border); }
.site-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(13, 27, 42, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
[data-theme="dark"] .site-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(224, 225, 221, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.site-header .nav-link {
  color: var(--text);
  font-variation-settings: "wght" 500;
  padding: 0.55rem 0.85rem !important;
}
.site-header .nav-link:hover,
.site-header .nav-link.active { color: var(--primary); }
.brand-logo { height: 36px; width: auto; }

/* Iconsax via mask so color follows the theme, not the SVG fill */
.ix {
  --ix-size: 28px;
  width: var(--ix-size);
  height: var(--ix-size);
  display: inline-block;
  flex: 0 0 var(--ix-size);
  background-color: var(--primary);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.ix-ink { background-color: var(--text); }
.ix-lg { --ix-size: 36px; }
.ix-sm { --ix-size: 20px; }
.icon-well {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--primary) 12%, var(--card));
  border: 1px solid var(--border);
}
.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.brand-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-variation-settings: "wght" 650;
}
[data-theme="dark"] .brand-logo { filter: brightness(0) invert(1); opacity: 0.95; }
.lang-flag { width: 18px; height: 12px; object-fit: cover; border-radius: 2px; }
.dropdown-menu {
  background: var(--card);
  border-color: var(--border);
}
.dropdown-item { color: var(--text); }
.dropdown-item:hover, .dropdown-item:focus, .dropdown-item.active {
  background: var(--bg-soft);
  color: var(--text);
}

.theme-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  white-space: nowrap;
}
.theme-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* Hero */
.hero {
  padding: 4.5rem 0 3rem;
  background:
    radial-gradient(1100px 420px at 100% 0%, var(--hero-glow), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface);
  color: var(--deep);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.875rem;
  font-variation-settings: "wght" 550;
}
[data-theme="dark"] .hero-badge { color: var(--text); }
.hero-visual {
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  background: var(--card);
  overflow: hidden;
}
.hero-visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* CSS 3D process scene */
.scene-wrap {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: calc(var(--radius) + 6px);
  border: 1px solid var(--border);
  background:
    linear-gradient(160deg, var(--bg-soft), var(--card) 55%, var(--bg-soft));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  perspective: 1200px;
}
.scene-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--border) 70%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--border) 70%, transparent) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.35;
  transform: perspective(800px) rotateX(62deg) translateY(18%) scale(1.4);
  transform-origin: center top;
}
.scene-3d {
  position: absolute;
  inset: 8% 6% 10%;
  transform-style: preserve-3d;
  transform: rotateX(18deg) rotateY(-18deg);
  animation: scene-float 9s ease-in-out infinite;
}
.scene-orbit {
  position: absolute;
  inset: 12%;
  border: 1px dashed color-mix(in srgb, var(--scene-accent) 55%, transparent);
  border-radius: 50%;
  transform: rotateX(68deg);
  animation: orbit-spin 18s linear infinite;
}
.scene-card {
  position: absolute;
  width: 42%;
  min-height: 28%;
  border-radius: 14px;
  border: 1px solid var(--scene-edge);
  background: var(--scene-face);
  box-shadow: var(--shadow-soft);
  padding: 0.85rem 1rem;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}
.scene-card h3 {
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
}
.scene-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.scene-card.c1 { inset-inline-start: 6%; top: 8%; transform: translateZ(40px); }
.scene-card.c2 { inset-inline-end: 4%; top: 28%; transform: translateZ(70px) rotateY(8deg); }
.scene-card.c3 { inset-inline-start: 18%; bottom: 8%; width: 48%; transform: translateZ(28px); }
.scene-node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--scene-node);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--scene-accent) 25%, transparent);
}
.scene-node.n1 { top: 22%; inset-inline-start: 48%; }
.scene-node.n2 { top: 48%; inset-inline-start: 62%; }
.scene-node.n3 { top: 64%; inset-inline-start: 36%; }
.scene-pulse {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--scene-accent);
  animation: pulse 2.4s ease-out infinite;
  top: 46%;
  inset-inline-start: 46%;
}
@keyframes scene-float {
  0%, 100% { transform: rotateX(18deg) rotateY(-18deg) translateY(0); }
  50% { transform: rotateX(14deg) rotateY(-12deg) translateY(-8px); }
}
@keyframes orbit-spin {
  to { transform: rotateX(68deg) rotateZ(360deg); }
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

/* Feature slider */
.slider-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.slider-controls { display: flex; gap: 0.5rem; }
.slider-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.slider-btn:hover { border-color: var(--primary); color: var(--primary); }
.feature-slider {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}
.feature-slider::-webkit-scrollbar { height: 6px; }
.feature-slider::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}
.slide-card {
  scroll-snap-align: start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  min-height: 210px;
  transition: transform .25s ease, border-color .25s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .slide-card:hover {
    transform: translateY(-4px);
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  }
}
.slide-card .num {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-variation-settings: "wght" 650;
  margin-bottom: 0.75rem;
}

.section { padding: 4.25rem 0; }
.section-surface {
  background: var(--bg-soft);
  border-block: 1px solid var(--border);
}
.section-title { margin-bottom: 0.75rem; }
.section-lead { max-width: 42rem; color: var(--text-soft); }

.feature-card,
.soft-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  height: 100%;
  transition: transform .25s ease, border-color .25s ease;
}
@media (prefers-reduced-motion: no-preference) {
  .feature-card:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
  }
}
.feature-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 0.9rem;
}
.feature-icon img { width: 22px; height: 22px; opacity: 0.9; }
[data-theme="dark"] .feature-icon img,
[data-theme="dark"] .soft-card img,
[data-theme="dark"] .slide-card img {
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.pillar-num {
  color: var(--text-soft);
  font-size: 0.85rem;
  font-variation-settings: "wght" 600;
}

.feature-deep {
  display: grid;
  gap: 1.25rem;
}
.feature-deep-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.feature-deep-item h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.feature-deep-item p { margin: 0; color: var(--text-soft); }

.compare-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.compare-table th,
.compare-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.compare-table th {
  background: var(--bg-soft);
  font-variation-settings: "wght" 650;
}
.compare-table tr:last-child td { border-bottom: 0; }

.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  height: 100%;
  background: var(--card);
}
.price-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-soft);
}
.price-value {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-variation-settings: "wght" 700;
  color: var(--text);
}
.price-note {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
  box-shadow: var(--shadow-soft);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 768px) {
  .proof-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.proof-item {
  text-align: center;
  padding: 1.25rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.proof-item .v {
  font-size: 1.35rem;
  font-variation-settings: "wght" 700;
  color: var(--text);
}
.proof-item .l {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: 0.25rem;
}

.prose { max-width: 48rem; }
.prose h2 { margin-top: 2rem; }
.prose ul { padding-inline-start: 1.2rem; }

.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 3.5rem 0 2rem;
}
.site-footer a { color: var(--footer-text); opacity: 0.85; }
.site-footer a:hover { opacity: 1; color: #fff; }
.site-footer .footer-title {
  color: #fff;
  font-variation-settings: "wght" 650;
  margin-bottom: 0.85rem;
}
.footer-bottom {
  border-top: 1px solid rgba(224, 225, 221, 0.15);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb {
  --bs-breadcrumb-divider-color: var(--text-soft);
  background: transparent;
  padding: 0;
  margin-bottom: 1.25rem;
}
.breadcrumb-item, .breadcrumb-item a { color: var(--text-soft); font-size: 0.9rem; }
.breadcrumb-item.active { color: var(--text); }

.form-control, .form-select {
  border-radius: 0.65rem;
  border-color: var(--border);
  background: var(--card);
  color: var(--text);
  padding: 0.75rem 1rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(65, 90, 119, 0.15);
  background: var(--card);
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.lang-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-variation-settings: "wght" 500;
}

.cta-band {
  background: var(--cta-bg);
  color: #fff;
  border-radius: calc(var(--radius) + 6px);
  padding: 2.25rem;
}
.cta-band .lead { color: rgba(224, 225, 221, 0.9) !important; }
.cta-band h2, .cta-band .h3 { color: #fff; }

.list-check {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}
.list-check li {
  position: relative;
  padding-inline-start: 1.4rem;
}
.chip-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-variation-settings: "wght" 600;
}
.chip-btn.active, .chip-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
[data-theme="dark"] .chip-btn.active,
[data-theme="dark"] .chip-btn:hover { color: #0D1B2A; }

.list-check li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--primary);
}

/* 3D coverflow — product story, text stays real HTML */
.deck3d-section { padding-top: 1rem; }
.deck3d-stage {
  position: relative;
  height: 520px;
  perspective: 1600px;
  margin: 1.5rem 0 1rem;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.deck3d-stage.is-dragging { cursor: grabbing; }
.deck3d-stage.is-dragging .deck3d-card { transition: none; }
.deck3d-rotor {
  position: relative;
  height: 100%;
  transform-style: preserve-3d;
}
.deck3d-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(640px, 86%);
  height: 100%;
  margin-left: calc(min(640px, 86%) / -2);
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.22,.7,.25,1), opacity .7s ease;
  will-change: transform;
}
.deck3d-face {
  height: 100%;
  overflow: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.6rem 1.7rem 1.4rem;
  box-shadow: 0 28px 70px rgba(13, 27, 42, 0.14);
  backface-visibility: hidden;
}
.deck3d-face h3 { margin: 0.35rem 0 0.6rem; }
.deck3d-kicker {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-variation-settings: "wght" 650;
  letter-spacing: 0.08em;
}
.flow-svg { width: 100%; height: 72px; margin-bottom: 0.6rem; }
.flow-path {
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-dasharray: 7 8;
  animation: flow-dash 2.8s linear infinite;
}
.flow-node { fill: var(--deep); }
@keyframes flow-dash { to { stroke-dashoffset: -60; } }
.deck3d-dots { display: flex; gap: 0.45rem; justify-content: center; margin-top: 0.4rem; }
.deck3d-dots button {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 0;
  background: var(--border);
  padding: 0;
}
.deck3d-dots button.is-on { background: var(--primary); transform: scale(1.25); }
.trust-prose p { color: var(--text); margin-bottom: 1rem; }
.trust-prose h2 { margin-top: 0; }
@media (max-width: 991.98px) {
  .hero { padding-top: 2.5rem; }
  .brand-logo { height: 30px; }
  .scene-3d { transform: rotateX(12deg) rotateY(-10deg); }
  .deck3d-stage { height: 460px; }
}
@media (prefers-reduced-motion: reduce) {
  .flow-path { animation: none; }
  .deck3d-card { transition: none; }
}
