/* ===========================================================================
   Кряж — столярная мастерская. Дизайн-система лендинга.
   Палитра орех/дуб + чёрный + лён. Сериф Georgia-стек + системный сан.
   Только локальные ресурсы, никаких внешних шрифтов и CDN.
   =========================================================================== */

:root {
  /* цвет — дерево, лён, графит */
  --linen:      #f1ebe0;
  --linen-2:    #e7dece;
  --paper:      #faf6ee;
  --char:       #1c1813;
  --char-2:     #2a231b;
  --text:       #2c2620;
  --text-soft:  #5a5043;
  --muted:      #8c8071;
  --line:       #ddd0bb;

  --walnut:     #6b4226;
  --walnut-deep:#54331c;
  --oak:        #c08a4e;
  --oak-soft:   #d9b486;
  --moss:       #6f7350;

  /* типографика */
  --serif: "Georgia", "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans:  ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* шкала отступов */
  --s-1: 8px;  --s-2: 16px; --s-3: 24px; --s-4: 32px;
  --s-5: 48px; --s-6: 72px; --s-7: 104px; --s-8: 140px;

  --maxw: 1200px;
  --radius: 3px;
  --radius-lg: 8px;
  --shadow:    0 1px 2px rgba(28,24,19,.06), 0 10px 30px rgba(28,24,19,.08);
  --shadow-lg: 0 24px 60px rgba(28,24,19,.20);
  --ease: cubic-bezier(.2,.6,.3,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  color: var(--text);
  background: var(--linen);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.1; letter-spacing: -.01em; margin: 0; }
p { margin: 0 0 var(--s-2); }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--s-4); }
.visually-hidden, .skip-link {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; top: 12px; left: 12px; width: auto; height: auto; clip: auto;
  background: var(--char); color: var(--linen); padding: 10px 16px; border-radius: var(--radius); z-index: 999;
}
:focus-visible { outline: 2px solid var(--oak); outline-offset: 3px; }

/* ---------- общие секции ---------- */
.section { padding-block: var(--s-7); }
.section--alt  { background: var(--linen-2); }
.section--wood { background: var(--char); color: #ece3d3; }
.section--dark { background: var(--char-2); color: #ece3d3; }

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: .26em;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--walnut);
  margin: 0 0 var(--s-2);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1px; background: var(--oak); display: inline-block;
}
.eyebrow--light { color: var(--oak-soft); }
.eyebrow--light::before { background: var(--oak); }

.section-head { max-width: 660px; margin: 0 auto var(--s-6); }
.section-head--left { margin-inline: 0; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 48px); margin-bottom: var(--s-2); }
.section-head__lead { color: var(--text-soft); font-size: 18px; margin: 0; }
.section--wood .section-head__lead { color: #c4b8a3; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--walnut); color: #fbf6ee;
  padding: 13px 26px; border: 1.5px solid var(--walnut);
  border-radius: var(--radius); font-weight: 600; font-size: 15px;
  letter-spacing: .01em;
  transition: background .25s var(--ease), transform .2s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { background: var(--walnut-deep); border-color: var(--walnut-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn--small { padding: 9px 18px; font-size: 14px; }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--outline { background: transparent; color: #fbf6ee; border-color: rgba(251,246,238,.55); }
.btn--outline:hover { background: rgba(251,246,238,.12); border-color: #fbf6ee; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  background: transparent;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(241,235,224,.92);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom-color: var(--line);
  box-shadow: 0 2px 18px rgba(28,24,19,.06);
}
.header-inner { display: flex; align-items: center; gap: var(--s-3); height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 23px; font-weight: 700; color: var(--char); letter-spacing: .01em; }
.brand__mark { color: var(--walnut); flex: none; }

.site-header:not(.scrolled) .brand,
.site-header:not(.scrolled) .nav a { color: #f6efe2; }
.site-header:not(.scrolled) .brand__mark { color: var(--oak-soft); }

.nav { display: flex; gap: var(--s-4); margin-left: auto; }
.nav a { font-size: 15px; font-weight: 500; position: relative; padding: 6px 0; transition: color .2s var(--ease); }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--oak);
  transition: width .25s var(--ease);
}
.nav a:hover { color: var(--oak); }
.nav a:hover::after { width: 100%; }
.nav-cta { flex: none; }

.burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; margin-left: auto; }
.burger span { width: 24px; height: 2px; background: var(--char); transition: transform .3s var(--ease), opacity .2s var(--ease); }
.site-header:not(.scrolled) .burger span { background: #f6efe2; }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 94vh; display: flex; align-items: flex-end;
  overflow: hidden; margin-top: -78px; padding-top: 78px;
  color: #f6efe2;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; will-change: transform; }
.hero__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(20,16,11,.82) 0%, rgba(20,16,11,.45) 45%, rgba(20,16,11,.18) 100%),
    linear-gradient(0deg, rgba(20,16,11,.78) 0%, rgba(20,16,11,0) 55%);
}
.hero__content { max-width: 820px; padding-block: var(--s-7) var(--s-8); }
.hero__title {
  font-size: clamp(40px, 7.5vw, 86px); line-height: 1.0; margin-bottom: var(--s-3);
  text-shadow: 0 2px 40px rgba(0,0,0,.35); letter-spacing: -.02em;
}
.hero__lead { font-size: clamp(17px, 2.2vw, 21px); max-width: 36em; color: #e6dccb; margin-bottom: var(--s-4); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-5); }
.hero__facts {
  list-style: none; display: flex; flex-wrap: wrap; gap: var(--s-5); padding: var(--s-4) 0 0; margin: 0;
  border-top: 1px solid rgba(246,239,226,.22); max-width: 620px;
}
.hero__facts li { display: flex; flex-direction: column; }
.hero__facts b { font-family: var(--serif); font-size: 30px; line-height: 1; color: var(--oak-soft); }
.hero__facts span { font-size: 13.5px; color: #c8bca8; margin-top: 6px; letter-spacing: .02em; }

/* ---------- about ---------- */
.about__grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: var(--s-6); align-items: center; }
.about__media { margin: 0; position: relative; }
.about__media img {
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  aspect-ratio: 3/4; object-fit: cover; width: 100%;
}
.about__media figcaption { font-size: 13px; color: var(--muted); margin-top: 14px; font-style: italic; }
.about__text h2 { font-size: clamp(28px, 3.8vw, 42px); margin-bottom: var(--s-3); }
.about__text p { color: var(--text-soft); }
.about__pull {
  font-family: var(--serif); font-size: clamp(20px, 2.6vw, 26px); line-height: 1.4;
  color: var(--walnut); margin: var(--s-4) 0 var(--s-2); padding-left: var(--s-3);
  border-left: 3px solid var(--oak); font-style: italic;
}
.about__sign { font-size: 14px; color: var(--muted); margin: 0; }

/* ---------- gallery (на тёмном) ---------- */
.gallery__grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s-3);
}
.piece {
  grid-column: span 3;
  background: #241d16; border: 1px solid #362c20;
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.piece--tall { grid-column: span 3; grid-row: span 2; }
.piece--wide { grid-column: span 6; }
.piece:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--walnut); }
.piece__media { overflow: hidden; aspect-ratio: 4/3; }
.piece--tall .piece__media { aspect-ratio: 4/5; }
.piece--wide .piece__media { aspect-ratio: 21/9; }
.piece__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.piece:hover .piece__media img { transform: scale(1.05); }
.piece__body { padding: var(--s-3) var(--s-4) var(--s-4); display: flex; flex-direction: column; gap: 9px; flex: 1; }
.piece__tag {
  font-size: 11px; text-transform: uppercase; letter-spacing: .18em; color: var(--oak); font-weight: 600;
}
.piece__body h3 { font-size: 23px; color: #f3ece0; }
.piece__body p { color: #b9ac98; font-size: 15px; margin: 0; flex: 1; }
.piece__foot { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); margin-top: 6px; padding-top: var(--s-2); border-top: 1px solid #362c20; }
.piece__price { font-family: var(--serif); font-size: 19px; color: var(--oak-soft); }
.piece__term { font-size: 13px; color: #8c8071; }
.gallery__note { text-align: center; color: #c4b8a3; max-width: 640px; margin: var(--s-6) auto 0; font-size: 16px; }
.gallery__note a { color: var(--oak-soft); border-bottom: 1px solid currentColor; }
.gallery__note a:hover { color: #fff; }

/* ---------- materials ---------- */
.materials__split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); align-items: start; margin-bottom: var(--s-7); }
.species__title { font-size: 24px; margin-bottom: var(--s-4); }
.species__list { list-style: none; padding: 0; margin: 0; }
.species__list li { display: flex; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
.species__list li:last-child { border-bottom: 1px solid var(--line); }
.species__swatch {
  flex: none; width: 52px; height: 52px; border-radius: var(--radius); border: 1px solid rgba(0,0,0,.08);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,.18);
}
.species__swatch--oak    { background: linear-gradient(135deg, #d9b486, #c08a4e); }
.species__swatch--ash    { background: linear-gradient(135deg, #e4dac0, #cfc2a8); }
.species__swatch--walnut { background: linear-gradient(135deg, #7d4f30, #54331c); }
.species__list h4 { font-size: 20px; margin-bottom: 4px; }
.species__list p { color: var(--text-soft); font-size: 15px; margin: 0; }
.materials__media { margin: 0; }
.materials__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.materials__media figcaption { font-size: 13px; color: var(--muted); margin-top: 12px; font-style: italic; }

.timeline { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.timeline__step { position: relative; padding-top: var(--s-3); border-top: 2px solid var(--walnut); }
.timeline__num { font-family: var(--serif); font-size: 14px; color: var(--walnut); letter-spacing: .12em; }
.timeline__step h4 { font-size: 19px; margin: 8px 0; }
.timeline__step p { color: var(--text-soft); font-size: 15px; margin: 0; }

/* ---------- quote band ---------- */
.quote-band { position: relative; overflow: hidden; padding-block: var(--s-8); display: flex; align-items: center; }
.quote-band__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.quote-band__veil { position: absolute; inset: 0; z-index: -1; background: rgba(20,16,11,.72); }
.quote-band blockquote { margin: 0; max-width: 900px; color: #f6efe2; }
.quote-band blockquote p { font-family: var(--serif); font-size: clamp(24px, 4vw, 42px); line-height: 1.3; font-style: italic; margin: 0; }
.quote-band cite { display: block; margin-top: var(--s-3); font-style: normal; font-size: 15px; letter-spacing: .08em; color: var(--oak-soft); }

/* ---------- order ---------- */
.order__grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: var(--s-6); align-items: start; }
.order__text h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: var(--s-3); }
.order__text > p { color: var(--text-soft); max-width: 46em; }
.order__steps { list-style: none; padding: 0; margin: var(--s-5) 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.order__steps li { padding-left: var(--s-3); border-left: 2px solid var(--oak); }
.order__steps h4 { font-size: 18px; margin-bottom: 6px; color: var(--walnut); }
.order__steps p { color: var(--text-soft); font-size: 15px; margin: 0; }
.order__card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: var(--s-4); box-shadow: var(--shadow); position: sticky; top: 100px;
}
.order__card h3 { font-size: 21px; margin-bottom: var(--s-3); }
.order__facts { margin: 0 0 var(--s-4); }
.order__facts div { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); padding: 11px 0; border-bottom: 1px solid var(--line); }
.order__facts dt { color: var(--text-soft); font-size: 14.5px; margin: 0; }
.order__facts dd { margin: 0; font-weight: 600; color: var(--walnut); font-size: 15px; text-align: right; }
.order__card-note { font-size: 13px; color: var(--muted); margin: var(--s-3) 0 0; text-align: center; }

/* ---------- partii / subscribe (dark) ---------- */
.partii__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s-6); align-items: center; }
.partii__text h2 { font-size: clamp(28px, 3.8vw, 42px); color: #f6efe2; margin-bottom: var(--s-3); }
.partii__text p { color: #c4b8a3; }
.partii__perks { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; gap: 12px; }
.partii__perks li { position: relative; padding-left: 30px; color: #ddd2bf; font-size: 15.5px; }
.partii__perks li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 14px; height: 8px;
  border-left: 2px solid var(--oak); border-bottom: 2px solid var(--oak); transform: rotate(-45deg);
}

.subscribe {
  background: #241d16; border: 1px solid #3a2f22; border-radius: var(--radius-lg);
  padding: var(--s-5); box-shadow: var(--shadow-lg);
}
.subscribe__title { font-size: 22px; color: #f3ece0; margin-bottom: var(--s-3); }
.subscribe__row { display: flex; gap: 10px; }
.subscribe input {
  flex: 1; min-width: 0; padding: 15px 18px; border-radius: var(--radius);
  border: 1.5px solid #4a3d2c; background: #1b150f; color: #f3ece0; font-size: 16px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.subscribe input::placeholder { color: #897c69; }
.subscribe input:focus { outline: none; border-color: var(--oak); box-shadow: 0 0 0 3px rgba(192,138,78,.25); }
.subscribe input.invalid { border-color: #cf6a4a; box-shadow: 0 0 0 3px rgba(207,106,74,.25); }
.subscribe .btn { flex: none; }
.subscribe__hint { font-size: 13px; color: #998c78; margin: 14px 0 0; }
.subscribe__error { font-size: 14px; color: #e8997e; margin: 14px 0 0; }
.subscribe__ok { font-size: 15px; color: #a9c98c; margin: 14px 0 0; }

/* ---------- reviews ---------- */
.reviews__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.review {
  margin: 0; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--s-4); box-shadow: var(--shadow);
}
.review__stars { color: var(--oak); letter-spacing: 2px; font-size: 15px; margin-bottom: var(--s-2); }
.review blockquote { margin: 0 0 var(--s-3); font-size: 16.5px; line-height: 1.6; color: var(--text); }
.review figcaption { font-size: 14px; color: var(--muted); letter-spacing: .02em; }

/* ---------- faq ---------- */
.faq__inner { display: grid; grid-template-columns: .75fr 1.25fr; gap: var(--s-6); align-items: start; }
.faq__list details { border-bottom: 1px solid var(--line); padding: var(--s-1) 0; }
.faq__list details:first-child { border-top: 1px solid var(--line); }
.faq__list summary {
  list-style: none; cursor: pointer; font-family: var(--serif); font-size: 20px;
  padding: 16px 40px 16px 0; position: relative; transition: color .2s var(--ease);
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 28px; color: var(--walnut); font-family: var(--sans); font-weight: 300; transition: transform .25s var(--ease);
}
.faq__list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq__list summary:hover { color: var(--walnut); }
.faq__list details p { color: var(--text-soft); padding: 0 40px 16px 0; margin: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--char); color: #c4b8a3; padding-top: var(--s-7); }
.footer__grid { display: grid; grid-template-columns: 1.7fr 1fr 1.2fr 1fr; gap: var(--s-5); padding-bottom: var(--s-6); }
.brand--light { color: #f3ece0; }
.brand--light .brand__mark { color: var(--oak-soft); }
.footer__brand p { margin-top: var(--s-2); font-size: 15px; max-width: 32ch; color: #a39784; }
.footer__col h4 { font-family: var(--sans); text-transform: uppercase; letter-spacing: .16em; font-size: 11.5px; color: #897c69; margin: 0 0 var(--s-2); }
.footer__col a, .footer__col p { display: block; font-size: 15px; color: #c4b8a3; margin: 0 0 9px; transition: color .2s var(--ease); }
.footer__col a:hover { color: var(--oak-soft); }
.footer__social a { display: inline; }
.footer__bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: var(--s-2);
  border-top: 1px solid #362c20; padding-block: var(--s-3) var(--s-4); font-size: 14px; color: #897c69;
}
.footer__bottom a:hover { color: var(--oak-soft); }

/* ---------- reveal-анимация ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1000px) {
  .about__grid, .materials__split, .order__grid, .partii__inner, .faq__inner { grid-template-columns: 1fr; gap: var(--s-5); }
  .about__media { max-width: 460px; }
  .about__media img { aspect-ratio: 3/2; }
  .order__card { position: static; }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .piece, .piece--tall, .piece--wide { grid-column: auto; grid-row: auto; }
  .piece--tall .piece__media, .piece--wide .piece__media { aspect-ratio: 4/3; }
  .reviews__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--s-4); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding-block: var(--s-6); }
  .wrap { padding-inline: var(--s-3); }
  .nav-cta { display: none; }
  .burger { display: flex; }
  .nav {
    position: fixed; inset: 78px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--linen); border-bottom: 1px solid var(--line);
    padding: var(--s-2) var(--s-3) var(--s-3); transform: translateY(-135%);
    transition: transform .35s var(--ease); box-shadow: var(--shadow-lg); margin: 0;
  }
  .site-header.menu-open .nav { transform: translateY(0); }
  .site-header:not(.scrolled).menu-open { background: rgba(241,235,224,.97); backdrop-filter: blur(10px); }
  .site-header:not(.scrolled).menu-open .nav a,
  .site-header:not(.scrolled).menu-open .brand { color: var(--char); }
  .site-header:not(.scrolled).menu-open .burger span { background: var(--char); }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a:last-child { border-bottom: 0; }
  .nav a::after { display: none; }
  .site-header.menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.menu-open .burger span:nth-child(2) { opacity: 0; }
  .site-header.menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero { min-height: 88vh; }
  .hero__facts { gap: var(--s-4); }
  .gallery__grid { grid-template-columns: 1fr; }
  .order__steps { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .subscribe { padding: var(--s-4); }
  .subscribe__row { flex-direction: column; }
  .subscribe .btn { width: 100%; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}