/*
  NordWood — стили одностраничного магазина мебели.
  В файле есть комментарии к основным зонам: базовые настройки, шапка,
  hero-блок, товары, блок “О нас”, форма и подвал.
*/

/* Базовые переменные: цвета, радиусы, отступы */
:root {
  --color-bg: #f6f4f0;
  --color-surface: #ffffff;
  --color-surface-muted: #ebe7df;
  --color-text: #1f211d;
  --color-muted: #686b63;
  --color-line: #d8d2c8;
  --color-primary: #2f3a32;
  --color-primary-hover: #1f271f;
  --color-secondary: #8b735a;
  --shadow-card: 0 16px 38px rgba(31, 33, 29, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(139, 115, 90, 0.35);
  outline-offset: 3px;
}

/* Шапка: липкая навигация с логотипом */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 22px;
  background: rgba(246, 244, 240, 0.92);
  border-bottom: 1px solid var(--color-line);
  backdrop-filter: blur(10px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  font-size: 0.94rem;
}

.main-nav a:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

/* Общие секции и типографика */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px 22px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-secondary);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.35rem, 7vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: -0.075em;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(1.75rem, 4vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.055em;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  letter-spacing: -0.025em;
}

.section-heading {
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-heading p,
.hero-text,
.about-copy p,
.form-note,
.site-footer p,
.site-footer small {
  color: var(--color-muted);
}

.align-left {
  margin-left: 0;
  text-align: left;
}

/* Первый экран: заголовок, кнопки и блок преимуществ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 28px;
  align-items: end;
  min-height: 620px;
  padding-top: 88px;
}

.hero-content {
  padding: 36px 0;
}

.hero-text {
  max-width: 610px;
  margin-bottom: 28px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn,
.cart-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 720;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.btn:hover,
.cart-button:hover {
  transform: translateY(-1px);
}

.btn-primary,
.cart-button {
  color: #fff;
  background: var(--color-primary);
}

.btn-primary:hover,
.cart-button:hover {
  background: var(--color-primary-hover);
}

.btn-secondary {
  background: transparent;
  border-color: var(--color-line);
  color: var(--color-text);
}

.btn-secondary:hover {
  background: var(--color-surface);
}

.hero-panel {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-line);
  box-shadow: var(--shadow-card);
}

.hero-panel div {
  padding: 24px;
  background: var(--color-surface);
}

.hero-panel strong {
  display: block;
  margin-bottom: 3px;
  font-size: 1.8rem;
  letter-spacing: -0.045em;
}

.hero-panel span {
  color: var(--color-muted);
}

/* Карточки товаров: фото сделаны CSS-блоками, чтобы не подключать внешние картинки */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.product-image {
  min-height: 250px;
  border-bottom: 1px solid var(--color-line);
  background-color: #ddd6cb;
  background-position: center;
  background-size: cover;
}

.product-image.sofa {
  background-image:
    linear-gradient(180deg, transparent 0 42%, rgba(0, 0, 0, 0.03) 42% 100%),
    radial-gradient(circle at 24% 66%, #3c4038 0 10%, transparent 10.5%),
    radial-gradient(circle at 76% 66%, #3c4038 0 10%, transparent 10.5%),
    linear-gradient(90deg, transparent 10%, #9f9c92 10% 90%, transparent 90%),
    linear-gradient(180deg, #c8c2b6 0 55%, #9b9588 55% 74%, #d7d0c3 74% 100%);
}

.product-image.table {
  background-image:
    linear-gradient(90deg, transparent 18%, #796248 18% 22%, transparent 22% 78%, #796248 78% 82%, transparent 82%),
    linear-gradient(180deg, transparent 39%, #b69570 39% 51%, transparent 51%),
    linear-gradient(180deg, #ddd7cd 0 58%, #cfc6b6 58% 100%);
}

.product-image.chair {
  background-image:
    radial-gradient(circle at 50% 34%, #b9ab9a 0 23%, transparent 23.5%),
    linear-gradient(90deg, transparent 25%, #76644f 25% 29%, transparent 29% 71%, #76644f 71% 75%, transparent 75%),
    linear-gradient(180deg, transparent 42%, #c8bcab 42% 70%, transparent 70%),
    linear-gradient(180deg, #ded8ce 0 58%, #cbc2b3 58% 100%);
}

.product-info {
  padding: 20px;
}

.product-info p {
  min-height: 48px;
  color: var(--color-muted);
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.price {
  white-space: nowrap;
  font-weight: 800;
}

.cart-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.92rem;
}

/* О нас: две колонки с тезисами */
.about {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 34px;
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.about-copy ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.about-copy li {
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.5);
}

/* Форма обратной связи */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1fr);
  gap: 34px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.form-row {
  display: grid;
  gap: 7px;
}

label {
  font-size: 0.9rem;
  font-weight: 760;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  font: inherit;
}

input {
  min-height: 46px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
}

.form-submit {
  width: fit-content;
}

.form-note {
  margin-bottom: 0;
  font-size: 0.88rem;
}

.notice,
.toast {
  border: 1px solid #bdc9b4;
  border-radius: var(--radius-sm);
  background: #eef4e8;
  color: #25331f;
}

.notice {
  padding: 12px;
}

/* Подвал и всплывающее уведомление */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: start;
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 22px 38px;
  border-top: 1px solid var(--color-line);
}

.site-footer address {
  margin: 0;
  color: var(--color-muted);
  font-style: normal;
}

.site-footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 36px));
  padding: 13px 15px;
  box-shadow: var(--shadow-card);
}

/* Адаптивность для планшетов и телефонов */
@media (max-width: 860px) {
  .site-header,
  .hero,
  .about,
  .contact,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .site-header {
    display: grid;
  }

  .main-nav {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
    padding-top: 54px;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-info p {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  .section {
    padding: 52px 16px;
  }

  .site-header,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .product-bottom,
  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .cart-button,
  .form-submit {
    width: 100%;
  }
}
