/* ==========================================================================
   Surena Soft — front-end styles
   Layout concept: dark technical canvas, asymmetric RTL grid, brand light
   (cyan → Surena blue) used as the only accent; violet is glow only.
   ========================================================================== */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* color */
  --bg: #060a1a;
  --bg-2: #0a1230;
  --navy: #0a367f;
  --surface: rgba(18, 28, 64, 0.55);
  --surface-solid: #0d1533;
  --surface-2: #111b40;
  --line: rgba(148, 172, 255, 0.12);
  --line-strong: rgba(148, 172, 255, 0.22);
  --fg: #eef2ff;
  --fg-2: #c3cbe6;
  --muted: #8f9bc2;
  --blue: #1e6bf5;
  --blue-2: #2f86ff;
  --cyan: #1ebcfa;
  --violet: #7c5cff;
  --green: #16a35a;
  --green-soft: #34d27f;
  --danger: #ff6b7a;
  --grad: linear-gradient(120deg, #1ebcfa 0%, #2f86ff 45%, #1e6bf5 70%, #1d45e3 100%);
  --grad-glow: radial-gradient(60% 60% at 50% 50%, rgba(47, 134, 255, 0.35), transparent 70%);

  /* type */
  --font: "Vazirmatn", "Vazir", Tahoma, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fs-hero: clamp(2.15rem, 1.35rem + 3.1vw, 3.75rem);
  --fs-h2: clamp(1.65rem, 1.2rem + 1.7vw, 2.55rem);
  --fs-h3: 1.2rem;
  --fs-body: 1.0625rem;
  --fs-sm: 0.9375rem;
  --fs-xs: 0.8125rem;

  /* shape & space */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --gutter: max(20px, env(safe-area-inset-left, 0px));
  --container: 1200px;
  --section: clamp(4rem, 2.6rem + 5vw, 7.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --header-h: 68px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.9;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { line-height: 1.35; text-wrap: balance; font-weight: 800; }
p { text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
.ltr { direction: ltr; unicode-bidi: isolate; }

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

.skip-link {
  position: absolute;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.section { padding-block: var(--section); position: relative; }

.section-head { max-width: 640px; margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); display: grid; gap: 14px; }
.section-head h2 { font-size: var(--fs-h2); }
.section-head p { color: var(--muted); max-width: 58ch; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  --h: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--h);
  padding: 0 24px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: var(--fs-sm);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background-color 0.25s, border-color 0.25s, box-shadow 0.35s var(--ease), color 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn .icon { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 10px 30px -10px rgba(30, 107, 245, 0.7);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-primary::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--grad);
  opacity: 0;
  transition: opacity 0.35s;
  z-index: -1;
}
.btn-primary:hover::before { opacity: 1; }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 16px 40px -12px rgba(30, 140, 250, 0.8); }
.btn-primary:hover .icon { transform: translateX(-4px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  color: var(--fg);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(148, 172, 255, 0.4); }

.btn-sm { --h: 42px; padding: 0 18px; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 60;
  background: var(--bg);
}

.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  height: var(--header-h);
  transition: background-color 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgba(6, 10, 26, 0.68);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom-color: var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; gap: 28px; }

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-mark { width: 40px; height: auto; }
.brand-word { width: 112px; height: auto; margin-top: 2px; }

.nav { margin-inline-start: auto; }
.nav ul { display: flex; gap: 4px; }
.nav a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: var(--fs-sm);
  color: var(--fg-2);
  transition: color 0.2s, background-color 0.2s;
}
.nav a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }

.header-cta { flex: none; }
.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  align-items: center; justify-content: center;
  cursor: pointer;
}

@media (max-width: 960px) {
  .nav, .header-cta { display: none; }
  .menu-toggle { display: inline-flex; margin-inline-start: auto; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(6, 10, 26, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: calc(env(safe-area-inset-top, 0px) + 18px) max(20px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 24px) max(20px, env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
  gap: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu ul { display: grid; gap: 4px; }
.mobile-menu ul a {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.mobile-menu.is-open ul a { transform: none; opacity: 1; }
.mobile-menu.is-open li:nth-child(2) a { transition-delay: 0.04s; }
.mobile-menu.is-open li:nth-child(3) a { transition-delay: 0.08s; }
.mobile-menu.is-open li:nth-child(4) a { transition-delay: 0.12s; }
.mobile-menu.is-open li:nth-child(5) a { transition-delay: 0.16s; }
.mobile-menu.is-open li:nth-child(6) a { transition-delay: 0.2s; }
.mobile-menu .btn { margin-top: auto; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  margin-top: calc(var(--header-h) * -1);
  padding-top: calc(var(--header-h) + clamp(2.5rem, 1rem + 5vw, 5.5rem));
  padding-bottom: clamp(3.5rem, 2rem + 4vw, 6rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(148, 172, 255, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 172, 255, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 35% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 35% 40%, #000 20%, transparent 75%);
}
.aurora { position: absolute; border-radius: 50%; will-change: transform; }
.aurora-1 {
  width: 720px; height: 720px;
  inset-inline-end: -180px; top: -260px;
  background: radial-gradient(circle, rgba(30, 107, 245, 0.42), transparent 62%);
  animation: drift-1 22s ease-in-out infinite alternate;
}
.aurora-2 {
  width: 620px; height: 620px;
  inset-inline-end: 28%; top: 10%;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.26), transparent 62%);
  animation: drift-2 26s ease-in-out infinite alternate;
}
.aurora-3 {
  width: 560px; height: 560px;
  inset-inline-end: 52%; top: -120px;
  background: radial-gradient(circle, rgba(30, 188, 250, 0.22), transparent 62%);
  animation: drift-3 30s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: auto 0 0;
  height: 200px;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
@keyframes drift-1 { to { transform: translate3d(-120px, 90px, 0) scale(1.12); } }
@keyframes drift-2 { to { transform: translate3d(140px, -60px, 0) scale(0.9); } }
@keyframes drift-3 { to { transform: translate3d(-80px, 120px, 0) scale(1.15); } }

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(2rem, 1rem + 3vw, 4.5rem);
  align-items: center;
}

.hero-copy { display: grid; gap: 26px; justify-items: start; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 16px;
  border-radius: var(--r-pill);
  background: rgba(30, 107, 245, 0.1);
  border: 1px solid rgba(47, 134, 255, 0.28);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--fg-2);
}
.pill-tag {
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.hero h1 { font-size: var(--fs-hero); font-weight: 850; line-height: 1.3; }
.hero-sub { font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.18rem); color: var(--fg-2); max-width: 46ch; line-height: 2; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* entrance */
.js .hero-copy > * { opacity: 0; transform: translateY(18px); animation: rise 0.9s var(--ease) forwards; }
.js .hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.js .hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.js .hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.js .hero-visual { opacity: 0; transform: translateY(28px) scale(0.98); animation: rise 1.2s var(--ease) 0.2s forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---- hero visual: Surena panel ---- */
.hero-visual { position: relative; perspective: 1400px; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: -12% -10%;
  background: radial-gradient(closest-side, rgba(47, 134, 255, 0.38), rgba(30, 188, 250, 0.12) 55%, transparent);
  z-index: -1;
}
.tilt { transform-style: preserve-3d; transition: transform 0.6s var(--ease); will-change: transform; }

.panel {
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, rgba(20, 31, 72, 0.92), rgba(10, 16, 40, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 40px 80px -30px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  font-size: 12px;
  line-height: 1.6;
}
.panel-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.panel-url {
  margin-inline: auto;
  padding: 3px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  display: inline-flex; align-items: center; gap: 6px;
}
.panel-url .icon { width: 12px; height: 12px; color: var(--green-soft); }
.panel-bar .dots { display: flex; gap: 6px; }
.panel-bar .dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }

.panel-body { display: grid; grid-template-columns: 148px 1fr; min-height: 360px; }
.panel-side { border-inline-end: 1px solid var(--line); padding: 14px 10px; display: grid; align-content: start; gap: 2px; }
.panel-side .ps-brand { display: flex; align-items: center; gap: 8px; padding: 2px 8px 12px; font-weight: 800; font-size: 13px; }
.panel-side .ps-brand img { width: 22px; }
.ps-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--muted); }
.ps-item .icon { width: 15px; height: 15px; }
.ps-item.is-active { background: rgba(47, 134, 255, 0.14); color: var(--fg); }
.ps-item .badge { white-space: nowrap; margin-inline-start: auto; font-size: 10px; padding: 0 7px; border-radius: 99px; background: rgba(22, 163, 90, 0.18); color: var(--green-soft); }

.panel-main { padding: 16px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.pm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-head b { font-size: 14px; }
.pm-head span { color: var(--muted); font-size: 11px; }
.pm-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pm-stat { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); display: grid; gap: 2px; }
.pm-stat small { color: var(--muted); font-size: 10.5px; }
.pm-stat strong { font-size: 17px; font-weight: 800; }
.pm-stat em { font-style: normal; font-size: 10.5px; color: var(--green-soft); }
.pm-chart { border-radius: 12px; background: rgba(255, 255, 255, 0.025); border: 1px solid var(--line); padding: 10px 12px 6px; }
.pm-chart-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; }
.pm-chart svg { width: 100%; height: 92px; }
.chart-line { stroke-dasharray: 600; stroke-dashoffset: 600; }
.js .chart-line { animation: draw 2.2s var(--ease) 0.7s forwards; }
.no-js .chart-line, .reduce .chart-line { stroke-dashoffset: 0; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pm-mods { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-mod { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--fg-2); font-size: 11px; }
.pm-mod i { width: 6px; height: 6px; border-radius: 50%; background: var(--green-soft); }
.pm-mod.off { color: var(--muted); border-style: dashed; }
.pm-mod.off i { background: var(--muted); opacity: 0.5; }

.float-card {
  position: absolute;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 54, 0.82);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 24px 50px -18px rgba(0, 0, 0, 0.7);
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateZ(60px);
}
.float-card .fc-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.float-card .fc-icon .icon { width: 18px; height: 18px; }
.float-card b { display: block; font-size: 13px; }
.float-card span { color: var(--muted); font-size: 11.5px; }
.fc-1 { top: 24%; inset-inline-end: -6%; animation: float-a 7s ease-in-out infinite; }
.fc-1 .fc-icon { background: rgba(22, 163, 90, 0.16); color: var(--green-soft); }
.fc-2 { bottom: -7%; inset-inline-start: 6%; animation: float-b 8s ease-in-out infinite; }
.fc-2 .fc-icon { background: rgba(47, 134, 255, 0.16); color: var(--blue-2); }
.fc-langs { display: flex; gap: 4px; margin-top: 4px; }
.fc-langs i { font-style: normal; font-family: var(--mono); font-size: 10px; padding: 1px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.06); color: var(--fg-2); }
@keyframes float-a { 50% { transform: translateZ(60px) translateY(-10px); } }
@keyframes float-b { 50% { transform: translateZ(60px) translateY(9px); } }

@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { max-width: 640px; width: 100%; justify-self: center; margin-top: 12px; }
}
@media (max-width: 760px) {
  .float-card, .site-header.is-scrolled { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .float-card { background: rgba(15, 23, 54, 0.97); }
  .site-header.is-scrolled { background: rgba(6, 10, 26, 0.94); }
  .aurora-2, .aurora-3 { animation: none; }
}
@media (max-width: 560px) {
  .panel-body { grid-template-columns: 1fr; min-height: 0; }
  .panel-side { display: none; }
  .pm-stat strong { font-size: 15px; }
  .fc-1 { inset-inline-end: -4px; top: 46%; }
  .fc-2 { inset-inline-start: 8px; bottom: -30px; }
  .hero-visual { margin-top: 20px; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* --------------------------------------------------------------------------
   Stats strip
   -------------------------------------------------------------------------- */
.stats { padding-block: clamp(3rem, 2rem + 2vw, 4.5rem) 0; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}
.stat { padding: 28px 24px; display: grid; gap: 4px; }
.stat + .stat { border-inline-start: 1px solid var(--line); }
.stat-num { font-size: clamp(2rem, 1.5rem + 1.6vw, 2.9rem); font-weight: 850; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat-num .grad-text { padding-inline-end: 2px; }
.stat-label { color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 760px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-inline-start: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .stat { padding: 22px 16px; }
}

/* --------------------------------------------------------------------------
   Services bento
   -------------------------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.card {
  --mx: 50%;
  --my: 50%;
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 27, 64, 0.7), rgba(10, 16, 40, 0.7));
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease), border-color 0.3s;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(47, 134, 255, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  z-index: -1;
}
.card::after {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(300px circle at var(--mx) var(--my), rgba(30, 188, 250, 0.7), transparent 50%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover { transform: translateY(-4px); }
.card:hover::before, .card:hover::after { opacity: 1; }
.card h3 { font-size: var(--fs-h3); }
.card p { color: var(--muted); font-size: var(--fs-sm); line-height: 1.95; }
.card-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: rgba(47, 134, 255, 0.12);
  border: 1px solid rgba(47, 134, 255, 0.25);
  color: var(--blue-2);
  margin-bottom: 6px;
  transition: transform 0.5s var(--ease-spring);
}
.card:hover .card-icon { transform: rotate(-8deg) scale(1.06); }

.b-wp { grid-column: span 3; grid-row: span 2; background: radial-gradient(120% 90% at 100% 0%, rgba(30, 107, 245, 0.32), transparent 60%), linear-gradient(180deg, #0f1a45, #0a1030); }
.b-panel, .b-mod { grid-column: span 3; }
.b-ai { grid-column: span 4; }
.b-stats { grid-column: span 2; }
.b-sms, .b-sec { grid-column: span 3; }

.b-mod { background: linear-gradient(135deg, rgba(124, 92, 255, 0.16), rgba(10, 16, 40, 0.7) 55%); }

/* wp visual: stacked code layers */
.code-stack { margin-top: auto; position: relative; height: 230px; }
.code-layer {
  position: absolute;
  inset-inline: 0;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 13, 34, 0.88);
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.85;
  direction: ltr;
  text-align: left;
  color: #9fb0dd;
  transition: transform 0.7s var(--ease);
  overflow: hidden;
}
.code-layer.l1 { top: 0; transform: translateX(-28px) scale(0.92); opacity: 0.45; }
.code-layer.l2 { top: 30px; transform: translateX(-14px) scale(0.96); opacity: 0.7; }
.code-layer.l3 { top: 62px; }
.b-wp:hover .code-layer.l1 { transform: translateX(-44px) translateY(-8px) scale(0.92); }
.b-wp:hover .code-layer.l2 { transform: translateX(-22px) translateY(-4px) scale(0.96); }
.tk-k { color: #7cc4ff; }
.tk-f { color: #c3a6ff; }
.tk-s { color: #7ee2a8; }
.tk-c { color: #5d6a93; }

/* ai visual */
.ai-demo { margin-top: auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.ai-box { border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); padding: 12px 14px; font-size: 13px; line-height: 1.8; min-height: 92px; }
.ai-box small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.ai-box.out { direction: ltr; text-align: left; }
.ai-box.out small { font-family: var(--mono); }
.ai-out-text { transition: opacity 0.35s; }
.ai-arrow { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; box-shadow: 0 0 0 6px rgba(30, 107, 245, 0.15); }
.ai-arrow .icon { width: 18px; height: 18px; }
.ai-langs { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.ai-langs button {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  min-height: 30px;
  transition: all 0.25s;
}
.ai-langs button[aria-pressed="true"] { background: rgba(47, 134, 255, 0.18); border-color: rgba(47, 134, 255, 0.5); color: var(--fg); }

/* stats visual */
.spark { margin-top: auto; }
.spark svg { width: 100%; height: 70px; }
.spark-meta { display: flex; justify-content: space-between; align-items: baseline; }
.spark-meta strong { font-size: 1.6rem; font-weight: 850; }
.spark-meta span { color: var(--green-soft); font-size: var(--fs-xs); }

/* sms & security mini rows */
.mini-row { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); font-size: var(--fs-xs); color: var(--fg-2); }
.chip .icon { width: 15px; height: 15px; color: var(--cyan); }

@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-wp { grid-column: span 2; grid-row: auto; }
  .b-panel, .b-mod, .b-stats, .b-sms, .b-sec { grid-column: span 1; }
  .b-ai { grid-column: span 2; }
}
@media (max-width: 680px) {
  .bento { grid-template-columns: 1fr; }
  .b-wp, .b-panel, .b-mod, .b-ai, .b-stats, .b-sms, .b-sec { grid-column: auto; }
  .card { padding: 22px; }
  .ai-demo { grid-template-columns: 1fr; }
  .ai-arrow { justify-self: center; transform: rotate(-90deg); }
}

/* --------------------------------------------------------------------------
   Why Surena (comparison)
   -------------------------------------------------------------------------- */
.why-wrap { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
.why-wrap .section-head { position: sticky; top: calc(var(--header-h) + 40px); margin-bottom: 0; }
.compare { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.compare-head, .compare-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr; align-items: center; }
.compare-head { padding: 16px 24px; border-bottom: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.compare-head .us { color: var(--fg); font-weight: 800; display: flex; align-items: center; gap: 8px; }
.compare-head .us img { width: 22px; }
.compare-row { padding: 20px 24px; gap: 16px; }
.compare-row + .compare-row { border-top: 1px solid var(--line); }
.compare-row h3 { font-size: 1.02rem; display: flex; align-items: center; gap: 12px; }
.compare-row h3 .icon { color: var(--cyan); width: 22px; height: 22px; }
.cmp { font-size: var(--fs-sm); line-height: 1.8; display: flex; gap: 8px; align-items: flex-start; }
.cmp .icon { width: 18px; height: 18px; margin-top: 4px; }
.cmp.them { color: var(--muted); }
.cmp.them .icon { color: #6b7699; }
.cmp.us { color: var(--fg); }
.cmp.us .icon { color: var(--green-soft); }
.compare-row { transition: background-color 0.3s; }
.compare-row:hover { background: rgba(47, 134, 255, 0.05); }

@media (max-width: 900px) {
  .why-wrap { grid-template-columns: 1fr; }
  .why-wrap .section-head { position: static; }
}
@media (max-width: 600px) {
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr; gap: 10px; padding: 20px; }
  .cmp.them::before { content: attr(data-label); font-weight: 700; color: var(--muted); white-space: nowrap; }
  .cmp.us::before { content: attr(data-label); font-weight: 700; color: var(--fg); white-space: nowrap; }
}

/* --------------------------------------------------------------------------
   Process timeline
   -------------------------------------------------------------------------- */
.process { background: linear-gradient(180deg, transparent, rgba(10, 18, 48, 0.6) 30%, rgba(10, 18, 48, 0.6) 70%, transparent); }
.timeline { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.timeline-track {
  position: absolute;
  top: 27px;
  inset-inline: 28px;
  height: 2px;
  background: var(--line-strong);
  border-radius: 2px;
  overflow: hidden;
}
.timeline-track span {
  position: absolute; inset: 0;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 1.6s var(--ease) 0.2s;
}
.timeline.is-in .timeline-track span { transform: scaleX(1); }
.no-js .timeline-track span, .reduce .timeline-track span { transform: scaleX(1); }
.step { position: relative; display: grid; gap: 12px; align-content: start; }
.step-dot {
  width: 56px; height: 56px;
  border-radius: 18px;
  display: grid; place-items: center;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  color: var(--blue-2);
  position: relative;
  z-index: 1;
  transition: border-color 0.5s, box-shadow 0.5s, color 0.5s;
}
.timeline.is-in .step-dot { border-color: rgba(47, 134, 255, 0.55); box-shadow: 0 0 0 6px rgba(30, 107, 245, 0.1); }
.step-num { font-size: var(--fs-xs); color: var(--cyan); font-weight: 700; margin-top: 8px; }
.step h3 { font-size: 1.15rem; }
.step p { color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 860px) {
  .timeline { grid-template-columns: 1fr; gap: 28px; }
  .timeline-track { top: 28px; bottom: 28px; inset-inline-start: 27px; inset-inline-end: auto; width: 2px; height: auto; }
  .timeline-track span { transform: scaleY(0); transform-origin: top; }
  .timeline.is-in .timeline-track span { transform: scaleY(1); }
  .no-js .timeline-track span, .reduce .timeline-track span { transform: scaleY(1); }
  .step { grid-template-columns: 56px 1fr; column-gap: 18px; }
  .step-dot { grid-row: span 3; }
  .step-num { margin-top: 0; }
}

/* --------------------------------------------------------------------------
   Portfolio
   -------------------------------------------------------------------------- */
.works { display: grid; gap: 28px; }
.work {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 1rem + 3vw, 4rem);
  align-items: center;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: radial-gradient(80% 120% at 0% 100%, rgba(30, 107, 245, 0.18), transparent 60%), var(--surface);
  padding: clamp(24px, 1rem + 2.5vw, 48px);
}
.work-copy { display: grid; gap: 18px; justify-items: start; }
.work-kicker { color: var(--cyan); font-size: var(--fs-sm); font-weight: 700; }
.work h3 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 2rem); }
.work p { color: var(--fg-2); }
.work-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.work-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--blue-2); }
.work-link .icon { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
.work-link:hover .icon { transform: translate(-3px, -3px); }
.work-media { position: relative; min-width: 0; }
.work-media img { border-radius: 16px; border: 1px solid var(--line-strong); width: 100%; height: auto; }

/* editorial site mock (used until a real screenshot is added) */
.site-mock { border-radius: 16px; border: 1px solid var(--line-strong); background: #f4f6fb; color: #13182b; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8); transform: rotate(-1.2deg); transition: transform 0.8s var(--ease); }
.work:hover .site-mock { transform: rotate(0deg) scale(1.01); }
.sm-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: #e6e9f2; }
.sm-bar .panel-url { background: #fff; color: #5b6380; }
.sm-bar .dots i { background: #c8cde0; }
.sm-nav { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid #dfe3ee; font-size: 11px; }
.sm-logo { font-weight: 900; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.sm-logo i { width: 18px; height: 18px; border-radius: 4px; background: #13182b; display: inline-block; transform: rotate(45deg) scale(0.75); }
.sm-links { display: flex; gap: 14px; color: #5b6380; }
.sm-lang { display: flex; gap: 4px; }
.sm-lang b { font-weight: 700; font-size: 10px; padding: 1px 6px; border-radius: 4px; background: #e6e9f2; }
.sm-lang b.on { background: #13182b; color: #fff; }
.sm-body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; padding: 16px 18px 18px; }
.sm-lead { display: grid; gap: 8px; }
.sm-img { aspect-ratio: 16 / 9; border-radius: 8px; background: linear-gradient(135deg, #20304f, #3a5a8c 50%, #8aa4cf); position: relative; overflow: hidden; }
.sm-img::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, 0.35)); }
.sm-cat { font-size: 10px; color: #b4232c; font-weight: 800; }
.sm-title { font-weight: 900; font-size: 15px; line-height: 1.6; }
.sm-meta { font-size: 10px; color: #5b6380; display: flex; gap: 8px; }
.sm-list { display: grid; gap: 10px; align-content: start; }
.sm-item { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px solid #dfe3ee; }
.sm-item:last-child { border-bottom: 0; }
.sm-item b { font-size: 11.5px; line-height: 1.7; }
.sm-item small { font-size: 9.5px; color: #5b6380; }
.sm-ai { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; color: #1e6bf5; font-weight: 800; }
.sm-ai::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #1e6bf5; }

@media (min-width: 901px) { .work:nth-child(even) .work-media { order: -1; } }
.form-status.err .icon { color: var(--danger); }
@media (max-width: 900px) {
  .work { grid-template-columns: 1fr; }
  .work-media { order: -1; }
}
@media (max-width: 520px) {
  .sm-body { grid-template-columns: 1fr; }
  .sm-links { display: none; }
}

/* --------------------------------------------------------------------------
   Smart panel
   -------------------------------------------------------------------------- */
.smart-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.smart-copy { display: grid; gap: 20px; justify-items: start; }
.smart-copy h2 { font-size: var(--fs-h2); }
.smart-copy > p { color: var(--muted); max-width: 52ch; }
.smart-flow {
  position: relative;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-strong);
  background: radial-gradient(90% 70% at 100% 0%, rgba(30, 107, 245, 0.22), transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(124, 92, 255, 0.14), transparent 60%), var(--surface-solid);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 50px 90px -40px rgba(0, 0, 0, 0.8);
  padding: clamp(24px, 1rem + 2vw, 40px);
  display: grid;
  gap: 30px;
}
.smart-flow li { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 18px; align-items: start; }
.smart-flow li:not(:last-child)::after {
  content: "";
  position: absolute;
  inset-inline-start: 25px;
  top: 58px;
  bottom: -26px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, rgba(47, 134, 255, 0.6), rgba(47, 134, 255, 0.08));
}
.sp-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: rgba(47, 134, 255, 0.12); border: 1px solid rgba(47, 134, 255, 0.3); color: var(--blue-2); transition: transform 0.5s var(--ease-spring); }
.smart-flow li:hover .sp-icon { transform: scale(1.08) rotate(-6deg); }
.sp-icon.is-done { background: rgba(22, 163, 90, 0.14); border-color: rgba(52, 210, 127, 0.4); color: var(--green-soft); }
.smart-flow b { display: block; font-size: 1.08rem; margin-top: 2px; }
.smart-flow span.sp-text { color: var(--muted); font-size: var(--fs-sm); }
@media (max-width: 960px) { .smart-wrap { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
.faq-wrap .section-head { margin-bottom: 0; }
.faq-mail { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; margin-top: 6px; }
.faq-mail .icon { color: var(--blue-2); }
.faq-list { display: grid; gap: 10px; }
.faq-item {
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.3s, background-color 0.3s;
}
.faq-item[open] { border-color: rgba(47, 134, 255, 0.35); background: rgba(18, 30, 72, 0.7); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.7;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-plus { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; flex: none; transition: transform 0.4s var(--ease), background-color 0.3s; }
.faq-plus .icon { width: 16px; height: 16px; }
.faq-item[open] .faq-plus { transform: rotate(45deg); background: var(--blue); border-color: var(--blue); }
.faq-body { padding: 0 22px 22px; color: var(--fg-2); font-size: var(--fs-sm); line-height: 2; overflow: hidden; }
@media (max-width: 900px) { .faq-wrap { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   CTA band
   -------------------------------------------------------------------------- */
.cta-band {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(40px, 2rem + 4vw, 88px) clamp(24px, 1rem + 4vw, 80px);
  background: linear-gradient(120deg, #0a367f 0%, #1e6bf5 55%, #2f86ff 80%, #1ebcfa 120%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
}
.cta-band::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(50% 80% at 85% 10%, rgba(124, 92, 255, 0.45), transparent 60%),
    radial-gradient(40% 60% at 10% 100%, rgba(30, 188, 250, 0.4), transparent 60%);
  z-index: -1;
  animation: cta-shift 14s ease-in-out infinite alternate;
}
.cta-band::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px), linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 70%);
  mask-image: linear-gradient(to left, #000, transparent 70%);
  z-index: -1;
}
@keyframes cta-shift { to { transform: translate3d(-4%, 3%, 0) scale(1.08); } }
.cta-band h2 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.8rem); color: #fff; }
.cta-band p { color: rgba(255, 255, 255, 0.85); margin-top: 12px; max-width: 52ch; }
.cta-mark { position: absolute; inset-inline-start: -40px; bottom: -70px; width: 320px; opacity: 0.12; z-index: -1; filter: brightness(3) saturate(0); transform: rotate(-10deg); }
.btn-white { background: #fff; color: #0a1230; box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.5); }
.btn-white:hover { background: #eef4ff; }
.btn-white:hover .icon { transform: translateX(-4px); }
@media (max-width: 760px) {
  .cta-band { grid-template-columns: 1fr; }
  .cta-band .btn { justify-self: start; }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
.contact-wrap .section-head { margin-bottom: 0; }
.contact-info { display: grid; gap: 12px; margin-top: 26px; }
.contact-info a, .contact-info div { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); transition: border-color 0.3s; }
.contact-info a:hover { border-color: rgba(47, 134, 255, 0.45); }
.contact-info .ci-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(47, 134, 255, 0.12); color: var(--blue-2); flex: none; }
.contact-info small { display: block; color: var(--muted); font-size: var(--fs-xs); }
.contact-info b { font-weight: 700; }

.form { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--surface); padding: clamp(22px, 1rem + 2vw, 36px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; position: relative; }
.field { display: grid; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: var(--fs-sm); font-weight: 600; color: var(--fg-2); }
.field label .req { color: var(--cyan); }
.input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 10, 26, 0.6);
  color: var(--fg);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  appearance: none;
}
.input::placeholder { color: #7480a8; }
.input:hover { border-color: rgba(148, 172, 255, 0.35); }
.input:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(47, 134, 255, 0.2); background: rgba(6, 10, 26, 0.85); }
textarea.input { min-height: 140px; resize: vertical; line-height: 1.9; }
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f9bc2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 18px;
  background-position: left 14px center;
  padding-left: 44px;
}
select.input option { background: var(--surface-solid); color: var(--fg); }
.field-hint { font-size: var(--fs-xs); color: var(--muted); }
.field-error { font-size: var(--fs-xs); color: var(--danger); display: none; }
.field.has-error .input { border-color: var(--danger); }
.field.has-error .field-error { display: block; }
.form-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.form-foot small { color: var(--muted); font-size: var(--fs-xs); }
.form .btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.3); border-top-color: #fff; animation: spin 0.7s linear infinite; display: none; }
.form.is-sending .btn .spin { display: block; }
.form.is-sending .btn .icon { display: none; }
.form.is-sending .btn { pointer-events: none; opacity: 0.85; }
.hp { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { grid-column: 1 / -1; display: none; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 14px; font-size: var(--fs-sm); }
.form-status .icon { margin-top: 3px; }
.form-status.ok { display: flex; background: rgba(22, 163, 90, 0.12); border: 1px solid rgba(52, 210, 127, 0.4); color: #c9f7dd; }
.form-status.ok .icon { color: var(--green-soft); }
.form-status.err { display: flex; background: rgba(255, 107, 122, 0.1); border: 1px solid rgba(255, 107, 122, 0.4); color: #ffd5da; }
@media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(3rem, 2rem + 3vw, 5rem) calc(env(safe-area-inset-bottom, 0px) + 28px); background: linear-gradient(180deg, rgba(10, 18, 48, 0.5), transparent); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.footer-about { display: grid; gap: 18px; align-content: start; }
.footer-social { display: flex; flex-wrap: wrap; gap: 10px; }
.social-link { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 14px; border-radius: 999px; border: 1px solid var(--line, rgba(255,255,255,.12)); color: var(--muted); font-size: var(--fs-sm); transition: color .2s, border-color .2s, background-color .2s; }
.social-link:hover, .social-link:focus-visible { color: var(--fg); border-color: rgba(47,134,255,.55); background: rgba(47,134,255,.08); }
.footer-about p { color: var(--muted); font-size: var(--fs-sm); max-width: 38ch; }
.footer-col h3 { font-size: var(--fs-sm); color: var(--fg); margin-bottom: 14px; }
.footer-col ul { display: grid; gap: 8px; }
.footer-col a { color: var(--muted); font-size: var(--fs-sm); transition: color 0.2s; }
.footer-col a:hover { color: var(--fg); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: var(--fs-xs); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: 1fr; } }

.to-top {
  position: fixed;
  inset-inline-start: max(20px, env(safe-area-inset-left, 0px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(13, 21, 51, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 40;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s var(--ease);
}
.to-top.is-show { opacity: 1; visibility: visible; transform: none; }

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------------
   Reduced motion / transparency
   -------------------------------------------------------------------------- */
@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; transition-delay: 0s !important; }
  .js .reveal, .js .hero-copy > *, .js .hero-visual { opacity: 1; transform: none; }
  .aurora, .float-card { animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header.is-scrolled, .float-card, .mobile-menu { background: var(--surface-solid); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

.eyebrow { color: var(--cyan); font-weight: 700; font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   Generic pages (index.php / page / single)
   -------------------------------------------------------------------------- */
.page-shell { padding-block: clamp(3rem, 2rem + 4vw, 6rem); }
.page-shell .entry { max-width: 760px; margin-inline: auto; }
.entry-title { font-size: var(--fs-h2); margin-bottom: 12px; }
.entry-meta { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 28px; }
.entry-content { color: var(--fg-2); }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2, .entry-content h3 { color: var(--fg); margin-top: 1.8em; }
.entry-content a { color: var(--blue-2); text-decoration: underline; text-underline-offset: 4px; }
.entry-content img { border-radius: var(--r); height: auto; }
.entry-content blockquote { margin-inline: 0; padding: 12px 20px; border-inline-start: 3px solid var(--blue); background: var(--surface); border-radius: var(--r-sm); }
.entry-content pre, .entry-content code { font-family: var(--mono); direction: ltr; }
.entry-content pre { overflow-x: auto; padding: 16px; border-radius: var(--r); background: var(--surface-solid); }
.post-list { display: grid; gap: 16px; max-width: 760px; margin-inline: auto; }
.post-item { padding: 22px 24px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); display: grid; gap: 6px; }
.post-item h2 { font-size: 1.2rem; }
.post-item p { color: var(--muted); font-size: var(--fs-sm); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }
.pagination .page-numbers { padding: 6px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); }
.pagination .current { background: var(--blue); border-color: var(--blue); }
.empty-state { text-align: center; display: grid; gap: 16px; justify-items: center; padding-block: 4rem; }
.empty-state h1 { font-size: var(--fs-h2); }
.empty-state p { color: var(--muted); }
.work-placeholder { aspect-ratio: 16 / 10; border-radius: 16px; border: 1px solid var(--line-strong); background: radial-gradient(80% 80% at 70% 20%, rgba(47, 134, 255, 0.35), transparent 60%), var(--surface-solid); display: grid; place-items: center; font-weight: 800; font-size: 1.4rem; color: var(--fg-2); padding: 24px; text-align: center; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Footer: legal links and trust seal */
.footer-bottom { align-items: center; }
.footer-bottom-main { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-legal a { color: var(--muted); transition: color 0.2s; }
.footer-legal a:hover { color: var(--fg); }
.footer-addr { color: var(--muted); font-size: var(--fs-sm); line-height: 1.9; }
.trust-seal { display: flex; align-items: center; }
.trust-seal img { width: 96px; height: auto; min-height: 0; }
.trust-seal.is-empty { display: none; }
.contact-info div b { font-weight: 600; line-height: 1.9; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; display: grid; gap: 0.5em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li::marker { color: var(--blue-2); }

/* ==========================================================================
   Blog
   ========================================================================== */
.nav a[aria-current="page"] { color: var(--fg); background: rgba(255, 255, 255, 0.06); }

/* ---------- article card ---------- */
.post-card { position: relative; display: grid; gap: 16px; align-content: start; min-width: 0; }
.post-card__media {
  display: block;
  position: relative;
  aspect-ratio: 40 / 21;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-solid);
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(70% 90% at 80% 0%, rgba(30, 107, 245, 0.35), transparent 60%), var(--surface-solid); }
.thumb-ph img { width: 64px; height: auto; opacity: 0.8; }
.post-card__body { display: grid; gap: 8px; justify-items: start; min-width: 0; }
.post-card__cat { color: var(--cyan); font-size: var(--fs-xs); font-weight: 700; }
.post-card__title { font-size: 1.18rem; line-height: 1.6; font-weight: 800; }
.post-card__title a { background-image: linear-gradient(currentColor, currentColor); background-size: 0% 1px; background-position: 100% 100%; background-repeat: no-repeat; transition: background-size 0.45s var(--ease), color 0.25s; }
.post-card:hover .post-card__title a { color: #fff; background-size: 100% 1px; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.post-card__excerpt { color: var(--muted); font-size: var(--fs-sm); line-height: 1.95; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-card a:focus-visible { outline: none; }
.post-card:has(a:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 6px; border-radius: var(--r); }

.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: var(--fs-xs); }
.post-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.post-meta .icon { width: 15px; height: 15px; opacity: 0.8; }
.post-meta--lg { font-size: var(--fs-sm); gap: 8px 22px; }
.post-meta__author { color: var(--fg-2); font-weight: 700; }
.post-meta__author img { width: 22px; height: auto; }

/* featured variant: horizontal */
.post-card--featured { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(20px, 1rem + 2vw, 44px); align-items: center; }
.post-card--featured .post-card__media { border-radius: var(--r-lg); }
.post-card--featured .post-card__title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.9rem); line-height: 1.5; }
.post-card--featured .post-card__excerpt { -webkit-line-clamp: 3; font-size: 1rem; }
.post-card--featured .post-card__body { gap: 12px; }
@media (max-width: 860px) { .post-card--featured { grid-template-columns: 1fr; } }

/* compact variant: thumb beside text */
.post-card--compact { grid-template-columns: 168px minmax(0, 1fr); gap: 16px; align-items: center; }
.post-card--compact .post-card__media { aspect-ratio: 40 / 21; border-radius: 12px; }
.post-card--compact .post-card__title { font-size: 1.02rem; }
@media (max-width: 420px) { .post-card--compact { grid-template-columns: 104px minmax(0, 1fr); } }

/* ---------- homepage latest ---------- */
.latest-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: clamp(1.8rem, 1rem + 2vw, 3rem); flex-wrap: wrap; }
.latest-head h2 { font-size: var(--fs-h2); }
.latest-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(24px, 1rem + 2vw, 48px); align-items: start; }
.latest-grid .post-card--featured { grid-template-columns: 1fr; }
.latest-side { display: grid; gap: 24px; padding-inline-start: clamp(0px, 2vw, 40px); border-inline-start: 1px solid var(--line); }
.latest-grid.is-single { grid-template-columns: 1fr; }
.latest-grid.is-single .post-card--featured { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 900px) {
  .latest-grid { grid-template-columns: 1fr; }
  .latest-side { border-inline-start: 0; padding-inline-start: 0; border-top: 1px solid var(--line); padding-top: 24px; }
  .latest-grid.is-single .post-card--featured { grid-template-columns: 1fr; }
}

/* ---------- blog listing ---------- */
.blog-head { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(2rem, 1rem + 2vw, 3rem); position: relative; isolation: isolate; }
.blog-head::before { content: ""; position: absolute; inset: -40% 0 0; z-index: -1; background: radial-gradient(50% 60% at 85% 0%, rgba(30, 107, 245, 0.22), transparent 70%); pointer-events: none; }
.blog-title { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); }
.blog-lead { color: var(--fg-2); max-width: 60ch; margin-top: 12px; font-size: 1.08rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.chip-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); color: var(--fg-2); font-size: var(--fs-sm); transition: background-color 0.2s, border-color 0.2s, color 0.2s; }
.chip-link:hover { border-color: rgba(47, 134, 255, 0.5); color: var(--fg); }
.chip-link.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.blog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 1.5rem + 2vw, 56px) clamp(24px, 1rem + 2vw, 40px); padding-bottom: 2rem; }
.blog-grid > .post-card--featured { grid-column: 1 / -1; padding-bottom: clamp(32px, 1.5rem + 2vw, 56px); border-bottom: 1px solid var(--line); }
@media (max-width: 700px) { .blog-grid { grid-template-columns: 1fr; } }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-block: 1rem 0; }
.pagination .page-numbers { min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); color: var(--fg-2); }
.pagination a.page-numbers:hover { border-color: rgba(47, 134, 255, 0.5); color: var(--fg); }
.pagination .current { background: var(--blue); border-color: var(--blue); color: #fff; }
.empty-state img { opacity: 0.7; }

/* ---------- single article ---------- */
.read-progress { position: fixed; inset: env(safe-area-inset-top, 0px) 0 auto; height: 3px; z-index: 55; pointer-events: none; display: none; }
.read-progress span { display: block; height: 100%; background: var(--grad); transform-origin: right; transform: scaleX(0); }
@supports (animation-timeline: scroll()) {
  .read-progress { display: block; }
  .read-progress span { animation: read-grow linear both; animation-timeline: scroll(root block); }
}
@keyframes read-grow { to { transform: scaleX(1); } }

.article-head { padding-block: clamp(2rem, 1rem + 3vw, 4rem) clamp(1.5rem, 1rem + 1.5vw, 2.5rem); position: relative; isolation: isolate; }
.article-head::before { content: ""; position: absolute; inset: -30% 0 0; z-index: -1; background: radial-gradient(45% 60% at 90% 0%, rgba(30, 107, 245, 0.22), transparent 70%); pointer-events: none; }
.article-head__inner { display: grid; gap: 18px; justify-items: start; }
.article-head__inner > * { max-width: 880px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--muted); }
.crumbs a:hover { color: var(--fg); }
.article-title { font-size: clamp(1.85rem, 1.3rem + 2.2vw, 3rem); line-height: 1.45; font-weight: 850; }
.article-lead { color: var(--fg-2); font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem); line-height: 2; max-width: 62ch; }

.article-cover { margin-block: 0 clamp(2rem, 1rem + 3vw, 3.5rem); }
.article-cover img { width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--line); }

.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: clamp(32px, 2rem + 3vw, 80px); align-items: start; }
.article-body { min-width: 0; max-width: 760px; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); order: 2; max-height: calc(100dvh - var(--header-h) - 48px); overflow: auto; }
.toc__box { border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); padding: 6px 6px 10px; }
.toc__box summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 800; font-size: var(--fs-sm); }
.toc__box summary::-webkit-details-marker { display: none; }
.toc__box summary .icon { color: var(--blue-2); }
.toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; counter-reset: toc; }
.toc__list a { display: block; padding: 7px 12px; border-radius: 10px; color: var(--muted); font-size: var(--fs-xs); line-height: 1.8; border-inline-start: 2px solid transparent; transition: color 0.2s, background-color 0.2s, border-color 0.3s; }
.toc__list a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.03); }
.toc__list a.is-active { color: var(--fg); border-inline-start-color: var(--blue-2); background: rgba(47, 134, 255, 0.08); }
.toc__list .lvl-3 a { padding-inline-start: 26px; }
@media (max-width: 1100px) {
  .article-grid { grid-template-columns: 1fr; }
  .toc { position: static; order: 0; max-height: none; }
  .toc__box:not([open]) { padding-bottom: 6px; }
  .article-body { max-width: none; }
}

/* prose */
.prose { color: var(--fg-2); font-size: 1.075rem; line-height: 2.1; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { color: var(--fg); font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); line-height: 1.6; margin-top: 2.2em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h3 { color: var(--fg); font-size: 1.2rem; line-height: 1.7; margin-top: 1.8em; scroll-margin-top: calc(var(--header-h) + 24px); }
.prose h2 + *, .prose h3 + * { margin-top: 0.7em; }
.prose strong { color: var(--fg); font-weight: 700; }
.prose a { color: var(--blue-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; transition: color 0.2s; }
.prose a:hover { color: var(--cyan); }
.prose ul, .prose ol { padding-inline-start: 1.3em; display: grid; gap: 0.55em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li::marker { color: var(--blue-2); font-weight: 700; }
.prose blockquote, .prose .wp-block-quote { margin: 1.8em 0; padding: 18px 22px; border-radius: var(--r); border: 1px solid rgba(47, 134, 255, 0.3); border-inline-start: 4px solid var(--blue-2); background: rgba(30, 107, 245, 0.07); color: var(--fg); }
.prose blockquote p { margin: 0; }
.prose blockquote cite { display: block; margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); font-style: normal; }
.prose img, .prose figure img { border-radius: var(--r); height: auto; }
.prose figure { margin-inline: 0; }
.prose figcaption { font-size: var(--fs-xs); color: var(--muted); text-align: center; margin-top: 8px; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); line-height: 1.9; }
.prose .wp-block-table { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); }
.prose th, .prose td { padding: 12px 14px; text-align: start; vertical-align: top; }
.prose thead th { background: rgba(47, 134, 255, 0.1); color: var(--fg); font-weight: 800; }
.prose tbody tr + tr td { border-top: 1px solid var(--line); }
.prose code { font-family: var(--mono); font-size: 0.9em; padding: 2px 7px; border-radius: 6px; background: rgba(255, 255, 255, 0.07); direction: ltr; unicode-bidi: isolate; }
.prose pre { direction: ltr; text-align: left; overflow-x: auto; padding: 18px; border-radius: var(--r); background: var(--surface-solid); border: 1px solid var(--line); line-height: 1.8; }
.prose pre code { padding: 0; background: none; }
.prose hr { border: 0; height: 1px; background: var(--line); margin-block: 2.4em; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 3rem; padding-top: 24px; border-top: 1px solid var(--line); }
.share__label { color: var(--muted); font-size: var(--fs-sm); margin-inline-end: 6px; }
.share__btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); background: transparent; color: var(--fg-2); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; transition: border-color 0.2s, color 0.2s, background-color 0.2s; }
.share__btn:hover { color: var(--fg); border-color: rgba(47, 134, 255, 0.5); background: rgba(47, 134, 255, 0.08); }
.share__btn.is-done { color: var(--green-soft); border-color: rgba(52, 210, 127, 0.5); }

.post-cta { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: clamp(22px, 1rem + 2vw, 36px); border-radius: var(--r-lg); border: 1px solid rgba(47, 134, 255, 0.35); background: radial-gradient(90% 120% at 100% 0%, rgba(30, 107, 245, 0.28), transparent 60%), var(--surface-solid); }
.post-cta h2 { font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem); line-height: 1.6; }
.post-cta p { color: var(--fg-2); font-size: var(--fs-sm); margin-top: 6px; }
@media (max-width: 640px) { .post-cta { grid-template-columns: 1fr; } .post-cta .btn { justify-self: start; } }

.related { padding-block: clamp(3.5rem, 2rem + 4vw, 6rem) 0; }
.related__title { font-size: var(--fs-h2); margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.5rem); }
.related__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 1rem + 1.5vw, 32px); }
@media (max-width: 900px) { .related__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .related__grid { grid-template-columns: 1fr; } }
.prose .wp-block-table table { border: 0; }
.prose .wp-block-table th, .prose .wp-block-table td { border: 0; }
.prose .wp-block-table thead { border-bottom: 1px solid var(--line-strong); }
.prose .wp-block-table tbody tr + tr td { border-top: 1px solid var(--line); }
.prose .wp-block-table td:first-child { color: var(--fg); font-weight: 700; }

/* --------------------------------------------------------------------------
   Floating messengers (speed dial) — sits opposite the to-top button
   -------------------------------------------------------------------------- */
.float-chat {
  position: fixed;
  inset-inline-end: max(20px, env(safe-area-inset-right, 0px));
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  z-index: 60;
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.float-chat__btn {
  position: relative;
  width: 56px; height: 56px; border-radius: 50%;
  border: 0; cursor: pointer; color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 28px -8px rgba(30, 107, 245, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: grid; place-items: center;
  transition: transform 0.25s var(--ease), background-color 0.2s;
}
.float-chat__btn:hover { background: var(--blue-2); transform: translateY(-2px); }
.float-chat__btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.float-chat__btn .icon { width: 26px; height: 26px; }
.float-chat__open, .float-chat__close { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity 0.2s, transform 0.3s var(--ease); }
.float-chat__close { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.float-chat.is-open .float-chat__open { opacity: 0; transform: rotate(90deg) scale(0.6); }
.float-chat.is-open .float-chat__close { opacity: 1; transform: none; }
.float-chat__btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(47, 134, 255, 0.55);
  animation: float-chat-ping 2.6s var(--ease) 2.5s 3;
}
.float-chat.is-open .float-chat__btn::after { animation: none; }
@keyframes float-chat-ping { 0% { box-shadow: 0 0 0 0 rgba(47, 134, 255, 0.5); } 70%, 100% { box-shadow: 0 0 0 16px rgba(47, 134, 255, 0); } }

.float-chat__panel {
  width: min(300px, calc(100vw - 40px));
  padding: 18px 14px 12px;
  border-radius: 20px;
  background: var(--surface-solid);
  border: 1px solid var(--line-strong);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.7);
  transform-origin: bottom left;
  opacity: 0; transform: translateY(10px) scale(0.96);
  transition: opacity 0.22s, transform 0.3s var(--ease);
}
.float-chat__panel[hidden] { display: block; visibility: hidden; pointer-events: none; }
.float-chat.is-open .float-chat__panel { opacity: 1; transform: none; visibility: visible; pointer-events: auto; }
.float-chat__head { padding: 0 6px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.float-chat__title { font-weight: 800; font-size: 1rem; color: var(--fg); }
.float-chat__text { font-size: var(--fs-xs); color: var(--muted); margin-top: 4px; }
.float-chat__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.float-chat__list li { opacity: 0; transform: translateY(6px); transition: opacity 0.25s, transform 0.3s var(--ease); transition-delay: calc(var(--i) * 40ms + 60ms); }
.float-chat.is-open .float-chat__list li { opacity: 1; transform: none; }
.float-chat__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; border-radius: 12px; color: var(--fg);
  transition: background-color 0.2s;
}
.float-chat__item:hover, .float-chat__item:focus-visible { background: rgba(148, 172, 255, 0.08); }
.float-chat__ic {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--blue-2);
  background: rgba(30, 107, 245, 0.12); border: 1px solid rgba(47, 134, 255, 0.22);
}
.float-chat__ic .icon { width: 20px; height: 20px; }
.float-chat__label { flex: 1; min-width: 0; display: grid; line-height: 1.5; }
.float-chat__label strong { font-weight: 700; font-size: var(--fs-sm); }
.float-chat__label small { font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.float-chat__label small.ltr { direction: ltr; text-align: end; }
.float-chat__go { width: 16px; height: 16px; color: var(--muted); transition: transform 0.25s var(--ease), color 0.2s; }
.float-chat__item:hover .float-chat__go { color: var(--fg); transform: translateX(-3px); }
@media (prefers-reduced-motion: reduce) {
  .float-chat__btn::after { animation: none; }
  .float-chat__panel, .float-chat__list li, .float-chat__open, .float-chat__close { transition: none; }
}
@media print { .float-chat { display: none; } }
