:root {
  --ink: #1c1914;
  --ink-soft: #4a453c;
  --paper: #f3efe6;
  --paper-deep: #e6dfd2;
  --wood: #8b5e3c;
  --wood-deep: #5c3a22;
  --moss: #3d5a45;
  --moss-soft: #5a7a62;
  --line: rgba(28, 25, 20, 0.12);
  --white: #fffaf3;
  --shadow: 0 18px 50px rgba(28, 25, 20, 0.12);
  --radius: 2px;
  --font-display: "Literata", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
  --max: 1180px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(139, 94, 60, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(61, 90, 69, 0.1), transparent 50%),
    linear-gradient(180deg, #f7f3ea 0%, var(--paper) 40%, #ebe4d7 100%);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(243, 239, 230, 0.86);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.brand-tag {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav a {
  position: relative;
  font-size: 0.95rem;
  color: var(--ink-soft);
  transition: color 0.25s ease;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.35rem;
  height: 1.5px;
  background: var(--wood);
}

.nav-phone {
  font-weight: 600;
  color: var(--ink) !important;
  white-space: nowrap;
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-items: center;
  justify-content: center;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
  display: block;
  width: 1.1rem;
  height: 1.5px;
  background: var(--ink);
  position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle span::before { top: -5px; }
.menu-toggle span::after { top: 5px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

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

.btn-primary {
  background: var(--ink);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--wood-deep);
}

.btn-ghost {
  border: 1px solid rgba(28, 25, 20, 0.28);
  color: var(--ink);
  background: transparent;
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: rgba(255, 250, 243, 0.55);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - 4.5rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  animation: heroZoom 18s ease-out forwards;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(18, 14, 10, 0.78) 0%, rgba(18, 14, 10, 0.45) 48%, rgba(18, 14, 10, 0.2) 100%),
    linear-gradient(0deg, rgba(18, 14, 10, 0.55) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 5rem 0 4.5rem;
  max-width: 38rem;
  animation: riseIn 0.9s ease both;
}

.hero-title {
  margin: 0 0 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero-text {
  margin: 0 0 1.8rem;
  color: rgba(255, 250, 243, 0.86);
  font-size: 1.05rem;
  max-width: 34ch;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.section-kicker {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--moss);
  font-weight: 650;
}

.section-title {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 650;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.section-text {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.ways {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.way {
  padding: 1.75rem 1.5rem;
  border-top: 1px solid var(--line);
  animation: riseIn 0.8s ease both;
}

.way:nth-child(2) {
  animation-delay: 0.12s;
}

.way h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 650;
}

.way p {
  margin: 0;
  color: var(--ink-soft);
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.preview-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper-deep);
  animation: riseIn 0.85s ease both;
}

.preview-item:nth-child(2) { animation-delay: 0.1s; }
.preview-item:nth-child(3) { animation-delay: 0.2s; }

.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.preview-item:hover img {
  transform: scale(1.05);
}

.preview-item span {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: 0.35rem 0.65rem;
  background: rgba(28, 25, 20, 0.72);
  color: var(--white);
  font-size: 0.85rem;
}

.cta-band {
  margin: 0 0 5rem;
  padding: 2.5rem;
  background:
    linear-gradient(135deg, rgba(61, 90, 69, 0.12), transparent 55%),
    linear-gradient(180deg, #ebe3d4, #e0d6c4);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-band h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.cta-band p {
  margin: 0;
  color: var(--ink-soft);
}

/* Catalog */
.page-hero {
  padding: 3.5rem 0 1.5rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.5rem 0 2rem;
}

.filter-btn {
  min-height: 2.4rem;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
  background: rgba(255, 250, 243, 0.45);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-btn:hover,
.filter-btn.is-active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 1.15rem;
  padding-bottom: 4rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: riseIn 0.7s ease both;
}

.product-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper-deep);
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.04);
}

.product-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.55rem;
  background: rgba(255, 250, 243, 0.92);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 650;
}

.product-body h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.25;
}

.product-meta {
  margin: 0 0 0.55rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.product-price {
  margin: 0 0 0.85rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.product-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.product-actions .btn {
  min-height: 2.6rem;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 14, 10, 0.62);
  backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  background: var(--white);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.modal-gallery {
  background: #e8e1d4;
}

.modal-gallery img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.modal-thumbs {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem;
  overflow-x: auto;
}

.modal-thumbs button {
  flex: 0 0 auto;
  width: 56px;
  height: 70px;
  overflow: hidden;
  opacity: 0.65;
  border: 1px solid transparent;
}

.modal-thumbs button.is-active,
.modal-thumbs button:hover {
  opacity: 1;
  border-color: var(--ink);
}

.modal-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  padding: 1.6rem 1.5rem 1.7rem;
}

.modal-info h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.2;
}

.modal-price {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 700;
}

.modal-desc {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.specs {
  margin: 0 0 1.3rem;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.specs li {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.specs li span:first-child {
  color: var(--ink-soft);
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  background: rgba(255, 250, 243, 0.9);
  border: 1px solid var(--line);
  font-size: 1.2rem;
  line-height: 1;
}

body.modal-open {
  overflow: hidden;
}

/* Contacts */
.contacts-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  padding-bottom: 4.5rem;
}

.contact-block {
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.contact-block h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.contact-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}

.contact-list li span:first-child {
  color: var(--ink-soft);
}

.contact-list a {
  color: var(--wood-deep);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.note {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.contact-panel {
  padding: 1.8rem 1.5rem;
  background:
    linear-gradient(160deg, rgba(61, 90, 69, 0.14), transparent 50%),
    #e7dfd0;
  border: 1px solid var(--line);
  align-self: start;
}

.contact-panel h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.contact-panel p {
  margin: 0 0 1.2rem;
  color: var(--ink-soft);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Animations */
@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Responsive */
@media (max-width: 960px) {
  .catalog-grid,
  .preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal-dialog {
    grid-template-columns: 1fr;
  }

  .contacts-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.25rem 1rem;
    background: rgba(243, 239, 230, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .ways,
  .catalog-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 86vh;
  }

  .hero-content {
    padding-bottom: 3rem;
  }

  .contact-list li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .specs li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}
