:root {
  --paper: #f7f0df;
  --paper-deep: #eee1c5;
  --ink: #28352f;
  --ink-soft: #5f6b63;
  --rust: #c5674e;
  --sun: #e3a94f;
  --sage: #7f9a79;
  --line: rgba(55, 83, 68, 0.19);
  --shadow: 0 18px 55px rgba(73, 55, 33, 0.13);
  --hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(227, 169, 79, .11), transparent 28rem),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(82, 108, 90, .055) 31px 32px),
    var(--paper);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.72;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .17;
  background-image: radial-gradient(#634e34 .45px, transparent .55px);
  background-size: 5px 5px;
  z-index: 20;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; }

.skip-link {
  position: fixed;
  top: .5rem;
  left: .5rem;
  z-index: 100;
  padding: .55rem .8rem;
  background: var(--ink);
  color: white;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

.shell { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.site-header {
  position: relative;
  z-index: 30;
  padding: 1rem 0 .5rem;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 2px solid var(--ink);
  padding: .3rem .1rem .85rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  font-family: var(--hand);
  font-weight: 700;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  transform: rotate(-1deg);
}

.brand-mark {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 48% 52% 41% 59%;
  color: var(--rust);
  font-size: 1.25rem;
}

.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--hand);
  cursor: pointer;
}

.site-nav { display: flex; align-items: center; gap: clamp(.8rem, 2.2vw, 1.7rem); }
.site-nav a {
  text-decoration: none;
  font-family: var(--hand);
  font-size: .88rem;
  position: relative;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 5%; right: 5%; bottom: -.3rem;
  height: 2px;
  background: var(--rust);
  transform: scaleX(0) rotate(-1deg);
  transition: transform .2s ease;
}
.site-nav a:hover::after,
.site-nav a.active::after { transform: scaleX(1) rotate(-1deg); }

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: 1.07fr .93fr;
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: 5.5rem 0 6.5rem;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  color: var(--rust);
  font-family: var(--hand);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  transform: rotate(-1deg);
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--hand);
  line-height: 1.15;
  text-wrap: balance;
}
h1 { font-size: clamp(3.1rem, 8vw, 6.4rem); letter-spacing: -.06em; }
h2 { font-size: clamp(2.1rem, 5vw, 3.7rem); letter-spacing: -.04em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.65rem); }

.hero-copy .lead {
  max-width: 36rem;
  margin: 1.8rem 0 2rem;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  color: var(--ink-soft);
}

.scribble { position: relative; display: inline-block; }
.scribble::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: -.12em;
  height: .18em;
  border-bottom: 4px solid var(--sun);
  border-radius: 50%;
  transform: rotate(-1.5deg);
}

.button-row { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: .65rem 1.15rem;
  border: 2px solid var(--ink);
  border-radius: 48% 52% 45% 55% / 54% 46% 54% 46%;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-family: var(--hand);
  font-weight: 700;
  box-shadow: 4px 5px 0 var(--sun);
  transition: transform .18s ease, box-shadow .18s ease;
}
.button:hover { transform: translate(2px, 2px) rotate(-1deg); box-shadow: 2px 3px 0 var(--sun); }
.button.ghost { background: transparent; color: var(--ink); box-shadow: none; }

.hero-photo { position: relative; min-height: 520px; }
.hero-photo img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border: 11px solid #fffaf0;
  box-shadow: var(--shadow);
  transform: rotate(2.2deg);
}
.tape {
  position: absolute;
  width: 125px;
  height: 34px;
  background: rgba(229, 195, 111, .69);
  box-shadow: 0 2px 4px rgba(71, 50, 25, .1);
  z-index: 2;
}
.tape.top { top: -8px; left: 35%; transform: rotate(-5deg); }
.tape.bottom { bottom: -7px; right: 12%; transform: rotate(5deg); }
.margin-note {
  position: absolute;
  right: -1rem;
  bottom: 3.5rem;
  max-width: 11rem;
  padding: .8rem 1rem;
  background: #f3d479;
  box-shadow: 6px 7px 18px rgba(68, 48, 26, .14);
  font-family: var(--hand);
  font-size: .88rem;
  line-height: 1.35;
  transform: rotate(-4deg);
}

.section { padding: 6.5rem 0; }
.section-title { max-width: 44rem; margin-bottom: 3rem; }
.section-title p { color: var(--ink-soft); max-width: 38rem; margin: 1rem 0 0; }

.note-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
.note-card {
  position: relative;
  min-height: 315px;
  padding: 1.7rem 1.5rem 1.5rem;
  background: rgba(255, 251, 240, .78);
  border: 1px solid var(--line);
  box-shadow: 8px 12px 28px rgba(67, 50, 29, .09);
  transform: rotate(-.5deg);
}
.note-card:nth-child(2n) { transform: rotate(.7deg); background: rgba(238, 230, 198, .72); }
.note-card:nth-child(3n) { transform: rotate(-.2deg); }
.note-card time, .tiny {
  display: block;
  color: var(--rust);
  font-family: var(--hand);
  font-size: .78rem;
  margin-bottom: 1rem;
}
.note-card p { color: var(--ink-soft); }
.note-card a { font-family: var(--hand); font-size: .83rem; font-weight: 700; text-decoration-thickness: 2px; text-decoration-color: var(--sun); }
.pin {
  position: absolute;
  width: 13px; height: 13px;
  top: .65rem; right: 1rem;
  border-radius: 50%;
  background: var(--rust);
  box-shadow: 2px 3px 4px rgba(0, 0, 0, .18);
}

.quote-band {
  margin: 1rem 0;
  padding: 5rem 1rem;
  background: var(--ink);
  color: var(--paper);
  transform: rotate(-.4deg);
  overflow: hidden;
}
.quote-band blockquote { width: min(880px, 90%); margin: auto; text-align: center; }
.quote-band p { margin: 0; font-family: var(--hand); font-size: clamp(1.8rem, 4vw, 3.2rem); line-height: 1.35; }
.quote-band cite { display: block; margin-top: 1.2rem; color: #e3cfaa; font-style: normal; font-size: .9rem; }

.two-col { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2.5rem, 7vw, 6.5rem); align-items: center; }
.photo-stack { position: relative; padding: 1rem 1.6rem 2rem 0; }
.photo-stack img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 10px solid #fffaf0;
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}
.photo-stack::after {
  content: "важное — рядом";
  position: absolute;
  right: 0; bottom: .5rem;
  padding: .75rem 1rem;
  background: #f1d47e;
  font-family: var(--hand);
  transform: rotate(3deg);
}
.check-list { list-style: none; padding: 0; margin: 1.8rem 0 2rem; }
.check-list li { margin: .65rem 0; padding-left: 1.8rem; position: relative; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--rust); font-family: var(--hand); font-weight: 700; }

.page-hero { padding: 5rem 0 3.5rem; max-width: 780px; }
.page-hero h1 { font-size: clamp(3rem, 7vw, 5.5rem); }
.page-hero p { max-width: 43rem; color: var(--ink-soft); font-size: 1.2rem; }

.filter-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 2rem; }
.filter-button {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: .4rem .9rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--hand);
  font-size: .78rem;
  cursor: pointer;
}
.filter-button.active, .filter-button:hover { background: var(--ink); color: var(--paper); }
.note-card[hidden] { display: none; }

.story {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 2rem;
  padding: 2.8rem 0;
  border-top: 1px solid var(--line);
}
.story-meta { font-family: var(--hand); color: var(--rust); font-size: .8rem; }
.story-body p:first-of-type::first-letter { float: left; font-family: var(--hand); font-size: 4.6rem; line-height: .8; padding: .25rem .35rem 0 0; color: var(--rust); }
.story-body h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1rem; }
.story-body p { color: var(--ink-soft); }
.story-photo { margin-top: 1.5rem; }
.story-photo img { width: 100%; max-height: 420px; object-fit: cover; border: 8px solid #fffaf0; box-shadow: var(--shadow); transform: rotate(.5deg); }

.gallery { columns: 3 260px; column-gap: 1rem; }
.gallery-item {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 1rem;
  border: 8px solid #fffaf0;
  background: #fffaf0;
  box-shadow: 4px 8px 20px rgba(60, 44, 25, .11);
  cursor: zoom-in;
  break-inside: avoid;
}
.gallery-item:nth-child(2n) { transform: rotate(.6deg); }
.gallery-item:nth-child(3n) { transform: rotate(-.5deg); }
.gallery-item img { width: 100%; height: auto; }
.gallery-item span { display: block; padding: .65rem .45rem .25rem; text-align: left; font-family: var(--hand); color: var(--ink); font-size: .77rem; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(24, 30, 27, .92);
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(100%, 1000px); max-height: 82vh; border: 10px solid #fffaf0; }
.lightbox-close { position: absolute; top: 1rem; right: 1.2rem; border: 0; background: transparent; color: white; font-size: 2rem; cursor: pointer; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2.5rem; }
.fact { padding: 1.3rem; border-top: 2px solid var(--ink); }
.fact strong { display: block; font-family: var(--hand); font-size: 1.8rem; color: var(--rust); }
.fact span { color: var(--ink-soft); font-size: .9rem; }

.site-footer { padding: 5rem 0 2rem; }
.footer-paper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  padding: 2.5rem;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 250, 237, .43);
}
.footer-paper h2, .footer-paper h3 { font-size: 1rem; margin-bottom: .75rem; }
.footer-paper p { margin: .3rem 0; color: var(--ink-soft); font-size: .88rem; }
.footer-paper a { text-decoration-color: var(--sun); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1rem .2rem 0; color: var(--ink-soft); font-size: .75rem; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 860px) {
  body { font-size: 17px; }
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 1rem; right: 1rem;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.3rem;
    background: #fff8e8;
    border: 2px solid var(--ink);
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .hero { grid-template-columns: 1fr; padding-top: 3.5rem; }
  .hero-photo { width: min(620px, 95%); margin-inline: auto; }
  .two-col { grid-template-columns: 1fr; }
  .note-grid { grid-template-columns: 1fr 1fr; }
  .footer-paper { grid-template-columns: 1fr 1fr; }
  .story { grid-template-columns: 1fr; gap: .5rem; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 1.2rem, 1120px); }
  .hero { min-height: auto; padding-bottom: 4rem; }
  .hero-photo, .hero-photo img { min-height: 390px; height: 390px; }
  .margin-note { right: -.2rem; }
  .note-grid, .facts, .footer-paper { grid-template-columns: 1fr; }
  .section { padding: 4.5rem 0; }
  .footer-paper { padding: 1.6rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
