@font-face {
  font-family: "Anybody";
  src: url("fonts/anybody.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}

:root {
  --blue: #2335C8;
  --blue-deep: #1A2896;
  --yellow: #FFC72C;
  --red: #E5322D;
  --paper: #F7F5F0;
  --paper-2: #ECE8DE;
  --ink: #15183A;
  --ink-dim: #4B4F6B;
  --wrap: 1180px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Anybody", "Helvetica Neue", Arial, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1.5px; }

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* Шапка */
.site-header {
  background: var(--blue);
  color: var(--paper);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.3rem;
  font-variation-settings: "wdth" 118;
  letter-spacing: -.01em;
  line-height: 1;
}

.logo svg { width: 30px; height: 30px; }

.nav { display: flex; flex-wrap: wrap; gap: .25rem 1.75rem; }

.nav a {
  text-decoration: none;
  font-weight: 600;
  padding: .25rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover { border-bottom-color: var(--yellow); }
.nav a[aria-current="page"] { border-bottom-color: var(--paper); }

/* Главный экран */
.hero {
  background: var(--blue);
  color: var(--paper);
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3.5rem, 8vw, 6.5rem);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2.5rem clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.2rem, 4.2vw, 3.9rem);
  font-weight: 850;
  font-variation-settings: "wdth" 108;
  line-height: 1.02;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.hero p {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: rgba(247, 245, 240, .86);
}

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

.btn {
  display: inline-block;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  border: 2px solid transparent;
}

.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { background: #FFD45C; }
.btn-ghost { border-color: rgba(247, 245, 240, .6); color: var(--paper); }
.btn-ghost:hover { border-color: var(--paper); }

/* Анимированный логотип-домик */
.house {
  justify-self: end;
  width: min(100%, 460px);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  -webkit-tap-highlight-color: transparent;
}

.house svg { width: 100%; }
.ring { fill: none; stroke: var(--paper); stroke-width: 5; }
.roof { fill: var(--yellow); }
.body { fill: var(--red); }
.window { fill: var(--paper); }
.roof, .window { transform-box: fill-box; transform-origin: center; }

.spawn .ring { animation: draw 1s cubic-bezier(.6, 0, .2, 1) both; }
.spawn .body { animation: blink .7s steps(1) .55s both; }
.spawn .roof { animation: drop .5s cubic-bezier(.3, 1.4, .5, 1) 1s both, blink .7s steps(1) 1s both; }
.spawn .window { animation: pop .35s cubic-bezier(.3, 1.6, .5, 1) 1.45s both; }

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes blink {
  0% { opacity: 0; } 15% { opacity: 1; } 30% { opacity: .15; }
  45% { opacity: 1; } 60% { opacity: .15; } 75%, 100% { opacity: 1; }
}
@keyframes drop { from { transform: translateY(-38px); } to { transform: translateY(0); } }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* Секции */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section + .section { padding-top: 0; }

.section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  line-height: 1.05;
  letter-spacing: -.015em;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.shot {
  margin: 0;
  border: 3px solid var(--ink);
  background: var(--paper-2);
}

.feature p { margin: 0 0 1.25rem; max-width: 34rem; }

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .35rem 1.25rem;
  margin: 0 0 1.5rem;
  font-size: .95rem;
}

.facts dt { color: var(--ink-dim); }
.facts dd { margin: 0; font-weight: 600; }

.more { font-weight: 700; }

/* Список постов */
.posts { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }

.posts li {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: .25rem 2rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(21, 24, 58, .2);
}

.posts time { color: var(--ink-dim); font-size: .95rem; padding-top: .2rem; }
.posts h3 { margin: 0 0 .25rem; font-size: 1.3rem; font-weight: 700; line-height: 1.25; }
.posts h3 a { text-decoration: none; }
.posts h3 a:hover { text-decoration: underline; }
.posts p { margin: 0; color: var(--ink-dim); max-width: 60ch; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 2rem;
  margin-bottom: 1.5rem;
}

.section-head h2 { margin: 0; }

/* Внутренние страницы */
.page-head {
  background: var(--blue);
  color: var(--paper);
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.page-head h1 {
  margin: 0 0 .75rem;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 850;
  font-variation-settings: "wdth" 115;
  line-height: 1;
  letter-spacing: -.02em;
  text-wrap: balance;
}

.page-head p {
  margin: 0;
  max-width: 40rem;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  color: rgba(247, 245, 240, .86);
}

.page-head .meta { font-size: 1rem; margin-top: 1rem; }
.page-head a { color: var(--paper); }

.prose { max-width: 66ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.6rem; margin: 2.5rem 0 .75rem; font-weight: 800; font-variation-settings: "wdth" 110; line-height: 1.15; }
.prose p, .prose ul { margin: 0 0 1.25rem; }
.prose ul { padding-left: 1.25rem; }
.prose li { margin-bottom: .4rem; }
.prose figure { margin: 2rem 0; }
.prose figcaption { margin-top: .5rem; font-size: .9rem; color: var(--ink-dim); }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 3rem;
}

.gallery figure { margin: 0; }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 2rem clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.aside {
  border-top: 2px solid var(--ink);
  padding-top: 1.25rem;
}

.aside h2 { font-size: 1.25rem; margin: 0 0 1rem; }

.back { display: inline-block; margin-top: 1rem; font-weight: 700; }

/* Подвал */
.site-footer {
  background: var(--ink);
  color: rgba(247, 245, 240, .78);
  font-size: .95rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.site-footer p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer a { color: var(--paper); }

/* 404 */
.notfound {
  min-height: 60vh;
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: 4rem 0;
}

.notfound h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 850;
  font-variation-settings: "wdth" 115;
  line-height: 1;
}

.notfound p { margin: 0; max-width: 40ch; }

@media (max-width: 860px) {
  .hero .wrap, .feature, .two-col { grid-template-columns: minmax(0, 1fr); }
  .house { justify-self: start; width: min(60vw, 280px); order: -1; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .posts li { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .spawn .ring, .spawn .body, .spawn .roof, .spawn .window { animation: none; }
}
