/* ===== Muebles Expertos — стили сайта ===== */

/* Токены: цвета и шрифты */
:root {
  --bg: #15181B;        /* фон страницы — графит */
  --surface: #1C2024;   /* карточки */
  --line: #2E3439;      /* линии и рамки */
  --text: #ECEAE6;      /* основной текст */
  --muted: #B7BCC1;     /* второстепенный текст */
  --dim: #8C939A;       /* подписи */
  --gold: #D9A86C;      /* акцент — цвет дуба */
  --gold-hover: #F0C48E;
  --display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --body: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--gold); }
a:hover { color: var(--gold-hover); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; line-height: 1; text-wrap: balance; }
p { margin: 0; }

/* Контейнер с боковыми отступами */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.section { padding-block: 88px 40px; display: flex; flex-direction: column; gap: 32px; }
.section-head { display: flex; flex-direction: column; gap: 8px; }
.section-head.row { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.section-head h2 { font-size: clamp(38px, 5vw, 52px); margin-top: 8px; }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.muted { color: var(--muted); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 20px; font-family: var(--body); font-weight: 600; font-size: 15px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .15s, color .15s; }
.btn-lg { padding: 15px 26px; font-size: 17px; }
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-hover); color: var(--bg); }
.btn-ghost { border-color: var(--text); color: var(--text); }
.btn-ghost:hover { background: var(--text); color: var(--bg); }
.btn-light { background: var(--text); color: var(--bg); }
.btn-light:hover { background: #fff; color: var(--bg); }

/* ===== Первый экран ===== */
.hero {
  background-image:
    linear-gradient(90deg, rgba(14,16,18,.94) 0%, rgba(14,16,18,.78) 42%, rgba(14,16,18,.25) 100%),
    url('../img/hero-cocina-isla.webp');
  background-size: cover;
  background-position: center right;
}
.topbar { padding-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; }
.logo { font-family: var(--display); font-weight: 700; font-size: 26px; letter-spacing: 0.06em; color: var(--text); text-decoration: none; white-space: nowrap; }
.logo span { color: var(--gold); }
.logo:hover { color: var(--text); }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; font-weight: 500; }
.nav a:not(.btn) { color: var(--text); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--gold); }
.menu-btn { display: none; background: none; border: 0; color: var(--text); width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer; }

.hero-body { padding-block: 112px 64px; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(46px, 7.2vw, 84px); line-height: 0.94; max-width: 10.5em; }
.lead { font-size: 19px; color: #C9CCCF; max-width: 32em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.trust { border-top: 1px solid rgba(236,234,230,.18); background: rgba(14,16,18,.55); }
.trust-grid { padding-block: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.trust-grid div { display: flex; flex-direction: column; gap: 2px; }
.trust-grid strong { font-family: var(--display); font-size: 30px; line-height: 1.1; color: var(--gold); }
.trust-grid span { font-size: 14px; color: var(--muted); }

/* ===== Услуги ===== */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.service { background: var(--surface); display: flex; flex-direction: column; }
.service img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; height: auto; }
.service-body { padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.service h3 { font-size: 36px; }
.service p { color: var(--muted); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1px solid #3A4046; padding: 8px 12px; font-size: 15px; }

/* ===== Галерея ===== */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { min-height: 44px; padding: 10px 16px; font-family: var(--body); font-size: 15px; font-weight: 600; border: 1.5px solid var(--gold); background: transparent; color: var(--text); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--gold); color: var(--bg); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.work { margin: 0; padding: 0; border: 0; position: relative; display: block; width: 100%; background: var(--surface); overflow: hidden; cursor: zoom-in; text-align: left; color: var(--text); font-family: var(--body); }
.work img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; height: auto; transition: transform .4s; }
.work:hover img { transform: scale(1.03); }
.work .cap { position: absolute; inset: auto 0 0 0; padding: 48px 16px 14px; background: linear-gradient(0deg, rgba(14,16,18,.92), rgba(14,16,18,0)); display: flex; flex-direction: column; gap: 4px; }

/* Лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10,11,13,.96); display: flex; align-items: center; justify-content: center; padding: 64px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); }
.lightbox[hidden] { display: none; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-bar { position: absolute; top: env(safe-area-inset-top, 0px); left: 0; right: 0; display: flex; align-items: center; gap: 16px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); }
.lb-title { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-count { font-family: var(--mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.lb-btn { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; background: rgba(28,32,36,.85); color: var(--text); border: 1px solid var(--line); cursor: pointer; }
.lb-btn:hover { color: var(--gold); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: max(12px, env(safe-area-inset-left, 0px)); }
.lb-next { right: max(12px, env(safe-area-inset-right, 0px)); }
.work .tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--gold); }
.work .title { font-size: 17px; font-weight: 600; line-height: 1.3; }

/* ===== Шаги ===== */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--gold); }
.steps li { padding: 24px 24px 8px 0; display: flex; flex-direction: column; gap: 8px; }
.steps .num { font-family: var(--mono); font-size: 14px; color: var(--gold); }
.steps h3 { font-size: 28px; }
.steps p { font-size: 15px; color: var(--muted); }

/* ===== Полоса Instagram ===== */
.band-ig {
  margin-top: 48px;
  background-image: linear-gradient(0deg, rgba(14,16,18,.82), rgba(14,16,18,.82)), url('../img/cocina-nogal-led.webp');
  background-size: cover; background-position: center;
}
.band-inner { padding-block: 72px; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.band-inner > div { display: flex; flex-direction: column; gap: 10px; flex: 1 1 420px; min-width: 0; }
.band-inner h2 { font-size: clamp(36px, 4.5vw, 48px); }
.band-inner p { color: #C9CCCF; font-size: 17px; }

/* ===== Контакты ===== */
.contact { flex-direction: row; flex-wrap: wrap; gap: 48px; padding-bottom: 88px; }
.contact-info { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.contact-info h2 { font-size: clamp(40px, 5vw, 56px); }
.contact-list { margin: 0; font-size: 18px; }
.contact-list div { display: flex; gap: 16px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list div:last-child { border-bottom: 0; }
.contact-list dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); width: 100px; flex: none; }
.contact-list dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.contact-list dd a { color: var(--text); text-decoration: none; }
.contact-list dd a:hover { color: var(--gold); }

.form { flex: 1 1 440px; min-width: 0; background: var(--surface); padding: 32px; display: flex; flex-direction: column; gap: 10px; }
.form label { font-size: 14px; font-weight: 600; color: var(--muted); margin-top: 4px; }
.form input, .form select, .form textarea { min-height: 48px; padding: 10px 14px; border: 1px solid #3A4046; background: var(--bg); color: var(--text); font-size: 16px; font-family: inherit; }
.form textarea { resize: vertical; }
.form button { margin-top: 10px; border: 0; }
.form-error { color: #FF9C8A; font-size: 15px; }
.form-note { font-size: 13px; color: var(--dim); }

/* ===== Футер ===== */
.footer { border-top: 1px solid var(--line); }
.footer-inner { padding-block: 24px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; font-size: 14px; color: var(--dim); }
.footer .logo { font-size: 18px; }

/* Плавающая кнопка WhatsApp — только на телефоне */
.wa-float { display: none; position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.35); z-index: 20; }
.wa-float:hover { color: #fff; }

/* ===== Адаптив ===== */
@media (max-width: 900px) {
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .services { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .topbar .logo { font-size: 21px; }
  .trust-grid strong { font-size: 24px; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 10; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 8px 20px 16px; }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; }
  .hero { background-image: linear-gradient(0deg, rgba(14,16,18,.95) 0%, rgba(14,16,18,.7) 55%, rgba(14,16,18,.4) 100%), url('../img/hero-cocina-isla.webp'); background-position: center; }
  .hero-body { padding-block: 96px 32px; }
  .lead { font-size: 17px; }
  .actions .btn { flex: 1 1 100%; }
  .section { padding-block: 64px 24px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .work .title { font-size: 14px; }
  .work .cap { padding: 32px 10px 10px; }
  .work .tag { font-size: 9px; }
  .lb-nav { top: auto; bottom: 16px; transform: none; }
  .steps { grid-template-columns: 1fr; }
  .form { padding: 20px; }
  .wa-float { display: inline-flex; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .work img { transition: none; }
}
