/* =========================================================
   ARVENTO — стальные входные двери
   Токены дизайна (светлый минимализм):
   Цвет: --bg (белый), --panel (чуть тёплый серый), --accent (стальной синий)
   Шрифты: Oswald (заголовки, индустриальный характер) + Inter (текст)
   Фирменный приём: тонкая рамка-паспарту вокруг фото двери с подписью
   характеристик сбоку — как этикетка на образце материала
   ========================================================= */

:root{
  --bg: #ffffff;
  --bg-2: #f6f5f2;
  --panel: #ffffff;
  --panel-2: #f1f0ec;
  --line: #e3e1db;
  --line-strong: #cfccc4;
  --text: #16181b;
  --text-muted: #5a5e62;
  --text-dim: #9a9d9f;
  --accent: #35505c;
  --accent-bright: #4a6d7c;
  --radius: 2px;
  --wrap: 1180px;
}

*, *::before, *::after{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,h2,h3{
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.4em;
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }

img{ max-width: 100%; display:block; }

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow{
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--accent);
  margin: 0 0 14px;
}

.accent-underline{
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat;
  background-position: 0 92%;
  background-size: 100% 3px;
}

:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 28px;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); }
.btn-primary{
  background: var(--text);
  color: #fff;
}
.btn-primary:hover{ background: var(--accent); }
.btn-outline{
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn-outline:hover{ border-color: var(--accent); color: var(--accent); }
.btn-small{ padding: 10px 18px; font-size: 12px; }
.btn-full{ width: 100%; padding: 16px; white-space: normal; }

/* ---------- Header ---------- */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  height: 76px;
}
.logo{
  display: flex;
  align-items: center;
}
.logo-img{
  height: 34px;
  width: auto;
  display: block;
}
.footer-logo-img{
  height: 30px;
  width: auto;
  display: block;
}

.nav{ display:flex; gap: 32px; }
.nav a{
  font-size: 14px;
  color: var(--text-muted);
  transition: color .15s ease;
}
.nav a:hover{ color: var(--accent); }

.header-actions{ display:flex; align-items:center; gap: 22px; }
.header-phone{
  font-family:'Oswald', sans-serif;
  font-size: 15px;
  letter-spacing: 0.03em;
}
.header-phone:hover{ color: var(--accent); }

.burger{ display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding:8px; }
.burger span{ width: 22px; height: 2px; background: var(--text); display:block; }

/* ---------- Hero ---------- */
.hero{
  position: relative;
  padding: 170px 0 110px;
  overflow: hidden;
  background: var(--bg);
}
.hero-grooves{
  position:absolute; inset:0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(0,0,0,0.028) 0px,
    rgba(0,0,0,0.028) 1px,
    transparent 1px,
    transparent 26px
  );
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 80%);
  pointer-events: none;
}
.hero-inner{
  display:block;
  position: relative;
}
.hero-text{ max-width: 720px; }
.hero h1{
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.08;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero-lead{
  color: var(--text-muted);
  font-size: 17px;
  max-width: 480px;
  margin-bottom: 34px;
}
.hero-cta{ display:flex; gap:16px; flex-wrap:wrap; margin-bottom: 48px; }
.hero-stats{ display:flex; gap: 40px; flex-wrap: wrap; }
.stat{ display:flex; flex-direction:column; padding-left: 14px; border-left: 2px solid var(--line-strong); }
.stat-num{ font-family:'Oswald',sans-serif; font-size: 24px; color: var(--text); }
.stat-label{ font-size: 12px; color: var(--text-dim); max-width: 120px; }

.hero-footnote{
  font-size: 12px;
  color: var(--text-dim);
  margin: 12px 0 0;
}

/* ---------- Advantages ---------- */
.advantages{ padding: 90px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.advantages-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.advantage-mark{
  font-family:'Oswald',sans-serif;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.advantage h3{ font-size: 18px; text-transform: none; margin-bottom: 10px; }
.advantage p{ color: var(--text-muted); font-size: 14.5px; margin:0; }

/* ---------- Product lines ---------- */
.line-section{ padding: 100px 0; }
.line-section-alt{ background: var(--bg-2); }
.line-head{ max-width: 620px; margin-bottom: 52px; }
.line-head h2{ font-size: clamp(28px, 3vw, 40px); text-transform: uppercase; }
.line-desc{ color: var(--text-muted); font-size: 16px; }

.card-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}
.card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.card:hover{ border-color: var(--line-strong); box-shadow: 0 12px 30px rgba(20,22,25,0.06); }
.card-image{
  background: var(--panel-2);
  aspect-ratio: 3/4;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 30px;
  min-height: 0;
  overflow: hidden;
}
.card-image img{ width: 100%; height: 100%; object-fit: contain; }
.card-clickable{ cursor: pointer; }
.card-body{ padding: 22px 24px 26px; display:flex; flex-direction:column; flex:1; }
.card-body h3{ font-size: 19px; text-transform:none; margin-bottom: 12px; }
.card-specs{ list-style:none; padding:0; margin: 0 0 20px; display:flex; flex-direction:column; gap:7px; }
.card-specs li{
  font-size: 13.5px;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
}
.card-specs li::before{
  content:"";
  position:absolute; left:0; top:8px;
  width:5px; height:1px;
  background: var(--accent);
}
.card-footer{ margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.price{ font-family:'Oswald', sans-serif; font-size: 18px; color: var(--text); }

/* ---------- Process ---------- */
.process{ padding: 100px 0; border-top: 1px solid var(--line); }
.process h2{ font-size: clamp(28px,3vw,40px); text-transform: uppercase; max-width: 560px; }
.process-grid{
  margin-top: 52px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.process-step{ border-top: 2px solid var(--text); padding-top: 20px; }
.process-num{ font-family:'Oswald',sans-serif; color: var(--accent); font-size: 22px; }
.process-step h3{ font-size: 17px; text-transform:none; margin: 14px 0 8px; }
.process-step p{ color: var(--text-muted); font-size: 14px; margin:0; }

/* ---------- CTA banner ---------- */
.cta-banner{
  background: var(--text);
  padding: 64px 0;
}
.cta-banner-inner{
  display:flex; align-items:center; justify-content:space-between; gap: 30px; flex-wrap: wrap;
}
.cta-banner h2{ font-size: clamp(22px,2.6vw,30px); text-transform: uppercase; margin-bottom: 8px; color: #fff; }
.cta-banner p{ color: #b9bdc0; margin:0; max-width: 480px; }
.cta-banner .btn-primary{ background: #fff; color: var(--text); }
.cta-banner .btn-primary:hover{ background: var(--bg-2); }

/* ---------- Contacts / form ---------- */
.contacts{ padding: 110px 0; }
.contacts-inner{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contacts h2{ font-size: clamp(28px,3vw,40px); text-transform: uppercase; }
.contacts-lead{ color: var(--text-muted); max-width: 420px; }
.contacts-list{ list-style:none; padding:0; margin-top: 32px; display:flex; flex-direction:column; gap: 18px; }
.contacts-label{ display:block; font-size:11px; text-transform:uppercase; letter-spacing:0.14em; color: var(--text-dim); margin-bottom:4px; }
.contacts-list a:hover{ color: var(--accent); }

.order-form{
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  display:flex;
  flex-direction:column;
  gap: 18px;
}
.order-form label{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size: 13px;
  color: var(--text-muted);
}
.order-form input,
.order-form select,
.order-form textarea{
  background: #fff;
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  resize: vertical;
}
.order-form input:focus,
.order-form select:focus,
.order-form textarea:focus{ border-color: var(--accent); outline:none; }
.form-note{ font-size: 13px; min-height: 18px; margin:0; color: var(--accent); }
.form-note.is-error{ color: #b5473f; }

/* ---------- Footer ---------- */
.site-footer{ border-top: 1px solid var(--line); padding: 46px 0; background: var(--bg); }
.footer-inner{ display:flex; flex-direction:column; gap: 10px; }
.footer-inner p{ color: var(--text-dim); font-size: 13px; margin:0; }
.footer-copy{ color: #b6b8b9 !important; }

/* ---------- Responsive ---------- */
@media (max-width: 960px){
  .nav{ display:none; }
  .burger{ display:flex; }
  .advantages-grid{ grid-template-columns: repeat(2,1fr); }
  .process-grid{ grid-template-columns: repeat(2,1fr); }
  .contacts-inner{ grid-template-columns: 1fr; }
  .header-phone{ display:none; }
  .header-actions .btn{ display:none; }
}

@media (max-width: 560px){
  .advantages-grid{ grid-template-columns: 1fr; }
  .process-grid{ grid-template-columns: 1fr; }
  .hero{ padding: 130px 0 70px; }
  .cta-banner-inner{ flex-direction: column; align-items:flex-start; }
}

/* ---------- Фильтр по цветам ---------- */
.color-filter{ margin-bottom: 32px; }
.color-filter-row{
  display:flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}
.color-swatch-btn{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.color-swatch-chip{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--line);
  transition: border-color .15s ease, transform .15s ease;
}
.color-swatch-btn:hover .color-swatch-chip{ transform: scale(1.08); }
.color-swatch-btn.is-active .color-swatch-chip{
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--accent);
}
.color-swatch-label{ font-size: 11px; color: var(--text-muted); }
.color-swatch-btn.color-swatch-all .color-swatch-chip{
  background: repeating-conic-gradient(#fff 0% 25%, #ddd 0% 50%) 50% / 10px 10px;
}
.color-filter-row-compact{ margin-top: 0; gap: 10px; margin-bottom: 16px; }
.color-filter-row-compact .color-swatch-chip{ width: 26px; height: 26px; }
.color-filter-row-compact .color-swatch-label{ font-size: 10px; }

.configurator-hardware-note{
  font-size: 13px;
  color: var(--accent);
  margin: 8px 0 14px;
  min-height: 18px;
}

/* ---------- Карусель (витрина + выбор внутренней панели) ---------- */
.carousel{
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}
.carousel-viewport{
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}
.carousel-viewport::-webkit-scrollbar{ display:none; }
.carousel-track{
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
}
.carousel-track.card-grid{ display:flex; } /* переопределяем grid из .card-grid */
.carousel-track.card-grid > .card{
  flex: 0 0 280px;
  scroll-snap-align: start;
}
.carousel-track > .cfg-option{
  flex: 0 0 190px;
  scroll-snap-align: start;
}
.carousel-viewport{ scroll-snap-type: x mandatory; }

.carousel-arrow{
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition: border-color .15s ease, color .15s ease;
}
.carousel-arrow:hover{ border-color: var(--accent); color: var(--accent); }

.carousel-empty{
  color: var(--text-dim);
  font-size: 14px;
  padding: 20px 0;
}

/* ---------- Конструктор (внешняя + внутренняя панель) ---------- */
.configurator{
  margin-top: 64px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.configurator-head{
  padding: 48px 48px 0;
}
.configurator-head h3{
  font-size: 32px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.configurator-note{
  color: var(--text-muted);
  font-size: 16px;
  max-width: 720px;
  margin: 0;
}
.configurator-body{
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 40px 48px 56px;
}

.configurator-preview{ display:flex; flex-direction:column; gap: 14px; }
.configurator-preview-pair{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.configurator-preview-side{ display:flex; flex-direction:column; align-items:center; gap: 14px; }
.configurator-preview-image{
  background: var(--panel-2);
  border: 1px solid var(--line);
  aspect-ratio: 3/4;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  display:flex; align-items:center; justify-content:center;
  padding: 36px;
}
.configurator-preview-image img{ width: 100%; height: 100%; object-fit: contain; }
.configurator-side-label{
  font-family:'Oswald', sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.configurator-side-name{
  font-size: 18px;
  color: var(--text-muted);
  text-align: center;
}

.configurator-controls{
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-width: 0;
}
.configurator-controls .configurator-group{ margin-bottom: 0; }

.configurator-group{ margin-bottom: 32px; min-width: 0; }
.configurator-label-row{
  display:flex;
  align-items:center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.configurator-label{
  display:block;
  font-family:'Oswald', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.configurator-change-link{
  font-size: 13px;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.configurator-change-link:hover{ color: var(--accent-bright); }
.configurator-current-external{
  font-family:'Oswald', sans-serif;
  font-size: 19px;
  color: var(--text);
  margin: 0;
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--line);
}

.configurator-options{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.cfg-option{
  display:flex;
  flex-direction: column;
  align-items:center;
  gap: 12px;
  padding: 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  cursor: pointer;
  font-family:'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-muted);
  text-align:center;
  transition: border-color .15s ease, color .15s ease;
}
.cfg-option:hover{ border-color: var(--line-strong); }
.cfg-option.is-active{ border-color: var(--accent); color: var(--text); }

.cfg-option-photo{
  aspect-ratio: 3/4;
  justify-content: center;
  padding: 8px;
}
.cfg-option-photo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--panel-2);
}

.configurator-price{
  display:flex;
  align-items:baseline;
  justify-content: space-between;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--text-muted);
}
.configurator-price strong{
  font-family:'Oswald', sans-serif;
  font-size: 30px;
  color: var(--text);
}

/* компенсация под фиксированную шапку при прокрутке к якорям */
#smart, #smartConfigurator, #smartExternalShowcase, #apartment, #aptConfigurator, #aptExternalShowcase, #termo, #termoConfigurator, #termoExternalShowcase{ scroll-margin-top: 96px; }

@media (max-width: 800px){
  .configurator-preview-pair{ grid-template-columns: 1fr; }
  .configurator-head{ padding: 32px 24px 0; }
  .configurator-body{ padding: 24px 24px 32px; }
}

/* ---------- Mobile nav (open state) ---------- */
.nav.is-open{
  display:flex;
  flex-direction:column;
  position:absolute;
  top:76px; left:0; right:0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
  gap: 18px;
}
