/* =========================================================
   AI Video Studio — Design Tokens (Light, 2026) v1.0
   Usage:
   - use var(--...) everywhere in components
   ========================================================= */

:root {
  /* -------------------------
     Colors — Base
     ------------------------- */
  --color-bg: #0F172A;          /* page background */
  --color-bg-alt: #1E293B;      /* alternating section bg */
  --color-surface: #1E293B;     /* cards, panels */
  --color-surface-2: #334155;   /* subtle surface for hero/media */

  --color-text: #F3F4F6;        /* primary text */
  --color-text-2: #CBD5E1;      /* secondary text */
  --color-text-3: #94A3B8;      /* muted/hints */

  --color-accent: #4F6EF7;      /* primary accent */
  --color-accent-hover: #3F5EEB;
  /* RGB helpers for rgba() usage */
  --accent-rgb: 79, 110, 247;
  --text-rgb: 243, 244, 246;
  --surface-rgb: 30, 41, 59;

  --color-accent-soft: #EEF2FF; /* soft accent bg */

  /* Borders are intentionally subtle in 2026 style */
  --color-border: rgba(255, 255, 255, 0.1);
  --color-border-strong: rgba(255, 255, 255, 0.2);
  --color-border-subtle: rgba(255, 255, 255, 0.05);

  /* System */
  --color-focus: rgba(79, 110, 247, 0.25);
  --color-shadow: rgba(15, 23, 42, 0.06);

  /* Derived */
  --overlay: rgba(0, 0, 0, 0.55);
  --surface-glass: rgba(var(--surface-rgb), 0.78);
  --surface-glass-strong: rgba(var(--surface-rgb), 0.90);
  --accent-10: rgba(var(--accent-rgb), 0.10);
  --accent-12: rgba(var(--accent-rgb), 0.12);
  --accent-18: rgba(var(--accent-rgb), 0.18);
  --accent-45: rgba(var(--accent-rgb), 0.45);
  --accent-55: rgba(var(--accent-rgb), 0.55);
  --accent-65: rgba(var(--accent-rgb), 0.65);

  /* Gradients */
  --grad-soft: linear-gradient(120deg, #EEF2FF 0%, #F8FAFF 100%);

  /* Flow gradients (2026) */
  --flow-1: linear-gradient(
    115deg,
    rgba(var(--accent-rgb), 0.18) 0%,
    rgba(var(--accent-rgb), 0.08) 25%,
    rgba(var(--accent-rgb), 0.00) 55%
  );
  --flow-2: linear-gradient(
    295deg,
    rgba(124, 155, 255, 0.14) 0%,
    rgba(124, 155, 255, 0.05) 30%,
    rgba(124, 155, 255, 0.00) 60%
  );

  --bg-blob-1: radial-gradient(800px 520px at 8% 8%, rgba(var(--accent-rgb), 0.12) 0%, rgba(var(--accent-rgb), 0.00) 60%);
  --bg-blob-2: radial-gradient(900px 560px at 92% 18%, rgba(var(--accent-rgb), 0.10) 0%, rgba(var(--accent-rgb), 0.00) 62%);
  --bg-blob-3: radial-gradient(900px 700px at 50% 112%, rgba(15, 23, 42, 0.06) 0%, rgba(15, 23, 42, 0.00) 55%);
  --bg-hero-image: url("../assets/bg/bg-flow-city.webp");
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");


  /* -------------------------
     Typography
     ------------------------- */
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;

  /* Font weights (avoid heavy bold) */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  /* Type scale */
  --fs-h1: 52px;
  --lh-h1: 1.15;

  --fs-h2: 40px;
  --lh-h2: 1.2;

  --fs-h3: 28px;
  --lh-h3: 1.25;

  --fs-body-lg: 18px;
  --lh-body-lg: 1.65;

  --fs-body: 16px;
  --lh-body: 1.6;

  --fs-sm: 14px;
  --lh-sm: 1.5;

  /* Letter spacing (subtle) */
  --ls-tight: -0.02em;
  --ls-normal: 0em;

  /* -------------------------
     Layout — Container & Gutters
     ------------------------- */
  --container-max: 1280px;

  /* Gutter (responsive in media queries below) */
  --gutter: clamp(16px, 3.6vw, 40px);

  /* Section spacing */
  --section-pad-y: 140px;       /* default vertical section padding */
  --section-gap: 64px;          /* gap between blocks inside a section */

  /* -------------------------
     Spacing scale (8pt-ish)
     ------------------------- */
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;
  --s-24: 96px;

  /* -------------------------
     Radius
     ------------------------- */
  --r-sm: 8px;
  --r-md: 12px;   /* buttons, inputs */
  --r-lg: 16px;   /* cards */
  --r-xl: 24px;   /* media / video */

  /* -------------------------
     Shadows (soft)
     ------------------------- */
  --shadow-sm: 0 6px 24px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 40px rgba(15, 23, 42, 0.06);

  /* -------------------------
     Components
     ------------------------- */
  /* Buttons */
  --btn-h: 48px;
  --btn-pad-x: 24px;
  --btn-radius: var(--r-md);

  /* Inputs */
  --input-h: 52px;
  --input-pad-x: 16px;
  --input-radius: var(--r-md);

  /* Media */
  --media-radius: var(--r-xl);

  /* -------------------------
     Motion
     ------------------------- */
  --dur-1: 180ms;
  --dur-2: 240ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* -------------------------
     Legacy aliases (keep current layout intact)
     ------------------------- */
  --bg: var(--color-bg);
  --surface: var(--color-bg-alt);
  --surface2: var(--color-surface-2);
  --text: var(--color-text);
  --muted: var(--color-text-2);
  --border: var(--color-border);
  --accent: var(--color-accent);
  --accent2: var(--color-accent-hover);
  --shadow: var(--shadow-md);
  --radius: var(--r-lg);
}

/* -------------------------
   Responsive gutters & spacing
   ------------------------- */
@media (max-width: 1024px) {
  :root {
    --gutter: 28px;
    --section-pad-y: 120px;
  }
}
@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --section-pad-y: 96px;

    /* Slightly smaller type on mobile */
    --fs-h1: 36px;
    --fs-h2: 30px;
    --fs-h3: 22px;
    --fs-body-lg: 16px;
  }
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
html, body { height: 100%; }
body{
  margin:0;
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  color:var(--color-text);
  background:var(--color-bg);
  line-height:var(--lh-body);
  letter-spacing: var(--ls-normal);
  overflow-x: hidden;
}

/* Background layer: soft gradients + noise (no images) */
body::before{
  content:"";
  position:fixed;
  inset:-20%;
  background:
    var(--flow-1),
    var(--flow-2),
    var(--bg-blob-1),
    var(--bg-blob-2),
    var(--bg-blob-3);
  transform: translateZ(0);
  pointer-events:none;
  z-index:-2;
}
body::after{
  content:"";
  position:fixed;
  inset:0;
  background-image: var(--noise);
  opacity:0.06;
  pointer-events:none;
  z-index:-1;
}
a{color:var(--color-accent); text-decoration:none}
a:hover{color:var(--color-accent-hover)}

.container{width:100%}

/* Внутренний контейнер: edge-to-edge секции + аккуратный gutter */
.wrap{
  width:100%;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}


/* Ограничение ширины только для длинных текстов (не для гридов/карточек) */
.content{
  max-width: 980px;
}
.nav{
  position:sticky; 
  top:0;
  z-index:100;
  background:var(--surface-glass);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
  will-change: transform;
}
html{
  scroll-behavior:smooth;
  height: 100%;
}
html, body { 
  height: 100%; 
  overflow-x: hidden;
}
body{
  margin:0;
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  color:var(--color-text);
  background:var(--color-bg);
  line-height:var(--lh-body);
  letter-spacing: var(--ls-normal);
  overflow-x: hidden;
}
.nav-inner{
  height:72px;
  display:flex; align-items:center; justify-content:space-between;
  padding:0;
}
.brand{
  display:flex; align-items:center; gap:12px;
  font-weight:650;
  letter-spacing:.2px;
  color: #F3F4F6;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.brand > div{
  color: #F3F4F6;
}
.logo{
  width:34px; height:34px; border-radius:12px;
  background:linear-gradient(135deg, var(--surface2), var(--color-surface));
  border:1px solid var(--border);
  box-shadow:0 6px 18px var(--color-shadow);
  position:relative;
  overflow:hidden;
}
.logo:after{
  content:"";
  position:absolute; inset:-8px;
  background:
    radial-gradient(circle at 30% 20%, var(--accent-18), transparent 55%),
    radial-gradient(circle at 80% 70%, var(--accent-10), transparent 55%);
}
.menu{
  display:flex; gap:18px; align-items:center;
  color:var(--muted); font-size:14px;
}
.menu-toggle{
  display:none;
  flex-direction:column;
  gap:4px;
  background:transparent;
  border:none;
  cursor:pointer;
  padding:8px;
  z-index:101;
  position:relative;
  pointer-events:auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.menu-toggle span{
  width:22px;
  height:2px;
  background:#F3F4F6;
  border-radius:2px;
  transition:all 0.3s ease;
  display:block;
  pointer-events:none;
}
.menu-toggle[aria-expanded="true"] span:nth-child(1){
  transform:rotate(45deg) translate(5px, 5px);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2){
  opacity:0;
}
.menu-toggle[aria-expanded="true"] span:nth-child(3){
  transform:rotate(-45deg) translate(7px, -6px);
}
.menu a{
  padding:8px 10px; 
  border-radius:10px;
  color: #F3F4F6;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.menu a:hover{
  background:var(--surface);
  color: var(--color-accent);
}
.nav a{
  color: #F3F4F6;
}
.nav-cta{display:flex; gap:10px; align-items:center}

.btn{
  appearance:none; border:1px solid var(--border);
  background:var(--color-surface); color:var(--text);
  height: var(--btn-h);
  padding:0 var(--btn-pad-x);
  border-radius:var(--btn-radius);
  font-weight:var(--fw-medium);
  font-size:14px;
  display:inline-flex;
  align-items:center;
  cursor:pointer;
  transition:transform var(--dur-1) var(--ease-out), box-shadow var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.btn:hover{box-shadow: var(--shadow); border-color:var(--color-border-strong)}
.btn:active{transform:translateY(1px)}
.btn.primary{
  background:var(--accent);
  color:#fff; border-color:rgba(var(--accent-rgb), 0.35);
}
.btn.primary:hover{background:var(--accent2)}
.btn.ghost{background:transparent}

.band{
  width:100%;
  position:relative;
  overflow:hidden;
  background: var(--band-bg, transparent);
}

/* Лёгкая вертикальная динамика (разный фон секций) */
.band::before{
  display: none;
}
.band::after{
  content:"";
  position:absolute;
  inset:0;
  background-image: var(--noise);
  opacity:0.035;
  pointer-events:none;
  z-index:0;
  mix-blend-mode:multiply;
}

.band > section{
  position:relative;
  z-index:1;
}

.band.soft{
  --band-bg: var(--color-bg-alt);
  --band-grad: transparent;
}

/* Первый блок имеет такой же фон как остальные */
.band:first-of-type {
  --band-bg: var(--color-bg-alt);
  --band-grad: transparent;
}

.band.border-top{border-top:1px solid var(--border)}
.band.border-bottom{border-bottom:1px solid var(--border)}

section{padding: var(--section-pad-y) 0}

/* HERO */
.hero{
  padding:0 0 34px;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  background: var(--color-bg);
  min-height: calc(100vh - 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 1025px) {
  .hero{
    padding-top: 100px;
  }
}

/* Hero background image on background */
.hero::before{
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: var(--hero-bg-image, url("../assets/bg/pr.png"));
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 0;
  pointer-events: none;
  filter: brightness(0.35);
}

@media (max-width: 1024px) {
  .hero::before {
    display: none;
  }
}
/* Fade to white at the bottom so the next section stays clean */
.hero::after{
  display: none;
}
.hero > *{ position: relative; z-index: 2; }

.hero-grid{
  display:grid;
  grid-template-columns: 1.15fr .85fr;
  gap:26px;
  align-items:stretch;
}
.kicker{
  display:inline-flex; gap:10px; align-items:center;
  padding:8px 12px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:999px;
  color:var(--muted);
  font-size:13px;
  width:fit-content;
}
.dot{
  width:8px; height:8px; border-radius:99px;
  background:var(--accent-55);
  box-shadow:0 0 0 4px var(--accent-12);
}
h1{
  margin:14px 0 10px;
  font-size:var(--fs-h1);
  line-height:var(--lh-h1);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.03em;
}
.lead{
  margin:0 0 18px;
  color: rgba(var(--text-rgb), 0.78);
  font-size:var(--fs-body-lg);
}

.hero-points{
  margin:0;
  padding:0;
  list-style:none;
  display:grid;
  gap:8px;
  color:var(--muted);
  font-size:14px;
}
.hero-points li{
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.hero-points li:before{
  content:"";
  width:7px; height:7px;
  border-radius:999px;
  background:var(--accent-65);
  box-shadow:0 0 0 4px var(--accent-12);
  margin-top:7px;
  flex:0 0 auto;
}

.trustline{
  margin-top:10px;
  font-size:13px;
  color:var(--muted);
}

.meta{
  margin-top:16px;
  display:flex; gap:12px; flex-wrap:wrap;
  color:var(--muted); font-size:13px;
}
.pill{
  padding:8px 10px;
  background:var(--color-surface);
  border:1px solid var(--border);
  border-radius:999px;
}
.hero-card{
  background:rgba(30, 41, 59, 0.5);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height: 320px;
}
.hero-preview{
  flex:1;
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius:var(--media-radius);
  border:1px solid var(--border);
  background:
    radial-gradient(circle at 25% 25%, var(--accent-18), transparent 52%),
    radial-gradient(circle at 85% 70%, var(--accent-10), transparent 55%),
    linear-gradient(180deg, var(--color-surface), rgba(var(--surface-rgb), 0));
  position:relative;
  overflow:hidden;
}
.preview-video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview-badge{
  position:absolute; left:12px; top:12px;
  background:var(--surface-glass);
  border:1px solid var(--border);
  border-radius:999px;
  padding:8px 10px;
  font-size:12px;
  color:var(--muted);
  backdrop-filter: blur(8px);
}
.play{
  position:absolute; inset:0;
  display:grid; place-items:center;
  cursor:pointer;
}
.play-btn{
  width:64px; height:64px; border-radius:999px;
  background:var(--color-surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  display:grid; place-items:center;
  transition:transform .12s ease;
}
.play:hover .play-btn{transform:scale(1.03)}
.triangle{
  width:0; height:0;
  border-left:14px solid var(--accent);
  border-top:9px solid transparent;
  border-bottom:9px solid transparent;
  margin-left:3px;
}
.hero-note{
  color:var(--muted);
  font-size:13px;
  display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap;
  border-top:1px solid var(--border);
  padding-top:12px;
}

/* Section headers */
.section-head{
  display:flex; justify-content:space-between; gap:16px; align-items:flex-end; flex-wrap:wrap;
  margin-bottom:18px;
}
.h2{
  margin:0;
  font-size:var(--fs-h3);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.025em;
  line-height:var(--lh-h3);
}
.sub{
  margin:0;
  color:var(--muted);
  font-size:14px;
}

/* Grids */
.grid-3{display:grid; grid-template-columns: repeat(3, 1fr); gap:14px; align-items:stretch}
#about .grid-3 > .card{
  height:100%; 
  display:flex; 
  flex-direction:column;
  min-height:180px
}
.services{display:grid; grid-template-columns:repeat(4,1fr); gap:14px; align-items:stretch}
#services .services > .card{height:100%; display:flex; flex-direction:column}
.benefits{display:grid; grid-template-columns:repeat(4,1fr); gap:14px}
.usecases{display:grid; grid-template-columns: 1fr 1fr; gap:14px}
/* Work carousel */
.work-carousel-wrapper{
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
}
.work-grid{
  display: flex;
  gap: 14px;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}
.work-grid::-webkit-scrollbar{
  display: none;
}
.work-grid > *{
  flex: 0 0 calc((100% - 42px) / 4);
  min-width: 0;
}
.carousel-btn{
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1;
}
.carousel-btn:hover{
  background: var(--color-surface-2);
  border-color: var(--color-border-strong);
  transform: scale(1.05);
}
.carousel-btn:active{
  transform: scale(0.95);
}
.carousel-btn svg{
  width: 20px;
  height: 20px;
}
.carousel-btn:disabled{
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}
.steps{display:grid; grid-template-columns:repeat(4,1fr); gap:14px}
.pricing{display:grid; grid-template-columns: 1.05fr .95fr; gap:14px; align-items:stretch}
#contact .pricing > .card{height:100%; display:flex; flex-direction:column}

.card{
  background: rgba(30, 41, 59, 0.68);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding:18px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
  position: relative;
  overflow: hidden;
}
.card::before{
  content: '';
  position: absolute;
  top: -1px;
  right: -1px;
  width: 70px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(-45deg);
  transform-origin: top right;
  z-index: 1;
}
.card::after{
  content: '';
  position: absolute;
  top: 11px;
  right: -1px;
  width: 70px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(-45deg);
  transform-origin: top right;
  z-index: 1;
}
.work::before,
.work::after{
  display: none;
}
#contact .card::before,
#contact .card::after{
  display: none;
}
.card.soft{background: rgba(30, 41, 59, 0.56)}
.card-title{margin:0 0 6px; font-size:16px; letter-spacing:-.2px}
.card-text{margin:0; color:var(--muted); font-size:14px}


/* Glass utilities (optional) */
.glass{
  background: rgba(30, 41, 59, 0.68);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.3),
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}
.glass-strong{
  background: rgba(30, 41, 59, 0.82);
  box-shadow:
    0 30px 90px rgba(var(--accent-rgb), 0.22),
    inset 0 0 0 1px rgba(var(--accent-rgb), 0.22);
}

.icon{
  width:34px; height:34px; border-radius:12px;
  border:1px solid rgba(255, 255, 255, 0.15);
  background:
    radial-gradient(circle at 30% 30%, rgba(var(--accent-rgb), 0.25), transparent 60%),
    rgba(30, 41, 59, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display:grid; place-items:center;
  margin-bottom:10px;
  box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.18);
}

.icon{
  color: var(--color-accent);
}
.icon svg [stroke]{stroke: currentColor !important;}
.icon svg [fill]{fill: currentColor !important;}

.benefit-num{
  font-size:12px; color:var(--muted);
  display:inline-flex; gap:8px; align-items:center;
  margin-bottom:8px;
}
.line{width:14px; height:2px; background:var(--accent-45); border-radius:99px}

.list{margin:0; padding-left:18px; color:var(--muted); font-size:14px}
.list li{margin:8px 0}

.work{padding:0; overflow:hidden; cursor:pointer; transition:transform .08s ease}
.work:active{transform:translateY(1px)}
.thumb{
  aspect-ratio: 9 / 16;
  width: 100%;
  background:
    radial-gradient(circle at 20% 25%, var(--accent-18), transparent 55%),
    radial-gradient(circle at 85% 70%, var(--accent-10), transparent 55%),
    linear-gradient(180deg, var(--color-surface), var(--color-bg-alt));
  border-bottom:1px solid var(--border);
  position:relative;
  overflow: hidden;
}
.thumb-video{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.thumb .mini-play{
  position:absolute; left:14px; bottom:14px;
  width:46px; height:46px; border-radius:999px;
  background:var(--surface-glass-strong);
  border:1px solid var(--border);
  display:grid; place-items:center;
  box-shadow:0 10px 26px rgba(var(--text-rgb), 0.08);
}
.work-body{padding:14px 16px}
.work-title{margin:0 0 6px; font-size:15px; letter-spacing:-.2px}
.work-meta{margin:0; color:var(--muted); font-size:13px}

.step-badge{
  font-size:12px; color:var(--muted);
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:999px;
  border:1px solid var(--border);
  background:var(--color-surface);
  margin-bottom:10px;
}

/* Form */
.form{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-top:10px;
}
.field{display:flex; flex-direction:column; gap:6px}
label{font-size:12px; color:var(--muted)}
input, textarea{
  width:100%;
  height: var(--input-h);
  padding:0 var(--input-pad-x);
  border-radius:var(--input-radius);
  border:1px solid var(--border);
  background:var(--color-surface);
  font:inherit;
  outline:none;
  transition:border-color var(--dur-2) var(--ease-out), box-shadow var(--dur-2) var(--ease-out);
}
textarea{min-height:108px; resize:vertical; height:auto; padding: var(--s-4) var(--input-pad-x)}
input:focus, textarea:focus{
  border-color:rgba(var(--accent-rgb), 0.45);
  box-shadow:0 0 0 6px var(--color-focus);
}
::placeholder{color:var(--color-text-3)}
.span-2{grid-column:1 / -1}
.form-actions{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:6px}
.fine{font-size:12px; color:var(--muted); margin:0}

/* Footer */
footer{
  padding:26px 0 34px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:13px;
  background:var(--color-surface);
}
.footer-grid{
  display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap;
  align-items:center;
}

/* Modal */
.modal{
  position:fixed; 
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index:100;
  display:none;
  align-items: center;
  justify-content: center;
  background:var(--overlay);
  padding:18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.modal.open{
  display:flex;
}
.modal-card{
  width:min(920px, calc(100% - 36px));
  max-height: calc(100vh - 36px);
  background:var(--color-surface);
  border-radius:20px;
  overflow:hidden;
  border:1px solid rgba(var(--surface-rgb), 0.18);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  margin: auto;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
/* Узкая ширина для вертикальных видео 9/16 */
.modal-card.modal-vertical{
  width:min(400px, calc(100% - 36px));
}
.modal-top{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  background:var(--surface);
  gap:10px;
}
.modal-title{margin:0; font-size:14px; color:var(--text); font-weight:650}
.close{
  border:1px solid var(--border);
  background:var(--color-surface);
  border-radius:12px;
  padding:8px 10px;
  cursor:pointer;
  color:var(--color-text);
  font-weight:650;
}
.player{
  background:#000;
  aspect-ratio: 9 / 16;
  display:grid; place-items:center;
  color:#fff;
  font-size:14px;
  width: 100%;
  max-width: min(400px, 90vw);
  margin: 0 auto;
  overflow: hidden;
}
/* Формат 16/9 для "Пример 01 - AI-ролик" (demos.mp4) */
.player[data-aspect="16/9"],
.player.video-widescreen{
  aspect-ratio: 16 / 9;
  max-width: min(920px, 90vw);
}
/* Формат 9/16 для всех остальных видео в "Примеры работ" */
.player.video-vertical{
  aspect-ratio: 9 / 16;
  max-width: 100%;
  width: 100%;
}
.player video{
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.player iframe{
  width: 100%;
  height: 100%;
}
.player small{opacity:.7}

.toast{
  position:fixed; right:14px; bottom:14px; z-index:120;
  background:var(--color-surface);
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px 14px;
  box-shadow: var(--shadow);
  display:none;
  max-width: 340px;
}
.toast.show{display:block}
.toast b{display:block; margin-bottom:4px}
.toast p{margin:0; color:var(--muted); font-size:13px}

/* Responsive */
@media (max-width: 980px){
  h1{font-size:38px}
  .hero-grid{grid-template-columns:1fr}
  .services{grid-template-columns:repeat(2,1fr)}
  .benefits{grid-template-columns:repeat(2,1fr)}
  .work-grid > *{flex: 0 0 calc((100% - 28px) / 3)}
  .steps{grid-template-columns:repeat(2,1fr)}
  .pricing{grid-template-columns:1fr}
}
@media (max-width: 640px){
  .menu-toggle{
    display:flex !important;
    pointer-events:auto !important;
  }
  .menu{
    display:none !important;
    position:fixed;
    top:72px;
    left:0;
    right:0;
    background:var(--surface-glass);
    backdrop-filter: blur(10px);
    border-bottom:1px solid var(--border);
    flex-direction:column;
    padding:18px;
    gap:12px;
    z-index:99;
    max-height:calc(100vh - 72px);
    overflow-y:auto;
  }
  .menu.open{
    display:flex !important;
  }
  .menu a{
    padding:12px;
    width:100%;
    text-align:left;
  }
  .nav-cta{
    display:none;
  }
  h1{font-size:34px}
  .grid-3{grid-template-columns:1fr}
  .services{grid-template-columns:1fr}
  .benefits{grid-template-columns:1fr}
  .usecases{grid-template-columns:1fr}
  .work-grid > *{flex: 0 0 100%}
  .work-carousel-wrapper{gap: 8px}
  .carousel-btn{width: 36px; height: 36px}
  .carousel-btn svg{width: 16px; height: 16px}
  .steps{grid-template-columns:1fr}
  .form{grid-template-columns:1fr}
  .hero{padding:46px 0 22px}
  .card::before,
  .card::after{width: 40px}
}
