/* mamrukov.com — personal page. Design notes: docs/DESIGN.md */
@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url("fonts/unbounded-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Unbounded"; font-weight: 500; font-display: swap; src: url("fonts/unbounded-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url("fonts/unbounded-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap; src: url("fonts/unbounded-cyrillic-800-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url("fonts/golos-text-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Golos Text"; font-weight: 400; font-display: swap; src: url("fonts/golos-text-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; font-weight: 700; font-display: swap; src: url("fonts/golos-text-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Golos Text"; font-weight: 700; font-display: swap; src: url("fonts/golos-text-cyrillic-700-normal.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --ground: #0f3f7a; /* blueprint paper */
  --line: #ffffff;   /* drawing lines and text */
  --mark: #ffd23f;   /* the person: decisions, primary actions */
  --soft: #c6d6ee;   /* secondary text */
  --display: "Unbounded", system-ui, sans-serif;
  --text: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --gap: clamp(4rem, 9vw, 5.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-width: 320px; color: var(--line); background-color: var(--ground);
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: var(--text); font-size: 1.125rem; line-height: 1.4; overflow-wrap: break-word;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--mark); }
a:hover { color: var(--line); }
:focus-visible { outline: 3px solid var(--mark); outline-offset: 3px; }
svg text { font-family: var(--text); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.5rem; }
main > section { padding-top: var(--gap); }

h1, h2, h3, .num, .n, .km, .mark { font-family: var(--display); }
h1 { font-weight: 800; font-size: clamp(2.25rem, 7.4vw, 5.75rem); line-height: .98; letter-spacing: -.03em; overflow-wrap: normal; }
h2 { font-weight: 800; font-size: clamp(1.875rem, 4.5vw, 3.25rem); line-height: 1.05; }
h3 { font-weight: 500; font-size: 1.25rem; line-height: 1.2; }
.sub { margin-top: 1rem; font-size: 1.375rem; max-width: 28em; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 3.5rem; padding: 0 2rem; border: 2px solid var(--line); color: var(--line); font-weight: 700; font-size: 1.25rem; text-decoration: none; overflow-wrap: anywhere; }
.btn:hover { background: var(--line); color: #000; }
.btn-mark { background: var(--mark); border-color: var(--mark); color: #000; }
.btn-mark:hover { background: var(--line); border-color: var(--line); color: #000; }

.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem 0; }
.mark { font-weight: 800; font-size: 1rem; }
.top nav { display: flex; align-items: center; gap: 1.5rem; }
.top .lang { color: var(--line); display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 .25rem; }
.top .btn { min-height: 2.75rem; padding: 0 1.25rem; font-size: 1rem; }

main > .hero { display: flex; flex-wrap: wrap; gap: 2.5rem; align-items: flex-end; padding: 3.5rem 0 4.5rem; }
.hero-text { flex: 1 1 0; min-width: min(100%, 300px); }
.lead { margin-top: 2rem; font-size: clamp(1.375rem, 2.6vw, 1.875rem); line-height: 1.25; max-width: 22em; }
.portrait { flex: 0 0 auto; width: 260px; max-width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border: 2px solid var(--line); }

main > .scale { display: flex; flex-wrap: wrap; gap: 0 1rem; padding: 0; border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.scale > div { flex: 1 1 200px; padding: 1.5rem 0; }
.num { font-weight: 800; font-size: 3rem; line-height: 1; color: var(--mark); }
.scale p { margin-top: .5rem; }

.pair { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2.5rem; align-items: flex-end; }
.pair figure { flex: 1 1 320px; min-width: 0; }
.pair svg { display: block; width: 100%; height: auto; }
figcaption { margin-top: .75rem; font-weight: 700; }

.cols { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 2.5rem; border: 2px solid var(--line); }
.cols > div { padding: 1.5rem; }
.cols > div + div { border-left: 2px solid var(--line); }
.cols h3 { color: var(--mark); }
.cols ul { margin-top: 1rem; display: grid; gap: .5rem; }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
.tiles li { padding: 1.5rem; border: 2px solid var(--line); }
.tiles h3 { margin-top: 1rem; font-size: 1.375rem; }
.tiles p { margin-top: .5rem; color: var(--soft); }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .75rem; margin-top: 2.5rem; }
.steps li { padding: 1.25rem; border: 2px solid var(--line); }
.steps li.person { background: var(--mark); border-color: var(--mark); color: #000; }
.steps .n { font-weight: 800; font-size: 1.75rem; line-height: 1; }
.steps h3 { margin-top: .75rem; font-family: var(--text); font-weight: 700; font-size: 1.125rem; }
.steps p { margin-top: .25rem; }
.legend { display: flex; flex-wrap: wrap; gap: .5rem 2rem; margin-top: 1.25rem; color: var(--soft); }
.legend span { display: inline-flex; align-items: center; gap: .625rem; }
.legend i { width: 18px; height: 18px; border: 2px solid var(--line); }
.legend i.person { background: var(--mark); border-color: var(--mark); }

.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2.5rem; }
.products a { display: block; padding: 1.5rem; background: var(--line); color: #000; text-decoration: none; border: 2px solid var(--line); }
.products a:hover { background: var(--mark); border-color: var(--mark); color: #000; }
.products h3 { font-weight: 800; }
.products p { margin-top: .5rem; }

.sub a { color: var(--mark); }

.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
.cases a { display: block; padding: 1.5rem; border: 2px solid var(--line); color: var(--line); text-decoration: none; }
.cases a:hover { border-color: var(--mark); }
.cases .num { font-size: clamp(1.5rem, 2.3vw, 2.25rem); overflow-wrap: break-word; }
.cases h3 { margin-top: 1rem; font-family: var(--text); font-weight: 700; font-size: 1.125rem; color: var(--mark); }
.cases p { margin-top: .25rem; }

.writing { margin-top: 2rem; border-top: 2px solid var(--line); }
.writing a { display: block; padding: 1.25rem 0; border-bottom: 2px solid var(--line); color: var(--line); text-decoration: none; }
.writing a:hover h3 { color: var(--mark); }
.writing h3 { font-family: var(--text); font-weight: 700; font-size: 1.375rem; }
.writing p { margin-top: .25rem; color: var(--soft); }

.life-row { display: flex; flex-wrap: wrap; gap: 2rem; align-items: center; margin-top: 2rem; }
.life-row > div { flex: 1 1 300px; min-width: 0; }
.life-row svg { flex: 0 1 320px; min-width: 0; height: auto; }
.km { font-weight: 800; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1; color: var(--mark); }
.life p { margin-top: .5rem; }
.km + p { margin-top: 1rem; }

main > .contact { padding: 6.5rem 0 6rem; }
.contact h2 { font-size: clamp(2.75rem, 9vw, 7rem); line-height: .95; letter-spacing: -.03em; }
.links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

@media (max-width: 1024px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .products { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .cases { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cols { grid-template-columns: 1fr; }
  .cols > div + div { border-left: 0; border-top: 2px solid var(--line); }
  .tiles, .products { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .btn { font-size: 1.0625rem; padding: 0 1.25rem; }
  .links .btn { width: 100%; }
  main > .hero { padding: 2rem 0 3rem; }
}
