/* ParGo — подарунки 2027. Стиль: бренд у святковому настрої. */

:root {
  --bg: #141518;
  --bg-2: #1b1c20;
  --surface: #222328;
  --surface-2: #2a2b31;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --ink: #f3f1ee;
  --ink-2: #b9b6b0;
  --ink-3: #85827d;
  --orange: #f5921e;
  --orange-2: #ffb35c;
  --orange-ink: #1a1206;
  --glow: rgba(245, 146, 30, .22);
  --ok: #6fcf8e;
  --warn: #ffcf6a;
  --paper: #f6f0e6;
  --paper-ink: #2a2622;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, .6);
  --f-head: 'Unbounded', system-ui, sans-serif;
  --f-body: 'Manrope', system-ui, sans-serif;
  --f-hand: 'Caveat', cursive;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 600px at 85% -10%, rgba(245, 146, 30, .14), transparent 60%),
    radial-gradient(700px 500px at -10% 40%, rgba(245, 146, 30, .06), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 400 16px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* ---------- Завантаження ---------- */
.boot {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(500px 360px at 50% 50%, rgba(245, 146, 30, .14), transparent 70%), var(--bg);
  transition: opacity .5s ease, visibility .5s;
}
.boot.is-gone { opacity: 0; visibility: hidden; }
.boot__inner { display: grid; justify-items: center; gap: 18px; text-align: center; max-width: 360px; }
.boot__seal {
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #4a4c53, #232428 70%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .35); animation: bootPulse 1.4s ease-in-out infinite;
}
.boot__seal img { width: 40px; margin-left: 2px; }
.boot__text { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.boot__text strong { display: block; margin-bottom: 4px; color: var(--ink); font: 700 20px/1.3 var(--f-head); }
.boot.is-error .boot__seal { animation: none; }
@keyframes bootPulse { 50% { transform: scale(.92); opacity: .7; } }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

/* ---------- Логотип ---------- */
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__img { height: 28px; width: auto; }
.logo--sm .logo__img { height: 20px; }

/* ---------- Типографіка ---------- */
.eyebrow {
  margin: 0 0 10px;
  font: 600 12px/1 var(--f-body);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--orange);
}
.h2 { margin: 0 0 14px; font: 700 clamp(26px, 4.2vw, 40px)/1.15 var(--f-head); letter-spacing: -.02em; text-wrap: balance; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: transparent; cursor: pointer; text-decoration: none; color: var(--ink);
  font-weight: 700; font-size: 15px;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s, border-color .2s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:hover { border-color: var(--ink-2); }
.btn:focus-visible { outline: 3px solid var(--orange-2); outline-offset: 3px; }
.btn--primary { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); box-shadow: 0 10px 30px -8px var(--glow); }
.btn--primary:hover { background: var(--orange-2); border-color: var(--orange-2); transform: translateY(-1px); box-shadow: 0 14px 36px -8px rgba(245, 146, 30, .45); }
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 16px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.link { background: none; border: 0; padding: 0; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }
.link:hover { color: var(--ink); }

/* =========================================================
   1. КОНВЕРТ
   ========================================================= */
.intro {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(600px 420px at 50% 55%, rgba(245, 146, 30, .18), transparent 70%),
    var(--bg);
  transition: opacity .7s var(--ease), visibility .7s;
}
.intro.is-gone { opacity: 0; visibility: hidden; }
.intro__inner { display: grid; justify-items: center; gap: 28px; }
.intro__hint { margin: 0; color: var(--ink-3); font-size: 14px; animation: pulse 2.4s ease-in-out infinite; }
.intro.is-open .intro__hint { opacity: 0; animation: none; transition: opacity .3s; }

.envelope {
  --w: min(440px, 86vw);
  position: relative;
  width: var(--w); aspect-ratio: 1.55;
  perspective: 1200px;
}
.envelope__back, .envelope__front, .envelope__flap { position: absolute; inset: 0; border-radius: 14px; }
.envelope__back { background: linear-gradient(#a85a08, #c46c0c 40%); }
.envelope__front {
  z-index: 2;
  background:
    linear-gradient(to top right, transparent 49.6%, #e0820f 50%) left / 50.5% 100% no-repeat,
    linear-gradient(to top left,  transparent 49.6%, #e0820f 50%) right / 50.5% 100% no-repeat,
    #ec8b16;
  clip-path: polygon(0 0, 50% 46%, 100% 0, 100% 100%, 0 100%);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 6%;
}
.envelope__address { display: grid; justify-items: center; gap: 2px; color: var(--orange-ink); text-align: center; padding: 0 10%; }
.envelope__label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.envelope__to { font: 700 clamp(15px, 3.6vw, 19px)/1.25 var(--f-head); }
.envelope__flap {
  z-index: 3;
  background: linear-gradient(#f9a43d, #f39220);
  clip-path: polygon(0 0, 100% 0, 50% 50%);
  transform-origin: top center;
  transition: transform .8s cubic-bezier(.45, 0, .2, 1);
  will-change: transform;
  backface-visibility: visible;
}
.envelope__seal {
  position: absolute; z-index: 4; left: 50%; top: 48%;
  width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #4a4c53, #232428 70%);
  color: var(--orange);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .35), inset 0 0 0 3px rgba(255, 255, 255, .06);
  display: grid; place-items: center;
  transition: transform .3s var(--ease), opacity .3s;
  animation: wiggle 3.2s ease-in-out infinite 1s;
}
.envelope__seal img { width: 40px; height: auto; margin-left: 2px; }
.envelope__seal:hover { transform: scale(1.07); }
.envelope__seal:focus-visible { outline: 3px solid var(--orange-2); outline-offset: 4px; }

.intro.is-open .envelope__seal { opacity: 0; transform: scale(.6); pointer-events: none; animation: none; }
.intro.is-open .envelope__flap { transform: rotateX(180deg); }

/* Портретна листівка. Розгортається з трубочки — анімація в app.js. */
.postcard-wrap {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: center;
  padding: 16px; overflow-y: auto;
  pointer-events: none;
}
.postcard-wrap.is-ready { pointer-events: auto; }
.postcard {
  width: min(400px, 100%);
  background: var(--paper); color: var(--paper-ink);
  border-radius: 20px; padding: 12px;
  will-change: clip-path;
  transition: box-shadow .5s ease;
}
.postcard.has-shadow { box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255,255,255,.06); will-change: auto; }
.postcard__art { height: min(300px, 38vh); border-radius: 12px; overflow: hidden; background: #1d1e23; }
.postcard__art .tree { width: 100%; height: 100%; display: block; }
.postcard__body { padding: 16px 8px 6px; text-align: center; }
.postcard__title { margin: 0 0 6px; font: 600 clamp(32px, 8vw, 40px)/1 var(--f-hand); color: #b4630a; text-wrap: balance; }
.postcard__text { margin: 0 auto 16px; max-width: 30ch; font-size: 15px; line-height: 1.5; color: #4a443d; }

/* Трубочка: скручений папір. Циліндр — градієнт світла, торці — спіраль. */
.roll {
  --d: 36px;
  position: absolute; left: 0; top: 0; width: 100px; height: var(--d);
  border-radius: calc(var(--d) / 2);
  background:
    linear-gradient(to bottom,
      #b7a88f 0%, #e9dfcd 18%, #fffaf1 38%, #f3eadb 55%, #d8cab2 78%, #9e8f77 100%);
  box-shadow: 0 14px 22px -8px rgba(0, 0, 0, .55), inset 0 -1px 0 rgba(0,0,0,.08);
  opacity: 0; visibility: hidden;
  will-change: transform, opacity;
  pointer-events: none;
}
.roll.is-on { visibility: visible; }
.roll::before, .roll::after {
  content: ''; position: absolute; top: 0; width: var(--d); height: var(--d); border-radius: 50%;
  background:
    radial-gradient(circle, #6d6152 0 9%, transparent 10%),
    repeating-radial-gradient(circle, #efe5d4 0 2px, #c9bba3 2px 3px),
    #efe5d4;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.roll::before { left: 0; transform: scaleX(.42); transform-origin: left center; }
.roll::after { right: 0; transform: scaleX(.42); transform-origin: right center; }

.ticket {
  --notch: radial-gradient(circle at 0 50%, transparent 9px, #000 9.5px) left / 51% 100% no-repeat,
           radial-gradient(circle at 100% 50%, transparent 9px, #000 9.5px) right / 51% 100% no-repeat;
  position: relative; margin: 0 0 16px; padding: 12px 22px;
  background: #efe3cf; border-radius: 10px; text-align: left;
  -webkit-mask: var(--notch); mask: var(--notch);
}
.ticket::before { content: ''; position: absolute; inset: 5px 14px; border: 1.5px dashed rgba(180, 99, 10, .45); border-radius: 6px; pointer-events: none; }
.ticket__head { display: flex; justify-content: space-between; gap: 8px; font: 700 10.5px/1.3 var(--f-head); letter-spacing: .06em; text-transform: uppercase; color: #6b6259; }
.ticket__head b { color: var(--orange); font-weight: 700; }
.ticket__no { color: #b4630a; white-space: nowrap; }
.ticket__to { margin-top: 6px; font-size: 15px; }
.ticket__to strong { font-weight: 800; }
.ticket__meta { margin-top: 2px; font-size: 12.5px; color: #7a7066; }

.tree-light { animation: twinkle 2s ease-in-out infinite; }
.tree-star { animation: pulse 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .35; } }

@keyframes pulse { 50% { opacity: .45; } }
@keyframes wiggle { 0%, 88%, 100% { transform: rotate(0); } 92% { transform: rotate(-9deg); } 96% { transform: rotate(9deg); } }

/* =========================================================
   2. СТОРІНКА
   ========================================================= */
.page { position: relative; z-index: 2; padding-bottom: 80px; }

.topbar {
  width: min(1160px, 100% - 32px); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 0;
}
.topbar__logo { display: block; }
.topbar__logo img { display: block; height: clamp(56px, 8vw, 84px); width: auto; }
.topbar__tag { font-size: 13px; font-weight: 600; color: var(--ink-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; }

/* ---------- Привітання менеджера ---------- */
.hello { margin-top: clamp(16px, 4vw, 48px); }
.hello__card {
  display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(20px, 3vw, 36px);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hello__title { margin: 0 0 18px; font: 700 clamp(30px, 5vw, 52px)/1.08 var(--f-head); letter-spacing: -.03em; }
.hello__title span { color: var(--orange); }
.hello__text { margin: 0 0 24px; font-size: clamp(17px, 1.6vw, 19px); line-height: 1.65; color: var(--ink); max-width: 58ch; }
.hello__sign { margin: 0; display: grid; gap: 2px; }
.hello__sign-name { font: 600 34px/1 var(--f-hand); color: var(--orange-2); }
.hello__sign-role { font-size: 14px; color: var(--ink-3); }

/* Фото (заглушка) з рамкою-пазлом */
.photo {
  position: relative; aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, hsl(var(--h) 45% 42%), hsl(var(--h) 30% 18%) 75%);
  display: grid; place-items: center;
}
.photo__initials { font: 700 clamp(44px, 7vw, 72px)/1 var(--f-head); color: rgba(255,255,255,.88); letter-spacing: -.03em; }
.photo__hint { position: absolute; left: 12px; bottom: 12px; font-size: 11px; color: rgba(255,255,255,.6); background: rgba(0,0,0,.28); padding: 3px 8px; border-radius: 999px; }
.photo::after {
  content: ''; position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%;
  background: url('../assets/g.png') center / 54% no-repeat, radial-gradient(circle at 35% 30%, #4a4c53, #232428 70%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
}

/* ---------- Команда ---------- */
/* ---------- Статистика ---------- */
.stats { margin-top: clamp(64px, 9vw, 120px); }
.stats__head { text-align: center; margin-bottom: 32px; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat {
  position: relative; padding: 22px 20px 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.stat__icon {
  width: 48px; height: 48px; border-radius: 50%; margin-bottom: 18px;
  display: grid; place-items: center; color: var(--orange);
  background: radial-gradient(circle at 35% 30%, #3a3c42, #232428 70%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.stat__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stat__value { margin: 0; font: 700 clamp(28px, 3.4vw, 40px)/1.05 var(--f-head); letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat__pre { color: var(--ink-3); margin-right: 4px; font-weight: 500; }
.stat__unit { margin-left: 6px; font: 600 15px/1 var(--f-body); color: var(--ink-2); letter-spacing: 0; }
.stat__label { margin: 8px 0 0; color: var(--ink-2); font-size: 14px; }
.stat__note { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.stat--hot {
  background: linear-gradient(150deg, rgba(245, 146, 30, .18), rgba(245, 146, 30, .04) 60%), var(--surface);
  border-color: rgba(245, 146, 30, .45);
}
.stat--hot .stat__value { color: var(--orange-2); }
.stat--hot .stat__icon { background: var(--orange); color: var(--orange-ink); }

.dirs { margin-top: 16px; padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.dirs__title { margin: 0 0 16px; font: 700 16px/1.2 var(--f-head); }
.dirs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.dir { display: grid; grid-template-columns: 36px minmax(110px, 200px) 1fr 48px; align-items: center; gap: 14px; }
.dir__icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--orange); }
.dir__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dir__name { font-weight: 600; font-size: 15px; }
.dir__bar { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.dir__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--orange), var(--orange-2)); transition: width 1.3s cubic-bezier(.2, .8, .2, 1) .2s; }
.stats.is-counted .dir__bar i { width: var(--w); }
.dir__pct { text-align: right; font: 700 15px/1 var(--f-head); color: var(--ink); font-variant-numeric: tabular-nums; }

.team { margin-top: clamp(64px, 9vw, 110px); text-align: center; }
.team .h2 { margin-bottom: 28px; }
.team__grid {
  justify-content: center;
  list-style: none; margin: 0 0 44px; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px;
}
.team__member { display: grid; gap: 10px; text-align: left; }
.team__member .photo { border-radius: 16px; }
.team__member .photo::after { width: 28px; height: 28px; right: 8px; top: 8px; }
.team__member .photo__initials { font-size: 34px; }
.team__name { font-weight: 700; font-size: 15px; line-height: 1.25; }
.team__meta { font-size: 13px; color: var(--ink-3); }
.team__member.is-mine .photo { box-shadow: 0 0 0 2px var(--orange); }
.team__cta svg { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(3px); } }

/* ---------- Набори ---------- */
.gifts { margin-top: clamp(80px, 10vw, 140px); scroll-margin-top: 24px; }
.gifts__head { text-align: center; margin-bottom: 40px; }
.gifts__sub { margin: 0 auto; max-width: 56ch; color: var(--ink-2); }
.gifts__sub strong { color: var(--ink); }
.gifts__notice {
  margin: 20px auto 0; max-width: 560px; padding: 14px 18px; border-radius: 14px;
  background: rgba(255, 207, 106, .1); border: 1px solid rgba(255, 207, 106, .4); color: var(--warn); font-weight: 600;
}
.closed-card {
  grid-column: 1 / -1; max-width: 560px; margin: 0 auto; padding: 32px; text-align: center;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.closed-card h3 { margin: 0 0 8px; font: 700 22px/1.25 var(--f-head); }
.closed-card p { margin: 0; color: var(--ink-2); }
.cover--photo { background: #1c1d21; }
.cover--photo img { width: 100%; height: 100%; object-fit: cover; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gifts__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.set {
  position: relative; display: flex; flex-direction: column;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  text-align: left; padding: 0; cursor: pointer;
  transition: transform .35s var(--ease), border-color .25s, box-shadow .35s var(--ease);
}
.set:hover:not(.is-out) { transform: translateY(-6px); border-color: rgba(245, 146, 30, .55); box-shadow: 0 30px 60px -24px rgba(245, 146, 30, .35); }
.set:focus-visible { outline: 3px solid var(--orange-2); outline-offset: 3px; }
.set__media { position: relative; }
.set__body { padding: 18px 20px 20px; display: grid; gap: 4px; flex: 1; }
.set__name { margin: 0; font: 700 24px/1.15 var(--f-head); letter-spacing: -.02em; }
.set__tagline { margin: 0 0 10px; color: var(--ink-2); font-size: 14px; }
.set__items { margin: 0 0 16px; color: var(--ink-3); font-size: 13px; line-height: 1.5; }
.set__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.set__more { font-size: 14px; font-weight: 700; color: var(--orange); display: inline-flex; align-items: center; gap: 6px; }
.set__more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease); }
.set:hover .set__more svg { transform: translateX(3px); }

.stock { display: grid; gap: 6px; min-width: 0; flex: 1; max-width: 120px; }
.stock__label { font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.stock__bar { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.stock__bar i { display: block; height: 100%; background: var(--ok); border-radius: inherit; }
.stock.is-low .stock__label { color: var(--warn); }
.stock.is-low .stock__bar i { background: var(--warn); }

.badge {
  position: absolute; left: 12px; top: 12px; z-index: 2;
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: rgba(20, 21, 24, .75); backdrop-filter: blur(6px); color: var(--ink);
}
.badge--hot { background: var(--warn); color: #2a1f00; }
.badge--out { background: var(--ink); color: var(--bg); }

.set.is-out { cursor: default; }
.set.is-out .set__media, .set.is-out .set__body > :not(.set__foot) { opacity: .4; filter: grayscale(1); }
.set.is-out .set__more { color: var(--ink-3); }

/* Обкладинка набору (заглушка до справжнього фото) */
.cover {
  position: relative; aspect-ratio: 4 / 4.2; overflow: hidden;
  background:
    radial-gradient(80% 70% at 50% 35%, rgba(245, 146, 30, .28), transparent 70%),
    linear-gradient(160deg, #2c2d33, #1c1d21);
  display: grid; place-items: center;
}
.cover__box {
  position: relative; width: 74%; aspect-ratio: 1.25;
  display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 4%;
  padding: 0 6% 8%;
}
.cover__box::before {
  content: ''; position: absolute; inset: 42% 0 0 0;
  border-radius: 10px;
  background: linear-gradient(#f39220, #c9700e);
  box-shadow: 0 18px 30px -10px rgba(0,0,0,.6);
}
.cover__box::after {
  content: ''; position: absolute; left: 30%; right: 30%; bottom: 9%; height: 13%;
  background: url('../assets/logo-word-mono.png') center / contain no-repeat; opacity: .6;
}
.cover__item { position: relative; z-index: 1; color: var(--ink); transform: translateY(-30%); }
.cover__item svg { width: 100%; height: auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.cover__item:nth-child(2) { transform: translateY(-46%) scale(1.15); }
.cover__hint { position: absolute; right: 10px; bottom: 10px; font-size: 11px; color: var(--ink-3); background: rgba(0,0,0,.3); padding: 3px 8px; border-radius: 999px; }

/* ---------- Дякуємо ---------- */
.done { margin-top: clamp(80px, 10vw, 140px); }
.done__card {
  max-width: 680px; margin: 0 auto; text-align: center;
  padding: clamp(28px, 5vw, 52px);
  border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.done__icon { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: var(--orange-ink); box-shadow: 0 0 0 10px rgba(245, 146, 30, .15); }
.done__icon svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.done__note { margin: 22px 0 0; color: var(--ink-2); }

.summary { margin: 26px 0 0; display: grid; gap: 0; text-align: left; border-top: 1px solid var(--line); }
.summary > div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.summary dt { color: var(--ink-3); font-size: 14px; }
.summary dd { margin: 0; font-weight: 600; }

.footer { margin-top: 100px; padding-top: 28px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--ink-3); font-size: 14px; }
.footer { flex-direction: column; justify-content: center; text-align: center; gap: 14px; }
.footer__logo img { display: block; height: 52px; width: auto; }
.footer p { margin: 0; }

/* =========================================================
   МОДАЛКА
   ========================================================= */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(8, 8, 10, .72); backdrop-filter: blur(6px); animation: fade .25s ease; }
.modal__panel {
  position: relative; width: min(860px, 100%); max-height: min(92vh, 900px); overflow: auto;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 26px;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.8);
  animation: rise .35s var(--ease);
  overscroll-behavior: contain;
}
.modal__close {
  position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2);
  background: rgba(27, 28, 32, .85); cursor: pointer; display: grid; place-items: center;
}
.modal__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.modal__close:hover { border-color: var(--ink-2); }
.modal__body { padding: 0 clamp(20px, 4vw, 40px) clamp(24px, 4vw, 40px); }

.steps { list-style: none; margin: 0; padding: 24px clamp(20px, 4vw, 40px) 20px; display: flex; gap: 8px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.steps li::before { content: counter(step); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1px solid var(--line-2); }
.steps li:not(:last-child)::after { content: ''; width: clamp(12px, 3vw, 32px); height: 1px; background: var(--line-2); }
.steps li.is-active { color: var(--ink); }
.steps li.is-active::before { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); }
.steps li.is-done::before { content: '✓'; background: var(--surface-2); color: var(--orange); }

.detail { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(20px, 3vw, 36px); align-items: start; }
.detail .cover { border-radius: 18px; }
.detail__name { margin: 0 0 4px; font: 700 clamp(28px, 4vw, 38px)/1.1 var(--f-head); letter-spacing: -.02em; }
.detail__tagline { margin: 0 0 20px; color: var(--ink-2); }
.contents { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.contents li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.contents__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--orange); }
.contents__icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.contents strong { display: block; font-size: 15px; color: var(--ink); }
.contents__desc { font-size: 13px; color: var(--ink-3); }
.contents .tag-18 { margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--warn); border: 1px solid currentColor; border-radius: 6px; padding: 0 5px; vertical-align: 2px; }

/* ---------- Форма ---------- */
.field { margin: 0 0 20px; border: 0; padding: 0; min-width: 0; }
.field__label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; font-weight: 700; font-size: 15px; }
.field__label .req { color: var(--orange); }
.field__hint { margin: 8px 0 0; font-size: 13px; color: var(--ink-3); }
.field__hint.is-warn { color: var(--warn); }
.field__error { margin: 8px 0 0; font-size: 13px; color: #ff8a7a; display: none; }
.field.is-invalid .field__error { display: block; }
.field.is-invalid .input, .field.is-invalid .chips { box-shadow: 0 0 0 2px #ff8a7a; border-radius: 12px; }

.input {
  width: 100%; min-height: 50px; padding: 12px 16px;
  border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.input::placeholder { color: var(--ink-3); }
.input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245, 146, 30, .2); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b9b6b0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 18px; padding-right: 44px; }
textarea.input { min-height: 84px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span {
  display: grid; place-items: center; min-width: 56px; min-height: 46px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  font-weight: 700; font-size: 15px; line-height: 1.1; text-align: center;
  transition: background .15s, border-color .15s, color .15s;
}
.chip span small { display: block; font-size: 10px; font-weight: 600; color: var(--ink-3); }
.chip input:hover + span { border-color: var(--ink-2); }
.chip input:focus-visible + span { outline: 3px solid var(--orange-2); outline-offset: 2px; }
.chip input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--orange-ink); }
.chip input:checked + span small { color: var(--orange-ink); opacity: .7; }
.chip.is-empty span { border-style: dashed; color: var(--ink-3); }
.chip.is-empty input:checked + span { color: var(--orange-ink); }

.size-chart { margin-top: 12px; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.size-chart table { width: 100%; border-collapse: collapse; font-size: 14px; }
.size-chart th, .size-chart td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.size-chart th { background: var(--surface); color: var(--ink-3); font-weight: 600; font-size: 12px; }
.size-chart tr:last-child td { border-bottom: 0; }
.size-chart td:first-child { font-weight: 700; }

/* Доставка */
.deliver-hero {
  display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center;
  padding: 18px; margin-bottom: 24px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(245, 146, 30, .16), rgba(245, 146, 30, .04));
  border: 1px solid rgba(245, 146, 30, .35);
}
.deliver-hero__icon { width: 56px; height: 56px; border-radius: 16px; background: var(--orange); color: var(--orange-ink); display: grid; place-items: center; }
.deliver-hero__icon svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.deliver-hero h3 { margin: 0 0 2px; font: 700 18px/1.25 var(--f-head); }
.deliver-hero p { margin: 0; color: var(--ink-2); font-size: 14px; }
.np-logo { font: 800 15px/1 var(--f-body); color: #fff; background: #da291c; border-radius: 14px; }

.alert { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 207, 106, .1); border: 1px solid rgba(255, 207, 106, .35); color: var(--warn); font-size: 14px; margin-bottom: 20px; }
.alert--error { background: rgba(255, 138, 122, .1); border-color: rgba(255, 138, 122, .45); color: #ff9f92; margin: 18px 0 0; }
.alert svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-top: 1px; }

.combo { position: relative; }
.combo__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5;
  list-style: none; margin: 0; padding: 6px; max-height: 240px; overflow: auto;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow);
}
.combo__list li { padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: 15px; }
.combo__list li:hover, .combo__list li.is-active { background: rgba(245, 146, 30, .18); }

.actions { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.actions .btn--primary { flex: 1 1 220px; max-width: 360px; margin-left: auto; }
.switch-delivery { margin-top: 4px; text-align: center; }
.actions--stack { flex-direction: column; align-items: stretch; }
.actions--stack .btn--primary { max-width: none; margin-left: 0; flex: none; }
.actions--stack .link { align-self: center; }
[tabindex="-1"]:focus { outline: none; }

.confirm__lead { margin: 0 0 8px; color: var(--ink-2); }
.confirm__set { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: center; margin: 20px 0 0; }
.confirm__set .cover { border-radius: 14px; aspect-ratio: 1; }
.confirm__set .cover__box { width: 90%; }
.confirm__set .cover__hint, .confirm__set .cover__box::after { display: none; }
.confirm__set h3 { margin: 0; font: 700 26px/1.1 var(--f-head); }
.confirm__set p { margin: 4px 0 0; color: var(--ink-3); font-size: 14px; }
.confirm__final { margin: 18px 0 0; font-size: 14px; color: var(--ink-3); }

/* Прототип */
.demo {
  position: fixed; right: 12px; bottom: 12px; z-index: 70;
  display: flex; align-items: center; gap: 4px;
  padding: 6px 6px 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: #222; font-size: 12px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.demo a, .demo button { color: #222; text-decoration: none; border: 0; background: #ececec; border-radius: 999px; padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 600; }
.demo a:hover, .demo button:hover { background: #ddd; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }

/* Поява при скролі */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   АДАПТИВ
   ========================================================= */
.team__grid { grid-template-columns: repeat(auto-fit, minmax(140px, 180px)) !important; }

/* Печатка, поки вантажаться дані */
.envelope__seal.is-loading { cursor: progress; animation: sealWait 1.4s ease-in-out infinite; }
.envelope__seal.is-loading:hover { transform: none; }
@keyframes sealWait { 50% { transform: scale(.93); box-shadow: 0 4px 10px rgba(0,0,0,.3), 0 0 0 10px rgba(245,146,30,.12); } }
.envelope__to.is-pending { display: inline-block; min-width: 10em; height: 1.1em; border-radius: 6px; background: rgba(26, 18, 6, .14); color: transparent; }

/* Фінальний екран */
.done__lead { margin: -2px auto 0; max-width: 46ch; color: var(--ink-2); font-size: 17px; }

/* Доставка — компактно, щоб умістилося без прокрутки */
.modal .step-delivery .detail__name { font-size: clamp(24px, 3vw, 30px); margin-bottom: 14px; }
.modal .step-delivery .deliver-hero { padding: 12px 14px; margin-bottom: 16px; grid-template-columns: 44px 1fr; gap: 12px; border-radius: 14px; }
.modal .step-delivery .deliver-hero__icon { width: 44px; height: 44px; border-radius: 12px; }
.modal .step-delivery .deliver-hero__icon svg { width: 24px; height: 24px; }
.modal .step-delivery .deliver-hero h3 { font-size: 16px; }
.modal .step-delivery .deliver-hero p { font-size: 13px; }
.modal .step-delivery .field { margin-bottom: 14px; }
.modal .step-delivery .field__label { margin-bottom: 6px; font-size: 14px; }
.modal .step-delivery .field__hint { margin-top: 5px; font-size: 12px; }
.modal .step-delivery .input { min-height: 44px; padding: 10px 14px; }
.modal .step-delivery textarea.input { min-height: 44px; height: 44px; resize: none; }
.modal .step-delivery .chip span { min-height: 40px; font-size: 14px; padding: 0 12px; }
.modal .step-delivery .alert { margin-bottom: 14px; padding: 10px 12px; font-size: 13px; }
.modal .step-delivery .actions { margin-top: 18px; padding-top: 16px; }
.modal .steps { padding-top: 20px; padding-bottom: 14px; }

@media (max-width: 1080px) {
  .gifts__grid { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .hello__card { grid-template-columns: 1fr; text-align: left; }
  .hello__photo { max-width: 210px; }
  .detail { grid-template-columns: 1fr; }
  .detail .cover { aspect-ratio: 16 / 10; }
  .detail .cover__box { width: 52%; }
  .grid-2 { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: repeat(auto-fit, minmax(100px, 150px)) !important; gap: 12px; }
  .modal { padding: 0; place-items: end stretch; }
  .modal__panel { max-height: 94vh; border-radius: 24px 24px 0 0; border-bottom: 0; }
  .steps li { font-size: 12px; }
  .actions .btn--primary { max-width: none; }
  .demo { left: 12px; right: auto; bottom: 12px; }
}
@media (max-width: 520px) {
  .gifts__grid { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: repeat(auto-fit, minmax(120px, 160px)) !important; }
  .stats__grid { gap: 10px; }
  .stat { padding: 16px 14px; }
  .stat__icon { width: 40px; height: 40px; margin-bottom: 12px; }
  .stat__value { font-size: 24px; }
  .stat__unit { font-size: 12px; margin-left: 4px; }
  .stat__label { font-size: 13px; }
  .dirs { padding: 18px 16px; }
  .dir { grid-template-columns: 32px 1fr 44px; gap: 10px; row-gap: 6px; }
  .dir__bar { grid-column: 2 / 4; grid-row: 2; }
  .summary > div { grid-template-columns: 1fr; gap: 2px; }
  .topbar__tag { display: none; }
  .confirm__set { grid-template-columns: 88px 1fr; }
  .steps { padding-right: 72px; }
  .steps li:not(.is-active) { font-size: 0; gap: 0; }
  .steps li:not(.is-active)::after { margin-left: 8px; }
}

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