/* ============================================================
   КОМПОНЕНТЫ
   То, что повторяется на всех страницах сайта:
   шапка, подвал, кнопки, поля формы, логотип.
   ============================================================ */

/* ============================================================
   ЛОГОТИП
   Цвета задаются здесь, а не внутри SVG — поэтому один и тот же
   знак работает и на светлом фоне, и на тёмном.
   ============================================================ */
.logo{
  display:inline-flex;
  align-items:center;
  gap:14px;
  text-decoration:none;
  color:var(--graphite);
}
.logo-mark{ width:64px; height:auto; flex-shrink:0; display:block; }
.logo-mark .lg-base{ fill:#26292B; }
.logo-mark .lg-accent{ fill:var(--accent); }

.logo-text{
  font-family:var(--font-logo);
  font-size:21px;
  font-weight:700;
  letter-spacing:.01em;
  text-transform:uppercase;
  white-space:nowrap;
}

/* ============================================================
   ШАПКА
   ============================================================ */
.site-header{
  position:sticky;
  top:0;
  z-index:100;
  background:var(--bg-header);
  border-bottom:1px solid var(--line);
  transition:box-shadow .2s ease;
}
.site-header.scrolled{ box-shadow:0 4px 16px rgba(30,30,28,.06); }

.header-inner{
  max-width:var(--shell);
  margin:0 auto;
  padding:18px var(--pad);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}

.main-nav{ display:flex; gap:32px; }
.main-nav a{
  font-size:15px;
  font-weight:700;
  text-decoration:none;
  position:relative;
  padding:4px 0;
  white-space:nowrap;
}
.main-nav a::after{
  content:'';
  position:absolute;
  left:0;
  bottom:0;
  width:0;
  height:2px;
  background:var(--accent);
  transition:width .2s ease;
}
.main-nav a:hover::after{ width:100%; }

/* Телефон в шапке */
.header-phone{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:16px;
  font-weight:700;
  text-decoration:none;
  white-space:nowrap;
  transition:color .2s ease;
}
.header-phone svg{ width:17px; height:17px; stroke:var(--accent); stroke-width:1.8; fill:none; }
.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:24px;
  height:2px;
  background:var(--graphite);
  transition:transform .25s ease, opacity .25s ease;
}
.burger.open span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2){ opacity:0; }
.burger.open span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* Мобильное меню */
.mobile-nav{
  display:none;
  flex-direction:column;
  background:var(--bg-header);
  border-top:1px solid var(--line);
  max-height:0;
  overflow:hidden;
  transition:max-height .3s ease;
}
.mobile-nav.open{ max-height:400px; }
.mobile-nav a{
  padding:16px var(--pad);
  font-size:16px;
  font-weight:700;
  text-decoration:none;
  border-bottom:1px solid var(--line);
}
.mobile-nav a:last-child{ border-bottom:none; color:var(--accent); }

@media (max-width:1080px){
  .header-phone{ display:none; }
  .main-nav{ gap:26px; }
}
@media (max-width:860px){
  .main-nav{ display:none; }
  .burger{ display:flex; }
  .mobile-nav{ display:flex; }
  .logo-mark{ width:52px; }
  .logo-text{ font-size:18px; }
}
@media (max-width:400px){
  .logo-text{ display:none; }
}

/* ============================================================
   КНОПКИ
   Срезанный угол вместо скругления — фирменная деталь сайта.
   ============================================================ */
.btn{
  font-family:var(--font);
  font-size:15px;
  font-weight:600;
  padding:15px 26px;
  border:none;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  text-decoration:none;
  clip-path:polygon(0 0, calc(100% - var(--cut-btn)) 0, 100% var(--cut-btn), 100% 100%, 0 100%);
  transition:background .18s ease, color .18s ease;
}
.btn .arrow{ transition:transform .15s ease; }
.btn:hover .arrow{ transform:translateX(3px); }

.btn-primary{ background:var(--accent); color:#fff; }
.btn-primary:hover{ background:var(--accent-dark); }
.btn-primary:disabled{ background:var(--text-muted); cursor:default; }

/* Второстепенная кнопка. Рамку рисуем тенью, а не border —
   при срезанном угле обычная рамка обрезается вместе с углом. */
.btn-secondary{
  background:transparent;
  color:var(--graphite);
  box-shadow:inset 0 0 0 1px var(--graphite);
}
.btn-secondary:hover{ background:var(--graphite); color:var(--bg); }

.btn-block{ width:100%; }

/* ============================================================
   ПОЛЯ ФОРМЫ
   ============================================================ */
.field{ margin-bottom:18px; }
.field label{
  display:block;
  font-size:13px;
  font-weight:500;
  color:var(--graphite-soft);
  margin-bottom:7px;
}
.field label span{ color:var(--accent); }

.field input,
.field select,
.field textarea{
  width:100%;
  padding:13px 15px;
  font-family:var(--font);
  font-size:15px;
  color:var(--graphite);
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:0;
  outline:none;
  transition:border-color .2s ease, background .2s ease;
  -webkit-appearance:none;
  appearance:none;
}
.field textarea{ min-height:96px; resize:vertical; }

.field select{
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236B675F' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 15px center;
  background-size:12px;
  padding-right:40px;
}

.field input:focus,
.field select:focus,
.field textarea:focus{ border-color:var(--accent); background:#fff; }
.field input::placeholder,
.field textarea::placeholder{ color:#A9A296; }

.field.has-error input,
.field.has-error select,
.field.has-error textarea{ border-color:var(--error); }

.field__error{ display:none; margin-top:6px; font-size:12.5px; color:var(--error); }
.field.has-error .field__error{ display:block; }

.field-row{ display:grid; grid-template-columns:1fr 1fr; gap:0 14px; }
@media (max-width:520px){ .field-row{ grid-template-columns:1fr; } }

/* Согласие на обработку данных */
.consent{
  display:flex;
  align-items:flex-start;
  gap:11px;
  margin:4px 0 22px;
  cursor:pointer;
}
.consent input{
  flex:none;
  width:19px;
  height:19px;
  margin-top:2px;
  accent-color:var(--accent);
  cursor:pointer;
}
.consent span{ font-size:13px; line-height:1.5; color:var(--text-muted); }
.consent a{ color:var(--graphite-soft); }
.consent.has-error span{ color:var(--error); }

/* Поле-ловушка для спам-ботов: человек его не видит */
.trap{ position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }

/* ============================================================
   ПОДВАЛ
   ============================================================ */
.footer{
  background:var(--graphite-deep);
  color:rgba(240,232,220,.72);
  padding:clamp(48px,6vw,72px) 0 0;
  font-size:15px;
}

.footer__top{
  display:grid;
  grid-template-columns:1.4fr 1fr 1fr 1.2fr;
  gap:40px clamp(24px,4vw,56px);
  padding-bottom:44px;
}

.footer .logo{ color:var(--bg); margin-bottom:18px; }
/* На тёмном фоне тёмная часть логотипа становится светлой */
.footer .logo-mark{ width:auto; height:56px; }
.footer .logo-mark .lg-base{ fill:#F0E8DC; }
.footer .logo-text{ color:var(--bg); font-size:19px; }

.footer__about{
  margin-bottom:22px;
  max-width:32ch;
  font-size:14.5px;
  line-height:1.6;
  color:rgba(240,232,220,.55);
}

/* Мессенджеры */
.footer__msg{ display:flex; flex-wrap:wrap; gap:10px; }
.footer__msg a{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid rgba(240,232,220,.18);
  text-decoration:none;
  transition:background .2s ease, border-color .2s ease, color .2s ease;
}
.footer__msg a svg{ width:20px; height:20px; fill:rgba(240,232,220,.75); transition:fill .2s ease; }
.footer__msg a:hover{ background:var(--accent); border-color:var(--accent); }
.footer__msg a:hover svg{ fill:#fff; }

.footer__msg a.is-text{
  font-size:13px;
  font-weight:700;
  color:rgba(240,232,220,.75);
}
.footer__msg a.is-text:hover{ color:#fff; }

.footer__head{
  margin-bottom:16px;
  font-size:11px;
  font-weight:600;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(240,232,220,.4);
}

.footer__list li{ margin-bottom:10px; }
.footer__list a{
  color:rgba(240,232,220,.75);
  text-decoration:none;
  font-size:14.5px;
  transition:color .2s ease;
}
.footer__list a:hover{ color:var(--accent); }

.footer__contact{ margin-bottom:18px; }
.footer__contact b{
  display:block;
  font-size:10px;
  font-weight:600;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:rgba(240,232,220,.35);
  margin-bottom:4px;
}
.footer__contact a,
.footer__contact span{
  color:var(--bg);
  font-size:16px;
  font-weight:600;
  text-decoration:none;
}
.footer__contact a:hover{ color:var(--accent); }
.footer__contact .small{ font-size:14.5px; font-weight:500; line-height:1.5; display:block; }

.footer__bottom{
  border-top:1px solid rgba(240,232,220,.12);
  padding:22px 0 28px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px 32px;
  font-size:13px;
  color:rgba(240,232,220,.45);
}
.footer__bottom a{ color:rgba(240,232,220,.6); text-decoration:none; }
.footer__bottom a:hover{ color:var(--accent); }
.footer__legal{ display:flex; flex-wrap:wrap; gap:8px 20px; }

@media (max-width:980px){
  .footer__top{ grid-template-columns:1fr 1fr; gap:36px 32px; }
}
@media (max-width:560px){
  .footer__top{ grid-template-columns:1fr; gap:32px; padding-bottom:32px; }
  .footer__about{ max-width:none; }
  .footer__bottom{ flex-direction:column; align-items:flex-start; }
}
