/* ============================================================
   CRMDV — components.css : section-specific styling
   ============================================================ */

/* ---------- HERO ---------- */
.hero { position: relative; overflow: hidden; padding-top: 130px; padding-bottom: clamp(60px, 8vw, 110px); }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8,8,11,.38), rgba(8,8,11,.48) 52%, rgba(8,8,11,.62)),
    radial-gradient(92% 82% at 68% 38%, transparent 0 42%, rgba(8,8,11,.46) 82%);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.hero-bg .glow {
  position: absolute; border-radius: 50%; filter: blur(90px);
}
.hero-bg .g1 { width: 620px; height: 620px; top: -180px; right: -120px; background: radial-gradient(circle, var(--amber-glow), transparent 68%); opacity: .34; }
.hero-bg .g2 { width: 480px; height: 480px; bottom: -220px; left: -120px; background: radial-gradient(circle, rgba(217,164,65,.3), transparent 70%); opacity: .28; }
/* delivery-map backdrop : улицы + анимированные маршруты + посылки, втекающие в телефон */
.hero-map {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: .58;
  -webkit-mask-image: radial-gradient(125% 108% at 70% 36%, #000 30%, transparent 80%);
          mask-image: radial-gradient(125% 108% at 70% 36%, #000 30%, transparent 80%);
}
.hero-map .road { fill: none; stroke: rgba(255,255,255,.055); stroke-width: 1.4; }
.hero-map .road.major { stroke: rgba(255,255,255,.085); stroke-width: 2.6; }
/* стопы градиентов — через классы, чтобы держать дизайн-токены */
.hero-map .rg-0 { stop-color: var(--gold); }
.hero-map .rg-1 { stop-color: var(--amber); }
.hero-map .hg-0 { stop-color: var(--amber); stop-opacity: .5; }
.hero-map .hg-1 { stop-color: var(--amber); stop-opacity: 0; }
.hero-map .route {
  fill: none; stroke: url(#routeGrad); stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 6 10; opacity: .34;
  animation: routeFlow 1s linear infinite;
}
@keyframes routeFlow { to { stroke-dashoffset: -16; } }
.hero-map .pin { fill: var(--amber); opacity: .65; }
.hero-map .pin-ring { fill: none; stroke: var(--amber); stroke-width: 1.4; opacity: .25; }
.hero-map .parcel { fill: var(--gold-200); opacity: .72; filter: drop-shadow(0 0 4px rgba(255,122,26,.22)); }
.hero-map .hub-glow { fill: url(#hubGlow); opacity: .55; }
.hero-map .hub-core { fill: var(--amber); opacity: .68; }
.hero-map .hub-ring { fill: none; stroke: var(--amber); stroke-width: 2; opacity: .6; }
@media (prefers-reduced-motion: reduce) {
  .hero-map .route { animation: none; }
}
/* Два элемента, две колонки: копия слева, телефон справа. Мини-прикидка комиссии убрана
   по решению владельца («всем и так понятно, сколько они платят»), вместе с ней ушёл
   и второй ряд сетки — иначе телефон растягивался бы на пустую строку. */
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 4vw, 56px) clamp(28px, 4vw, 56px); align-items: center; }
.hero-copy { min-width: 0; grid-column: 1; grid-row: 1; }
.hero-stage { grid-column: 2; grid-row: 1; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 8px 7px 14px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-2);
  font-size: 13px; color: var(--on-dark-mut);
}
.hero-badge b { color: var(--on-dark); font-weight: 600; }
/* iiko — ключевая интеграция: пилюля с красноватой подсветкой бренда iiko */
.hero-iiko { padding: 8px 16px; gap: 11px; background: rgba(238,56,58,.09); border-color: rgba(238,56,58,.42); }
.hero-iiko .iiko-logo { height: 17px; width: auto; display: block; }
.hero-iiko b { color: var(--on-dark); }
.hero-badge .pulse { width: 8px; height: 8px; border-radius: 50%; background: #38d27a; box-shadow: 0 0 0 0 rgba(56,210,122,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(56,210,122,.5);} 70%{ box-shadow: 0 0 0 9px rgba(56,210,122,0);} 100%{box-shadow:0 0 0 0 rgba(56,210,122,0);} }

/* H1 был лишь четвёртым по кеглю на странице (44 px против 128 у «20 000+»): контраст
   к тексту 2,44x. clamp до 68 px даёт ~3,8x и разводит H1 с H2 (34 px) на 34 px. */
.hero h1 {
  font-size: clamp(28px, 4.2vw, 52px);
  line-height: 1.06; letter-spacing: -.02em;
  margin-bottom: 12px; text-wrap: balance;
}
.hero h1 .em { color: var(--amber); }
.hero-tagline { font-family: var(--f-display); font-weight: 600; font-size: clamp(16px, 1.9vw, 23px); color: var(--gold-200); letter-spacing: -.01em; margin-bottom: 10px; }
/* цена была хвостом подзаголовка и рвалась по строке посреди фразы. Отдельный чип: сумма
   набрана дисплейной гарнитурой и не переносится (white-space + неразрывные пробелы). */
.hero-price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.hero-price b {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(28px, 3vw, 40px); line-height: 1;
  letter-spacing: -.02em; white-space: nowrap;
  background: linear-gradient(100deg, var(--gold-200), var(--amber));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-price span { font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-dim); }
.hero-sub { font-size: clamp(15px, 1.6vw, 18px); color: var(--on-dark-mut); max-width: 48ch; margin-bottom: 18px; }
.hero-stack { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.hero-stack .tag { color: var(--on-dark); background: rgba(255,255,255,.04); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-trust { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; }
.hero-trust .trust-metrics { display: flex; gap: 22px; flex-wrap: wrap; }
.hero-trust .tm { display: flex; flex-direction: column; }
.hero-trust .tm b { font-family: var(--f-display); font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.hero-trust .tm span { font-size: 12px; color: var(--on-dark-dim); font-family: var(--f-mono); }

/* hero stage : phone mockup */
.hero-stage { position: relative; display: flex; justify-content: center; align-items: center; min-height: 560px; }

/* ---------- PHONE MOCKUP ---------- */
.phone {
  position: relative; width: 300px; aspect-ratio: 300/620;
  border-radius: 50px; padding: 12px;
  background: linear-gradient(160deg, #2b2b34, #0c0c10);
  box-shadow: var(--sh-lg), 0 0 0 1px rgba(255,255,255,.06) inset;
}
.phone.tilt { transform: rotate(-7deg) translateY(6px); }
.phone-screen {
  position: relative; width: 100%; height: 100%; border-radius: 40px; overflow: hidden;
  background: #0c0a0e;
  display: flex; flex-direction: column;
}
/* dynamic island + live activity */
.island {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 6; background: #000; color: #fff;
  border-radius: 22px; height: 34px;
  display: flex; align-items: center; gap: 9px;
  padding: 0 13px; min-width: 116px;
  transition: min-width .55s var(--e-out), height .55s var(--e-out), padding .4s;
  overflow: hidden; white-space: nowrap;
}
.island .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); flex: none; }
.island .live-txt { font-size: 11px; font-weight: 600; opacity: 0; transition: opacity .3s; }
.island .live-eta { font-family: var(--f-mono); font-size: 11px; color: var(--amber); opacity: 0; transition: opacity .3s; margin-left: auto; }
.phone.expanded .island { min-width: 230px; height: 46px; padding: 0 16px; }
.phone.expanded .island .live-txt,
.phone.expanded .island .live-eta { opacity: 1; }

/* app statusbar */
.app-status { height: 50px; flex: none; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 22px 6px; font-size: 11px; font-weight: 600; }
/* app content */
.app-body { flex: 1; overflow: hidden; background: #0c0a0e; }
.app-top { padding: 6px 18px 12px; display: flex; align-items: center; justify-content: space-between; }
.app-top .app-logo { font-family: var(--f-display); font-weight: 700; font-size: 16px; }
.app-cats { display: flex; gap: 7px; padding: 0 18px 12px; }
.app-cat { font-size: 10.5px; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--on-dark-mut); white-space: nowrap; }
.app-cat.on { background: var(--amber); color: #1a0d02; font-weight: 600; }
.app-dishes { display: flex; flex-direction: column; gap: 11px; padding: 0 18px; }
.dish { display: flex; gap: 11px; align-items: center; }
.dish-img { width: 58px; height: 58px; border-radius: 14px; flex: none; object-fit: cover; display: block; }
.dish-meta { flex: 1; min-width: 0; }
.dish-meta b { font-size: 12.5px; font-weight: 600; display: block; }
.dish-meta span { font-size: 10.5px; color: var(--on-dark-dim); }
.dish-price { font-family: var(--f-mono); font-size: 12px; color: var(--amber); font-weight: 600; }
.dish-add { width: 26px; height: 26px; border-radius: 8px; background: var(--amber); color: #1a0d02; display: grid; place-items: center; font-size: 16px; font-weight: 700; flex: none; }

/* push notification */
.push {
  position: absolute; top: 56px; left: 12px; right: 12px; z-index: 7;
  background: rgba(30,28,34,.86); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px; padding: 11px 13px;
  display: flex; gap: 11px; align-items: flex-start;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.7);
  transform: translateY(-180%); opacity: 0;
  transition: transform .6s var(--e-out), opacity .4s;
}
.push.show { transform: translateY(0); opacity: 1; }
.push-ico { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(150deg, var(--amber), var(--gold)); flex: none; display: grid; place-items: center; font-size: 17px; }
.push-body b { font-size: 12px; display: block; }
.push-body span { font-size: 11px; color: var(--on-dark-mut); line-height: 1.35; display: block; }
.push-time { margin-left: auto; font-size: 10px; color: var(--on-dark-dim); font-family: var(--f-mono); flex: none; }

/* floating glass mini-cards near phone */
.float-card {
  position: absolute; z-index: 4;
  border-radius: var(--r-md); padding: 13px 15px;
  background: rgba(22,22,27,.72); backdrop-filter: blur(14px);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-md);
}
.float-card .fc-label { font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-dark-dim); margin-bottom: 4px; }
.float-card .fc-txt { font-family: var(--f-display); font-size: 15px; font-weight: 600; line-height: 1.25; letter-spacing: -.01em; color: var(--on-dark); }
/* карточки с текстом шире прежних числовых: разводим их по высоте, иначе они наезжают друг на друга */
.float-card { max-width: 200px; }
.fc-rev { bottom: 20%; left: 0; }
.fc-conv { bottom: 2%; right: 0; }

/* обёртка плавающих карточек: на десктопе прозрачна (карточки абсолютны), на планшете - ряд под телефоном */
.hero-floats { display: contents; }
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .hero-copy, .hero-stage { grid-column: 1; grid-row: auto; }
  .hero-stage { flex-direction: column; min-height: auto; margin-top: 20px; gap: 18px; }
  .hero-floats { display: flex; gap: 12px; width: 100%; max-width: 340px; }
  .float-card { position: static; flex: 1; min-width: 0; }
}
@media (max-width: 560px) {
  /* цель: телефон-макет попадает в первые 1,2 экрана. Ужимаем поля hero, снимаем третий
     тег и сокращаем зазоры. */
  .hero {
    padding-top: 100px;
    padding-bottom: 52px;
  }
  .hero-copy {
    width: 100%;
    max-width: 310px;
  }
  .hero-badges { margin-bottom: 14px; }
  .hero h1 {
    font-size: clamp(24px, 7.4vw, 30px);
    line-height: 1.08;
    text-wrap: auto;
    max-width: 100%;
    margin-bottom: 10px;
  }
  .hero h1 .em {
    display: block;
  }
  .hero-tagline {
    font-size: clamp(15px, 5vw, 18px);
    line-height: 1.2;
    margin-bottom: 6px;
  }
  .hero-price { margin-bottom: 12px; gap: 8px; }
  .hero-price b { font-size: clamp(26px, 8.4vw, 34px); }
  .hero-sub {
    font-size: 15px;
    max-width: 100%;
    margin-bottom: 14px;
  }
  /* третий тег на 390 занимал отдельную строку и отодвигал всё, что ниже */
  .hero-stack .tag-extra { display: none; }
  .hero-badge {
    max-width: 100%;
    font-size: 12.5px;
    gap: 8px;
  }
  .hero-stack .tag {
    font-size: 10px;
    letter-spacing: .06em;
    padding-inline: 10px;
  }
  .hero-stack { margin-bottom: 20px; }
  .hero-cta { margin-bottom: 20px; gap: 10px; }
  .hero-stack,
  .hero-cta,
  .hero-trust {
    width: 100%;
    max-width: 100%;
  }
  .hero-cta .btn {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }
  .hero-trust .trust-metrics {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .hero-trust .tm b {
    font-size: clamp(16px, 4.8vw, 18px);
    letter-spacing: -.03em;
    white-space: nowrap;
  }
  .hero-trust .tm span {
    font-size: 9.5px;
    line-height: 1.25;
  }
  .hero-stage {
    min-height: 430px;
    overflow: hidden;
  }
  .phone {
    width: min(270px, 78vw);
  }
}

/* ---------- BENTO ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; grid-auto-rows: minmax(60px, auto); }
.cell {
  border-radius: var(--r-lg); padding: 26px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; min-width: 0;
  overflow-wrap: break-word;
  transition: transform .35s var(--e-out), border-color .3s;
}
.sec-dark .cell { background: var(--ink-800); border: 1px solid var(--line); }
.sec-dark .cell:hover { transform: translateY(-4px); border-color: var(--line-2); }
.sec-cream .cell { background: #fff; border: 1px solid var(--cream-300); }
.sec-cream .cell:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.cell .cell-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; font-size: 20px; background: var(--amber-soft); color: var(--amber); flex: none; }
.cell h3 { font-size: 19px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; line-height: 1.1; }
.cell p { font-size: 14px; color: var(--on-dark-mut); }
.sec-cream .cell p { color: var(--on-cream-mut); }
.cell .benefit { margin-top: auto; padding-top: 14px; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--amber); display: inline-flex; align-items: center; gap: 7px; }
/* на белой карточке --amber-600 давал 3,07:1 при 11,5 px — ниже порога WCAG AA */
.sec-cream .cell .benefit { color: var(--amber-700); }
.cell.col-3 { grid-column: span 3; }
/* feature cells are always dark-gradient — force light text regardless of section */
.cell.feature { background: linear-gradient(155deg, var(--ink-750), var(--ink-850)) !important; color: var(--on-dark); border-color: var(--line-2); }
.sec-cream .cell.feature, .sec-dark .cell.feature { color: var(--on-dark); }
.sec-cream .cell.feature h3, .sec-dark .cell.feature h3 { color: var(--on-dark); }
.sec-cream .cell.feature p, .sec-dark .cell.feature p { color: var(--on-dark-mut); }
.sec-cream .cell.feature .benefit, .sec-dark .cell.feature .benefit { color: var(--amber); }
.cell.feature .tag { color: var(--on-dark); background: rgba(255,255,255,.05); border-color: var(--line-2); }
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .cell.col-3 { grid-column: span 1; }
  .cell.feature { grid-column: span 2; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .cell.feature, .cell.col-3 { grid-column: span 1; }
}

/* теги внутри карточки «Что входит» */
.cell-tags { margin-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
/* на светлой карточке базовый тег (светлый текст на прозрачном) нечитаем - свои цвета */
.sec-cream .cell:not(.feature) .cell-tags .tag { color: var(--on-cream); border-color: var(--cream-300); background: var(--cream-200); }

/* ⚠️ Подписи под цифрами первого экрана были 9,5 px, теги - 10 px: замер на 320 и 390
   показал их как самый мелкий текст страницы, притом под главными числами. 11,5 px
   читается, а строка «заказов в год» по-прежнему умещается в свою колонку. */
@media (max-width: 560px) {
  .hero-trust .tm span { font-size: 11.5px; line-height: 1.3; }
  .hero-stack .tag { font-size: 11px; }
}
