/* kapustin.info — design «Акварель» */

@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/alegreya-cyrillic-wght-normal.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/alegreya-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/alegreya-cyrillic-wght-italic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Alegreya";
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/alegreya-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #F7F2E9;
  --paper-deep: #EFE7D8;
  --ink: #242B33;
  --ink-soft: #4C555E;
  --muted: #57606A;
  --river: #3D6076;
  --river-dark: #274457;
  --rule: #DDD3C2;
  --rule-deep: #D5C9B5;
  --gutter: clamp(20px, 8.4vw, 120px);
  --section: clamp(72px, 9vw, 120px);
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Alegreya", Georgia, "Times New Roman", serif;
  font-size: 20px;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; height: auto; }
dfn { font-style: normal; }

a { color: var(--river); text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { color: var(--river-dark); }
:focus-visible { outline: 2px solid var(--river); outline-offset: 3px; }

h2 { font-size: clamp(36px, 3.5vw, 50px); line-height: 1.1; font-weight: 500; text-wrap: balance; }
h3 { font-size: 22px; line-height: 1.3; font-weight: 500; font-style: italic; color: var(--muted); }

.wrap { max-width: 1440px; margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: calc(800px + 2 * var(--gutter)); }

.skip-link { position: absolute; left: -9999px; top: 12px; }
.skip-link:focus { left: 12px; z-index: 20; padding: 8px 14px; background: var(--ink); color: var(--paper); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Header and footer */

.site-header { border-bottom: 1px solid var(--rule); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 40px; padding-block: 24px; }
.brand { font-size: 26px; font-weight: 500; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 32px; font-size: 19px; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-deep); }

.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; padding-block: 28px 40px; font-size: 16px; color: var(--muted); }

/* Home: hero and plate */

.hero { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: end; padding-top: clamp(48px, 6vw, 88px); }
.hero-title { grid-column: 1 / span 7; }
.hero-aside { grid-column: 9 / span 4; }
.hero-name { font-size: clamp(46px, 5.7vw, 82px); line-height: 0.98; font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; }
.subtitle { margin-top: 28px; font-size: clamp(22px, 1.95vw, 28px); line-height: 1.35; font-style: italic; color: var(--muted); text-wrap: pretty; }
.lead { font-size: 21px; line-height: 1.6; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 28px; }
.button { display: inline-flex; align-items: center; min-height: 52px; padding-inline: 28px; border-radius: 3px; background: var(--river); color: var(--paper); font-size: 19px; font-weight: 500; text-decoration: none; }
.button:hover { background: var(--river-dark); color: var(--paper); }

.plate { max-width: 1440px; margin: clamp(40px, 5vw, 64px) auto 0; padding-left: var(--gutter); }
.plate img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.plate figcaption { margin-top: 12px; padding-right: var(--gutter); font-size: 16px; font-style: italic; color: var(--muted); }

/* Home: sections */

.section { padding-block: var(--section); }
.tinted { background: var(--paper-deep); }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; align-items: start; }
.c1-4 { grid-column: 1 / span 4; }
.c1-5 { grid-column: 1 / span 5; }
.c1-6 { grid-column: 1 / span 6; }
.c6-6 { grid-column: 6 / span 6; }
.c7-6 { grid-column: 7 / span 6; }
.c8-5 { grid-column: 8 / span 5; }

.prose > * + * { margin-top: 18px; }
.prose > h2 + * { margin-top: 24px; }
.prose p { font-size: 21px; line-height: 1.65; text-wrap: pretty; }
.prose .soft { color: var(--ink-soft); }

.stack > * + * { margin-top: 20px; }

.portrait img { width: 300px; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--rule); }

.timeline { border-bottom: 1px solid var(--rule-deep); }
.timeline li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; padding-block: 18px; border-top: 1px solid var(--rule-deep); font-size: 20px; line-height: 1.5; }
.timeline .year { color: var(--river); font-weight: 500; font-variant-numeric: lining-nums; }

.defs { border-bottom: 1px solid var(--rule); }
.defs li { padding-block: 13px; border-top: 1px solid var(--rule); font-size: 19px; line-height: 1.45; color: var(--ink-soft); }
.defs strong { font-weight: 500; color: var(--ink); }
.tinted .defs,
.tinted .defs li { border-color: var(--rule-deep); }

.compact { columns: 2; column-gap: 32px; }
.compact li { break-inside: avoid; padding-block: 9px; border-top: 1px solid var(--rule-deep); font-size: 18px; line-height: 1.4; }

.quote { max-width: 980px; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.22; font-style: italic; text-wrap: balance; }
.quote + .grid { margin-top: clamp(48px, 6vw, 72px); }
.accent { font-size: 26px; font-style: italic; color: var(--river); }

.reading { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px; align-items: start; }
.reading article { padding-top: 28px; border-top: 2px solid var(--ink); }
.reading article > * + * { margin-top: 18px; }
.card-title { font-size: 34px; line-height: 1.15; font-weight: 500; font-style: normal; color: var(--ink); }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--river); }
.card-quote { font-size: 23px; line-height: 1.45; font-style: italic; }
.card-quote footer { margin-top: 8px; font-size: 16px; font-style: normal; color: var(--muted); }
.card-text { font-size: 19px; line-height: 1.6; text-wrap: pretty; }
.muted { color: var(--muted); }
.term { font-weight: 700; letter-spacing: 0.03em; }

.contact { background: var(--ink); color: var(--paper); }
.contact-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px; }
.contact-row p { margin-top: 16px; font-size: 21px; color: #C9CDD1; }
.contact-email { font-size: clamp(30px, 4vw, 56px); line-height: 1.1; color: var(--paper); text-decoration-color: #7F97A6; overflow-wrap: anywhere; }
.contact-email:hover { color: #FFFFFF; }
.contact :focus-visible { outline-color: var(--paper); }

/* Inner pages */

.page-head { padding-block: clamp(56px, 7vw, 96px) 32px; }
.page-head > * + * { margin-top: 24px; }
.page-title { font-size: clamp(44px, 5vw, 72px); line-height: 1; font-weight: 500; letter-spacing: -0.01em; text-wrap: balance; }
.intro p { font-size: 22px; line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }
.intro p + p { margin-top: 14px; }
.note { font-size: 17px; font-style: italic; color: var(--muted); text-wrap: pretty; }

.qa-list { padding-bottom: var(--section); }
.qa { padding-block: 36px; border-top: 1px solid var(--rule); }
.qa > * + * { margin-top: 16px; }
.question { font-size: 23px; line-height: 1.5; font-style: italic; text-wrap: pretty; }
.question footer { margin-top: 8px; font-size: 16px; font-style: normal; color: var(--muted); }
.qa > p,
.qa > ul,
.qa > ol { font-size: 20px; line-height: 1.65; text-wrap: pretty; }
.qa ul { padding-left: 1.2em; list-style: disc; }
.back-link { padding-top: 32px; border-top: 1px solid var(--rule); font-size: 18px; }

.alphabet { position: sticky; top: 0; z-index: 5; background: var(--paper); border-block: 1px solid var(--rule); }
.alphabet-row { display: flex; flex-wrap: wrap; gap: 2px 14px; padding-block: 10px; font-size: 22px; line-height: 1.4; }
.alphabet a { text-decoration: none; }
.alphabet span { color: #BDB4A6; }
.reference-body { padding-bottom: var(--section); }
.letter { padding-top: 40px; scroll-margin-top: 64px; }
.letter-title { font-size: 64px; line-height: 1; color: var(--river); }
.letter-title + .entry { margin-top: 16px; }
.entry { padding-block: 18px; border-top: 1px solid var(--rule); scroll-margin-top: 64px; }
.entry p { font-size: 20px; line-height: 1.65; text-wrap: pretty; }
.entry > * + * { margin-top: 12px; }
.entry dfn { font-weight: 700; letter-spacing: 0.03em; }

/* Responsive */

@media (max-width: 1000px) {
  .reading { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 900px) {
  .hero-title, .hero-aside,
  .c1-4, .c1-5, .c1-6, .c6-6, .c7-6, .c8-5 { grid-column: 1 / -1; }
  .grid { row-gap: 40px; }
  .hero { row-gap: 28px; }
}

@media (max-width: 700px) {
  body { font-size: 18px; }
  .brand { font-size: 23px; }
  .site-nav { gap: 4px 18px; font-size: 17px; }
  .plate img { aspect-ratio: 16 / 10; object-position: 80% 50%; }
  .prose p, .lead, .contact-row p { font-size: 19px; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; font-size: 18px; }
  .compact { columns: 1; }
  .defs li { font-size: 18px; }
  .card-title { font-size: 30px; }
  .question { font-size: 20px; }
  .qa > p, .qa > ul, .qa > ol, .entry p { font-size: 18px; }
  .intro p { font-size: 19px; }
  .alphabet-row { flex-wrap: nowrap; overflow-x: auto; gap: 16px; font-size: 20px; }
  .letter-title { font-size: 48px; }
}
