/* ГИАТС — журнал о ремонте и дизайне жилья. Единый CSS сайта. */

@font-face {
  font-family: "Playfair Display";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/playfair-display-600-cyrillic.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/playfair-display-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201D, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/playfair-display-700-cyrillic.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/playfair-display-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201D, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/golos-text-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/golos-text-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201D, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/golos-text-500-cyrillic.woff2") format("woff2");
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/golos-text-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2018-201D, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF;
}

:root {
  --paper: #f6f1e7;
  --paper-deep: #efe7d6;
  --terra: #b5542f;
  --terra-dark: #8f3f20;
  --sage: #8a9a7b;
  --sage-soft: #cfd6c3;
  --ink: #2b2620;
  --ink-soft: #5d554a;
  --rule: #d9cfba;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Golos Text", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* зернистость бумаги */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .5;
  background-image: radial-gradient(rgba(43,38,32,.05) 1px, transparent 1px);
  background-size: 4px 4px;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: var(--terra); text-decoration: none; }
a:hover { color: var(--terra-dark); }

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

/* ---------- шапка ---------- */
.masthead {
  border-bottom: 3px double var(--rule);
  background: var(--paper);
  position: relative;
  z-index: 2;
}
.masthead-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-top: 26px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}
.logo {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--ink);
}
.logo:hover { color: var(--terra); }
.logo-mark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 42px;
  letter-spacing: .06em;
  line-height: 1;
}
.logo-tag {
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  white-space: nowrap;
}
.issue-strip {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 6px;
}
.issue-strip .dot {
  width: 7px; height: 7px;
  background: var(--terra);
  border-radius: 50%;
  display: inline-block;
}

.nav {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 5;
}
.nav-inner {
  display: flex;
  gap: 4px;
  align-items: stretch;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav a {
  display: block;
  padding: 13px 18px 11px;
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.on {
  color: var(--terra);
  border-bottom-color: var(--terra);
}

/* ---------- карточка материала (полоса журнала) ---------- */
.rubric-label {
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  margin-bottom: 10px;
}
.num {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 58px;
  line-height: .9;
  color: var(--terra);
  opacity: .9;
}

.hero {
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.08;
  margin: 14px 0 18px;
  letter-spacing: -.01em;
}
.hero h1 a { color: var(--ink); }
.hero h1 a:hover { color: var(--terra); }
.hero-lede {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 0 0 26px;
}
.hero figure { margin: 0; }
.hero figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--rule);
  padding: 8px;
  background: #fff;
}
.byline {
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  gap: 14px;
  align-items: center;
}
.byline .sep { color: var(--terra); }

/* ---------- лента на главной ---------- */
.layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 48px;
  padding: 44px 0 60px;
}
.rail {
  position: sticky;
  top: 62px;
  align-self: start;
  border-right: 1px solid var(--rule);
  padding-right: 22px;
}
.rail h2 {
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  margin: 0 0 14px;
}
.rail ol {
  list-style: none;
  margin: 0 0 34px;
  padding: 0;
}
.rail ol li { margin: 0 0 12px; }
.rail ol a {
  display: flex;
  gap: 12px;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.4;
}
.rail ol a:hover { color: var(--terra); }
.rail ol .n {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--terra);
  min-width: 2.2ch;
}
.rail-note {
  background: var(--paper-deep);
  border-left: 3px solid var(--sage);
  padding: 16px 16px 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

.strip {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--rule);
}
.strip:first-of-type { border-top: 0; padding-top: 0; }
.strip .num { margin-top: 6px; }
.strip-body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 2.6vw, 33px);
  line-height: 1.16;
  margin: 0 0 10px;
}
.strip-body h2 a { color: var(--ink); }
.strip-body h2 a:hover { color: var(--terra); }
.strip-body p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  max-width: 60ch;
}
.strip figure { margin: 0; }
.strip figure img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--rule);
  padding: 6px;
  background: #fff;
}
.meta-row {
  font-size: 12.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  margin-bottom: 8px;
}
.read-link {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--terra);
  border-bottom: 1px solid var(--terra);
  padding-bottom: 2px;
}
.read-link:hover { color: var(--terra-dark); border-color: var(--terra-dark); }

/* ---------- страница статьи ---------- */
.article-head {
  padding: 46px 0 8px;
  max-width: 780px;
}
.article-head h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  margin: 12px 0 16px;
}
.lede {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 0 20px;
}
.crumbs {
  font-size: 12.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 22px;
}
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { color: var(--terra); }
.crumbs .sep { color: var(--terra); margin: 0 8px; }

.article-figure {
  margin: 30px -60px 36px;
}
.article-figure img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  border: 1px solid var(--rule);
  padding: 9px;
  background: #fff;
}
.article-figure .cap {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--sage);
  text-align: right;
}
.article-figure.inside { margin: 34px 0; }
.article-figure.inside img { max-height: 420px; }

.prose {
  max-width: 720px;
  margin: 0 auto;
}
.prose h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(24px, 2.4vw, 31px);
  line-height: 1.2;
  margin: 44px 0 16px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.prose h2 .h-num {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 8px;
}
.prose h3 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 21px;
  margin: 30px 0 10px;
}
.prose p { margin: 0 0 18px; }
.prose .first-p::first-letter {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 74px;
  line-height: .72;
  float: left;
  padding: 8px 12px 0 0;
  color: var(--terra);
}
.prose ul, .prose ol {
  margin: 0 0 20px;
  padding-left: 24px;
}
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--sage); }

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 26px;
  font-size: 15.5px;
}
.prose caption {
  text-align: left;
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage);
  padding-bottom: 8px;
}
.prose th, .prose td {
  border-bottom: 1px solid var(--rule);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}
.prose th {
  font-weight: 500;
  color: var(--ink);
  border-bottom: 2px solid var(--terra);
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.prose tbody tr:nth-child(even) { background: rgba(138,154,123,.07); }

.pull {
  border-left: 3px solid var(--terra);
  background: var(--paper-deep);
  padding: 18px 22px;
  margin: 26px 0;
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.45;
  color: var(--ink);
}

.end-note {
  margin: 40px auto 0;
  padding-top: 18px;
  border-top: 3px double var(--rule);
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- остальные страницы ---------- */
.page-head {
  padding: 52px 0 10px;
  max-width: 760px;
}
.page-head h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.14;
  margin: 0 0 16px;
}
.page-body {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 64px;
}
.page-body h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 24px;
  margin: 34px 0 12px;
}
.page-body ol, .page-body ul { padding-left: 22px; }
.page-body li { margin-bottom: 10px; }
.page-body img {
  border: 1px solid var(--rule);
  padding: 7px;
  background: #fff;
  margin: 22px 0 26px;
}

.contact-block {
  background: var(--paper-deep);
  border-left: 3px solid var(--terra);
  padding: 24px 26px;
  margin: 26px 0 30px;
  font-size: 18px;
}
.contact-block a { word-break: break-word; }

/* ---------- подвал ---------- */
footer {
  border-top: 3px double var(--rule);
  background: #ece4d2;
  padding: 34px 0 40px;
  margin-top: 30px;
  font-size: 14px;
  color: var(--ink-soft);
}
.foot-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.foot-brand .logo-mark { font-size: 30px; }
.foot-brand p { margin: 8px 0 0; max-width: 34ch; }
footer h3 {
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--sage);
  font-weight: 500;
  margin: 0 0 12px;
}
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 8px; }
footer address { font-style: normal; line-height: 1.7; }
.copyright {
  border-top: 1px solid var(--rule);
  margin-top: 26px;
  padding-top: 16px;
  font-size: 13px;
  letter-spacing: .1em;
}

/* ---------- адаптив ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; gap: 10px; }
  .rail { position: static; border-right: 0; padding-right: 0; border-bottom: 1px solid var(--rule); padding-bottom: 22px; }
  .rail ol { column-count: 2; column-gap: 24px; }
  .strip { grid-template-columns: 58px minmax(0, 1fr); gap: 18px; }
  .strip figure { grid-column: 1 / -1; margin-top: 6px; }
  .strip .num { font-size: 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .article-figure { margin: 26px 0 30px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .masthead-inner { padding-top: 18px; }
  .logo-mark { font-size: 32px; }
  .logo { gap: 10px; flex-wrap: wrap; }
  .issue-strip { padding-bottom: 0; }
  .rail ol { column-count: 1; }
  .strip { grid-template-columns: 1fr; }
  .strip .num { font-size: 34px; margin-bottom: 2px; }
  .prose .first-p::first-letter { font-size: 58px; }
  .foot-grid { grid-template-columns: 1fr; gap: 22px; }
  .contact-block { font-size: 16px; padding: 18px; }
  .wrap { padding: 0 16px; }
}
.contact-phrase {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
  margin: 26px 0 8px;
}
