/* ============================================================
   DOMECO — components.css
   Header, nav, buttons, badges, cards, forms, accordion, footer
   ============================================================ */

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--white);
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: 1.05em 1.7em; border-radius: var(--r-sm);
  font-weight: 700; font-size: var(--fs-base); line-height: 1;
  white-space: nowrap;
  background: var(--btn-bg); color: var(--btn-fg);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn--gold { --btn-bg: var(--gold); --btn-fg: var(--gold-ink); }
.btn--gold:hover { box-shadow: var(--shadow-gold); }
.btn--dark { --btn-bg: var(--ink); --btn-fg: var(--white); }
.btn--light { --btn-bg: var(--white); --btn-fg: var(--ink); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border: 1.5px solid currentColor; }
.on-dark .btn--ghost { --btn-fg: var(--white); }
.btn--lg { padding: 1.2em 2.1em; font-size: var(--fs-lg); }
.btn--block { display: flex; width: 100%; }
.btn--pill { border-radius: var(--r-pill); }

/* WhatsApp pill */
.btn-wa { --btn-bg: var(--wa); --btn-fg: var(--ink); border-radius: var(--r-pill); padding: .85em 1.35em; }
.btn-wa:hover { filter: brightness(1.05); }
.btn-wa .ic { width: 1.25em; height: 1.25em; }

/* Text link with arrow */
.link-arrow { display: inline-flex; align-items: center; gap: .5em; font-weight: 700; }
.link-arrow .ic { transition: transform var(--dur-fast) var(--ease); }
.link-arrow:hover .ic { transform: translateX(4px); }

/* ---------- Badges / pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .5em .9em; border-radius: var(--r-pill);
  background: var(--white); color: var(--ink);
  font-weight: 700; font-size: var(--fs-sm); line-height: 1; white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.pill--ink { background: var(--ink); color: var(--white); box-shadow: none; }
.pill--gold { background: var(--gold); color: var(--gold-ink); box-shadow: none; }
.pill-group { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--white) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: transform .35s var(--ease), background .35s var(--ease);
}
.site-header.is-hidden { transform: translateY(-102%); }
.header-inner {
  display: flex; align-items: center; gap: clamp(1rem, 3vw, 3rem);
  min-height: 84px; padding-block: .6rem;
}
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { height: 34px; width: auto; }
.brand--white img { display: none; }

.main-nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem); margin-inline-start: clamp(.5rem, 2vw, 2rem); }
.main-nav a { font-weight: 600; font-size: var(--fs-base); position: relative; padding-block: .4em; }
.main-nav a::after { content:""; position:absolute; left:0; bottom:.1em; height:2px; width:0; background: var(--gold); transition: width var(--dur-fast) var(--ease); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { width: 100%; }

.header-meta { display: flex; align-items: center; gap: clamp(.7rem, 1.6vw, 2rem); margin-inline-start: auto; flex: 0 0 auto; }
.header-meta .btn-wa { flex: 0 0 auto; }
/* адаптив шапки: по мере сужения убираем второстепенное, чтобы WhatsApp-кнопка не резалась.
   Пороги подобраны по замерам: меню 419px + бренд 134 + телефон 136 + язык 81 + кнопка 245 */
@media (max-width: 1400px) { .header-meta .meta-item.is-address { display: none; } }
@media (max-width: 1280px) { .header-meta .meta-item[href^="tel:"] { display: none; } }
.meta-item { display: inline-flex; align-items: center; gap: .5em; font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; }
.meta-item .ic { width: 1.15em; height: 1.15em; color: var(--ink); flex: 0 0 auto; }

/* Language switch */
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; }
.lang button { padding: .4em .7em; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; color: var(--text-muted); transition: background var(--dur-fast), color var(--dur-fast); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--white); }

/* Burger */
.burger { display: none; align-items: center; gap: .55em; height: 42px; padding: 0 .95em; border: 1.5px solid var(--line); border-radius: var(--r-sm); }
.burger .burger-txt { font-weight: 700; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .04em; color: var(--ink); line-height: 1; }
.burger span { position: relative; width: 22px; height: 2px; background: var(--ink); transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast); }
.burger span::before, .burger span::after { content:""; position:absolute; left:0; width:22px; height:2px; background: var(--ink); transition: transform var(--dur-fast) var(--ease); }
.burger span::before { top: -7px; } .burger span::after { top: 7px; }
body.nav-open .burger span { background: transparent; }
body.nav-open .burger span::before { transform: translateY(7px) rotate(45deg); }
body.nav-open .burger span::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: inline-flex; margin-inline-start: auto; }
  .main-nav, .header-meta { display: none; }
  .header-inner { min-height: 66px; }
  .brand img { height: 28px; }
  /* mobile drawer */
  .mobile-nav {
    position: fixed; inset: 0 0 0 auto; width: min(88vw, 380px);
    background: var(--ink); color: var(--text-on-dark);
    transform: translateX(100%); visibility: hidden;
    transition: transform var(--dur) var(--ease), visibility 0s linear var(--dur);
    z-index: 60; display: flex; flex-direction: column; padding: 5.5rem 2rem 2rem; gap: 1.4rem;
    box-shadow: -30px 0 60px -20px rgba(0,0,0,.5);
    overflow-y: auto;
  }
  body.nav-open .mobile-nav { transform: none; visibility: visible; transition: transform var(--dur) var(--ease); }
  .mobile-nav a.m-link { font-family: var(--font-display); text-transform: uppercase; font-size: 1.6rem; }
  .mobile-nav .m-sep { height: 1px; background: var(--line-dark); }
  .nav-scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); opacity: 0; visibility: hidden; transition: opacity var(--dur); z-index: 55; }
  body.nav-open .nav-scrim { opacity: 1; visibility: visible; }
}
.mobile-nav { display: none; }
@media (max-width: 860px) { .mobile-nav { display: flex; } }

/* ---------- Cards ---------- */
.card { border-radius: var(--r); overflow: hidden; background: var(--white); }
.media { position: relative; overflow: hidden; background: var(--paper); }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.media--ratio { aspect-ratio: 16 / 11; }
.media--tall { aspect-ratio: 3 / 4; }
.media--wide { aspect-ratio: 16 / 9; }

/* Project card */
.project {
  position: relative; border-radius: var(--r); overflow: hidden; isolation: isolate;
  background: var(--ink);
}
.project .media { aspect-ratio: 4 / 3; }
.project:hover .media img { transform: scale(1.05); }
.project::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,0) 42%, rgba(0,0,0,.72) 100%); z-index: 1; pointer-events:none; }
.project .badges { position: absolute; top: 1rem; left: 1rem; z-index: 2; }
.project .project-foot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 1.4rem; }
.project .project-title { color: var(--white); font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.2rem, 1rem + 1vw, 1.9rem); line-height: 1; letter-spacing: -.01em; }
.project .project-meta { color: rgba(255,255,255,.72); font-size: var(--fs-sm); margin-top: .5rem; }
.project .btn { flex: 0 0 auto; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label { font-weight: 600; font-size: var(--fs-sm); }
.input, .textarea, select.input {
  width: 100%; padding: 1em 1.1em; border-radius: var(--r-sm);
  border: 1.5px solid var(--line); background: var(--white); color: var(--ink);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.on-dark .input, .on-dark .textarea { background: rgba(255,255,255,.06); border-color: var(--line-dark); color: var(--white); }
.on-dark .input::placeholder, .on-dark .textarea::placeholder { color: var(--text-on-dark-muted); }
.input:focus, .textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(243,112,33,.22); }
.textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: var(--fs-xs); color: var(--text-muted); }
.on-dark .form-note { color: var(--text-on-dark-muted); }

/* ---------- Accordion (FAQ) ---------- */
.accordion { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.5rem 0; text-align: left; font-weight: 700; font-size: var(--fs-lg);
}
.acc-head .acc-ic { flex: 0 0 auto; width: 26px; height: 26px; position: relative; }
.acc-head .acc-ic::before, .acc-head .acc-ic::after { content:""; position:absolute; top:50%; left:50%; width:16px; height:2px; background: var(--ink); transform: translate(-50%,-50%); transition: transform var(--dur-fast) var(--ease); }
.acc-head .acc-ic::after { transform: translate(-50%,-50%) rotate(90deg); }
.acc-item.is-open .acc-ic::after { transform: translate(-50%,-50%) rotate(0); opacity: 0; }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur) var(--ease); }
.acc-panel > div { overflow: hidden; }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-body { padding: 0 0 1.6rem; color: var(--text-muted); max-width: 68ch; line-height: 1.65; }
.acc-body strong { color: var(--ink); }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 70;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: #25D366; color: #fff; box-shadow: 0 14px 34px -8px rgba(37,211,102,.6);
  transition: transform var(--dur-fast) var(--ease); animation: wa-pulse 2.6s var(--ease) infinite;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float .ic { width: 30px; height: 30px; }
@keyframes wa-pulse { 0%,100% { box-shadow: 0 14px 34px -8px rgba(37,211,102,.6), 0 0 0 0 rgba(37,211,102,.4); } 50% { box-shadow: 0 14px 34px -8px rgba(37,211,102,.6), 0 0 0 14px rgba(37,211,102,0); } }
@media (prefers-reduced-motion: reduce) { .wa-float { animation: none; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--text-on-dark); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2rem; padding-block: clamp(2rem, 4vw, 3.2rem); }
.site-footer .brand img { height: 40px; }
.footer-nav { display: flex; gap: clamp(1.2rem, 2.4vw, 2.4rem); flex-wrap: wrap; }
.footer-nav a { font-weight: 600; color: var(--text-on-dark); opacity: .9; }
.footer-nav a:hover { color: var(--gold); opacity: 1; }
.footer-meta { display: flex; align-items: center; gap: 1rem 1.25rem; flex-wrap: wrap; }
.footer-meta .meta-item .ic { color: var(--gold); }
.footer-bottom { border-top: 1px solid var(--line-dark); padding-block: 1.3rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; font-size: var(--fs-sm); color: var(--text-on-dark-muted); }
.footer-bottom a:hover { color: var(--gold); }

/* touch targets (mobile audit) */
.lang button { min-height: 34px; min-width: 40px; }
.footer-bottom a { display: inline-block; padding: .35em .15em; }

/* BEGIN header-nav-6 (16.09.2026): шестой пункт меню «Дизайн интерьера».
   Без этого шапка не помещается: ссылки ломаются на две строки, а на 861-960 px
   содержимое вылезало за контейнер ещё до нового пункта. */
.main-nav{gap:clamp(.85rem,1.5vw,2rem)}
.main-nav a{white-space:nowrap}
@media (min-width:861px) and (max-width:1180px){
  .header-meta .btn-wa{padding-inline:.85em}
  .header-meta .btn-wa span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
}
@media (max-width:1500px){.header-meta .meta-item.is-address{display:none}}
/* END header-nav-6 */
