/* ==========================================================================
   Kerege Auto — industrial / utilitarian. Dark steel, one amber accent,
   data-forward typography. Mobile-first, no horizontal scroll at 360px.
   Display: Tektur (cyrillic-ext → ң ө ү). Body: IBM Plex Sans.
   ========================================================================== */

:root {
  --bg: #0f1114;
  --bg-2: #15181d;
  --panel: #1b1f25;
  --line: #2a2f37;
  --line-2: #3a404a;
  --text: #eef0f3;
  --muted: #a4adba;
  --amber: #ffb703;
  --amber-2: #ffc933;
  --amber-ink: #1a1400;
  --wa: #25d366;
  --danger: #ff6b6b;
  --ok: #4ade80;

  --radius: 8px;
  --radius-sm: 6px;
  --wrap: 1180px;
  --gutter: 16px;

  --font-display: "Tektur", "Arial Black", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;

  /* type scale, ratio 1.25 */
  --fs--1: 13px;
  --fs-0: 16px;
  --fs-1: 18px;
  --fs-2: 20px;
  --fs-3: 25px;
  --fs-4: 31px;
  --fs-5: 39px;

  /* spacing scale (4/8) */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 24px 60px rgba(0, 0, 0, .5);
  --hazard: repeating-linear-gradient(135deg, var(--amber) 0 14px, #121417 14px 28px);
  --grade: saturate(.72) sepia(.15) contrast(1.08);
  --grade-team: saturate(.5) sepia(.22) contrast(1.1) brightness(.96);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth; scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--line-2) var(--bg);
  color-scheme: dark;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-0);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  padding-bottom: 64px; /* room for the mobile action bar */
}
body::before { /* grain */
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: 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='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
::selection { background: var(--amber); color: var(--amber-ink); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 800; line-height: 1.05; text-wrap: balance; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 3px; }

.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.section { padding: var(--s-8) 0; position: relative; }
.h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: var(--s-4); max-width: 22ch; }
.section-sub { color: var(--muted); max-width: 58ch; font-size: var(--fs-1); }
.sec-head {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-3) var(--s-6);
  padding-bottom: var(--s-4); margin-bottom: var(--s-6); border-bottom: 1px solid var(--line);
}
.sec-head .h2 { margin-bottom: var(--s-3); }
.sec-head .section-sub { margin-bottom: var(--s-1); }
.sec-meta {
  font-size: var(--fs--1); font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0;
}
@media (min-width: 720px) { :root { --gutter: 24px; } .section { padding: var(--s-9) 0; } .sec-head { margin-bottom: var(--s-7); } }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--amber); color: var(--amber-ink); padding: 10px 14px; border-radius: 6px; font-weight: 600;
}
.skip:focus { left: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  position: relative; isolation: isolate; overflow: hidden;
  transition: transform .15s ease, border-color .2s, color .2s, background .2s;
}
.btn:active { transform: translateY(1px); }
.btn.is-busy { opacity: .7; cursor: progress; }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: var(--fs-0); }
.btn-block { width: 100%; }
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary::before { /* fill slide */
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--amber-2);
  transform: translateX(-101%); transition: transform .3s var(--ease);
}
.btn-primary:hover::before { transform: none; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }
.btn-wa { background: var(--wa); color: #06210f; }
.btn-wa:hover { background: #2ee27a; }
.btn-dark { background: var(--bg); color: var(--text); }
.btn-dark:hover { background: #000; }
.btn-outline-dark { border-color: rgba(26, 20, 0, .5); color: var(--amber-ink); }
.btn-outline-dark:hover { background: rgba(26, 20, 0, .08); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 17, 20, .82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.site-header.is-scrolled { background: rgba(15, 17, 20, .96); border-color: var(--line); }
.header-row { display: flex; align-items: center; gap: var(--s-3); height: 68px; transition: height .25s var(--ease); }
.site-header.is-scrolled .header-row { height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  background: var(--amber); color: var(--amber-ink); font-family: var(--font-display); font-weight: 800; font-size: 19px;
  border-radius: 4px; transform: skewX(-8deg);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.brand-name span { color: var(--amber); }
.main-nav { display: none; gap: var(--s-5); margin-left: var(--s-5); }
.main-nav a { position: relative; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; padding: 6px 0; transition: color .2s; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--amber);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after { transform: scaleX(1); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.lang { display: none; align-items: center; gap: 2px; }
.lang button {
  background: none; border: 0; min-width: 44px; min-height: 44px; padding: 0 6px; color: var(--muted);
  font-weight: 600; font-size: 13px; letter-spacing: .06em; cursor: pointer; border-radius: 4px; transition: color .2s;
}
.lang button[aria-pressed="true"] { color: var(--amber); }
.lang button:hover { color: var(--text); }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 600;
  min-height: 44px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-variant-numeric: tabular-nums; transition: border-color .2s;
}
.header-phone:hover { border-color: var(--amber); }
.header-phone span { display: none; }
.header-phone svg { color: var(--amber); flex-shrink: 0; }
.btn-header { min-height: 44px; padding: 0 18px; font-size: 14px; display: none; }
.burger {
  width: 44px; height: 44px; display: grid; place-content: center; gap: 5px;
  background: none; border: 1px solid var(--line-2); border-radius: var(--radius-sm); cursor: pointer;
}
.burger span { width: 20px; height: 2px; background: var(--text); transition: transform .25s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-nav {
  display: flex; flex-direction: column; padding: var(--s-2) var(--gutter) var(--s-4);
  border-top: 1px solid var(--line); background: var(--bg-2);
  animation: navdrop .25s var(--ease);
}
@keyframes navdrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mobile-nav > a { text-decoration: none; padding: 14px 4px; font-weight: 600; font-size: 17px; border-bottom: 1px solid var(--line); }
.mobile-nav[hidden] { display: none; }
body.nav-open { overflow: hidden; }
main:focus { outline: none; }
.mobile-nav a.btn { margin-top: var(--s-4); border-bottom: 0; }
.lang-mobile { display: flex; gap: 4px; padding-top: var(--s-3); }
.lang-mobile button { min-width: 48px; min-height: 44px; font-size: 14px; }

@media (min-width: 600px) { .header-phone span { display: inline; } }
@media (min-width: 720px) { .lang { display: inline-flex; } }
@media (min-width: 1024px) {
  .main-nav { display: flex; }
  .main-nav a, .header-phone, .btn-header { white-space: nowrap; }
  .btn-header { display: inline-flex; }
  .burger, .mobile-nav { display: none !important; }
  body { padding-bottom: 0; }
}
@media (min-width: 1024px) and (max-width: 1199px) { /* nav + lang + phone + CTA do not fit with the number spelled out */
  .main-nav { gap: var(--s-4); margin-left: var(--s-4); }
  .header-phone span { display: none; }
  .header-phone { padding: 0 12px; }
}

/* ---------- Hero: type left, photo bleeding right, form on the seam ---------- */
.hero { position: relative; overflow: hidden; padding: var(--s-6) 0 var(--s-7); isolation: isolate; }
.hero-grid { display: grid; gap: var(--s-5); position: relative; z-index: 1; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs--1); font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--amber);
  margin-bottom: var(--s-4);
}
.hero h1 { font-size: clamp(38px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -.01em; max-width: 12ch; margin-bottom: var(--s-4); }
.lead { font-size: var(--fs-1); color: var(--muted); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); margin-top: var(--s-5); }
.hero-or { font-size: 15px; color: var(--muted); }
.hero-or a { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-2); font-variant-numeric: tabular-nums; transition: border-color .2s, color .2s; }
.hero-or a:hover { color: var(--amber); border-color: var(--amber); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-5); border-top: 1px solid var(--line); padding-top: var(--s-4); font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; line-height: 1.3; }
.hero-meta li::before { content: ""; width: 6px; height: 6px; background: var(--amber); flex-shrink: 0; }

.hero-media { margin-inline: calc(var(--gutter) * -1); aspect-ratio: 16 / 10; overflow: hidden; position: relative; }
/* < 1024 the band is almost the whole 3:2 frame, whose top 40 % is the car's black underside;
   zoom into the subject (lit face → lamp → brake) and anchor low so the black stays out. */
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 45% 95%; filter: var(--grade); transform: scale(1.35); transform-origin: 45% 95%; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg) 0%, transparent 45%);
}

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.quote { padding: var(--s-5) var(--s-4) var(--s-4); margin-top: calc(var(--s-7) * -1); position: relative; z-index: 2; }
.quote-title { font-size: var(--fs-3); margin-bottom: var(--s-1); }
.quote-sub { color: var(--muted); font-size: 14px; margin-bottom: var(--s-4); }

.hazard { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--hazard); }

@media (min-width: 1024px) {
  .hero { padding: var(--s-8) 0 calc(var(--s-8) + 8px); }
  /* the grid goes static so the photo positions against the full-width section, not the 1180px wrap */
  .hero-grid { position: static; grid-template-columns: minmax(0, 1fr) minmax(400px, 46%); column-gap: var(--s-7); align-items: center; min-height: 620px; }
  .hero-copy { grid-column: 1; grid-row: 1; position: relative; z-index: 1; }
  .hero-media {
    position: absolute; top: 0; bottom: 8px; left: 46%; right: 0; margin: 0; aspect-ratio: auto; z-index: 0;
  }
  .hero-media img { object-position: 50% 40%; transform: none; }
  .hero-media::after {
    background:
      linear-gradient(90deg, var(--bg) 0%, rgba(15, 17, 20, .7) 18%, rgba(15, 17, 20, .15) 42%, transparent 60%),
      linear-gradient(0deg, var(--bg) 0%, transparent 28%);
  }
  .quote { grid-column: 2; grid-row: 1; width: 400px; justify-self: start; margin-top: 0; padding: var(--s-6) var(--s-6) var(--s-5); }
}
@media (min-width: 1024px) and (max-width: 1439px) {
  /* laptop widths: a narrower card further left so the lamp-lit wheel is a real object
     (≈ 300 px at 1280, was ≈ 190), not a sliver behind the form */
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 52%); }
  .quote { width: 360px; padding: var(--s-5) var(--s-5) var(--s-4); }
  .hero-media { left: 44%; }
  .hero-media img { object-position: 72% 40%; }
}
@media (min-width: 1280px) { .hero h1 { font-size: 72px; } }
:lang(kg) .hero h1 { font-size: clamp(34px, 4.6vw, 60px); max-width: 14ch; }
:lang(en) .hero h1 { font-size: clamp(36px, 4.4vw, 60px); max-width: 16ch; } /* «Honest repairs. / We show you what / we replaced.» — three lines, not five, in the laptop column */

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--s-4); }
.field label { font-size: var(--fs--1); font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 12px 14px; color: var(--text); transition: border-color .2s, box-shadow .2s;
  min-height: 48px; font-variant-numeric: tabular-nums;
}
.field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%23a4adba' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
.field input::placeholder, .field textarea::placeholder { color: #7d8694; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255, 183, 3, .18); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field input[type="date"] { color-scheme: dark; }
.error { font-size: var(--fs--1); color: var(--danger); display: none; }
.field.invalid .error { display: block; }
.form-note { font-size: var(--fs--1); color: var(--muted); margin-top: var(--s-3); text-align: center; }
.field-row { display: grid; gap: 0 var(--s-4); }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }

/* live estimate — the signature moment */
.estimate {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label value" "note note";
  align-items: center; column-gap: var(--s-4); row-gap: 2px;
  padding: var(--s-3) var(--s-4); margin: calc(var(--s-1) * -1) 0 var(--s-4);
  border: 1px dashed rgba(255, 183, 3, .45); border-radius: var(--radius-sm); background: rgba(255, 183, 3, .05);
}
.est-label { grid-area: label; font-size: var(--fs--1); color: var(--muted); line-height: 1.3; }
.est-value { grid-area: value; font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.est-value b { font-size: var(--fs-3); font-weight: 800; color: var(--amber); display: inline-block; margin: 0 2px; }
.est-value b.is-rolling { animation: estflash .45s var(--ease); }
@keyframes estflash { 0% { color: #fff; transform: translateY(-4px); } 100% { color: var(--amber); transform: none; } }
.est-note { grid-area: note; font-size: 12px; color: var(--muted); opacity: .85; line-height: 1.35; } /* full width: KG label + note no longer stack six lines beside the value */
.estimate-row { margin-top: 0; }

.form-state.success { text-align: center; padding: var(--s-5) var(--s-2); animation: fadeup .4s var(--ease); }
.form-state.success:focus { outline: none; } /* focus moves here programmatically; the drawn tick is the state change */
.success-icon { width: 64px; height: 64px; margin: 0 auto var(--s-4); fill: none; stroke: var(--ok); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.success-icon circle { stroke-dasharray: 183; stroke-dashoffset: 183; animation: draw .6s var(--ease) forwards; }
.success-icon path { stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .35s var(--ease) .4s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.form-state.success h2, .form-state.success h3 { font-size: var(--fs-3); margin-bottom: var(--s-2); }
.form-state.success p { color: var(--muted); margin-bottom: var(--s-4); max-width: 40ch; margin-inline: auto; }

/* ---------- Services: price list ---------- */
.services { background: var(--bg-2); }
.pricelist { display: grid; gap: var(--s-6) var(--s-8); }
.pl-cat {
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--font-display); font-weight: 700; font-size: var(--fs--1); letter-spacing: .12em; text-transform: uppercase; color: var(--amber);
  margin-bottom: var(--s-2);
}
.pl-cat::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.pl-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name price" "desc cta";
  column-gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit; position: relative;
}
.pl-row::before {
  content: ""; position: absolute; inset: 0 calc(var(--s-3) * -1); border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .035); opacity: 0; transition: opacity .2s;
}
.pl-row:hover::before { opacity: 1; }
.pl-name { grid-area: name; display: flex; align-items: baseline; font-weight: 600; font-size: 17px; line-height: 1.3; transition: color .2s; }
.pl-name::after { content: ""; flex: 1; min-width: var(--s-5); margin: 0 var(--s-2); border-bottom: 1px dotted var(--line-2); transform: translateY(-5px); }
.pl-row:hover .pl-name { color: var(--amber); }
.pl-price { grid-area: price; align-self: baseline; font-family: var(--font-display); font-weight: 700; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pl-price b { font-size: 22px; font-weight: 800; color: var(--amber); margin: 0 1px; }
.pl-desc { grid-area: desc; color: var(--muted); font-size: 14px; max-width: 46ch; margin-top: var(--s-1); line-height: 1.45; }
.pl-cta { grid-area: cta; justify-self: end; align-self: end; font-size: var(--fs--1); font-weight: 600; color: var(--muted); white-space: nowrap; margin-top: var(--s-1); transition: color .2s, transform .25s var(--ease); }
.pl-cta::after { content: " →"; }
.pl-row:hover .pl-cta { color: var(--text); transform: translateX(3px); }
@media (max-width: 599px) { .pl-name::after { display: none; } } /* wrapped names turn the leader into a dash stub; the amber price already anchors the row */
@media (min-width: 900px) { .pricelist { grid-template-columns: 1fr 1fr; } }

/* ---------- Trust ---------- */
.trust-grid { display: grid; gap: var(--s-7); }
.badges { display: grid; gap: var(--s-2); margin-top: var(--s-5); }
.badges li { position: relative; padding-left: 20px; font-weight: 500; font-size: 15px; }
.badges li::before { content: ""; position: absolute; left: 0; top: .5em; width: 9px; height: 9px; background: var(--amber); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-6); align-self: center; }
.stats li { border-top: 1px solid var(--line-2); padding: var(--s-5) 0; }
.stats b { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 7vw, 48px); line-height: 1; color: var(--amber); font-variant-numeric: tabular-nums; margin-bottom: var(--s-2); text-wrap: balance; }
.stats span { display: block; color: var(--muted); font-size: 14px; max-width: 20ch; line-height: 1.4; }
@media (min-width: 900px) { .trust-grid { grid-template-columns: 1fr 1fr; gap: var(--s-9); align-items: center; } }

/* ---------- How ---------- */
.how { background: var(--bg-2); }
.steps { display: grid; gap: var(--s-6); }
.steps li { border-top: 2px solid var(--line); padding-top: var(--s-5); position: relative; }
.steps li::before { content: ""; position: absolute; top: -2px; left: 0; width: 40px; height: 2px; background: var(--amber); }
.step-num { display: block; font-family: var(--font-display); font-weight: 700; font-size: var(--fs--1); letter-spacing: .12em; color: var(--amber); margin-bottom: var(--s-3); }
.steps h3 { font-size: var(--fs-2); margin-bottom: var(--s-2); }
.steps p { color: var(--muted); font-size: 15px; max-width: 30ch; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .steps { grid-template-columns: repeat(4, 1fr); gap: var(--s-6); } }

/* ---------- Team ---------- */
.team-grid { display: grid; gap: var(--s-7); }
.team-cards { display: grid; gap: var(--s-4); grid-template-columns: 1fr 1fr; }
.team-cards figure { margin: 0 0 var(--s-3); aspect-ratio: 3 / 4; overflow: hidden; background: var(--panel); position: relative; }
/* The two portraits come from different shoots (cool grey vs. saturated blue/orange): one
   harder grade + a shared warm-to-dark wash so they read as one crew under one light. */
.team-cards img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: var(--grade-team); transition: transform .6s var(--ease), filter .4s; }
.team-cards figure::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 183, 3, .10) 0%, rgba(255, 183, 3, 0) 40%, rgba(15, 17, 20, .45) 100%);
  mix-blend-mode: multiply;
}
.team-cards li:nth-child(2) img { object-position: 68% 30%; }
.team-cards li:hover img { transform: scale(1.03); filter: saturate(.7) sepia(.14) contrast(1.06); }
.team-cards h3 { font-size: var(--fs-2); }
.team-cards p { color: var(--muted); font-size: 14px; margin-top: 2px; }
@media (min-width: 900px) { .team-grid { grid-template-columns: .8fr 1.2fr; align-items: center; gap: var(--s-9); } .team-cards { gap: var(--s-5); } }

/* ---------- Booking ---------- */
.book { background: var(--bg-2); border-top: 1px solid var(--line); }
.book-grid { display: grid; gap: var(--s-6); }
.book-alt { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.booking { padding: var(--s-5) var(--s-4) var(--s-4); }
@media (min-width: 960px) {
  .book-grid { grid-template-columns: .85fr 1.15fr; gap: var(--s-9); align-items: start; }
  .booking { padding: var(--s-6); }
  .book-copy { position: sticky; top: 96px; }
}

/* ---------- Reviews ---------- */
.review-grid { display: grid; gap: var(--s-5) var(--s-6); }
.review { border-top: 1px solid var(--line-2); padding-top: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.stars { color: var(--amber); letter-spacing: .1em; font-size: 13px; }
.review p { font-size: var(--fs-0); flex: 1; line-height: 1.5; }
.review footer { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 14px; }
.review footer b { font-weight: 600; }
.review footer span { color: var(--muted); }
.review footer span::before { content: "· "; }
@media (min-width: 640px) { .review-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .review-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Gallery: mosaic ---------- */
.gallery { padding-bottom: 0; container-type: inline-size; }
.gallery .sec-head { border-bottom: 0; margin-bottom: var(--s-4); padding-bottom: 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; margin-top: var(--s-5); }
.gallery-grid li { overflow: hidden; aspect-ratio: 4 / 3; background: var(--panel); }
.gallery-grid .g-big { grid-column: span 2; aspect-ratio: 16 / 9; }
.gallery-grid li:last-child { grid-column: span 2; aspect-ratio: 16 / 9; } /* 8 tiles in 2 columns: the last one spans, no orphan cell */
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .4s; filter: var(--grade); }
.gallery-grid li:hover img { transform: scale(1.03); filter: saturate(1) contrast(1.02); }
@media (min-width: 720px) {
  /* 4 columns, 3 rows. Row height is derived from the column width so every tile — the
     2×2 lead, the 2-wide sixth, the 4:3 singles — fills its cell; aspect-ratio items would
     otherwise not stretch and leave a hole under the small tiles in row 3. */
  .gallery-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: calc((100cqw - 12px) / 4 * .75); }
  .gallery-grid li, .gallery-grid li:last-child, .gallery-grid .g-big { grid-column: auto; aspect-ratio: auto; }
  .gallery-grid .g-big { grid-column: span 2; grid-row: span 2; }
  .gallery-grid li:nth-child(6) { grid-column: span 2; }
  @supports not (width: 1cqw) { /* no container units: fall back to ratios that agree to the pixel */
    .gallery-grid { grid-auto-rows: auto; }
    .gallery-grid li { aspect-ratio: 4 / 3; align-self: stretch; }
    .gallery-grid .g-big { aspect-ratio: auto; }
    .gallery-grid li:nth-child(6) { aspect-ratio: 8 / 3; }
  }
}

/* ---------- CTA band ---------- */
.cta-band { background: var(--amber); color: var(--amber-ink); padding: var(--s-7) 0; }
.cta-band .h2 { color: var(--amber-ink); margin-bottom: var(--s-2); }
.cta-band .section-sub { color: #4a3a00; }
.cta-row { display: grid; gap: var(--s-5); }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (min-width: 900px) { .cta-row { grid-template-columns: 1fr auto; align-items: center; gap: var(--s-8); } }

/* ---------- Contacts ---------- */
.contact-grid { display: grid; gap: var(--s-6); }
.contact-col { border-left: 1px solid var(--line-2); padding-left: var(--s-5); }
.contact-col h3 { font-family: var(--font-body); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--amber); margin-bottom: var(--s-3); }
.contact-col h3 + h3, .contact-col p + h3 { margin-top: var(--s-5); }
.contact-big { font-size: var(--fs-1); font-weight: 500; max-width: 26ch; text-wrap: balance; }
.contact-phone { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-3); text-decoration: none; font-variant-numeric: tabular-nums; transition: color .2s; }
.contact-phone:hover { color: var(--amber); }
.hours { margin: 0; max-width: 300px; }
.hours div { display: flex; justify-content: space-between; gap: var(--s-4); padding: 8px 0; border-bottom: 1px dotted var(--line-2); font-variant-numeric: tabular-nums; }
.hours dt { font-weight: 500; }
.hours dd { margin: 0; color: var(--muted); }
.map-links { display: flex; flex-wrap: wrap; gap: 0 var(--s-5); margin-top: var(--s-2); }
.map-links a { display: inline-block; font-size: 14px; font-weight: 600; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 5px; padding: 11px 0; transition: text-decoration-color .2s, color .2s; }
.map-links a::after { content: " ↗"; color: var(--amber); }
.map-links a:hover { text-decoration-color: var(--amber); color: var(--amber); }
@media (min-width: 800px) { .contact-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: var(--s-7); } }

/* ---------- FAQ ---------- */
.faq { background: var(--bg-2); }
.faq-list { margin-top: var(--s-6); border-top: 1px solid var(--line-2); }
@media (min-width: 900px) { /* same copy-left / object-right split as trust, team and booking */
  .faq-wrap { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s-8); align-items: start; }
  .faq-list { margin-top: 0; }
  .faq .h2 { position: sticky; top: 96px; margin-bottom: 0; font-size: clamp(28px, 2.8vw, 36px); } /* one size down: «Что спрашивают» fits the 1fr column instead of leaving «Что» alone on line 1 */
}
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; padding: var(--s-4) 40px var(--s-4) 0; font-weight: 600; font-size: 17px; list-style: none; position: relative; transition: color .2s; }
summary:hover { color: var(--amber); }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%);
  background:
    linear-gradient(var(--amber), var(--amber)) center / 14px 2px no-repeat,
    linear-gradient(var(--amber), var(--amber)) center / 2px 14px no-repeat;
  transition: transform .25s var(--ease);
}
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { color: var(--muted); padding: 0 0 var(--s-4); max-width: 66ch; }

/* ---------- Footer ---------- */
.site-footer { background: #0a0c0e; border-top: 1px solid var(--line); padding: var(--s-7) 0 var(--s-6); position: relative; z-index: 1; }
.footer-grid { display: grid; gap: var(--s-6); }
.footer-tagline { color: var(--muted); margin: var(--s-4) 0; max-width: 34ch; font-size: 14px; }
.site-footer h3 { font-family: var(--font-body); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--amber); margin-bottom: var(--s-3); }
.site-footer nav a { display: block; text-decoration: none; color: var(--muted); padding: 5px 0; font-weight: 500; transition: color .2s; }
.site-footer nav a:hover { color: var(--text); }
.site-footer .contact-phone { display: inline-block; margin-bottom: var(--s-2); }
.site-footer p { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.insta { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; color: var(--text); transition: color .2s; }
.insta:hover { color: var(--amber); }
.footer-bottom { margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--line); font-size: 13px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }

/* ---------- Mobile action bar (< 1024) ---------- */
.mbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 1px;
  background: var(--line); border-top: 1px solid var(--line);
  transition: transform .3s var(--ease);
}
.mbar a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 60px; padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: #14171c; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px;
}
.mbar a svg { flex-shrink: 0; }
.mbar-wa { color: var(--wa) !important; }
.mbar-book { background: var(--amber) !important; color: var(--amber-ink) !important; }
.mbar.is-hidden { transform: translateY(110%); }

/* ---------- Desktop WhatsApp pill (≥ 1024) ---------- */
.float { display: none; }
@media (min-width: 1024px) {
  .mbar { display: none; }
  .float {
    position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: 45;
    display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 20px 0 16px; border-radius: 999px;
    background: var(--wa); color: #06210f; font-weight: 600; font-size: 15px; text-decoration: none;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
    transition: transform .3s var(--ease), opacity .3s, background .2s;
  }
  .float:hover { background: #2ee27a; transform: translateY(-2px); }
  .float.is-hidden { opacity: 0; transform: translateY(16px); pointer-events: none; }
}

/* ---------- Motion: page-load orchestration + scroll reveals (JS-gated) ---------- */
html.js .reveal { opacity: 0; transform: translateY(16px); animation: rise .5s var(--ease) forwards; animation-delay: calc(60ms + var(--i, 0) * 80ms); }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.js .reveal { opacity: 1 !important; transform: none !important; }
  .success-icon circle, .success-icon path { stroke-dashoffset: 0; }
  html { scroll-behavior: auto; }
}
