/* ==========================================================================
   Woodesign.by — главная страница
   Вёрстка по макету «Главная woodesign v4» (Claude Design)
   ========================================================================== */

/* --- Шрифт заголовков ----------------------------------------------------
   Bebas Cyr — основной шрифт заголовков из макета. Файлы шрифта
   в assets/fonts/ (см. assets/fonts/README.txt). Пока их нет,
   заголовки автоматически рендерятся в Oswald — он подключён из Google Fonts
   и по пропорциям ближе всего к Bebas.
   Диапазон font-weight: 400 700 отключает синтетическое утолщение.
   ------------------------------------------------------------------------ */
@font-face {
  font-family: 'Bebas Cyr';
  src: url('../assets/fonts/BebasBold.woff2') format('woff2'),
       url('../assets/fonts/BebasBold.woff') format('woff'),
       url('../assets/fonts/BebasBold.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #b07a32;
  --ink: #111214;
  --muted: #5f646e;
  --muted-light: #a8acb4;
  --line: #e2e5ea;
  --line-dark: #43464c;
  --soft: #ebeef4;
  --soft-2: #e1e5ec;
  --maxw: 1460px;
  --pad: 40px;
  --font-body: 'Golos Text', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bebas Cyr', 'Oswald', 'Golos Text', sans-serif;
}

/* --- База ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--accent); }

img, svg { max-width: 100%; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Заголовки уровня раздела */
.h2 {
  font-size: clamp(30px, 3.4vw, 56px);
  line-height: 1.02;
  letter-spacing: .005em;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 26px;
}

.lead { font-size: 18px; margin: 0 0 18px; }
.muted { color: var(--muted); }
.pretty { text-wrap: pretty; }

/* --- Кнопки -------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 21px 42px;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover, .btn--dark:focus-visible { background: var(--accent); color: #fff; }

.btn--outline {
  border: 1px solid var(--ink);
  font-size: 14px;
  padding: 17px 34px;
  background: transparent;
}
.btn--outline:hover, .btn--outline:focus-visible { background: var(--ink); color: #fff; }

.btn--light { background: #fff; color: var(--ink); font-size: 14px; padding: 19px 38px; align-self: flex-start; }
.btn--light:hover, .btn--light:focus-visible { background: var(--accent); color: #fff; }

.btn--sm { font-size: 14px; padding: 18px 36px; }

/* --- Верхний блок / шапка ------------------------------------------------ */
.hero-wrap {
  position: relative;
  background: linear-gradient(to right, var(--soft) 0%, var(--soft) 77%, #fff 77%, #fff 100%);
}

.site-header {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 30px var(--pad);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 40px;
}

.logo { display: inline-flex; line-height: 0; }
.logo img { height: 44px; width: auto; display: block; }

.nav {
  display: flex;
  gap: clamp(18px, 2.6vw, 46px);
  justify-content: center;
  font-size: 15px;
  white-space: nowrap;
  min-width: 0;
}
.nav a { padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav a:hover { border-bottom-color: var(--accent); }
/* Класс навешивает js/main.js при прокрутке до соответствующего раздела */
.nav a.is-active { color: var(--accent); border-bottom-color: var(--accent); }

.header-contacts {
  text-align: right;
  font-size: 15px;
  line-height: 1.5;
  white-space: nowrap;
}
.header-contacts a { display: block; }
.header-contacts .email { color: var(--muted); }

/* Кнопка мобильного меню */
.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  position: absolute;
  left: 50%; margin-left: -10px;
  width: 20px; height: 1.5px;
  background: var(--ink);
  transition: transform .22s ease, opacity .22s ease;
}
.nav-toggle span { top: 50%; margin-top: -.75px; }
.nav-toggle span::before { content: ''; top: -6px; margin-left: 0; left: 0; }
.nav-toggle span::after  { content: ''; top:  6px; margin-left: 0; left: 0; }

body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span::after  { transform: translateY(-6px) rotate(-45deg); }

/* --- Первый экран -------------------------------------------------------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 60px var(--pad) 130px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px;
  align-items: center;
}
.hero__text { padding-left: 60px; }
.hero h1 {
  font-size: clamp(38px, 5.2vw, 78px);
  line-height: 1;
  letter-spacing: .005em;
  margin: 0 0 32px;
}
.hero__sub {
  margin: 0 0 44px;
  font-size: 19px;
  line-height: 1.5;
  max-width: 24em;
}
.hero__media {
  background: var(--soft-2);
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.hero__media img {
  max-width: 88%;
  max-height: 84%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* --- Строка преимуществ -------------------------------------------------- */
.usp { padding-top: 46px; }
.usp__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 50px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 30px;
}
.usp__item { font-size: 15px; color: var(--muted); }
.usp__item b { color: var(--ink); font-weight: 400; }

/* --- Универсальная секция «текст + картинка» ----------------------------- */
.split {
  margin-top: 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 80px;
  align-items: center;
}
.split--master { margin-top: 140px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.split__media { min-width: 0; height: 500px; background: var(--soft); }
.split--master .split__media { height: 520px; }
.split__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Блок 3D: рендер на белом фоне — показываем целиком, как в окне программы */
.split--3d .split__media {
  background: #fff;
  border: 1px solid var(--line);
  padding: 28px;
}
.split--3d .split__media img { object-fit: contain; }
.split h2 { margin-bottom: 24px; }
.split__body { margin: 0 0 34px; max-width: 34em; color: var(--muted); }

/* --- Каталог ------------------------------------------------------------- */
.section { margin-top: 140px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 60px;
  margin-bottom: 54px;
}
.section-head h2 { max-width: 14em; }
.section-head p {
  color: var(--muted);
  margin: 0;
  width: 330px;
  flex: 0 0 auto;
  font-size: 15px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px 30px;
}
.card { display: block; }
.card__media { height: 320px; background: var(--soft); overflow: hidden; }
.card__media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.card:hover .card__media img { transform: scale(1.04); }
.card__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 27px;
  letter-spacing: .03em;
  line-height: 1.1;
  margin: 18px 0 8px;
}
.card__note { color: var(--muted); font-size: 14px; }
.card:hover .card__note { color: var(--muted); }

.card--link {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line);
  padding: 32px;
  min-height: 320px;
  transition: border-color .2s ease;
}
.card--link:hover { border-color: var(--ink); }
.card--link__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 32px;
  letter-spacing: .03em;
  line-height: 1.05;
}
.card--link__arrow { margin-top: 20px; font-size: 24px; color: var(--accent); }

/* --- Четыре причины ------------------------------------------------------ */
.reasons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
}
.reasons__item { border-top: 1px solid var(--line); padding-top: 20px; }
.reasons__item:first-child { border-top-color: var(--ink); }
.reasons__label {
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--accent);
  margin-bottom: 14px;
}
.reasons__item p { margin: 0; font-size: 15px; }

/* --- Процесс ------------------------------------------------------------- */
.process {
  margin-top: 140px;
  background: var(--soft);
  padding: 110px 0;
}
.process__head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 80px;
  align-items: end;
  margin-bottom: 70px;
}
.process__head p { color: var(--muted); margin: 0; font-size: 15px; }

.steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
}
.step { border-top: 1px solid var(--ink); padding-top: 18px; }
.step__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  margin-bottom: 12px;
}
.step__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: .03em;
  margin-bottom: 6px;
}
.step__note { color: var(--muted); font-size: 14px; }
.process__cta { margin-top: 60px; }

/* --- Портфолио ----------------------------------------------------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px 30px;
}
.gallery figure { margin: 0; }
.gallery__media { height: 290px; background: var(--soft); }
.gallery__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* --- Форма заявки -------------------------------------------------------- */
.cta {
  margin-top: 140px;
  background: var(--ink);
  color: #fff;
  padding: 120px 0;
}
.cta__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 90px;
}
.cta h2 { font-size: clamp(32px, 3.8vw, 64px); line-height: .98; margin: 0 0 26px; }
.cta__text { margin: 0 0 40px; max-width: 32em; color: var(--muted-light); }
.cta__links {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.cta__links a { border-bottom: 1px solid var(--line-dark); padding-bottom: 6px; }
.cta__links a:hover { border-bottom-color: var(--accent); }

.form { display: flex; flex-direction: column; gap: 26px; }
.form label { display: block; }
.form__label {
  display: block;
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted-light);
  margin-bottom: 9px;
}
.form input,
.form textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  color: inherit;
  font: inherit;
  padding: 10px 0;
  outline: none;
  border-radius: 0;
  transition: border-color .2s ease;
}
.form textarea { resize: none; }
.form input::placeholder,
.form textarea::placeholder { color: #6c7078; }
.form input:focus,
.form textarea:focus { border-bottom-color: #fff; }
.form input[aria-invalid='true'],
.form textarea[aria-invalid='true'] { border-bottom-color: #d4703f; }
.form__note { font-size: 12px; color: var(--muted-light); min-height: 18px; }
.form__note--ok { color: #9fd3a6; }
.form__note--err { color: #e39a72; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Подвал -------------------------------------------------------------- */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 70px var(--pad);
  display: grid;
  grid-template-columns: auto repeat(3, minmax(0, 1fr));
  gap: 40px;
  align-items: start;
}
.site-footer .logo img { height: 40px; }
.footer-col__title {
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.footer-legal {
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  padding: 22px 0 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 1200px) {
  .split, .split--master { gap: 50px; }
  .process__head { gap: 50px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 28px; }
  .cta__grid { gap: 60px; }
}

/* Мобильное меню */
@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 20px;
    padding: 20px var(--pad);
  }
  .nav-toggle { display: block; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 50;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 26px;
    background: #fff;
    font-size: 22px;
    font-family: var(--font-display);
    letter-spacing: .04em;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity .22s ease, transform .22s ease, visibility .22s;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav { opacity: 1; visibility: visible; transform: none; }
  body.nav-open .nav-toggle { position: relative; z-index: 60; }

  .header-contacts { grid-column: 2; text-align: right; font-size: 14px; }
  .header-contacts .email { display: none; }
}

@media (max-width: 960px) {
  :root { --pad: 28px; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-bottom: 80px;
  }
  .hero__text { padding-left: 0; order: 1; }
  .hero__media { order: 2; height: 380px; }
  .hero-wrap { background: var(--soft); }
  .hero h1 { margin-bottom: 22px; }
  .hero__sub { margin-bottom: 32px; font-size: 17px; }

  .usp__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }

  .split, .split--master {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    margin-top: 90px;
  }
  .split__media, .split--master .split__media { height: 340px; }
  /* 3D-рендер показываем целиком — высоту задаёт пропорция картинки */
  .split--3d .split__media { height: auto; aspect-ratio: 1388 / 1132; padding: 18px; }
  .split__body { max-width: none; }

  .section, .process { margin-top: 90px; }
  .process { padding: 70px 0; }
  .process__head {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    margin-bottom: 44px;
  }

  .section-head { flex-direction: column; align-items: flex-start; gap: 18px; margin-bottom: 36px; }
  .section-head h2 { max-width: none; }
  .section-head p { width: auto; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .card__media { height: 260px; }
  .card--link { min-height: 260px; padding: 26px; }

  .reasons { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; }
  .reasons__item:nth-child(2) { border-top-color: var(--ink); }

  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
  .gallery__media { height: 240px; }

  .cta { margin-top: 90px; padding: 70px 0; }
  .cta__grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }

  .site-footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 34px;
    padding: 50px var(--pad);
  }
  .site-footer .logo { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  :root { --pad: 20px; }

  body { font-size: 15px; }
  .logo img { height: 34px; }

  .hero__media { height: 300px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usp__grid, .cards, .reasons, .gallery { grid-template-columns: minmax(0, 1fr); }
  .reasons__item { border-top-color: var(--ink); }
  .card__media { height: 230px; }
  .gallery__media { height: 230px; }

  .btn { width: 100%; text-align: center; padding: 19px 24px; }
  .btn--light { align-self: stretch; }
  .cta__links { gap: 18px; }
  .cta__links a { flex: 1 0 auto; }

  .site-footer { grid-template-columns: minmax(0, 1fr); }
  .footer-legal { padding-bottom: 30px; }
}

@media (max-width: 420px) {
  .steps { grid-template-columns: minmax(0, 1fr); }
}

/* --- Печать -------------------------------------------------------------- */
@media print {
  .nav-toggle, .nav, .cta__links { display: none !important; }
  body { color: #000; }
  .hero-wrap, .process, .cta { background: #fff !important; color: #000 !important; }
}
