:root {
  --cold: #ECECEF;
  --warm: #F4ECE6;
  --bg: var(--cold);
  --card: #F8F8FA;
  --line: #D6D6DC;
  --ink: #18181B;
  --mute: #6E6E77;
  --berry: #9E142B;
  --berry-d: #7D0F22;
  --powder: #E8C4CC;
  --brass: #B08D57;
  --flame: #F6B24A;
  --disp: 'Sofia Sans Extra Condensed', 'Arial Narrow', sans-serif;
  --text: 'Ysabeau Office', 'Segoe UI', sans-serif;
  --pad: clamp(18px, 5vw, 64px);
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--text); font-size: 17px; line-height: 1.55; color: var(--ink);
  background: var(--bg); transition: background-color .25s linear;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
/* лёгкое зерно, как матовая студийная стена */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.4 0 0 0 0 0.4 0 0 0 0 0.42 0 0 0 .08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: 1; }
img { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; }
em { font-style: normal; color: var(--berry); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- type ---------- */
.eyebrow { font-family: var(--text); font-weight: 600; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--mute); display: flex; align-items: center; gap: 12px; }
.eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--brass); }
.h-display, .h-sec { font-family: var(--disp); font-weight: 300; text-transform: uppercase; letter-spacing: .01em; line-height: .92; }
.h-display { font-size: clamp(52px, 13vw, 132px); margin: 18px 0 22px; }
.h-sec { font-size: clamp(44px, 9vw, 96px); margin-top: 14px; }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: #3a3a40; max-width: 34em; }
.sec-note { color: var(--mute); max-width: 32em; margin-top: 14px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: .06em; text-transform: uppercase;
  border-radius: 0; transition: background .3s var(--ease), color .3s, transform .3s var(--ease);
}
.btn:hover { background: var(--berry); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-line { background: transparent; color: var(--berry); box-shadow: inset 0 0 0 1px var(--berry); }
.btn-line:hover { background: var(--berry); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 13px; }
body.warm .btn:not(.btn-ghost):not(.btn-line) { background: var(--berry); }
body.warm .btn:not(.btn-ghost):not(.btn-line):hover { background: var(--berry-d); }

/* ---------- header ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 12px var(--pad); transition: background .4s, box-shadow .4s, transform .4s var(--ease);
}
.top.solid { background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.brand-mark { width: 14px; height: 40px; color: var(--brass); }
.brand-word { font-family: var(--disp); font-size: 26px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; }
.nav { display: none; gap: 34px; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }
.nav a { text-decoration: none; position: relative; }
.nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--brass); transition: right .4s var(--ease); }
.nav a:hover::after { right: 0; }
@media (min-width: 900px) { .nav { display: flex; margin: 0 auto 0 56px; } }

/* ---------- wick (scroll candle) ---------- */
.wick { position: fixed; left: 14px; top: 90px; bottom: 40px; width: 22px; z-index: 5; pointer-events: none; display: none; }
.wick svg { width: 100%; height: 100%; overflow: visible; }
.wick path { fill: none; stroke: var(--brass); stroke-width: 1.4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.wick-flame { position: absolute; left: 50%; width: 10px; height: 16px; margin-left: -5px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6d8 0 20%, var(--flame) 45%, rgba(246,178,74,0) 72%);
  filter: blur(.3px); opacity: 0; transform: scale(.4); transition: opacity .6s, transform .6s var(--ease); }
.wick.lit .wick-flame { opacity: 1; transform: scale(1); animation: flicker 2.4s infinite ease-in-out; box-shadow: 0 0 30px 12px rgba(246,178,74,.25); }
@media (min-width: 1100px) { .wick { display: block; } }
@keyframes flicker { 0%,100% { transform: scale(1) rotate(-2deg); } 40% { transform: scale(1.08, .94) rotate(2deg); } 70% { transform: scale(.95, 1.06) rotate(-1deg); } }

/* ---------- hero ---------- */
.hero { display: grid; min-height: 100svh; }
.hero-media { position: relative; margin: 0; overflow: hidden; background: #dcdcdf; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 4; transform: scale(1.06); animation: heroIn 2.2s var(--ease) forwards; }
@keyframes heroIn { to { transform: scale(1); } }
.tag { font-size: 12px; letter-spacing: .08em; color: var(--mute); background: var(--card); padding: 9px 14px; box-shadow: 0 0 0 1px var(--line); display: inline-flex; gap: 12px; }
.tag span { color: var(--brass); font-weight: 600; }
.tag-hero { position: absolute; left: 16px; bottom: 16px; }
.hero-text { padding: 34px var(--pad) 48px; align-self: center; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-cta .btn { flex: 1 1 200px; }
.facts { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 38px; border-top: 1px solid var(--line); }
.facts li { padding: 16px 10px 0 0; display: flex; flex-direction: column; }
.facts li + li { padding-left: 14px; border-left: 1px solid var(--line); }
.facts b { font-family: var(--disp); font-weight: 400; font-size: 34px; line-height: 1; text-transform: uppercase; }
.facts span { font-size: 13px; color: var(--mute); margin-top: 4px; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 1fr; }
  .h-display { font-size: clamp(64px, 6.3vw, 108px); }
  .hero-media { order: 2; height: 100svh; }
  .hero-media img { aspect-ratio: auto; }
  .hero-text { padding: 120px 40px 60px calc(var(--pad) + 30px); }
}

/* ---------- manifest ---------- */
.manifest { padding: clamp(80px, 14vw, 180px) var(--pad); max-width: 1180px; margin: 0 auto; }
.manifest-text { font-family: var(--disp); font-weight: 300; font-size: clamp(34px, 5.6vw, 68px); line-height: 1.02; text-transform: uppercase; }
.sign { margin-top: 28px; color: var(--brass); letter-spacing: .14em; text-transform: uppercase; font-size: 13px; font-weight: 600; }

/* ---------- sections ---------- */
section { scroll-margin-top: 70px; }
.sec-head { padding: 0 var(--pad); max-width: 1300px; margin: 0 auto 34px; }
.collection, .cut, .pack, .order { padding: clamp(60px, 10vw, 130px) 0; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px var(--pad) 18px; scrollbar-width: none; max-width: 1300px; margin: 0 auto; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; padding: 11px 18px; font-size: 14px; letter-spacing: .05em; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); transition: .3s var(--ease); }
.tabs button[aria-selected="true"] { background: var(--ink); color: #fff; box-shadow: none; }

/* ---------- gallery (museum labels) ---------- */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 0 var(--pad); max-width: 1300px; margin: 0 auto; }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 1200px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.piece { text-align: left; display: flex; flex-direction: column; opacity: 0; transform: translateY(24px); animation: up .8s var(--ease) forwards; }
.piece-img { position: relative; overflow: hidden; background: #dedee1; aspect-ratio: 4 / 5; }
.piece-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.piece:hover .piece-img img { transform: scale(1.05); }
.piece-plus { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; display: grid; place-items: center; background: var(--card); font-size: 20px; line-height: 1; box-shadow: 0 0 0 1px var(--line); transition: .3s; }
.piece:hover .piece-plus { background: var(--berry); color: #fff; }
.label { background: var(--card); box-shadow: 0 0 0 1px var(--line); padding: 10px 12px 12px; display: grid; gap: 2px; }
.label .no { font-size: 11px; color: var(--brass); letter-spacing: .12em; font-weight: 600; }
.label .t { font-family: var(--disp); font-size: 22px; line-height: 1.05; text-transform: uppercase; }
.label .d { font-size: 13px; color: var(--mute); line-height: 1.35; }
@keyframes up { to { opacity: 1; transform: none; } }

/* ---------- cut ---------- */
.cut-wrap { max-width: 1300px; margin: 0 auto; padding: 0 var(--pad); display: grid; gap: 26px; }
.cut-list { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; margin: 0 calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad); }
.cut-list::-webkit-scrollbar { display: none; }
.cut-list button { flex: none; padding: 10px 16px; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line); background: var(--card); transition: .3s var(--ease); white-space: nowrap; }
.cut-list button[aria-selected="true"] { background: var(--berry); color: #fff; box-shadow: none; }
.cut-stage { display: grid; gap: 28px; align-items: center; }
.slice { position: relative; height: clamp(250px, 46vw, 420px); display: flex; flex-direction: column-reverse; margin: 0 6%;
  /* кремове покриття торта: боки та верх */
  border: 9px solid #FAF7F2; border-bottom: 0; border-radius: 6px 6px 0 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04), 0 1px 0 var(--line); background: #FAF7F2; }
.slice::after { /* тарелка */ content: ''; position: absolute; left: -30px; right: -30px; bottom: -10px; height: 10px; background: #fff; box-shadow: 0 1px 0 var(--line), 0 18px 30px -18px rgba(0,0,0,.35); }
.layer { position: relative; width: 100%; transform-origin: bottom; animation: drop .55s var(--ease) both; }
.layer.sponge { background-color: var(--c); background-image: radial-gradient(rgba(0,0,0,.08) 1px, transparent 1.4px), radial-gradient(rgba(255,255,255,.12) 1px, transparent 1.4px); background-size: 9px 9px, 13px 13px; background-position: 0 0, 4px 6px; }
.layer.cream { background: var(--c); }
.layer.jam { background: var(--c); box-shadow: inset 0 3px 0 rgba(255,255,255,.18); }
.layer.speck { background-color: var(--c); background-image: radial-gradient(#2a1e1a 1.1px, transparent 1.5px); background-size: 7px 6px; }
.layer.crunch { background-color: var(--c); background-image: radial-gradient(rgba(60,30,10,.45) 1.6px, transparent 2px); background-size: 8px 7px; }
.layer.top { border-radius: 2px 2px 0 0; }
@keyframes drop { from { opacity: 0; transform: translateY(-40px) scaleY(.6); } to { opacity: 1; transform: none; } }
.cut-name { font-family: var(--disp); font-weight: 300; font-size: clamp(40px, 7vw, 72px); text-transform: uppercase; line-height: .95; }
.cut-layers { list-style: none; margin: 18px 0 22px; counter-reset: l; }
.cut-layers li { counter-increment: l; display: flex; gap: 14px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); }
.cut-layers li::before { content: counter(l, decimal-leading-zero); font-size: 12px; color: var(--brass); font-weight: 600; }
.cut-photo { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.cut-photo img { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 1px var(--line), 0 0 0 5px var(--card); }
.cut-photo figcaption { font-size: 14px; color: var(--mute); }
@media (min-width: 900px) { .cut-stage { grid-template-columns: 1.1fr 1fr; gap: 70px; } .cut-list { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; } }

/* ---------- daria ---------- */
.daria { display: grid; gap: 40px; padding: clamp(60px, 10vw, 130px) var(--pad); max-width: 1300px; margin: 0 auto; align-items: center; }
.daria-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.daria-photos img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.daria-photos img:nth-child(even) { transform: translateY(34px); }
.daria-text p:not(.eyebrow) { margin-top: 16px; color: #3a3a40; max-width: 32em; }
.insta { display: inline-block; margin-top: 26px; font-weight: 600; color: var(--berry); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
@media (min-width: 900px) { .daria { grid-template-columns: 1fr 1fr; gap: 90px; } }

/* ---------- pack ---------- */
.pack-row { display: flex; gap: 14px; overflow-x: auto; padding: 0 var(--pad) 10px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.pack-row::-webkit-scrollbar { display: none; }
.pack-row img { flex: none; width: min(70vw, 340px); aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: start; }
.pack-grid { display: grid; gap: 0; padding: 40px var(--pad) 0; max-width: 1300px; margin: 0 auto; }
.pack-grid > div { padding: 22px 0; border-top: 1px solid var(--line); }
.pack-grid h3 { font-family: var(--disp); font-weight: 400; font-size: 28px; text-transform: uppercase; }
.pack-grid p { color: #4a4a52; margin-top: 6px; }
@media (min-width: 900px) { .pack-grid { grid-template-columns: repeat(4, 1fr); gap: 30px; } }

/* ---------- order quiz ---------- */
.quiz { max-width: 760px; margin: 0 auto; padding: 0 var(--pad); }
.steps { list-style: none; display: flex; gap: 6px; margin-bottom: 26px; counter-reset: s; }
.steps li { flex: 1; counter-increment: s; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); padding-top: 10px; border-top: 2px solid var(--line); transition: .4s; }
.steps li::before { content: '0' counter(s) ' · '; }
.steps li.on { color: var(--ink); border-color: var(--berry); }
.step { border: 0; display: none; }
.step.on { display: grid; gap: 22px; animation: up .6s var(--ease) both; }
.step legend { font-family: var(--disp); font-weight: 300; font-size: clamp(36px, 6vw, 56px); text-transform: uppercase; line-height: 1; margin-bottom: 6px; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.field input:not([type=range]), .field select, .field textarea {
  font: inherit; font-size: 17px; color: var(--ink); background: var(--card); border: 0; box-shadow: inset 0 0 0 1px var(--line);
  padding: 14px 16px; border-radius: 0; width: 100%; min-height: 52px; -webkit-appearance: none; appearance: none;
}
.field select { background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
.field.range b { color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--berry); height: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 11px 16px; font-size: 15px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); transition: .25s var(--ease); }
.chips button.on { background: var(--ink); color: #fff; box-shadow: none; }
.hint { font-size: 14px; color: var(--mute); }
.hint-rush { color: var(--berry); background: color-mix(in srgb, var(--powder) 45%, transparent); padding: 12px 14px; }
.ref { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 8px; }
.ref img { width: 64px; height: 80px; object-fit: cover; }
.ref small { display: block; color: var(--mute); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.ref b { font-family: var(--disp); font-weight: 400; font-size: 22px; text-transform: uppercase; }
.ref-x { width: 40px; height: 40px; font-size: 24px; color: var(--mute); }
.step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; }
.step-nav .btn { min-width: 140px; }

.wish { text-align: center; display: grid; gap: 16px; justify-items: center; animation: up .8s var(--ease) both; }
.wish h3 { font-family: var(--disp); font-weight: 300; font-size: clamp(44px, 8vw, 80px); text-transform: uppercase; line-height: 1; }
.wish-candle { position: relative; width: 26px; height: 96px; color: var(--brass); }
.wish-candle svg { width: 100%; height: 100%; }
.flame { position: absolute; left: 50%; top: -18px; width: 16px; height: 26px; margin-left: -8px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fffaf0 0 18%, #ffd27a 38%, var(--flame) 55%, rgba(246,178,74,0) 74%);
  box-shadow: 0 0 60px 26px rgba(246,178,74,.28); animation: ignite 1.2s var(--ease) both .3s, flicker 2.4s infinite ease-in-out 1.5s; }
@keyframes ignite { from { opacity: 0; transform: scale(.2) translateY(10px); } to { opacity: 1; transform: none; } }
.wish-text { white-space: pre-wrap; text-align: left; font-family: var(--text); font-size: 15px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 18px 20px; width: 100%; max-width: 560px; }
.wish-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.wish .hint { max-width: 520px; }

.rules { max-width: 760px; margin: 50px auto 0; padding: 0 var(--pad); }
.rules summary { cursor: pointer; font-family: var(--disp); font-size: 26px; text-transform: uppercase; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); list-style: none; display: flex; justify-content: space-between; }
.rules summary::after { content: '+'; color: var(--brass); }
.rules[open] summary::after { content: '−'; }
.rules ul { padding: 16px 0 0 20px; color: #4a4a52; display: grid; gap: 8px; }

/* ---------- footer ---------- */
.foot { padding: 80px var(--pad) 110px; text-align: center; border-top: 1px solid var(--line); }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--disp); font-size: clamp(54px, 12vw, 140px); letter-spacing: .08em; text-transform: uppercase; line-height: 1; font-weight: 300; }
.foot-brand .brand-mark { width: 30px; height: 90px; }
.foot-slogan { margin-top: 14px; color: var(--brass); letter-spacing: .16em; text-transform: uppercase; font-size: 13px; font-weight: 600; }
.foot-meta { margin-top: 10px; color: var(--mute); font-size: 14px; }

/* ---------- fab ---------- */
.fab { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 25; min-height: 54px; display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: #fff; text-decoration: none; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 14px;
  transform: translateY(140%); transition: transform .5s var(--ease), background .3s; }
.fab.show { transform: none; }
body.warm .fab { background: var(--berry); }
@media (min-width: 900px) { .fab { display: none; } }

/* ---------- lightbox ---------- */
.lb { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(10px); display: grid; place-items: center; padding: 60px 16px 20px; gap: 16px; align-content: center; }
.lb[hidden] { display: none; }
.lb figure { max-width: min(560px, 100%); }
.lb img { max-height: 70svh; width: auto; margin: 0 auto; box-shadow: 0 30px 60px -30px rgba(0,0,0,.4); }
.lb figcaption { text-align: center; margin-top: 12px; font-family: var(--disp); font-size: 28px; text-transform: uppercase; }
.lb-cta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lb-x { position: absolute; top: 12px; right: 16px; width: 48px; height: 48px; font-size: 32px; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 12px 18px; font-size: 14px; opacity: 0; pointer-events: none; transition: .4s var(--ease); z-index: 60; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

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