@font-face {
  font-family: "Caveat";
  src: url("assets/fonts/caveat-cyr.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Caveat";
  src: url("assets/fonts/caveat-lat.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2190-2193, U+20AC, U+2122, U+2212;
}

:root {
  --paper: #f1ecdf;
  --paper-2: #ebe4d6;
  --card: #f8f5ee;
  --ink: #26221e;
  --ink-2: #5b544b;
  --line: #d9d0bf;
  --blue: #3e5c97;
  --blue-dark: #2f4a7f;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --text: "Lora", Georgia, serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --shadow: 0 1px 2px rgba(60, 45, 25, .12), 0 8px 22px rgba(60, 45, 25, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  color: var(--ink);
  font: 400 17px/1.6 var(--text);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(241, 236, 223, .55), rgba(241, 236, 223, .55)),
    url("assets/deco/paper-tile.webp");
  background-size: auto, 1536px 1024px;
  overflow-x: hidden;
}
main { overflow-x: clip; }

.deco-abs { position: absolute; pointer-events: none; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(40px, 5.6vw, 76px); }
h1 span { display: block; white-space: nowrap; }
h2 { font-size: clamp(32px, 4vw, 46px); }
h3 { font-size: 28px; }
p { margin: 0 0 1em; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.hand { font-family: var(--hand); font-size: 24px; line-height: 1.15; color: var(--ink-2); }

.underline { display: block; width: 196px; height: 14px; margin: 10px 0 0 -4px; color: var(--blue); opacity: .88; }

/* шапка */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(243, 238, 228, .92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(217, 208, 191, .7);
}
.top__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 24px/1 var(--serif); white-space: nowrap; }
.brand__sprig { width: 40px; height: 22px; color: var(--ink-2); transform: rotate(-20deg); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; }
.nav a:hover { color: var(--blue); }
.nav__cta { padding: 7px 16px; border: 1px solid var(--ink); border-radius: 999px; }

/* кнопка-мазок */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 60px; padding: 18px 46px 19px;
  color: #fff; text-decoration: none; font: 500 18px/1.1 var(--text);
  text-shadow: 0 1px 2px rgba(10, 25, 60, .45);
  background: url("assets/deco/brushstroke.webp") center / 100% 100% no-repeat;
  transition: transform .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px) rotate(-.5deg); filter: brightness(.86) drop-shadow(0 4px 6px rgba(20, 40, 90, .25)); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px dashed var(--blue); outline-offset: 5px; border-radius: 6px; }
.btn--ghost { color: var(--ink); text-shadow: none; background: transparent; border: 1.5px solid var(--ink); }
.btn--ghost:hover { background: var(--card); filter: none; }
.nav a:focus-visible, .gallery__btn:focus-visible, .gallery__track:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* заглушки изображений */
.ph {
  display: grid; place-items: center; text-align: center;
  width: 100%; min-height: 120px; padding: 12px;
  font: 600 22px/1.25 var(--hand); color: #8a7f6c;
  background: repeating-linear-gradient(-45deg, #ece5d7 0 10px, #e6decd 10px 20px);
  border: 1.5px dashed #c4b89f;
}
.ph small { font: 400 14px/1.35 var(--text); color: #9a8f7b; }
.ph--big { aspect-ratio: 4 / 3; }

/* картины */
.art { display: block; width: 100%; height: auto; object-fit: cover; background: var(--paper-2); }
.art--big { aspect-ratio: 4 / 3; }

/* работа на листе: неровный край бумаги и контактная тень */
.sheet {
  position: relative; padding: 13px 13px 15px;
  background: url("assets/paper/sheet.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(0 1px 1px rgba(60, 45, 25, .2)) drop-shadow(0 9px 14px rgba(60, 45, 25, .13));
}

/* полароид / скотч */
.photo { position: relative; margin: 0; padding: 10px 10px 14px; background: var(--card); box-shadow: var(--shadow); }
.photo--tape::before, .cta::before {
  content: ""; position: absolute; left: 50%; top: -10px; width: 92px; height: 20px;
  background: url("assets/deco/tape.webp") center / 100% 100% no-repeat;
  opacity: .88; transform: translateX(-50%) rotate(var(--tape-rot, -3deg));
  pointer-events: none;
}
.hero__pin1 { --tape-rot: -7deg; }
.hero__pin2 { --tape-rot: 5deg; }
.wall .photo:nth-child(odd), .gallery__track > .photo:nth-child(3n+1) { --tape-rot: 4deg; }
.wall__col:nth-child(2) .photo:nth-child(odd), .gallery__track > .photo:nth-child(3n+2) { --tape-rot: -6deg; }
.tilt-l { transform: rotate(-2.5deg); }
.tilt-r { transform: rotate(2deg); }

.note {
  margin: 0; padding: 24px 30px 26px;
  font: 400 24px/1.1 var(--hand); color: var(--ink-2);
  background: url("assets/deco/note.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 3px rgba(60, 45, 25, .14));
}
.pencil { position: absolute; color: #7d7262; opacity: .5; pointer-events: none; }
.note--plain { padding: 0; background: none; box-shadow: none; }

/* hero */
.hero { position: relative; padding: 40px 0 0; }
.hero > .wrap { position: relative; z-index: 1; }
.hero__text { position: relative; }
.hero__text::before {
  content: ""; position: absolute; inset: -40px -60px -20px -70px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(246, 242, 233, .75), rgba(246, 242, 233, 0));
}

/* фоновые рисунки по полям, на всю ширину секции */
.deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.deco img { position: absolute; width: auto; max-width: none; }
.deco__botanical { left: -70px; top: 200px; height: 450px; opacity: .52; transform: rotate(-6deg); }
.deco__pitcher { left: calc(50% + 520px); top: 190px; height: 500px; opacity: .32; }
.deco__architecture { left: calc(50% + 590px); top: 12px; height: 160px; opacity: .45; }
.hero__grid { display: grid; grid-template-columns: 5.4fr 6.6fr; gap: 40px; align-items: start; }
.hero__role { font: 400 26px/1 var(--hand); color: var(--blue); margin-bottom: 14px; }
.hero__lead { margin: 20px 0 26px; font-size: 22px; line-height: 1.35; color: var(--ink-2); }
.hero__pins { position: relative; margin-top: 34px; max-width: 490px; display: grid; grid-template-columns: minmax(0, 250px) auto; gap: 22px; align-items: center; }
.hero__note1 { font-size: 24px; white-space: nowrap; justify-self: start; transform: rotate(1.6deg) translateY(-6px); }

.hero__art { position: relative; margin-top: 16px; margin-bottom: 62px; }
.hero__pin2 { position: absolute; right: -24px; top: -28px; width: 30%; z-index: 2; }
.hero__under {
  position: absolute; top: -26px; left: -30px; z-index: 0;
  width: calc(100% + 52px); height: calc(100% + 56px); max-width: none; object-fit: fill;
  transform: rotate(-1.8deg); pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(60, 45, 25, .12));
}
.sheet-wrap { position: relative; }
.sheet { z-index: 1; }
.hero__note3 { position: absolute; left: -34px; bottom: -70px; z-index: 3; max-width: 220px; font-size: 22px; transform: rotate(-3.2deg); }
.hero__arrow { left: 200px; bottom: -14px; width: 66px; height: 38px; z-index: 2; opacity: .65; transform: rotate(-8deg); }
.hero__brushes {
  position: absolute; right: -46px; bottom: -92px; z-index: 4;
  width: auto; height: 300px; pointer-events: none;
  filter: drop-shadow(0 6px 8px rgba(60, 45, 25, .16));
}
.hero__edge { position: relative; z-index: 2; height: 40px; margin-top: 18px; margin-bottom: -20px; pointer-events: none; }
.hero__edge-line { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__graphite { position: absolute; left: calc(50% - 700px); top: -6px; width: 160px; height: 40px; opacity: .55; transform: rotate(-4deg); }
.hero__blue-trace { position: absolute; left: calc(50% + 330px); top: 6px; width: 170px; height: auto; opacity: .38; transform: rotate(-3deg); }

/* секции: отступ только снизу, чтобы промежутки не удваивались */
.section { padding: 0 0 76px; }
.section--after-hero { padding-top: 46px; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; }
.head__aside { margin: 0; text-align: right; transform: rotate(-2deg); }

/* направления */
.cards { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards__pencils { left: -196px; top: 40%; z-index: 2; width: 220px; height: auto; }
.card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(60, 45, 25, .06);
}
.card__img { aspect-ratio: 4 / 3.3; border: 0; border-bottom: 1px solid var(--line); }
.card__fig { position: relative; margin: 0; }
.card__fig figcaption {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 10px;
  font: 400 19px/1.2 var(--hand); color: var(--ink-2); background: rgba(248, 245, 238, .9);
}
.card__body { position: relative; padding: 22px 24px 26px; }
.card--paint .card__body { padding-right: 88px; }
.card__swatches { right: 22px; bottom: 20px; width: 54px; height: auto; opacity: .85; }
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; color: var(--ink-2); font-size: 16px; }

/* обо мне */
.about { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 640px); gap: 64px; align-items: center; }
.about__figure { margin: 0; }
.about__note { margin: 14px 0 0; text-align: center; transform: rotate(-2deg); }
.about__text h2 + .underline { margin-bottom: 24px; }
.about__text p:last-child { margin-bottom: 0; }

/* мои работы: три колонки, ширина подобрана под пропорции картин */
.wall { display: grid; grid-template-columns: 1.2fr 1.22fr 1fr; gap: 28px; align-items: start; }
.wall__col { display: flex; flex-direction: column; gap: 26px; }
.wall .photo { margin: 0; }

/* как проходят занятия */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step {
  display: flex; flex-direction: column; padding: 22px 22px 24px;
  background: url("assets/paper/sheet.svg") center / 100% 100% no-repeat;
  filter: drop-shadow(0 1px 1px rgba(60, 45, 25, .12)) drop-shadow(0 4px 8px rgba(60, 45, 25, .08));
}
.step__img { width: 120px; height: 88px; object-fit: contain; object-position: left center; margin-bottom: 14px; }
.step__num { font: 600 30px/1 var(--serif); color: var(--blue); }
.step__title { margin: 6px 0 8px; font-size: 25px; }
.step__text { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink-2); }

/* стоимость: один широкий лист */
.price {
  position: relative; max-width: 1100px; margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 48px; align-items: center;
  padding: 40px 56px 42px;
}
.price > :not(.price__bg) { position: relative; z-index: 1; }
.price__bg {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; max-width: none;
  object-fit: fill; pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(60, 45, 25, .13));
}
.price__aside { margin: 18px 0 0; transform: rotate(-1.5deg); }
.price__offer { text-align: center; }
.price__label { margin: 0 0 4px; font: 400 26px/1.1 var(--hand); color: var(--blue); }
.price__value { margin: 0; font: 600 58px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.price__note { margin: 10px auto 0; max-width: 290px; font-size: 15px; line-height: 1.45; color: var(--ink-2); }

/* работы учеников */
#works { position: relative; }
#works > .wrap { position: relative; z-index: 1; }
#works .head { margin-bottom: 4px; }
.works__flowers { left: -50px; bottom: 24px; height: 300px; width: auto; opacity: .58; }

/* галерея */
.gallery { position: relative; }
.gallery__track {
  display: flex; align-items: center;
  gap: 26px; padding: 26px 8px 30px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track > .photo { flex: none; scroll-snap-align: start; }
.gallery__track .art { width: auto; height: 340px; }
.gallery__btn {
  position: absolute; top: 50%; z-index: 2; width: 48px; height: 48px; margin-top: -24px;
  border: 2px solid rgba(255, 255, 255, .7); border-radius: 50%;
  background: var(--ink); color: #fff; font-size: 20px; line-height: 1; cursor: pointer;
  box-shadow: 0 3px 10px rgba(40, 30, 20, .25);
  transition: background .2s;
}
.gallery__btn:hover { background: var(--blue); }
.gallery__btn--prev { left: -22px; }
.gallery__btn--next { right: -22px; }
.gallery__btn[disabled] { opacity: .3; cursor: default; background: var(--ink); }
.gallery__caption { margin: 4px 0 0; text-align: right; transform: rotate(-2deg); }

/* запись */
#contact { padding-bottom: 48px; }
.cta {
  position: relative; max-width: 1000px; margin-inline: auto; padding: 40px 44px;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 28px; align-items: center;
  background: var(--card); box-shadow: var(--shadow);
}
.cta::before { width: 120px; height: 24px; top: -12px; --tape-rot: 2deg; }
.cta__sprig { width: 84px; height: 42px; color: var(--ink-2); }
.cta__text h2 { font-size: clamp(30px, 3.2vw, 38px); }
.cta__text p { margin: 10px 0 0; color: var(--ink-2); }
.cta__links { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cta__tg { font: 400 24px/1 var(--hand); color: var(--blue); }

.foot { padding: 0 0 36px; font-size: 15px; color: var(--ink-2); }
.foot__row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ноутбуки */
@media (max-width: 1600px) {
  .deco__architecture { display: none; }
  .deco__botanical { left: -110px; top: 230px; height: 370px; }
  .deco__pitcher { left: calc(50% + 500px); top: 210px; height: 420px; }
  .cards__pencils { left: -140px; width: 190px; }
  .works__flowers { left: -80px; height: 250px; }
}
@media (max-width: 1100px) {
  .cards__pencils { display: none; }
  .hero__pin2 { right: -8px; width: 28%; }
  .hero__brushes { right: -18px; height: 250px; }
  .price { grid-template-columns: minmax(0, 1fr) auto; row-gap: 24px; }
  .price__btn { grid-column: 1 / -1; justify-self: center; }
}

/* планшет */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; gap: 56px; }
  .hero__pins { max-width: 520px; }
  .hero__art { margin-right: 20px; margin-bottom: 72px; }
  .hero__note3 { left: 8px; }
  .hero__arrow { left: 226px; }
  .deco, .cards__pencils, .hero__graphite { display: none; }
  .cards { grid-template-columns: 1fr 1fr; }
  .cards .card:last-child { grid-column: 1 / -1; }
  .cards .card:last-child .card__img { aspect-ratio: 16 / 7; }
  .about { grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 36px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .wall { gap: 20px; }
  .wall__col { gap: 20px; }
  .gallery__track .art { height: 300px; }
  .gallery__btn--prev { left: -8px; }
  .gallery__btn--next { right: -8px; }
  .cta { grid-template-columns: minmax(0, 1fr) auto; }
  .cta__sprig { display: none; }
}

/* телефон */
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav a:not(.nav__cta) { display: none; }
  .brand { font-size: 21px; }
  .brand__sprig { display: none; }
  .hero { padding: 28px 0 0; }
  .hero__lead { font-size: 19px; }
  .btn { width: 100%; justify-content: center; }
  .hero__pins { grid-template-columns: 1fr 1fr; margin-top: 36px; gap: 14px; }
  .hero__note1 { font-size: 21px; padding: 10px 14px; }
  .hero__art { margin-right: 0; margin-bottom: 0; }
  .hero__arrow, .hero__blue-trace, .card__swatches { display: none; }
  .card--paint .card__body { padding-right: 24px; }
  .hero__under { top: -14px; left: -12px; width: calc(100% + 24px); height: calc(100% + 30px); }
  .hero__brushes { right: -6px; bottom: -40px; height: 150px; }
  .hero__edge { margin-top: 36px; }
  .hero__pin2 { width: 34%; right: -4px; top: -32px; }
  .hero__note3 { position: relative; left: 0; bottom: 0; margin-top: 18px; font-size: 21px; max-width: 62%; }
  .section { padding-bottom: 48px; }
  .section--after-hero { padding-top: 36px; }
  .head { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
  .head__aside { text-align: left; }
  .cards { grid-template-columns: 1fr; gap: 18px; }
  .cards .card:last-child .card__img { aspect-ratio: 4 / 3.3; }
  .about { grid-template-columns: 1fr; gap: 28px; }
  .about__figure { max-width: 280px; margin-inline: auto; }
  .wall { display: block; columns: 2; column-gap: 14px; }
  .wall__col { display: contents; }
  .wall .photo { display: inline-block; width: 100%; break-inside: avoid; margin: 0 0 20px; padding: 6px 6px 9px; }
  .wall .photo--tape::before { width: 64px; height: 15px; top: -8px; }
  .steps { grid-template-columns: 1fr; gap: 16px; }
  .step { display: grid; grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 18px 18px 20px; }
  .step__img { grid-row: 1 / 3; width: 96px; height: 70px; margin: 0; }
  .step__title { margin: 2px 0 0; font-size: 23px; }
  .step__text { grid-column: 1 / -1; margin-top: 12px; }
  .price { grid-template-columns: 1fr; gap: 22px; padding: 34px 24px 32px; text-align: center; }
  .price__bg { display: none; }
  .price { background: url("assets/paper/sheet.svg") center / 100% 100% no-repeat; filter: drop-shadow(0 2px 5px rgba(60, 45, 25, .13)); }
  .price .underline { margin-inline: auto; }
  .price__aside br { display: none; }
  .price__value { font-size: 52px; }
  .price__btn { width: auto; padding-inline: 26px; white-space: nowrap; }
  .works__flowers { left: -46px; bottom: 10px; height: 170px; opacity: .45; }
  .gallery__track { gap: 18px; }
  .gallery__track .art { height: 240px; max-width: 76vw; }
  .gallery__btn { display: none; }
  #contact { padding-bottom: 40px; }
  .cta { grid-template-columns: 1fr; gap: 18px; padding: 36px 20px; text-align: center; }
  .cta__links .btn { width: 100%; }
}
