/* Goretska Art — теплий «гіпсовий» світлий сайт із бордовим акцентом з логотипа */
:root {
  --cream: #f4eee6;
  --paper: #fbf8f3;
  --sand: #eadfd0;
  --ink: #2a2220;
  --muted: #7b6f67;
  --wine: #5c1220;
  --wine-2: #7d1f31;
  --line: rgba(42, 34, 32, .14);
  --radius: 6px;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --nav-h: 76px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* рельєф, схожий на текстурну пасту: шум + бічне світло */
  --plaster: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900'%3E%3Cfilter id='p' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.011 .026' numOctaves='5' seed='11' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='7' diffuseConstant='1.15'%3E%3CfeDistantLight azimuth='215' elevation='58'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
::selection { background: var(--wine); color: var(--cream); }

.container { width: min(1200px, 100% - 48px); margin-inline: auto; }

/* ---------- Типографіка ---------- */
h1, h2 { font-family: var(--display); font-weight: 900; letter-spacing: -.015em; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 6.6vw, 5.9rem); line-height: 1.02; }
h2 { font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.08; max-width: 18ch; }
h1 em, h2 em, .wordmark i, .logo i { font-style: italic; font-weight: 800; color: var(--wine); }
h3 { font: 700 1.35rem/1.25 var(--display); }
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase;
  color: var(--wine); margin-bottom: 20px;
}
.eyebrow::before { content: ''; width: 34px; height: 1px; background: currentColor; }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.3rem); max-width: 50ch; }
.note { color: var(--muted); margin-top: 34px; max-width: 64ch; }

/* ---------- Кнопки ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 30px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 1rem; letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: color .35s var(--ease), border-color .35s var(--ease), transform .2s;
}
.btn:active { transform: scale(.97); }
/* заливка «напливає» знизу при наведенні */
.btn::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  transform: translateY(101%); transition: transform .45s var(--ease);
}
.btn:hover::before { transform: none; }
.btn-primary { background: var(--wine); color: var(--cream); }
.btn-primary::before { background: var(--ink); }
.btn-line { border-color: var(--ink); color: var(--ink); }
.btn-line::before { background: var(--ink); }
.btn-line:hover { color: var(--cream); }
.btn-cream { background: var(--cream); color: var(--wine); }
.btn-cream::before { background: #fff; }
.btn-sm { min-height: 44px; padding: 0 22px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Шапка ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 max(24px, (100% - 1200px) / 2);
  border-bottom: 1px solid transparent;
  transition: background-color .3s, border-color .3s, height .3s;
}
.nav.scrolled { background: rgba(244, 238, 230, .9); backdrop-filter: blur(14px); border-color: var(--line); }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 800 1.35rem/1 var(--display); }
.logo img { width: 52px; height: 52px; border-radius: 50%; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links > a:not(.btn) { position: relative; text-decoration: none; font-weight: 500; font-size: 1rem; }
.nav-links > a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px; background: var(--wine);
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform .4s var(--ease);
}
.nav-links > a:not(.btn):hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button { border: 0; background: none; cursor: pointer; padding: 5px 11px; border-radius: 999px; font-size: .8rem; font-weight: 600; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.burger { display: none; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: rgba(244, 238, 230, .7); cursor: pointer; padding: 0; }
.burger span { display: block; width: 20px; height: 1.5px; margin: 6px auto; background: var(--ink); transition: transform .3s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- Перший екран ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 30px) 0 70px;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: var(--plaster) center / 900px, var(--cream);
  background-blend-mode: multiply;
  opacity: .5;
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero .lead { margin-top: 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* рядки заголовка виїжджають знизу з-під маски */
.line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.14em; }
.line > span { display: block; }
.js .line > span { transform: translateY(112%); transition: transform 1.1s var(--ease); }
.js .line:nth-child(2) > span { transition-delay: .1s; }
.js .line:nth-child(3) > span { transition-delay: .2s; }
.js.ready .line > span { transform: none; }
.js .hero .eyebrow, .js .hero .lead, .js .hero-cta { opacity: 0; translate: 0 18px; transition: opacity .9s var(--ease), translate .9s var(--ease); }
.js .hero .lead { transition-delay: .45s; }
.js .hero-cta { transition-delay: .6s; }
.js.ready .hero .eyebrow, .js.ready .hero .lead, .js.ready .hero-cta { opacity: 1; translate: none; }

.hero-art { position: relative; aspect-ratio: 1 / 1.08; }
.art {
  position: absolute; overflow: hidden;
  border: 9px solid #fff; border-radius: 3px; background: #fff;
  box-shadow: 0 30px 60px -22px rgba(60, 30, 20, .45), 0 2px 6px rgba(60, 30, 20, .12);
  will-change: transform;
}
.art img { width: 100%; height: 100%; object-fit: cover; }
.art-1 { width: 64%; aspect-ratio: 5 / 6; right: 4%; top: 2%; rotate: 2.5deg; }
.art-2 { width: 40%; aspect-ratio: 5 / 6; left: 0; bottom: 6%; rotate: -5deg; }
.art-3 { width: 33%; aspect-ratio: 5 / 6; right: 0; bottom: -2%; rotate: 6deg; }
.js .art { opacity: 0; scale: .86; transition: opacity 1s var(--ease), scale 1.3s var(--ease); }
.js .art-1 { transition-delay: .25s; }
.js .art-2 { transition-delay: .45s; }
.js .art-3 { transition-delay: .6s; }
.js.ready .art { opacity: 1; scale: 1; }

.scroll-hint { position: absolute; left: 50%; bottom: 22px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid var(--ink); border-radius: 14px; opacity: .55; }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--ink); animation: hint 1.8s var(--ease) infinite; }
@keyframes hint { 0% { transform: none; opacity: 1; } 70%, 100% { transform: translateY(14px); opacity: 0; } }

/* ---------- Рухомий рядок ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: var(--paper); padding: 20px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.marquee-group { display: flex; align-items: center; flex: none; }
.marquee-group span { font: italic 800 clamp(1.5rem, 3.4vw, 2.6rem)/1.2 var(--display); white-space: nowrap; padding: 0 clamp(18px, 2.4vw, 34px); }
.marquee-group span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1px var(--wine); }
.marquee-group i { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--wine); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Секції ---------- */
.section { padding: clamp(80px, 11vw, 150px) 0; }
.section-sand { background: var(--sand); }
.section h2 { margin-bottom: clamp(36px, 5vw, 64px); }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { margin-bottom: 0; }

/* ---------- Роботи ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 20px; border: 1px solid var(--line); border-radius: 999px; background: none; cursor: pointer;
  font-weight: 500; font-size: .98rem; transition: background-color .3s, color .3s, border-color .3s;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--cream); }

.works { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(28px, 3.4vw, 46px) 22px; }
.more { display: flex; justify-content: center; margin-top: clamp(34px, 4vw, 54px); }
.work-btn { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; }
.work-img { position: relative; display: block; overflow: hidden; aspect-ratio: 5 / 6; border-radius: var(--radius); background: var(--sand); }
.work-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.work-btn:hover .work-img img { transform: scale(1.07); }
/* відблиск, що пробігає по картині, — як світло по рельєфу */
.work-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .5) 50%, transparent 62%);
  transform: translateX(-110%); transition: transform .9s var(--ease);
}
.work-btn:hover .work-img::after { transform: translateX(110%); }
.work-shots { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 4px 10px; border-radius: 999px; background: rgba(42, 34, 32, .72); color: var(--cream); font-size: .78rem; font-weight: 600; letter-spacing: .04em; }
.work-name { display: block; margin-top: 16px; font: 700 1.2rem/1.25 var(--display); }
.work-meta { display: block; margin-top: 4px; color: var(--muted); font-size: .98rem; }
.work-btn:hover .work-name { color: var(--wine); }

/* ---------- Розміри та ціни ---------- */
.sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.size-btn {
  display: grid; justify-items: center; gap: 6px; width: 100%; height: 100%;
  padding: 30px 20px 26px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); text-align: center; cursor: pointer;
  transition: border-color .35s, translate .45s var(--ease), box-shadow .45s var(--ease);
}
.size-btn:hover { border-color: var(--wine); translate: 0 -6px; box-shadow: 0 26px 44px -26px rgba(60, 30, 20, .45); }
.size-stage { display: flex; align-items: flex-end; justify-content: center; height: 190px; width: 100%; margin-bottom: 18px; }
.size-canvas {
  height: calc(var(--h) * 100%); aspect-ratio: var(--ratio);
  background: var(--plaster) center / 420px, #fff;
  box-shadow: 0 16px 26px -14px rgba(60, 30, 20, .5), 0 0 0 1px rgba(42, 34, 32, .07);
  transform-origin: 50% 100%; transition: transform 1.1s var(--ease);
}
.js .size:not(.in) .size-canvas { transform: scale(.55); }
.size-dim { font: 800 1.7rem/1.1 var(--display); }
.size-sizes { font-weight: 600; font-size: .95rem; letter-spacing: .04em; color: var(--wine); }
.size-fit { color: var(--muted); font-size: 1rem; line-height: 1.4; max-width: 26ch; }
.size-price { font: 800 1.45rem/1.2 var(--display); color: var(--wine); font-variant-numeric: tabular-nums lining-nums; margin-top: 6px; }
.size-pick { margin-top: 12px; padding: 8px 20px; border: 1px solid var(--ink); border-radius: 999px; font-size: .92rem; font-weight: 600; transition: background-color .3s, color .3s; }
.size-btn:hover .size-pick { background: var(--ink); color: var(--cream); }

/* повний прайс: назва ······ розмір  ціна */
.list-title { margin: clamp(48px, 6vw, 80px) 0 18px; font: 800 clamp(1.5rem, 2.6vw, 2rem)/1.2 var(--display); }
.pricelist { columns: 2; column-gap: clamp(28px, 5vw, 72px); }
.pricelist li { break-inside: avoid; }
.price-row {
  display: flex; align-items: baseline; gap: 12px; width: 100%;
  padding: 15px 0; border: 0; border-bottom: 1px solid var(--line); background: none;
  text-align: left; cursor: pointer; transition: color .3s, padding .4s var(--ease);
}
.price-row:hover { color: var(--wine); padding-left: 10px; }
.price-name { flex: 1; display: flex; align-items: baseline; gap: 12px; font: 700 1.15rem/1.3 var(--display); }
.price-name::after { content: ''; flex: 1; min-width: 16px; border-bottom: 1px dotted rgba(42, 34, 32, .4); translate: 0 -4px; }
.price-size { color: var(--muted); font-size: .98rem; white-space: nowrap; }
.price-row b { min-width: 5.2em; text-align: right; font: 800 1.15rem/1.3 var(--display); color: var(--wine); white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
.js .pricelist li { opacity: 0; translate: 0 14px; transition: opacity .7s var(--ease), translate .7s var(--ease); transition-delay: calc(var(--i) * 35ms); }
.js .pricelist.in li { opacity: 1; translate: none; }

/* ---------- Під замовлення ---------- */
.steps { --p: 0; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; counter-reset: step; padding-top: 44px; }
.steps::before, .steps::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line); }
.steps::after { background: var(--wine); transform: scaleX(var(--p)); transform-origin: 0 50%; }
.steps li { counter-increment: step; position: relative; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; margin-bottom: 14px;
  font: italic 800 3rem/1 var(--display); color: var(--wine);
}
.steps li::after { content: ''; position: absolute; left: 0; top: -51px; width: 13px; height: 13px; border-radius: 50%; background: var(--cream); border: 2px solid var(--wine); }
.steps p { color: var(--muted); margin-top: 10px; }

.duo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(18px, 3vw, 44px); align-items: center; margin-top: clamp(64px, 9vw, 120px); }
.duo-img { overflow: hidden; border-radius: var(--radius); }
.duo-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.duo-img-low { margin-top: 28%; }
.duo-img-low img { aspect-ratio: 1; }
blockquote p { font: italic 800 clamp(1.7rem, 3.4vw, 2.9rem)/1.2 var(--display); color: var(--wine); text-wrap: balance; }
blockquote cite { display: block; margin-top: 18px; font-style: normal; color: var(--muted); }

/* ---------- Про мене ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(36px, 7vw, 110px); align-items: center; }
.about-photos { position: relative; padding: 0 16% 12% 0; }
.about-main { overflow: hidden; border-radius: var(--radius); }
.about-main img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; }
.about-side { position: absolute; right: 0; bottom: 0; width: 46%; overflow: hidden; border: 8px solid var(--sand); border-radius: var(--radius); }
.about-side img { width: 100%; aspect-ratio: 5 / 6; object-fit: cover; }
.about-text h2 { margin-bottom: 26px; }
.about-text > p + p { margin-top: 18px; color: #4a403b; max-width: 54ch; }
.ticks { margin: 30px 0 36px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 34px; }
.ticks li::before { content: ''; position: absolute; left: 0; top: .78em; width: 20px; height: 1.5px; background: var(--wine); }

/* фото відкриваються «шторкою» */
.js .about-main, .js .about-side, .js .duo-img { opacity: 1; transform: none; }
.js .about-main img, .js .about-side img, .js .duo-img img { clip-path: inset(0 0 100% 0); scale: 1.12; transition: clip-path 1.3s var(--ease), scale 1.6s var(--ease); }
.js .about-main.in img, .js .about-side.in img, .js .duo-img.in img { clip-path: inset(0); scale: 1; }
.js .about-side:not(.in) { border-color: transparent; }
.js .about-side { transition: border-color .6s; }
.js .about-side img, .js .duo-img-low img { transition-delay: .2s; }

/* ---------- Умови ---------- */
.terms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.term {
  position: relative; overflow: hidden; padding: 34px 26px 30px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
}
/* бордова лінія «промальовується» згори картки, коли та з’являється */
.term::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--wine);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.1s var(--ease) .35s;
}
.term.in::before { transform: none; }
.term h3 { font: 800 1.5rem/1.2 var(--display); margin-bottom: 18px; }
.term ul { display: grid; gap: 12px; }
.term ul li { position: relative; padding-left: 22px; color: #4a403b; line-height: 1.5; }
.term ul li::before { content: ''; position: absolute; left: 0; top: .72em; width: 12px; height: 1.5px; background: var(--wine); }
.term b { color: var(--wine); font-weight: 600; }
.terms-note {
  margin-top: 26px; padding: clamp(22px, 3vw, 34px) clamp(22px, 4vw, 44px);
  border-left: 3px solid var(--wine); border-radius: 0 var(--radius) var(--radius) 0; background: rgba(92, 18, 32, .06);
  font: italic 700 clamp(1.15rem, 2vw, 1.5rem)/1.4 var(--display); color: var(--wine); text-wrap: balance;
}

/* ---------- Замовлення ---------- */
.section-wine { position: relative; isolation: isolate; background: var(--wine); color: var(--cream); }
.section-wine::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--plaster) center / 900px; mix-blend-mode: multiply; opacity: .35; }
.section-wine .eyebrow { color: #e7c9b8; }
.section-wine h2 em { color: #f1cdb9; }
.order-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 90px); align-items: center; }
.order-text h2 { margin-bottom: 24px; }
.order-text .btn { margin-top: 34px; }
.card { background: var(--paper); color: var(--ink); border-radius: 10px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6); }
.order-card { padding: clamp(24px, 3.4vw, 42px); }
.field { display: grid; gap: 8px; margin-bottom: 18px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-size: .9rem; font-weight: 600; letter-spacing: .02em; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 54px; padding: 12px 16px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff;
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field input::placeholder { color: #a79c94; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(42, 34, 32, .4); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(92, 18, 32, .14); }
.preview { margin: 4px 0 20px; padding: 16px 18px; border: 1px dashed rgba(92, 18, 32, .4); border-radius: 8px; background: rgba(92, 18, 32, .04); }
.preview span { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--wine); }
.preview p { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.5; }
.form-hint { margin-top: 12px; color: var(--muted); font-size: .92rem; text-align: center; }
.form-copied { margin-top: 12px; padding: 12px 14px; border-radius: 8px; background: rgba(92, 18, 32, .08); color: var(--wine); font-weight: 600; text-align: center; }

/* ---------- Підвал ---------- */
.footer { padding: clamp(50px, 7vw, 90px) 0 34px; overflow: hidden; }
.wordmark { font: 900 clamp(3.2rem, 13.5vw, 11.5rem)/.95 var(--display); letter-spacing: -.03em; white-space: nowrap; text-align: center; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 30px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 1rem; }
.footer-inner a { color: var(--ink); text-underline-offset: 4px; }
.footer-inner a:hover { color: var(--wine); }

/* ---------- Картка роботи ---------- */
.modal {
  width: min(1060px, 100% - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 10px; overflow: auto;
  background: var(--paper); color: var(--ink); box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .6);
}
.modal[open] { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); animation: modal-in .5s var(--ease); }
.modal::backdrop { background: rgba(42, 34, 32, .6); backdrop-filter: blur(6px); animation: fade-in .4s; }
/* фото роботи: кадр, стрілки, лічильник, мініатюри */
.viewer { display: flex; flex-direction: column; min-width: 0; background: var(--sand); }
.viewer-stage { position: relative; aspect-ratio: 3 / 4; max-height: calc(100dvh - 120px); overflow: hidden; touch-action: pan-y; user-select: none; }
.viewer-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; }
.viewer-stage img.swap { animation: shot-in .45s var(--ease); }
@keyframes shot-in { from { opacity: 0; scale: 1.04; } }
.viewer-nav {
  position: absolute; top: 50%; width: 46px; height: 46px; margin-top: -23px;
  border: 0; border-radius: 50%; background: rgba(251, 248, 243, .92); cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(42, 34, 32, .5); transition: background-color .25s, scale .25s var(--ease);
}
.viewer-nav:hover { background: #fff; scale: 1.08; }
.viewer-nav::before { content: ''; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border: solid var(--ink); border-width: 2px 2px 0 0; }
.viewer-prev { left: 12px; }
.viewer-prev::before { transform: translate(-30%, -50%) rotate(-135deg); }
.viewer-next { right: 12px; }
.viewer-next::before { transform: translate(-70%, -50%) rotate(45deg); }
.viewer-count { position: absolute; left: 12px; bottom: 12px; padding: 5px 12px; border-radius: 999px; background: rgba(42, 34, 32, .7); color: var(--cream); font-size: .85rem; font-weight: 600; letter-spacing: .04em; }
.viewer-thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: var(--paper); border-top: 1px solid var(--line); scrollbar-width: thin; }
.viewer-thumbs button { flex: none; width: 60px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--sand); cursor: pointer; opacity: .6; transition: opacity .25s, border-color .25s; }
.viewer-thumbs button:hover { opacity: 1; }
.viewer-thumbs button[aria-current="true"] { border-color: var(--wine); opacity: 1; }
.viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.viewer.single .viewer-nav, .viewer.single .viewer-count, .viewer.single .viewer-thumbs { display: none; }
.modal-body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; padding: clamp(26px, 4vw, 48px); }
.modal-body .eyebrow { margin-bottom: 0; }
.modal-body h3 { font: 900 clamp(1.8rem, 3.4vw, 2.5rem)/1.1 var(--display); }
.modal-meta { font: 800 1.3rem/1.2 var(--display); color: var(--wine); }
.modal-body .btn { margin-top: 10px; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(251, 248, 243, .92); cursor: pointer; }
.modal-close::before, .modal-close::after { content: ''; position: absolute; left: 14px; top: 22px; width: 18px; height: 1.5px; background: var(--ink); }
.modal-close::before { transform: rotate(45deg); }
.modal-close::after { transform: rotate(-45deg); }
@keyframes modal-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- Поява блоків ---------- */
.js .reveal { opacity: 0; transform: translateY(34px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .work.reveal { transition-delay: calc(var(--i, 0) * .08s); }
.js .sizes .reveal:nth-child(2), .js .steps .reveal:nth-child(2), .js .terms .reveal:nth-child(2) { transition-delay: .1s; }
.js .sizes .reveal:nth-child(3), .js .steps .reveal:nth-child(3), .js .terms .reveal:nth-child(3) { transition-delay: .2s; }
.js .sizes .reveal:nth-child(4), .js .steps .reveal:nth-child(4), .js .terms .reveal:nth-child(4) { transition-delay: .3s; }

/* ---------- Планшет і телефон ---------- */
@media (max-width: 1100px) {
  .works { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { gap: 18px; }
  .nav-links > a:not(.btn) { font-size: .95rem; }
}

@media (max-width: 960px) {
  .burger { display: block; }
  .nav-links {
    position: absolute; top: calc(100% + 8px); left: 14px; right: 14px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 16px;
    background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 30px 60px -30px rgba(60, 30, 20, .5);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; }
  .nav-links > a:not(.btn) { padding: 13px 10px; font: 700 1.4rem/1.2 var(--display); }
  .nav-links > a:not(.btn)::after { display: none; }
  .lang { align-self: flex-start; margin: 10px 10px 14px; }
  .nav-links .btn { min-height: 54px; }

  .hero { align-items: flex-start; padding-bottom: 90px; }
  .hero-grid, .about-grid, .order-grid { grid-template-columns: 1fr; }
  .hero-art { width: min(520px, 100%); margin: 26px auto 0; }
  .steps { grid-template-columns: 1fr; gap: 34px; padding: 0 0 0 44px; }
  .steps::before, .steps::after { left: 6px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .steps::after { transform: scaleY(var(--p)); transform-origin: 50% 0; }
  .steps li::after { left: -44px; top: 16px; }
  .duo { grid-template-columns: 1fr 1fr; }
  .duo blockquote { grid-column: 1 / -1; }
  .about-photos { max-width: 520px; }
}

@media (max-width: 640px) {
  :root { --nav-h: 68px; }
  body { font-size: 1.0625rem; }
  .container { width: min(1200px, 100% - 36px); }
  .nav { padding: 0 18px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .scroll-hint { display: none; }
  .works { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
  .work-name { font-size: 1.08rem; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-inline: -18px; padding-inline: 18px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .sizes { grid-template-columns: 1fr; gap: 12px; }
  .terms { grid-template-columns: 1fr; gap: 12px; }
  .term { padding: 28px 22px 24px; }
  .size-stage { height: 150px; }
  .pricelist { columns: 1; }
  .price-name { font-size: 1.05rem; }
  .price-row b { font-size: 1.05rem; min-width: 4.6em; }
  .price-size { font-size: .9rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .modal[open] { grid-template-columns: 1fr; }
  .viewer-stage { max-height: 72dvh; }
  .viewer-nav { width: 42px; height: 42px; margin-top: -21px; }
  .viewer-thumbs button { width: 52px; height: 52px; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
  .js .reveal, .js .art, .js .line > span, .js .hero .eyebrow, .js .hero .lead, .js .hero-cta { opacity: 1; transform: none; translate: none; scale: 1; }
  .js .about-main img, .js .about-side img, .js .duo-img img { clip-path: none; scale: 1; }
  .js .size:not(.in) .size-canvas { transform: none; }
  .js .pricelist li { opacity: 1; translate: none; }
}
