/*
 * App Negar v13 — Blue & Silver design system
 * A deliberately small final layer that normalises the legacy styles without
 * touching business logic or data structures.
 */

@font-face {
  font-family: "Vazirmatn Local";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/vazirmatn-arabic-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC;
}

@font-face {
  font-family: "Vazirmatn Local";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/vazirmatn-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --bg: #f4f7fb;
  --bg-alt: #e9eef5;
  --surface: #ffffff;
  --surface-soft: #f9fbfd;
  --ink: #101827;
  --ink-soft: #475569;
  --ink-mute: #64748b;
  --line: #d7dee8;
  --line-soft: #e8edf3;
  --brand: #0b3a82;
  --brand-2: #2368b3;
  --brand-strong: #072b63;
  --brand-tint: #e8f0fa;
  --accent: #7897b8;
  --silver: #a7b1c2;
  --silver-light: #edf1f5;
  --price: #08765e;
  --shadow-sm: 0 2px 10px rgba(16, 24, 39, .055);
  --shadow-md: 0 14px 38px -26px rgba(16, 24, 39, .34);
  --shadow-lg: 0 28px 70px -44px rgba(7, 43, 99, .42);
  --shadow-pop: 0 30px 80px -42px rgba(7, 43, 99, .56);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --wrap-max: 1240px;
}

html {
  background: var(--bg);
  scrollbar-color: var(--silver) var(--silver-light);
}

body,
button,
input,
select,
textarea {
  font-family: "Vazirmatn Local", ui-sans-serif, system-ui, "Segoe UI", Tahoma, sans-serif;
}

body {
  background:
    radial-gradient(900px 440px at 92% -120px, rgba(35, 104, 179, .11), transparent 65%),
    linear-gradient(180deg, #f8fafc 0, var(--bg) 38rem);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .42;
  background-image: linear-gradient(rgba(120, 151, 184, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 151, 184, .035) 1px, transparent 1px);
  background-size: 32px 32px;
}

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

:focus-visible {
  outline: 3px solid rgba(35, 104, 179, .28);
  outline-offset: 3px;
}

.wrap { padding-inline: clamp(16px, 3vw, 28px); }

.btn {
  min-height: 44px;
  border-radius: 14px;
  font-weight: 750;
  box-shadow: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--brand-strong), var(--brand-2));
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 12px 26px -18px rgba(7, 43, 99, .9);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #062659, #1b5da4);
  box-shadow: 0 18px 36px -22px rgba(7, 43, 99, .9);
}

.btn--ghost {
  color: var(--brand-strong);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn--ghost:hover { background: var(--silver-light); border-color: #bdc8d6; }

/* Header ------------------------------------------------------------- */
.topbar {
  background: rgba(248, 250, 252, .9);
  border-bottom: 1px solid rgba(215, 222, 232, .82);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  animation: none;
}

.topbar.is-scrolled {
  background: rgba(255, 255, 255, .96);
  border-bottom-color: var(--line);
  box-shadow: 0 16px 36px -32px rgba(16, 24, 39, .6);
}

.topbar__inner { min-height: 72px; padding-block: 9px; gap: 18px; }

.brand { gap: 11px; transform: none !important; }
.brand__logo {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(7, 43, 99, .16));
  animation: none !important;
}
.brand__name { color: var(--brand-strong); font-size: 18px; letter-spacing: .4px; }
.brand__tag { color: var(--ink-mute); }

.topbar__nav { gap: clamp(14px, 1.6vw, 24px); }
.topbar__nav > a,
.nav-more > summary {
  position: relative;
  color: #3f4c5e;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-more > summary::after { content: "⌄"; display: inline-block; margin-inline-start: 5px; color: var(--silver); }
.nav-more[open] > summary,
.topbar__nav > a:hover { color: var(--brand); }

.nav-more { position: relative; }
.nav-more__panel {
  position: absolute;
  top: calc(100% + 15px);
  inset-inline-end: 0;
  min-width: 210px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--shadow-pop);
}
.nav-more__panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 11px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}
.nav-more__panel a:hover { color: var(--brand); background: var(--brand-tint); }

.topbar__actions { gap: 8px; }
.topbar__cta { border-radius: 12px; }
.topbar__burger { border-color: var(--line); border-radius: 13px; }
.topbar__burger span { background: var(--brand-strong); }

.mobile-nav-actions,
.nav-backdrop { display: none; }
.nav-mobile-only { display: none !important; }

/* Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: clip !important;
  padding: clamp(42px, 6vw, 78px) 0 clamp(52px, 7vw, 88px) !important;
}

.hero::before {
  content: "";
  position: absolute;
  width: min(42vw, 560px);
  aspect-ratio: 1;
  inset-inline-end: -10%;
  top: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 151, 184, .22), rgba(35, 104, 179, .07) 45%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .98fr) !important;
  gap: clamp(32px, 5vw, 72px) !important;
}

.hero__copy { position: relative; z-index: 2; }
.hero__copy .pill {
  max-width: 100%;
  margin-bottom: 18px;
  padding: 7px 13px;
  color: var(--brand-strong);
  background: rgba(232, 240, 250, .82);
  border: 1px solid #ccd8e7;
}
.pill__dot { background: var(--brand-2); box-shadow: none; animation: none; }
.hero__title {
  max-width: 13ch;
  margin-bottom: 20px;
  font-size: clamp(38px, 4.4vw, 60px);
  line-height: 1.24;
  letter-spacing: -.8px;
}
.grad-text {
  background: linear-gradient(110deg, var(--brand-strong), var(--brand-2) 58%, #708aa6);
  -webkit-background-clip: text;
  background-clip: text;
}
.hero__sub { max-width: 58ch; color: #4c5b6d; font-size: 16px; line-height: 2; }
.hero__actions { margin-bottom: 28px; }
.hero__metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, .86);
}
.hero__metrics li { padding-inline: 10px; border-inline-start: 1px solid var(--line-soft); }
.hero__metrics li:last-child { border-inline-start: 0; }
.hero__metrics strong { color: var(--brand-strong); font-size: 21px; }
.hero__metrics span { color: var(--ink-mute); }

.hero__visual,
.hero__visual--lottie {
  min-height: 430px !important;
  margin: 0 !important;
  order: initial !important;
}
.hero__animation-card {
  width: min(42vw, 560px) !important;
  animation: none !important;
  filter: drop-shadow(0 30px 34px rgba(7, 43, 99, .15)) !important;
}
.lottie-mount .lottie-static-image { width: 100%; height: 100%; object-fit: contain; }
.hero__animation-card dotlottie-wc,
.hero__animation-card .lottie-mount {
  width: 118% !important;
  height: 118% !important;
  transform: none !important;
}

/* Sections and cards ------------------------------------------------- */
.section { padding: clamp(58px, 7vw, 88px) 0; }
.section--alt,
.section--articles { background: rgba(255, 255, 255, .68); border-color: var(--line-soft); }
.section--stats,
.section--tech,
.section--portal,
.section--projects,
.section--digital,
.section--about,
.section--portfolio-cats { background: transparent; }

.section__head { max-width: 680px; margin-bottom: 32px; }
.section__head h2,
.about-copy h2,
.portal-copy h2,
.cta__copy h2 { letter-spacing: -.25px; }
.section__head p { color: var(--ink-soft); line-height: 1.95; }
.eyebrow {
  color: var(--brand-strong);
  background: var(--brand-tint);
  border: 1px solid #d2ddea;
}

.product,
.portfolio-card,
.project-card,
.digital-card,
.tech-card,
.stat-card,
.quality-card,
.about-card,
.why-card,
.portal-card,
.chart-card,
.article-card,
.video-showcase-card {
  border-color: var(--line) !important;
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, .94);
}

.product:hover,
.portfolio-card:hover,
.project-card:hover,
.digital-card:hover,
.tech-card:hover,
.about-card:hover,
.why-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.product__media,
.portfolio-card__media,
.project-card__media,
.digital-card__media { background: var(--silver-light); }

.product__media img,
.portfolio-card__media img,
.project-card__media img,
.digital-card__media img { aspect-ratio: 16 / 10; }

.tech-card__icon,
.about-card > span { color: var(--brand); background: var(--brand-tint); }

.portal-card {
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(232, 240, 250, .8));
}
.portal-preview i { background: linear-gradient(90deg, var(--brand), var(--accent)); }

.portfolio-category-grid { gap: 16px; scrollbar-color: var(--silver) transparent; }
.portfolio-cat {
  min-width: 132px;
  border: 1px solid transparent;
}
.portfolio-cat:hover { border-color: var(--line); }
.portfolio-cat__image {
  width: 88px;
  height: 88px;
  padding: 10px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #fff, var(--silver-light));
}
.mobile-secondary-toggle { display: none; }

/* Contact ------------------------------------------------------------ */
.cta {
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
  gap: clamp(24px, 5vw, 54px);
  width: 100%;
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 30px;
  background:
    radial-gradient(420px 260px at 8% 0%, rgba(167, 177, 194, .22), transparent 68%),
    linear-gradient(145deg, #082c63, #0d438d 62%, #355f8c);
  box-shadow: 0 36px 80px -48px rgba(7, 43, 99, .82);
}
.cta::before { background: radial-gradient(circle, rgba(255, 255, 255, .12), transparent 68%); }
.cta__copy,
.cta__form { min-width: 0; width: 100%; }
.cta__copy h2 { color: #fff; }
.cta__copy p { color: #e3eaf2; line-height: 2; }
.cta__copy .eyebrow { color: #fff; border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.1); }
.cta__channels li { color: #eff5fb; }
.cta__form {
  padding: clamp(18px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 22px 55px -36px rgba(0, 0, 0, .52);
}
.cta__form .field { min-width: 0; }
.cta__form .field > span,
.cta__form label > span { color: var(--ink-soft) !important; }
.cta__form input,
.cta__form select,
.cta__form textarea {
  width: 100%;
  max-width: 100%;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.cta__form input:focus,
.cta__form select:focus,
.cta__form textarea:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(35, 104, 179, .1); }
.cta__form .btn--primary { color: #fff; background: linear-gradient(135deg, var(--brand-strong), var(--brand-2)); }
.cta__note { color: var(--brand); }

/* Trust + footer ----------------------------------------------------- */
.trust-section { padding: 42px 0; }
.trust-card {
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(135deg, #092d64, #174f91 66%, #6c829a);
  box-shadow: var(--shadow-lg);
}
.trust-card__eyebrow { color: #f3f7fb; }

.footer {
  padding: 48px 0 20px;
  color: #dce5ef;
  border-top: 1px solid rgba(167, 177, 194, .22);
  background:
    radial-gradient(500px 260px at 85% 0%, rgba(120, 151, 184, .16), transparent 68%),
    linear-gradient(145deg, #081a33, #0b274b 64%, #102f55);
}
.footer__inner { grid-template-columns: minmax(240px, 1.05fr) minmax(0, 2fr); }
.footer-logo { width: 68px; height: 68px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.2)); }
.footer .footer__brand .brand__name { color: #dce5ef !important; }
.footer__brand p,
.footer__cols a { color: #c5d0dd; }
.footer__cols h3,
.footer__cols h4 { margin: 0 0 12px; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .3px; }
.footer__cols a:hover { color: #fff; }
.footer__social-zone,
.footer__bar { border-color: rgba(203, 213, 225, .16); }
.footer__social-zone[hidden] { display: none !important; }
.footer__follow-label { color: #e3eaf2; }
.footer__social-link { color: #e6edf5; border-color: rgba(203,213,225,.24); background: rgba(255,255,255,.06); }
.footer__social-link:hover { color: #fff; background: rgba(255,255,255,.14); }
.footer__bar { color: #d3dde8; }
.footer__bar a { color: #f2f6fa; }
.footer__group > summary { display: none; }

/* Floating controls ------------------------------------------------- */
.ai-widget {
  inset-inline-start: 18px !important;
  bottom: 18px !important;
  transition: opacity .18s ease, transform .18s ease;
}
.ai-widget__fab {
  width: 54px;
  min-width: 54px;
  height: 54px;
  padding: 0 10px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--brand-strong), var(--brand-2));
  box-shadow: 0 18px 34px -20px rgba(7, 43, 99, .92);
}
.back-to-top {
  left: 24px !important;
  bottom: 84px !important;
  width: 42px;
  height: 42px;
  transform: translateY(8px) !important;
  background: rgba(255,255,255,.96);
  color: var(--brand-strong);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.back-to-top.is-visible { transform: translateY(0) !important; }
.floating-muted .back-to-top { opacity: 0 !important; visibility: hidden !important; pointer-events: none; }
.floating-muted .ai-widget { opacity: 0 !important; visibility: hidden !important; pointer-events: none; transform: translateY(12px); }
.is-typing .ai-widget { opacity: 0; pointer-events: none; transform: translateY(12px); }
.nav-open-lock .ai-widget,
.nav-open-lock .back-to-top { opacity: 0 !important; visibility: hidden !important; pointer-events: none; }

#cart-widget .cart-widget__fab {
  color: #fff;
  border-color: rgba(255,255,255,.5) !important;
  background: linear-gradient(135deg, var(--brand-strong), var(--brand-2), #758ba3) !important;
  animation: none !important;
}
#cart-widget .cart-widget__fab::before { display: none !important; }
#cart-widget .cart-widget__icon { display: inline-grid; place-items: center; line-height: 0; }

/* Auth / user pages -------------------------------------------------- */
.auth-body {
  background:
    radial-gradient(760px 420px at 8% 0%, rgba(35,104,179,.16), transparent 62%),
    radial-gradient(640px 360px at 100% 8%, rgba(167,177,194,.18), transparent 64%),
    linear-gradient(180deg, #f9fbfd, #edf2f7) !important;
}
.auth-shell { border: 1px solid var(--line); box-shadow: 0 38px 90px -56px rgba(16,24,39,.72); }
.auth-side { background: linear-gradient(155deg, #082b61, #0c438c 60%, #607994); }
.auth-side__list li::before { background: #bec9d6; }
.auth-side__glow { background: radial-gradient(circle, rgba(212,222,233,.25), transparent 70%); }
.user-tabs { background: var(--silver-light); border: 1px solid var(--line); }
.user-tabs button { color: #3f4c5e; }
.user-tabs button.is-active { color: var(--brand); box-shadow: var(--shadow-sm); }
.user-form input,
.user-settings-form input { border-color: var(--line); }
.captcha-box {
  max-width: none;
  min-height: 58px;
  border-radius: 14px;
  border-color: var(--line);
  background: var(--surface-soft);
  box-shadow: none;
}
.captcha-box__check { width: 24px; height: 24px; border-color: #aeb8c5; border-radius: 6px; }
.captcha-box__logo { display: none; }
.captcha-box__label { color: var(--ink-soft); }
.user-dashboard__hero { background: linear-gradient(135deg, #082b61, #124d94 68%, #607994); }

/* Youtube page ------------------------------------------------------- */
.youtube-page { min-height: 100vh; background: var(--bg); }
.youtube-main { width: min(1180px, 100%); margin: 0 auto; padding: 64px clamp(16px, 4vw, 28px) 88px; }
.youtube-hero { max-width: 720px; margin: 0 auto 34px; text-align: center; }
.youtube-hero h1 { margin: 12px 0 8px; font-size: clamp(30px, 5vw, 48px); line-height: 1.35; }
.youtube-hero p { margin: 0; color: var(--ink-soft); line-height: 1.95; }
.youtube-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; color: var(--brand-strong); background: var(--brand-tint); border: 1px solid #ccd8e7; font-weight: 800; font-size: 12px; }
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.yt-card { overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); }
.yt-frame { position: relative; aspect-ratio: 16/9; background: #07111f; }
.yt-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-card__body { padding: 15px 17px; }
.yt-card__body h3 { margin: 0; font-size: 15px; }
.yt-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 680px;
  margin: 24px auto 0;
  padding: clamp(34px, 7vw, 64px) 24px;
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed #b9c5d3;
  border-radius: 28px;
  background: linear-gradient(145deg, #fff, #edf2f7);
}
.yt-empty[hidden] { display: none; }
.yt-empty__icon { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 22px; color: #fff; background: linear-gradient(145deg, var(--brand-strong), var(--brand-2)); box-shadow: var(--shadow-md); }
.yt-empty h2 { margin: 4px 0 0; color: var(--ink); font-size: 22px; }
.yt-empty p { max-width: 50ch; margin: 0; line-height: 1.9; }
.yt-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }

/* Responsive --------------------------------------------------------- */
@media (max-width: 1090px) {
  .topbar__inner { min-height: 66px; padding-inline: 16px; }
  .brand { margin-inline-end: auto; }
  .brand__logo { width: 44px; height: 44px; }
  .brand__name { font-size: 16px; }

  .topbar__nav {
    display: none !important;
    position: fixed !important;
    top: 66px !important;
    right: 0 !important;
    left: auto !important;
    width: min(88vw, 370px) !important;
    height: calc(100dvh - 66px) !important;
    max-height: none !important;
    padding: 18px 16px 28px !important;
    overflow-y: auto !important;
    border: 0 !important;
    border-inline-start: 1px solid var(--line) !important;
    background: rgba(255,255,255,.985) !important;
    box-shadow: -24px 24px 64px -40px rgba(16,24,39,.68) !important;
    animation: none !important;
    z-index: 80;
  }
  .topbar.nav-open .topbar__nav { display: flex !important; }
  .topbar__nav > a {
    min-height: 46px;
    display: flex;
    align-items: center;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line-soft);
    font-size: 14px;
  }
  .topbar__nav > .nav-mobile-only { display: flex !important; color: var(--brand); font-weight: 800; }
  .nav-more { position: static; border-bottom: 1px solid var(--line-soft); }
  .nav-more > summary { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 10px 8px; font-size: 14px; }
  .nav-more__panel { position: static; min-width: 0; padding: 4px 8px 10px; border: 0; border-radius: 0; box-shadow: none; background: var(--surface-soft); }
  .nav-more__panel a { padding: 10px 12px; }

  .mobile-nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
  }
  .mobile-nav-actions > * { min-width: 0; }
  .mobile-nav-actions .topbar__auth-mount { grid-column: 1 / -1; }
  .mobile-nav-actions .topbar__cta--login,
  .mobile-nav-actions .topbar__user-btn { display: flex !important; width: 100%; justify-content: center; }
  .mobile-nav-actions .topbar__cart-mount { display: block !important; grid-column: 1 / -1; width: 100%; }
  .mobile-nav-actions #cart-widget.cart-widget { position: static !important; width: 100% !important; transform: none !important; }
  .mobile-nav-actions #cart-widget .cart-widget__fab { width: 100% !important; min-width: 0 !important; height: 44px !important; padding-inline: 14px !important; border-radius: 12px !important; display: flex !important; justify-content: center !important; gap: 8px; }
  .mobile-nav-actions #cart-widget .cart-widget__fab span:not(.cart-widget__icon) { display: inline !important; }
  .mobile-nav-actions #cart-widget .cart-widget__fab strong { position: static !important; min-width: 22px !important; height: 22px !important; transform: none !important; border: 0 !important; }

  .nav-backdrop {
    position: fixed;
    inset: 66px 0 0;
    z-index: 70;
    background: rgba(16, 24, 39, .38);
    backdrop-filter: blur(3px);
  }
  .topbar.nav-open .nav-backdrop { display: block; }
  body.nav-open-lock { overflow: hidden; }

  .hero__inner { grid-template-columns: 1fr !important; }
  .hero__copy { order: 1 !important; }
  .hero__visual,
  .hero__visual--lottie { order: 2 !important; min-height: 300px !important; }
  .hero__animation-card { width: min(72vw, 430px) !important; }

  .cta { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  body::before { display: none; }
  .wrap { padding-inline: 16px; }
  .topbar__actions > .topbar__cart-mount,
  .topbar__actions > .topbar__auth-mount,
  .topbar__actions > .topbar__cta--login { display: none !important; }
  .topbar__actions > .topbar__cta:not(.topbar__cta--login) {
    display: inline-flex !important;
    min-height: 42px;
    padding-inline: 13px !important;
    font-size: 12px !important;
  }
  .topbar__burger { display: inline-flex !important; width: 42px; height: 42px; }

  .hero { padding: 34px 0 46px !important; }
  .hero::before { width: 90vw; inset-inline-end: -38%; top: 18%; }
  body:not(.show-mobile-secondary) #about,
  body:not(.show-mobile-secondary) #technologies,
  body:not(.show-mobile-secondary) #portal { display: none !important; }
  .mobile-secondary-toggle { display: flex; justify-content: center; margin-top: 22px; }
  .mobile-secondary-toggle .btn { width: min(100%, 330px); justify-content: center; gap: 9px; }
  .mobile-secondary-toggle__icon { font-size: 20px; line-height: 1; transition: transform .18s ease; }
  body.show-mobile-secondary .mobile-secondary-toggle__icon { transform: rotate(45deg); }
  .hero__inner { gap: 18px !important; }
  .hero__copy .pill { margin-bottom: 14px; font-size: 11px; line-height: 1.7; }
  .hero__title {
    max-width: 100%;
    margin-bottom: 14px;
    font-size: clamp(32px, 9.2vw, 42px) !important;
    line-height: 1.28;
    letter-spacing: -.45px;
  }
  .hero__sub { margin-bottom: 20px; font-size: 14px; line-height: 1.95; }
  .hero__actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-bottom: 20px; }
  .hero__actions .btn { width: 100%; }
  .hero__metrics { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 8px; gap: 0; }
  .hero__metrics li { min-height: 66px; justify-content: center; border: 0; }
  .hero__metrics li:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .hero__metrics li:nth-child(odd) { border-inline-end: 1px solid var(--line-soft); }
  .hero__metrics strong { font-size: 18px; }
  .hero__visual,
  .hero__visual--lottie { min-height: 220px !important; margin-top: 4px !important; }
  .hero__animation-card { width: min(78vw, 300px) !important; filter: none !important; }

  .section { padding: 48px 0; }
  .section__head { margin-bottom: 24px; }
  .section__head h2 { font-size: clamp(24px, 7vw, 31px); }
  .section__head p { font-size: 13.5px; }

  .section__head--split { display: grid; gap: 14px; }
  .section__head--split .btn { width: max-content; }

  .stats-layout { display: block; }
  .stats-grid,
  .quality-grid,
  .advantages-grid,
  .about-list {
    display: flex !important;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    padding: 2px 1px 14px;
    scrollbar-width: none;
  }
  .stats-grid::-webkit-scrollbar,
  .quality-grid::-webkit-scrollbar,
  .advantages-grid::-webkit-scrollbar,
  .about-list::-webkit-scrollbar { display: none; }
  .stats-grid > *,
  .quality-grid > *,
  .advantages-grid > *,
  .about-list > * {
    flex: 0 0 min(82vw, 320px);
    scroll-snap-align: center;
  }
  .chart-card { min-height: 300px; margin-top: 2px; padding: 15px; }
  .chart-card svg { height: 205px; }
  .quality-grid { margin-top: 12px; }

  .tech-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .tech-card { padding: 12px 10px; }
  .about-layout { gap: 24px; }
  .about-copy h2 { font-size: 28px; }
  .about-metrics { grid-template-columns: repeat(3, 1fr); }
  .about-metrics strong { font-size: 19px; }

  .portfolio-category-grid { margin-inline: -16px; padding-inline: 16px; }
  .portfolio-cat { min-width: 106px; }
  .portfolio-cat__image { width: 74px; height: 74px; }

  .cta {
    width: 100% !important;
    margin: 0 !important;
    padding: 22px 16px !important;
    gap: 24px;
    border-radius: 24px;
  }
  .cta__copy,
  .cta__copy > *,
  .cta__form { max-width: 100% !important; margin-inline: 0 !important; transform: none !important; }
  .cta__copy h2 { font-size: 27px; }
  .cta__copy p { font-size: 13.5px; }
  .cta__form { padding: 16px 13px; border-radius: 19px; }

  .trust-card { padding: 24px 18px; border-radius: 24px; }
  .trust-card__text { min-width: 0; }

  .footer { padding-top: 38px; }
  .footer__inner { display: grid; grid-template-columns: 1fr; gap: 28px; }
  .footer__brand { max-width: none; text-align: center; }
  .footer-logo { margin-inline: auto; }
  .footer__cols { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .footer__group {
    border: 1px solid rgba(203, 213, 225, .16);
    border-radius: 15px;
    background: rgba(255,255,255,.035);
    overflow: hidden;
  }
  .footer__group > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
  }
  .footer__group > summary::-webkit-details-marker { display: none; }
  .footer__group > summary::after { content: "+"; color: #c8d3df; font-size: 18px; }
  .footer__group[open] > summary::after { content: "−"; }
  .footer__group > h3,
  .footer__group > h4 { display: none; }
  .footer__group > a { padding: 8px 14px; border-top: 1px solid rgba(203,213,225,.1); }
  .footer__group > a:last-child { padding-bottom: 14px; }
  .footer__social-zone { margin-top: 26px; padding-inline: 16px; }
  .footer__bar { display: grid; gap: 6px; justify-items: center; text-align: center; color: #dce5ef; }

  .ai-widget { inset-inline-start: 12px !important; bottom: max(12px, env(safe-area-inset-bottom)) !important; }
  .ai-widget__fab { width: 48px; min-width: 48px; height: 48px; padding: 0; border-radius: 15px; }
  .ai-widget__fab small { display: none; }
  .ai-widget__fab span { font-size: 13px; }
  .back-to-top { left: 15px !important; bottom: 70px !important; width: 40px; height: 40px; }

  .auth-page { padding-inline: 12px; }
  .auth-card { overflow: hidden; }
  .auth-card h1 { font-size: 23px; }
  .auth-card__sub { font-size: 13px; }
  .user-tabs { max-width: none; }

  .youtube-main { padding-top: 42px; padding-bottom: 64px; }
  .youtube-hero { margin-bottom: 26px; }
  .yt-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .brand__text { display: flex !important; }
  .brand__tag { display: none !important; }
  .brand__logo { width: 40px; height: 40px; }
  .brand__name { font-size: 14px; }
  .topbar__inner { gap: 7px; padding-inline: 12px; }
  .topbar__actions { gap: 6px; }
  .topbar__actions > .topbar__cta:not(.topbar__cta--login) { padding-inline: 10px !important; }
  .hero__title { font-size: 31px !important; }
}

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

/* Admin panel -------------------------------------------------------- */
.admin-page { background: #eef2f7 !important; }
.admin-sidebar,
.admin-shell::before { background: linear-gradient(180deg, #071c38, #0a2d57 62%, #102f55) !important; }
.admin-brand { border: 1px solid rgba(203,213,225,.14); background: rgba(255,255,255,.045); }
.admin-brand img { background: rgba(255,255,255,.92); }
.admin-tabs { gap: 10px !important; }
.admin-tabs__group { display: grid; gap: 6px; }
.admin-tabs__label {
  display: block;
  padding: 12px 10px 5px;
  color: #91a5ba;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .25px;
}
.admin-tabs button {
  min-height: 44px !important;
  color: #d9e3ed !important;
  border: 1px solid transparent !important;
  background: transparent !important;
}
.admin-tabs button:hover { background: rgba(255,255,255,.07) !important; }
.admin-tabs button.is-active {
  color: #fff !important;
  border-color: rgba(203,213,225,.18) !important;
  background: linear-gradient(135deg, rgba(35,104,179,.62), rgba(120,151,184,.24)) !important;
}
.admin-tabs button small { color: #c5d0dd !important; background: rgba(255,255,255,.1) !important; }
.admin-main { background: transparent; }
.admin-header {
  position: sticky;
  top: 14px;
  z-index: 35;
  border: 1px solid rgba(215,222,232,.9);
  border-radius: 22px;
  padding: 17px 18px;
  background: rgba(255,255,255,.93);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 44px -36px rgba(16,24,39,.7);
}
.admin-header h1 { color: var(--brand-strong); font-size: clamp(25px, 3vw, 35px); }
.admin-header p { color: #526174; }
.admin-actions { align-items: center; }
.admin-dirty-indicator {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #526174;
  background: var(--silver-light);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.admin-dirty-indicator.is-dirty { color: #8a4b08; border-color: #efd39f; background: #fff8e8; }
.admin-dirty-indicator.is-saving { color: var(--brand); border-color: #c7d7e9; background: var(--brand-tint); }
.admin-dirty-indicator.is-saved { color: #08765e; border-color: #b9dfd3; background: #edf9f5; }
#save-btn.is-dirty { box-shadow: 0 0 0 4px rgba(35,104,179,.12), 0 14px 28px -20px rgba(7,43,99,.86); }
#save-btn:disabled { cursor: default; opacity: .72; }
#save-btn[aria-busy="true"] { cursor: wait; }
.admin-more { position: relative; }
.admin-more > summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--brand-strong);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.admin-more > summary::-webkit-details-marker { display: none; }
.admin-more__menu {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  z-index: 60;
  width: 220px;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-pop);
}
.admin-more__menu .btn { width: 100%; justify-content: flex-start; }
.admin-card,
.admin-toolbar,
.admin-modal__dialog,
.admin-summary-card,
.admin-settings-card { border-color: var(--line) !important; box-shadow: var(--shadow-sm) !important; }
.admin-summary-copy small { color: #526174 !important; }
.admin-field input,
.admin-field select,
.admin-field textarea,
.admin-form input,
.admin-form select,
.admin-form textarea { border-color: var(--line) !important; }
.admin-sidebar-toggle { position: relative; }
.admin-sidebar-toggle span { display: none !important; }
.admin-sidebar-toggle::before,
.admin-sidebar-toggle::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 2px;
  border-radius: 99px;
  background: #fff;
}
.admin-sidebar-toggle::before { transform: rotate(45deg); }
.admin-sidebar-toggle::after { transform: rotate(-45deg); }

@media (max-width: 920px) {
  .admin-mobile-menu {
    top: 12px !important;
    right: 12px !important;
    width: 46px !important;
    height: 46px !important;
    border: 1px solid rgba(255,255,255,.16) !important;
    border-radius: 14px !important;
    background: linear-gradient(145deg, #082b61, #174f91) !important;
    box-shadow: var(--shadow-md) !important;
  }
  .admin-mobile-menu:not(.is-collapsed) span { display: none !important; }
  .admin-mobile-menu:not(.is-collapsed)::before,
  .admin-mobile-menu:not(.is-collapsed)::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 2px;
    border-radius: 99px;
    background: #fff;
  }
  .admin-mobile-menu:not(.is-collapsed)::before { transform: rotate(45deg); }
  .admin-mobile-menu:not(.is-collapsed)::after { transform: rotate(-45deg); }
  .admin-sidebar {
    width: min(86vw, 320px) !important;
    padding: 14px !important;
  }
  .admin-brand { padding: 10px !important; }
  .admin-tabs {
    display: block !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 28px !important;
  }
  .admin-tabs__group { margin-bottom: 10px; }
  .admin-tabs__label { padding-top: 8px; }
  .admin-tabs button { width: 100% !important; min-width: 0 !important; }

  .admin-main {
    padding: 72px 12px 94px !important;
  }
  .admin-header {
    position: relative;
    top: auto;
    display: block !important;
    min-height: 0 !important;
    padding: 16px !important;
    border-radius: 20px !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .admin-header h1 {
    margin: 4px 0 6px !important;
    font-size: clamp(22px, 7vw, 28px) !important;
    line-height: 1.35 !important;
  }
  .admin-header p {
    display: -webkit-box;
    margin: 0 !important;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 12px !important;
    line-height: 1.7 !important;
  }
  .admin-actions {
    position: fixed !important;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 120;
    width: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 48px !important;
    gap: 8px !important;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 24px 60px -30px rgba(16,24,39,.72);
    backdrop-filter: blur(16px);
  }
  .admin-dirty-indicator { display: none; }
  .admin-actions #save-btn { width: 100%; min-height: 48px; }
  .admin-more { min-width: 0; }
  .admin-more > summary { display: flex; width: 48px; height: 48px; padding: 0; font-size: 0; }
  .admin-more > summary::before { content: "•••"; font-size: 16px; letter-spacing: 2px; }
  .admin-more__menu {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    width: min(270px, calc(100vw - 32px));
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-pop);
  }
  .admin-more__menu .btn { width: 100%; justify-content: flex-start; }
}
