/* Порядок дома — mobile-first, warm home, no marketplace chrome */

:root {
  --bg: #F4EFE6;
  --card: #FFFDF8;
  --text: #2B2723;
  --muted: #6E675E;
  --line: #E3D8C8;
  --sage: #3D6B58;
  --sage-soft: #4A7D68;
  --paper: #EDE6D8;
  --header-h: 3.4rem;
}

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

html {
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--header-h) + 0.6rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--sage);
}

img {
  max-width: 100%;
}

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.narrow {
  width: min(640px, calc(100% - 2rem));
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(244, 239, 230, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0 0.65rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.wordmark img {
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 5px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  border-bottom: 1px solid transparent;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--sage);
  border-bottom-color: var(--sage);
}

/* Hero */

.hero {
  padding: 2rem 0 1.6rem;
}

.hero-grid {
  display: grid;
  gap: 1.4rem;
  align-items: center;
}

.hero-photo {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.kicker {
  margin: 0 0 0.7rem;
  color: var(--sage);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.7rem, 4.2vw, 2.35rem);
  font-weight: 700;
  line-height: 1.22;
  max-width: 22ch;
}

.lead {
  margin: 0 0 0.85rem;
  font-size: 1.14rem;
  color: var(--text);
  max-width: 36ch;
}

.hero-note {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
}

/* Intro */

.intro {
  padding: 0.2rem 0 1.8rem;
}

.intro p {
  margin: 0 0 0.85rem;
}

.intro p:last-child {
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
}

/* Zones */

.zone {
  padding: 2.2rem 0 2.6rem;
  border-top: 1px solid var(--line);
}

.zone.alt {
  background: #efe8db;
}

.zone-label {
  margin: 0 0 0.4rem;
  color: var(--sage);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zone h2 {
  margin: 0 0 0.9rem;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.4rem, 3.6vw, 1.9rem);
  font-weight: 700;
  line-height: 1.28;
  max-width: 24ch;
}

.zone > .wrap > p {
  margin: 0 0 1rem;
  max-width: 58ch;
}

.scheme {
  display: grid;
  gap: 0.7rem;
  margin: 1.2rem 0 1.3rem;
}

.scheme-row {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.85rem 0.95rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.scheme-row p {
  margin: 0;
}

.scheme-n {
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--sage);
  color: #f7f3ea;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Cards */

.cards {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.4rem;
  align-items: start;
}

.cards-inline {
  grid-template-columns: 1fr;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(43, 39, 35, 0.06);
}

.card-ph {
  min-height: 9.2rem;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: #f7f3ea;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  text-align: center;
  letter-spacing: 0.01em;
}

.ph-linen { background: #6b7d6a; }
.ph-box { background: #8a6f4e; }
.ph-small { background: #6e7c8a; }
.ph-shelf { background: #5d6e5c; }
.ph-hooks { background: #7a5d4a; }
.ph-vac { background: #4f6a62; }
.ph-sink { background: #5a6f78; }
.ph-drawer { background: #7a6a4e; }

.card-body {
  padding: 1rem 1.05rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.why {
  margin: 0;
  color: var(--muted);
}

.zone-tag {
  margin: 0.15rem 0 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.btn {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  padding: 0.6rem 1rem;
  background: var(--sage);
  color: #f7f3ea;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
}

.btn:hover,
.btn:focus-visible {
  background: var(--sage-soft);
}

.pick-lead {
  max-width: 52ch;
}

.pick {
  background: #ebe3d4;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0 2rem;
  background: #efe8db;
}

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

.footer-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}


/* Wider screens */

@media (min-width: 640px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0;
  }

  .hero {
    padding: 3.2rem 0 2rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 2.2rem;
  }

  .hero-photo img {
    height: 340px;
  }

  .cards-inline,
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .cards-inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards-inline:has(> :only-child) {
    grid-template-columns: minmax(0, 340px);
  }

  .cards-inline:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 340px));
  }

  .scheme {
    grid-template-columns: repeat(3, 1fr);
  }

  .scheme-row {
    grid-template-columns: 1fr;
    min-height: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.card-photo {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--paper);
}
@media (min-width: 720px) {
  .card-photo { height: 220px; }
}

/* Article pages — scoped, does not change landing cards */

.article {
  width: min(68ch, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3.4rem;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
}

.article h1 {
  margin: 0 0 0.9rem;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.7rem, 4.2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.25;
}

.article h2 {
  margin: 1.8rem 0 0.7rem;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.55rem);
  font-weight: 700;
  line-height: 1.3;
}

.article h3 {
  margin: 1.4rem 0 0.5rem;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
}

.article p {
  margin: 0 0 0.95rem;
}

.article p:last-child {
  margin-bottom: 0;
}

.article figure {
  margin: 1.4rem 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}

.article figure img {
  display: block;
  width: 100%;
  height: auto;
}

.article figcaption {
  padding: 0.6rem 0.85rem 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.articles-empty {
  margin: 0;
  padding: 1.2rem 1.15rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  max-width: 42ch;
}

.card-link {
  color: inherit;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-link h3 {
  color: var(--text);
}

.card-link:hover h3,
.card-link:focus-visible h3 {
  color: var(--sage);
}

.article .lead {
  max-width: none;
  margin-bottom: 1.15rem;
}

.article ul,
.article ol {
  margin: 0 0 1.15rem;
  padding-left: 1.3rem;
}

.article li + li {
  margin-top: 0.4rem;
}

.article figure + figure {
  margin-top: 1.6rem;
}

.article figure + h2 {
  margin-top: 2.1rem;
}

.article h2:first-of-type {
  margin-top: 1.4rem;
}
