/* ===========================================================
   PROBKA54 — пробковая мастерская. Общие стили.
   Тёплая природная гамма, системные шрифты, mobile-first.
   =========================================================== */

:root {
  /* Природная пробковая палитра */
  --bg:          #FBF7EF;   /* тёплый белый фон */
  --bg-alt:      #F3EADB;   /* кремовая секция */
  --card:        #FFFFFF;
  --cork:        #B57A40;   /* основной пробковый акцент */
  --cork-dark:   #99632F;
  --cork-light:  #E8D4B8;
  --terra:       #C2663F;   /* терракот — акцент кнопок */
  --terra-dark:  #A8512E;
  --green:       #6E7B4E;   /* приглушённый зелёный */
  --green-dark:  #5A663E;
  --ink:         #3A2C1E;   /* тёмно-коричневый текст */
  --ink-soft:    #6B5946;
  --line:        #E5D8C4;
  --star:        #E0A52E;
  --shadow:      0 6px 24px rgba(58, 44, 30, .08);
  --shadow-lg:   0 18px 50px rgba(58, 44, 30, .14);
  --radius:      14px;
  --radius-sm:   9px;
  --maxw:        1180px;
  --ff: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 50px); }
h2 { font-size: clamp(25px, 3.4vw, 36px); }
h3 { font-size: clamp(19px, 2.2vw, 23px); }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--cork-dark); text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.center { text-align: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--cork); margin-bottom: 12px;
}
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--ink-soft); max-width: 60ch; }
.muted { color: var(--ink-soft); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-align: center; line-height: 1.1;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--terra); color: #fff; }
.btn--primary:hover { background: var(--terra-dark); box-shadow: 0 10px 24px rgba(168,81,46,.32); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-dark); box-shadow: 0 10px 24px rgba(90,102,62,.3); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--cork); color: var(--cork-dark); }
.btn--light { background: #fff; color: var(--ink); }
.btn--block { width: 100%; }
.btn--sm { padding: 10px 18px; font-size: 14px; }

/* ---------- Плейсхолдеры изображений ---------- */
.ph {
  position: relative; overflow: hidden; border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(0,0,0,.06)),
    radial-gradient(circle at 30% 30%, var(--cork-light), var(--cork) 130%);
  display: flex; align-items: flex-end; color: rgba(255,255,255,.9);
  font-size: 13px; font-weight: 600;
}
.ph::before { /* пробковая крошка-текстура */
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    radial-gradient(rgba(120,80,40,.35) 1.2px, transparent 1.6px),
    radial-gradient(rgba(255,255,255,.30) 1px, transparent 1.4px);
  background-size: 13px 13px, 9px 9px;
  background-position: 0 0, 5px 6px;
}
.ph > span { position: relative; padding: 10px 12px; }
.ph--tall { aspect-ratio: 3/4; }
.ph--wide { aspect-ratio: 16/10; }
.ph--sq  { aspect-ratio: 1/1; }
/* цветовые вариации пробки для разнообразия */
.ph.t-light { --cork-light:#F0E6D4; --cork:#D9BE97; }
.ph.t-sand  { --cork-light:#EAD2A6; --cork:#C99B5C; }
.ph.t-terra { --cork-light:#E2B193; --cork:#BF6F49; }
.ph.t-coffee{ --cork-light:#C9A57E; --cork:#8A5D34; }
.ph.t-wenge { --cork-light:#9A7B5C; --cork:#4E3A28; }
.ph.t-grey  { --cork-light:#D8CFC2; --cork:#9C9183; }

/* ---------- Карточки ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}

.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Звёзды ---------- */
.stars { color: var(--star); letter-spacing: 2px; font-size: 15px; }

/* ===========================================================
   ШАПКА
   =========================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(251,247,239,.9);
  backdrop-filter: blur(10px); border-bottom: 1px solid transparent;
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.site-header.scrolled {
  background: rgba(251,247,239,.97);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 22px rgba(58,44,30,.09);
}
.header-bar { display: flex; align-items: center; gap: 16px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 21px;
  color: var(--ink); white-space: nowrap; }
.logo__txt { letter-spacing: .01em; }
.logo b { color: var(--cork-dark); }
.logo__mark {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, var(--cork-light), var(--cork) 75%, var(--cork-dark));
  position: relative; box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), var(--shadow);
}
.logo__mark::after {
  content:""; position:absolute; inset:0; border-radius:50%; opacity:.6;
  background-image: radial-gradient(rgba(80,50,20,.5) 1px, transparent 1.4px);
  background-size: 6px 6px;
}

/* ----- навигация ----- */
.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav > a, .nav-dd__btn {
  font-family: inherit; color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap;
  padding: 10px 13px; border-radius: 9px; background: none; border: 0; cursor: pointer;
  line-height: 1; display: inline-flex; align-items: center; transition: background .15s, color .15s;
}
.nav > a:hover, .nav-dd__btn:hover { background: var(--bg-alt); color: var(--cork-dark); }
.nav > a.active, .nav-dd__btn.active { color: var(--cork-dark); background: var(--cork-light); }

/* ----- выпадающее «О пробке» ----- */
.nav-dd { position: relative; }
.nav-dd__btn .chev { width: 15px; height: 15px; margin-left: 4px; transition: transform .2s; }
.nav-dd:hover .nav-dd__btn .chev, .nav-dd.open .nav-dd__btn .chev { transform: rotate(180deg); }
.nav-dd::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 10px; } /* мост для hover */
.nav-dd__menu {
  position: absolute; top: 100%; left: 0; min-width: 224px; margin-top: 9px;
  background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-lg);
  padding: 7px; display: flex; flex-direction: column; gap: 2px; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(7px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.nav-dd:hover .nav-dd__menu, .nav-dd.open .nav-dd__menu { opacity: 1; visibility: visible; transform: none; }
.nav-dd__menu a { padding: 11px 13px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.nav-dd__menu a:hover { background: var(--bg-alt); color: var(--cork-dark); }
.nav-dd__menu a.active { background: var(--cork-light); color: var(--cork-dark); }

/* ----- действия справа ----- */
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: 16px; }
.header-phone { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.header-phone__ic { width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--cork-light);
  color: var(--cork-dark); display: grid; place-items: center; }
.header-phone__ic svg { width: 19px; height: 19px; }
.header-phone__txt { display: flex; flex-direction: column; line-height: 1.12; }
.header-phone__txt b { font-size: 17px; font-weight: 800; }
.header-phone__txt small { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.header-cta { white-space: nowrap; }
.header-call-m { display: none; width: 44px; height: 44px; border-radius: 50%; background: var(--cork-light);
  color: var(--cork-dark); place-items: center; flex: none; }
.header-call-m svg { width: 20px; height: 20px; }
.nav-mobile-extra { display: none; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; flex: none; }
.burger span { display: block; width: 26px; height: 3px; background: var(--ink); border-radius: 2px; margin: 5px 0; transition: .25s; }
.burger.open span:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.burger.open span:nth-child(2){ opacity: 0; }
.burger.open span:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

body.nav-locked { overflow: hidden; }

/* прячем подпись под телефоном на средних экранах */
@media (max-width: 1200px) { .header-phone__txt small { display: none; } }
/* на средних экранах телефон сворачивается до иконки, CTA остаётся */
@media (max-width: 1060px) {
  .header-phone__txt { display: none; }
  .header-phone { gap: 0; }
}

@media (max-width: 900px) {
  .header-phone, .header-cta { display: none; }
  .header-actions { margin-left: auto; }
  .header-call-m { display: grid; }
  .burger { display: block; }
  .nav {
    position: fixed; inset: 72px 0 0 0; margin: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg); padding: 14px 20px 32px; overflow-y: auto;
    transform: translateX(100%); transition: transform .3s ease; box-shadow: var(--shadow-lg);
  }
  .nav.open { transform: none; }
  .nav > a { padding: 15px 12px; font-size: 17px; border-radius: 0; border-bottom: 1px solid var(--line); }
  /* выпадающее меню разворачивается в подгруппу */
  .nav-dd { position: static; }
  .nav-dd::after { display: none; }
  .nav-dd__btn { width: 100%; justify-content: flex-start; padding: 18px 12px 8px; font-size: 12px;
    text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); pointer-events: none; }
  .nav-dd__btn .chev { display: none; }
  .nav-dd__menu { position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; background: none; padding: 0; margin: 0; min-width: 0; }
  .nav-dd__menu a { padding: 15px 24px; font-size: 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-mobile-extra { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
  .nav-mobile-extra .nav-phone { display: flex; align-items: center; justify-content: center; gap: 9px;
    font-size: 20px; font-weight: 800; color: var(--cork-dark); }
  .nav-mobile-extra .nav-phone svg { width: 21px; height: 21px; }
}

/* ===========================================================
   ПОДВАЛ
   =========================================================== */
.site-footer { background: #2E2317; color: #E9DECB; padding: 54px 0 26px; margin-top: 20px; }
.site-footer a { color: #E9DECB; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 15px; }
.footer-logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 22px; color:#fff; margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.13); margin-top: 36px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #B7A88F; }
@media (max-width: 760px){ .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; } }
@media (max-width: 460px){ .footer-grid { grid-template-columns: 1fr; } }

/* ===========================================================
   ПЛАВАЮЩАЯ КНОПКА
   =========================================================== */
.float-call { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 12px; }
.float-btn {
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
  transition: transform .2s; position: relative;
}
.float-btn:hover { transform: scale(1.07); }
.float-btn svg { width: 30px; height: 30px; }
.float-btn--wa { background: #25D366; }
.float-btn--call { background: var(--terra); }
.float-btn::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37,211,102,.5); animation: pulse 2.2s infinite;
}
.float-btn--call::after { box-shadow: 0 0 0 0 rgba(194,102,63,.5); animation: pulseT 2.2s infinite; }
@keyframes pulse { to { box-shadow: 0 0 0 16px rgba(37,211,102,0); } }
@keyframes pulseT { to { box-shadow: 0 0 0 16px rgba(194,102,63,0); } }

/* ===========================================================
   МОДАЛЬНЫЕ ОКНА
   =========================================================== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; background: rgba(40,30,18,.55);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg); border-radius: var(--radius); width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg); padding: 30px; position: relative;
  transform: translateY(20px) scale(.97); transition: transform .25s ease; max-height: 92vh; overflow:auto;
}
.modal-overlay.show .modal { transform: none; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--bg-alt); cursor: pointer; font-size: 20px; color: var(--ink); line-height: 1; }
.modal__close:hover { background: var(--cork-light); }
.modal h3 { margin-bottom: 6px; padding-right: 30px; }
.modal .modal__sub { color: var(--ink-soft); font-size: 15px; margin-bottom: 18px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field textarea, .field select {
  width: 100%; font-family: inherit; font-size: 16px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); transition: border-color .15s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--cork); }
.field textarea { resize: vertical; min-height: 84px; }
.form-success { text-align: center; padding: 20px 0; }
.form-success .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; margin: 0 auto 16px; font-size: 32px; }
.consent { font-size: 12px; color: var(--ink-soft); margin-top: 10px; text-align: center; }

/* ===========================================================
   АНИМАЦИЯ ПОЯВЛЕНИЯ
   =========================================================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce){ .reveal { opacity:1; transform:none; transition:none; } html{scroll-behavior:auto;} }

/* ===========================================================
   ПЕРЕИСПОЛЬЗУЕМЫЙ СЛАЙДЕР ДО/ПОСЛЕ
   =========================================================== */
.ba { position: relative; overflow: hidden; border-radius: var(--radius-sm); user-select: none; touch-action: none; cursor: ew-resize; }
.ba__after, .ba__before { position: absolute; inset: 0; }
.ba__before { z-index: 2; clip-path: inset(0 50% 0 0); }
.ba .ph { border-radius: 0; height: 100%; width: 100%; }
.ba__tag { position: absolute; top: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(0,0,0,.45); color: #fff; z-index: 3; }
.ba__tag--before { left: 10px; }
.ba__tag--after { right: 10px; }
.ba__handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff; z-index: 4; transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.ba__handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 40px; height: 40px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center;
  font-size: 18px; box-shadow: var(--shadow); }

/* ===========================================================
   УТИЛИТЫ / ОБЩИЕ КОМПОНЕНТЫ
   =========================================================== */
.page-hero { background: var(--bg-alt); padding: 50px 0 46px; border-bottom: 1px solid var(--line); }
.crumbs { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }
.crumbs a { color: var(--ink-soft); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px;
  background: var(--cork-light); color: var(--cork-dark); font-size: 13px; font-weight: 700; }
.tag { display:inline-block; padding: 3px 9px; border-radius: 6px; background: var(--bg-alt); color: var(--ink-soft);
  font-size: 12px; font-weight: 600; }

.accordion__item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 14px; overflow: hidden; box-shadow: var(--shadow); }
.accordion__head { width: 100%; text-align: left; background: none; border: 0; cursor: pointer; font-family: inherit;
  display: flex; gap: 14px; align-items: center; padding: 20px 22px; font-size: clamp(16px,2vw,19px); font-weight: 700; color: var(--ink); }
.accordion__head .ix { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--bg-alt); display: grid; place-items: center; font-size: 19px; transition: transform .25s; color: var(--cork-dark); }
.accordion__item.open .accordion__head .ix { transform: rotate(45deg); background: var(--cork); color: #fff; }
.accordion__body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.accordion__inner { padding: 0 22px 22px; color: var(--ink-soft); }

table.price { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.price th, table.price td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
table.price th { background: var(--bg-alt); font-size: 14px; }
table.price td:last-child, table.price th:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
table.price tr:last-child td { border-bottom: 0; }

@media (max-width: 920px){ .g-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 760px){
  .section { padding: 46px 0; }
  .g-3 { grid-template-columns: 1fr; }
  .g-2 { grid-template-columns: 1fr; }
}
@media (max-width: 520px){ .g-4 { grid-template-columns: 1fr; } }
