:root { --ink: #1c1650; --sky: #a9defa; --sun: #ffc928; --leaf: #087a3a; --coral: #ff7f5c; --m: clamp(20px, 4vw, 72px); --focus: #1c1650; --paper: url(img/paper.webp); --sh: drop-shadow(0 -5px 5px #1c165038) drop-shadow(0 -18px 22px #1c165026); }
body { font-family: Geologica, system-ui, sans-serif; font-weight: 420; font-size: 18px; line-height: 1.5; color: var(--ink); background: #fff var(--paper); }
h1, h2, h3 { font-weight: 800; letter-spacing: -.045em; line-height: .98; }
h2 { font-size: clamp(42px, 6.4vw, 112px); }
img { pointer-events: none; }

.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 62px; padding: 0 36px; border-radius: 12px; background: var(--leaf) var(--paper); color: #fff; font-weight: 650; font-size: 19px; text-decoration: none; box-shadow: 0 2px 2px #1c165033, 0 10px 18px #1c165038; transition: transform .35s cubic-bezier(.2,.9,.3,1.3), box-shadow .3s; }
.btn:hover { transform: translateY(-5px) rotate(-1.5deg); box-shadow: 0 4px 4px #1c165026, 0 22px 30px #1c165038; }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 2px #1c165055; }
.btn.small { min-height: 48px; padding: 0 24px; font-size: 17px; background-color: var(--sun); color: var(--ink); }

.top { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; gap: 24px; padding: 18px var(--m); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.top.hide { transform: translateY(-120%); } .top:focus-within { transform: none; }
.brand, .top nav { background: #fff var(--paper); border-radius: 12px; box-shadow: 0 2px 2px #1c165022, 0 8px 16px #1c165026; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 18px 4px 10px; font-weight: 800; font-size: 20px; letter-spacing: -.03em; text-decoration: none; margin-right: auto; min-height: 48px; }
.brand img { height: 38px; width: auto; }
.top nav { display: flex; padding: 0 8px; }
.top nav a { padding: 12px; text-decoration: none; font-weight: 600; font-size: 16px; }
.top nav a:hover { text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 2px; }

/* Холм: цвет и бумага, вырезанные маской из main.js. Тень на родителе или самом слое. */
.hill { position: absolute; left: 0; right: 0; bottom: 0; filter: var(--sh); will-change: transform; }
.hill::before { content: ""; position: absolute; inset: 0; background: var(--c) var(--paper); -webkit-mask: var(--shape) 0 0 / var(--w, 1600px) 100% repeat-x; mask: var(--shape) 0 0 / var(--w, 1600px) 100% repeat-x; }

.stage { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 600px; overflow: hidden; background: var(--sky) var(--paper); }
.book { height: 370vh; }
.set { position: absolute; inset: 0; pointer-events: none; will-change: transform; }
.sun { position: absolute; width: clamp(150px, 19vw, 340px); right: 9vw; top: 13vh; height: auto; }
.cl { position: absolute; height: auto; } .cl.a { width: 17vw; left: 35vw; top: 47vh; } .cl.b { width: 12vw; left: 49vw; top: 13vh; }
.title { position: absolute; z-index: 3; left: clamp(110px, 10.5vw, 220px); top: 20vh; display: grid; justify-items: start; gap: 24px; }
.title h1 { font-size: clamp(50px, min(7.2vw, 14vh), 140px); letter-spacing: -.06em; line-height: .9; max-width: 6.4em; }
.title p { font-size: clamp(18px, 1.5vw, 24px); font-weight: 550; }
.book .h1 { height: 40vh; --c: #8fd06b; } .book .h2 { height: 29vh; --c: #35a852; } .book .h3 { height: 14vh; --c: #087a3a; }
.tree { position: absolute; height: auto; filter: drop-shadow(0 6px 6px #1c165030); }
.t1 { width: 7vw; left: 39vw; bottom: 27vh; } .t2 { width: 9vw; right: 8vw; bottom: 25vh; } .t3 { width: 8vw; left: 27vw; bottom: 21vh; }
.cast { position: absolute; left: 67%; bottom: 9vh; display: flex; align-items: end; translate: -50% 0; filter: drop-shadow(0 6px 6px #1c165038); }
.cast img { width: auto; max-width: none; } .cast img:nth-child(1) { height: 46vh; margin-right: -17vh; } .cast img:nth-child(2) { height: 30vh; margin-right: 1vh; } .cast img:nth-child(3) { height: 33vh; margin-right: 1vh; } .cast img:nth-child(4) { height: 27vh; }
.sheets { position: absolute; z-index: 5; inset: 0; pointer-events: none; }
.sheets svg { position: absolute; inset: -3%; width: 106%; height: 106%; max-width: none; filter: drop-shadow(0 3px 4px #1c165055) drop-shadow(0 14px 26px #1c165045); will-change: transform; }
.bird { position: absolute; z-index: 4; height: auto; left: -24vw; filter: drop-shadow(0 10px 8px #1c165030); } .b1 { width: clamp(110px, 13vw, 230px); top: 34vh; } .b2 { width: clamp(70px, 8vw, 140px); top: 60vh; }
.after { position: absolute; z-index: 4; left: var(--m); width: min(44vw, 900px); top: 17vh; font-weight: 800; font-size: clamp(44px, min(6.8vw, 13vh), 130px); letter-spacing: -.055em; line-height: .92; visibility: hidden; }

/* Прогулка: день переходит в закат */
.walk .stage { background-color: var(--sky); }
.walk .sun.low { right: auto; left: 62vw; top: 31vh; }
.far, .mid, .near, .track { position: absolute; left: 0; bottom: 0; will-change: transform; }
.far .hill { height: 58vh; --c: #c5ea9c; --w: 2100px; } .mid .hill { height: 42vh; --c: #5dbb5b; --w: 1500px; } .near .hill { height: 15vh; --c: #087a3a; }
.far, .mid, .near { height: 100%; width: 100%; }
.track { display: flex; height: 100%; width: max-content; }
.scene { position: relative; width: clamp(720px, 74vw, 1400px); height: 100%; flex: none; }
.scene > div { position: absolute; left: 6%; top: 17vh; width: 88%; display: grid; gap: 14px; }
.scene h3 { font-size: clamp(44px, 6vw, 108px); }
.scene p { font-size: clamp(19px, 1.65vw, 27px); line-height: 1.35; font-weight: 520; max-width: 25em; }
.scene .pic { position: absolute; left: 34%; bottom: 25vh; height: 41vh; width: auto; max-width: none; filter: drop-shadow(0 7px 7px #1c165038); transform-origin: 50% 100%; }
.scene .pic.duo { display: flex; align-items: end; gap: 5vh; } .duo img { height: 34vh; width: auto; max-width: none; } .duo img + img { height: 41vh; }
.first { width: clamp(820px, 96vw, 1800px); } .first h2 { position: absolute; left: var(--m); top: 17vh; max-width: 9.5em; font-size: clamp(46px, min(6.6vw, 12vh), 120px); }
.scene .tall { left: 76%; height: 62vh; bottom: 22vh; }
.last { width: 100vw; }
.kite .pic { left: 33%; height: 60vh; bottom: 22vh; }
.cut::after { content: ""; position: absolute; left: 26%; bottom: 17vh; width: 64%; height: 14vh; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: #5dbb5b var(--paper); -webkit-mask: linear-gradient(#000 45%, #0000); mask: linear-gradient(#000 45%, #0000); }
.band { position: absolute; left: 7vw; bottom: 7vh; display: flex; align-items: end; gap: 2vh; filter: drop-shadow(0 6px 6px #1c165045); }
.band img { width: auto; max-width: none; height: 25vh; } .band img:nth-child(1) { height: 23vh; } .band img:nth-child(3) { height: 20vh; }

.give { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); min-height: 100svh; background: #ffe39a var(--paper); overflow: hidden; }
.give form { position: relative; z-index: 2; align-self: center; margin: clamp(60px, 7vw, 120px) 0 clamp(60px, 7vw, 120px) var(--m); padding: clamp(24px, 3.4vw, 60px); background: #fff var(--paper); border-radius: 18px; box-shadow: 0 3px 3px #1c165022, 0 30px 60px #1c16502e; display: grid; gap: 22px; }
.give h2 { font-size: clamp(38px, 4.4vw, 76px); margin-bottom: 8px; }
.kind { display: flex; flex-wrap: wrap; gap: 10px; }
.kind label { flex: 1 1 150px; }
.kind input { position: absolute; opacity: 0; }
.kind span, .presets button { display: grid; place-items: center; min-height: 58px; border-radius: 12px; background: #e4f4fd var(--paper); font-weight: 600; cursor: pointer; transition: transform .3s cubic-bezier(.2,.9,.3,1.4), box-shadow .3s, background-color .2s, color .2s; }
.kind :checked + span { background-color: var(--ink); color: #fff; box-shadow: 0 8px 14px #1c165040; transform: translateY(-3px); }
.kind :focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px; }
.presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.presets button:hover { transform: translateY(-3px); box-shadow: 0 8px 14px #1c165026; }
.presets [aria-pressed=true] { background-color: var(--sun); transform: translateY(-3px) rotate(-2deg); box-shadow: 0 8px 14px #1c165033; }
.slide input { width: 100%; height: 48px; margin: 0; appearance: none; background: none; cursor: grab; }
.slide input::-webkit-slider-runnable-track { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--leaf) var(--fill), #d9edf8 var(--fill)); box-shadow: inset 0 2px 4px #1c165030; }
.slide input::-moz-range-track { height: 14px; border-radius: 7px; background: linear-gradient(90deg, var(--leaf) var(--fill), #d9edf8 var(--fill)); }
.slide input::-webkit-slider-thumb { appearance: none; width: 46px; height: 46px; margin-top: -16px; background: url(img/n0.webp) center / contain no-repeat; border: 0; filter: drop-shadow(0 4px 4px #1c165040); transition: transform .4s; }
.slide input:hover::-webkit-slider-thumb { transform: rotate(30deg) scale(1.1); }
.slide input::-moz-range-thumb { width: 46px; height: 46px; background: url(img/n0.webp) center / contain no-repeat; border: 0; }
.sum { display: grid; gap: 8px; }
.sum input { min-height: 62px; border-radius: 12px; border: 2px solid #8f8bb4; padding: 0 20px; font-weight: 750; font-size: 24px; width: 100%; background: #fff; }
.sum input[aria-invalid] { border-color: #b3261e; }
.wide { width: 100%; min-height: 72px; font-size: 20px; }
.note { min-height: 1.5em; }
.meadow { position: relative; z-index: 1; min-height: 540px; }
.meadow .hill { left: -110vw; right: -10vw; } .m1 { height: 34%; --c: #8fd06b; } .m2 { height: 15%; --c: #35a852; z-index: 2; }
.flowers { position: absolute; inset: 0; }
.flowers svg { position: absolute; bottom: 9%; overflow: visible; max-width: none; transform-origin: 50% 100%; filter: drop-shadow(0 5px 5px #1c165040); }

.help { overflow-x: clip; padding: clamp(110px, 13vw, 210px) var(--m); display: grid; gap: clamp(150px, 15vw, 250px); }
.help ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 44px); perspective: 1600px; }
.help li { transform-style: preserve-3d; }
.help a { position: relative; display: flex; align-items: end; min-height: clamp(380px, 33vw, 560px); padding: clamp(22px, 2.4vw, 42px); border-radius: 18px; text-decoration: none; background: var(--c) var(--paper); box-shadow: 0 3px 3px #1c165022, 0 24px 44px #1c16502b; transform-style: preserve-3d; transition: box-shadow .4s, transform .6s cubic-bezier(.2,.8,.2,1); }
.help img { position: absolute; left: 50%; bottom: 46%; height: 92%; width: auto; max-width: 92%; object-fit: contain; object-position: 50% 100%; translate: -50% 0; transform-origin: 50% 100%; filter: drop-shadow(0 8px 8px #1c165040); }
.help .s img { height: 60%; bottom: 54%; }
.help b { display: block; font-size: clamp(28px, 2.8vw, 48px); font-weight: 800; letter-spacing: -.04em; line-height: 1; margin-bottom: 12px; }
.help a:hover { transform: rotateX(7deg); box-shadow: 0 3px 3px #1c165022, 0 44px 60px #1c165033; }
.y { --c: #ffd348; } .s { --c: #9fdaf8; } .c { --c: #ffb39c; }

footer { position: relative; background: #1c1650 var(--paper); color: #fff; overflow: hidden; --focus: #fff; }
.night { position: relative; height: clamp(320px, 40vw, 640px); }
.moon { position: absolute; left: 14vw; top: 22%; width: clamp(90px, 11vw, 190px); aspect-ratio: 1; border-radius: 50%; background: #ffe39a var(--paper); box-shadow: 0 0 0 clamp(14px, 1.8vw, 30px) #2c2570, 0 0 0 clamp(30px, 4vw, 66px) #241d60; }
.night img { position: absolute; right: 20vw; bottom: 22%; width: 13vw; height: auto; filter: brightness(.5) saturate(.8) drop-shadow(0 6px 8px #0008); }
.n1 { height: 62%; --c: #2f3f8f; } .n2 { height: 30%; --c: #0b5a3a; } footer .hill { --sh: drop-shadow(0 -8px 14px #0007); }
.foot { position: relative; background: #0b5a3a var(--paper); padding: clamp(30px, 4vw, 70px) var(--m) 48px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: var(--m); align-items: end; }
.foot h2 { font-size: clamp(50px, 8.4vw, 150px); }
.foot a { display: inline-block; padding-block: 5px; text-underline-offset: .2em; }

@media (max-width: 860px) {
  .top nav { display: none; }
  .title { top: 104px; left: 24px; right: 24px; gap: 16px; justify-items: center; text-align: center; } .cast { left: 50%; } .after { width: auto; right: var(--m); text-align: center; top: 13vh; } .title h1 { font-size: clamp(48px, 14.6vw, 76px); }
  .sun { width: 33vw; right: 6vw; top: 43vh; } .cl.a { width: 34vw; left: 6vw; top: 49vh; } .cl.b { display: none; }
  .t1 { width: 19vw; left: 12vw; bottom: 25vh; } .t2 { width: 19vw; right: 11vw; } .t3 { display: none; }
  .cast img:nth-child(1) { height: 60vw; margin-right: -24vw; } .cast img:nth-child(2) { height: 38vw; margin-right: 0; } .cast img:nth-child(3) { height: 42vw; margin: 0; } .cast img:nth-child(4) { height: 34vw; }
  .walk .sun.low { left: 56vw; top: 40vh; }
  .scene { width: 112vw; } .scene > div { left: 24px; width: 86vw; top: 13vh; } .scene h3 { font-size: 46px; }
  .scene .pic { left: 8vw; height: auto; width: 80vw; bottom: 27vh; max-height: 40vh; object-fit: contain; object-position: 50% 100%; }
  .scene .pic.duo { width: auto; gap: 4vw; } .duo img { height: 44vw; } .duo img + img { height: 53vw; }
  .first h2 { left: 24px; top: 13vh; width: 88vw; font-size: 46px; } .scene .tall { left: 46vw; width: auto; height: 44vh; }
  .kite .pic { left: 8vw; width: 92vw; height: auto; bottom: 25vh; }
  .far .hill { --w: 1300px; } .mid .hill, .near .hill { --w: 1000px; }
  .band { left: 5vw; bottom: 6vh; gap: 2vw; } .band img, .band img:nth-child(1) { height: 17vh; } .band img:nth-child(3) { height: 14vh; }
  .give { grid-template-columns: minmax(0, 1fr); } .give form { margin: 70px 14px 0; padding: 24px 18px; } .presets { grid-template-columns: 1fr 1fr; }
  .meadow { min-height: 460px; }
  .help { gap: 170px; } .help ul { grid-template-columns: minmax(0, 1fr); gap: 170px; }
  .cut::after { left: 4%; width: 92%; bottom: 20vh; height: 10vh; }
  .foot { grid-template-columns: minmax(0, 1fr); align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  .book { height: auto; } .book .stage { position: relative; }
  .walk .stage { position: relative; height: auto; overflow: visible; } .far, .mid, .near, .band, .walk .sun, .cut::after, .bird { display: none; }
  .track { position: static; width: auto; flex-wrap: wrap; justify-content: center; gap: 60px 0; padding-block: 80px; }
  .scene { width: min(100%, 720px); height: auto; padding: 24px; } .scene > div, .scene .pic, .first h2 { position: static; width: auto; } .scene .pic { height: auto; max-width: 100%; max-height: 380px; margin-top: 24px; }
}
