@font-face {
  font-family: "Dela Gothic One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/dela-gothic-one-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Dela Gothic One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/dela-gothic-one-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --display: "Dela Gothic One", "Arial Black", sans-serif;
  --body: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;

  --young: #f2b705; --young-deep: #c48c00; --young-ink: #2a1803;
  --herb: #2c6a35; --herb-deep: #1b4622; --herb-ink: #f7ecc9;
  --red: #b1182b; --red-deep: #7c0e1b; --red-ink: #fff0d4;
  --black: #171312; --black-deep: #3a302a; --black-ink: #f4e2b8;
  --rind: #74462a; --rind-deep: #4c2b17; --rind-ink: #fbe9cc;
  --casein: #fbf5e6; --casein-ink: #1f1a14;
  --paste-ink: #2a1803;
  --cut-mask: url("cut-wide.svg");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-color: var(--rind) var(--young); }
body {
  margin: 0;
  font: 400 18px/1.6 var(--body);
  color: var(--young-ink);
  background: var(--young);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--casein); color: var(--casein-ink); }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; border-radius: 6px; }

h1, h2 { font-family: var(--display); font-weight: 400; margin: 0 0 .45em; text-wrap: balance; position: relative; }
h1 { font-size: clamp(2.3rem, 4.6vw, 4.9rem); line-height: 1.04; letter-spacing: -.01em; max-width: 13ch; }
h2 { font-size: clamp(2rem, 3.6vw, 3.7rem); line-height: 1.06; }
p { margin: 0 0 1em; max-width: 60ch; position: relative; }
.lead { font-size: clamp(18px, 1.35vw, 21px); }

/* --- header: the wordmark sits in the wax; wax swatches are the navigation ----------------------- */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px clamp(16px, 5vw, 72px);
  color: var(--young-ink);
}
.mark { font-family: var(--display); font-size: 22px; text-decoration: none; letter-spacing: .01em; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px; }
.top nav a {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease;
}
.top nav a:hover { background: rgba(42, 24, 3, .1); }
.sw {
  width: 14px; height: 14px; border-radius: 50%; display: inline-block; flex: none;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .28), 0 0 0 1.5px rgba(42, 24, 3, .4);
}
.sw-young { background: #ffd84d; }
.sw-herb { background: var(--herb); }
.sw-red { background: var(--red); }
.sw-black { background: var(--black); }
.sw-rind { background: var(--rind); }

/* --- a wheel: the section is its wax coat; the cut opens through it onto the paste --------------- */
.wheel {
  --wax: var(--young); --wax-deep: var(--young-deep); --ink: var(--young-ink);
  --paste: #fbe08c; --paste-hi: #fff0b8; --paste-deep: #e7c260;
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(18px, 3.4vh, 34px);
  padding: 112px 72px 88px;
  --lip-wide: url("lip-wide-1.svg"); --lip-tall: url("lip-tall-1.svg"); --drip-x: 0px; --stamp: #664804;
  color: var(--ink);
  background: var(--wax);
}
/* wax runs over the bottom edge into the next wheel */
.wheel::after {
  content: ""; position: absolute; z-index: 3; left: 0; right: 0; bottom: -52px; height: 60px; pointer-events: none;
  background: var(--wax);
  -webkit-mask: url("drip-edge.svg") var(--drip-x) top / 1440px 100% repeat-x;
  mask: url("drip-edge.svg") var(--drip-x) top / 1440px 100% repeat-x;
}
/* a lone wheel (the 404 page) has nothing below to drip onto */
main > .wheel:only-child::after { display: none; }
.w-herb { --lip-wide: url("lip-wide-2.svg"); --lip-tall: url("lip-tall-2.svg"); --drip-x: -380px; --stamp: #dfdcb7; }
.w-red { --lip-wide: url("lip-wide-3.svg"); --lip-tall: url("lip-tall-3.svg"); --drip-x: -760px; --stamp: #f3cdb9; }
.w-black { --lip-wide: url("lip-wide-4.svg"); --lip-tall: url("lip-tall-4.svg"); --drip-x: -1090px; --stamp: #8a7f68; }
.w-missing { --lip-wide: url("lip-wide-5.svg"); --lip-tall: url("lip-tall-5.svg"); }
.w-herb { --wax: var(--herb); --wax-deep: var(--herb-deep); --ink: var(--herb-ink); --paste: #f3db88; --paste-hi: #fbebb6; --paste-deep: #dcbd62; }
.w-red { --wax: var(--red); --wax-deep: var(--red-deep); --ink: var(--red-ink); --paste: #f0c25b; --paste-hi: #f8d98c; --paste-deep: #d6a23d; }
.w-black { --wax: var(--black); --wax-deep: var(--black-deep); --ink: var(--black-ink); --paste: #d99630; --paste-hi: #e9b158; --paste-deep: #b9761c; }

/* rind stamp: printed in a tone of the wax itself (darker on light wax, paler on dark wax, 4.6:1);
   caps because rind stamps are cut in caps (decorative, aria-hidden); whole segments wrap out of sight */
.stamp {
  margin: 0; max-width: none;
  display: flex; flex-wrap: wrap; column-gap: .7em; height: 1.5em; overflow: hidden;
  font-family: var(--display); font-size: clamp(12px, 1.15vw, 15px); line-height: 1.5; letter-spacing: .2em; text-transform: uppercase;
  color: var(--stamp);
}
.stamp span { white-space: nowrap; }

.wheel-cut { position: relative; isolation: isolate; width: min(100%, 1180px); }
/* the cut itself is the paste: masked to the wheel-section shape, the copy is set on it */
.cut {
  position: relative;
  padding: clamp(34px, 5.5vw, 78px) clamp(36px, 9vw, 150px);
  color: var(--paste-ink);
  background: radial-gradient(120% 110% at 42% 38%, var(--paste-hi), var(--paste) 58%, var(--paste-deep));
  -webkit-mask: var(--cut-mask) center / 100% 100% no-repeat;
  mask: var(--cut-mask) center / 100% 100% no-repeat;
}
/* the coat's thickness at the cut, uneven, with one long drip running off the lip; the lip outline
   fills the top 5/6 of its mask, the drip hangs in the rest */
.wheel-cut::before, .wheel-cut::after {
  content: ""; position: absolute; inset: -16px -18px calc(-20% - 22px);
  -webkit-mask: var(--lip-wide) center / 100% 100% no-repeat;
  mask: var(--lip-wide) center / 100% 100% no-repeat;
}
/* two mask layers: the cut shape grown 14px on every side (so the wax always encloses the paste) plus the
   uneven per-wheel lip with its drip */
.wheel-cut::before {
  z-index: -2; background: var(--wax-deep);
  -webkit-mask: var(--cut-mask) 4px 2px / calc(100% - 8px) calc(83.333% - 3.7px) no-repeat, var(--lip-wide) center / 100% 100% no-repeat;
  mask: var(--cut-mask) 4px 2px / calc(100% - 8px) calc(83.333% - 3.7px) no-repeat, var(--lip-wide) center / 100% 100% no-repeat;
}
/* where light catches the curved lip */
.wheel-cut::after { z-index: -1; background: rgba(255, 255, 255, .34);
  -webkit-mask-image: url("lip-gloss-wide.svg"); mask-image: url("lip-gloss-wide.svg"); }
.paste { position: absolute; inset: 0; pointer-events: none; }
.w-herb .wheel-cut { width: min(100%, 980px); margin-left: auto; }
.w-red .wheel-cut { width: min(100%, 1240px); margin-inline: auto; }
.w-black .wheel-cut { width: min(100% - clamp(0px, 7vw, 140px), 920px); margin-left: clamp(0px, 7vw, 140px); }

.eye {
  position: absolute; border-radius: 50%; aspect-ratio: 1.18;
  background: var(--paste-deep);
  box-shadow: inset 0 3px 7px rgba(60, 35, 0, .3), 0 1px 0 rgba(255, 255, 255, .4);
}
.e1 { left: 71%; top: 20%; width: 4.4%; }
.e2 { left: 83%; top: 46%; width: 2.6%; }
.e3 { left: 62%; top: 64%; width: 3.4%; }
.e4 { left: 89%; top: 24%; width: 1.9%; }
.e5 { left: 76%; top: 76%; width: 2.2%; }
.fleck {
  position: absolute; width: 1.7%; min-width: 9px; height: 3px; border-radius: 2px;
  background: #3d6b2c; box-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.f1 { left: 64%; top: 18%; transform: rotate(-18deg); }
.f2 { left: 78%; top: 30%; transform: rotate(32deg); }
.f3 { left: 70%; top: 52%; transform: rotate(-40deg); }
.f4 { left: 86%; top: 60%; transform: rotate(12deg); }
.f5 { left: 60%; top: 78%; transform: rotate(24deg); }
.f6 { left: 92%; top: 40%; transform: rotate(-12deg); }
.f7 { left: 10%; top: 86%; transform: rotate(38deg); }
.f8 { left: 74%; top: 86%; transform: rotate(-30deg); }
.f9 { left: 52%; top: 9%; transform: rotate(14deg); }
.crystal {
  position: absolute; width: 7px; height: 7px; border-radius: 2px; transform: rotate(45deg);
  background: #fff3d6; box-shadow: inset -1px -1px 0 rgba(185, 118, 28, .5);
}
.c1 { left: 66%; top: 16%; }  .c2 { left: 74%; top: 34%; } .c3 { left: 84%; top: 22%; }
.c4 { left: 90%; top: 56%; }  .c5 { left: 70%; top: 70%; } .c6 { left: 80%; top: 82%; }
.c7 { left: 60%; top: 86%; }  .c8 { left: 94%; top: 76%; } .c9 { left: 56%; top: 12%; }
.c10 { left: 87%; top: 40%; }

/* --- casein labels: pressed into the paste, rim sunk, never lifted ------------------------------ */
.label { position: relative; margin: clamp(8px, 2vh, 16px) 0 0; }
.label summary, .casein, .rules li {
  background: var(--casein); color: var(--casein-ink); border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(31, 26, 20, .14), inset 0 -3px 0 rgba(31, 26, 20, .1);
}
.label summary {
  list-style: none; cursor: pointer;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 240px; padding: 16px 38px 18px;
  font-family: var(--display); font-size: 18px; line-height: 1.15;
  transform: rotate(-3deg);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.label summary::-webkit-details-marker { display: none; }
.label summary span, .casein { font-family: var(--body); font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.label summary span { color: #5c4a33; }
.label summary:hover { transform: rotate(-1deg) scale(1.03); }
.label summary:focus-visible { outline: 3px solid var(--paste-ink); outline-offset: 5px; border-radius: 50%; }
.label[open] summary { transform: rotate(0); }
.label p { margin: 18px 0 0; max-width: 52ch; }
.casein {
  position: absolute; top: -14px; right: 14%; z-index: 1;
  display: flex; flex-direction: column; align-items: center; padding: 12px 28px 14px; color: #5c4a33;
  transform: rotate(7deg);
}
.casein b { font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: .02em; color: var(--casein-ink); }

.caption {
  position: relative;
  display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px clamp(18px, 3vw, 44px);
  width: fit-content; max-width: 100%;
  margin: clamp(20px, 3vh, 30px) 0 0; padding: 12px 0;
  border-top: 1px solid rgba(42, 24, 3, .35); border-bottom: 1px solid rgba(42, 24, 3, .35);
}
.caption dt { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--paste-ink); }
.caption dd { margin: 0; font-family: var(--display); font-size: clamp(18px, 1.6vw, 22px); font-variant-numeric: tabular-nums; }

/* --- the cut: the first wheel opens from a knife slit on arrival; the others are already open ------ */
.js-cut #molodoy .wheel-cut {
  clip-path: inset(46% -20px 46% -20px);
  transition: clip-path 1.1s cubic-bezier(.16, 1, .3, 1);
}
.js-cut #molodoy.is-cut .wheel-cut { clip-path: inset(-30px -30px -30% -30px); }

/* --- cellar: bare rind, the house rules on casein labels ----------------------------------------- */
.cellar {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: center;
  padding: 128px 72px 112px;
  color: var(--rind-ink);
  background: var(--rind);
}
.cellar h2 { color: var(--rind-ink); }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; justify-items: start; }
/* text kept inside the oval's inscribed box */
.rules li { display: grid; gap: 4px; max-width: 460px; padding: 30px 72px 34px; text-align: center; }
.rules li:nth-child(1) { transform: rotate(-3deg); }
.rules li:nth-child(2) { transform: rotate(2deg); margin-left: clamp(0px, 6vw, 72px); }
.rules li:nth-child(3) { transform: rotate(-1.5deg); margin-left: clamp(0px, 2vw, 24px); }
.rules b { font-family: var(--display); font-weight: 400; font-size: 20px; }

.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px clamp(24px, 5vw, 72px);
  background: var(--rind-deep); color: var(--rind-ink); font-size: 14px;
}
.foot .mark { font-size: 16px; }

@media (max-width: 860px) {
  .top { flex-direction: column; align-items: flex-start; gap: 6px; padding-bottom: 0; }
  .top nav { margin-left: -10px; }
  .top nav a { padding: 6px 10px; font-size: 13px; }
  .wheel { min-height: auto; padding: 96px 16px 88px; }
  .wheel.w-young { padding-top: 176px; }
  .wheel-cut, .w-herb .wheel-cut, .w-red .wheel-cut, .w-black .wheel-cut { width: 100%; margin: 0; }
  .cut { padding: 96px 34px 92px; }
  /* the paste's eyes, flecks and crystals sit in the open paste above the heading and under the caption */
  .paste i:nth-child(n+5) { display: none; }
  .paste i:nth-child(1) { left: 58%; top: 4.5%; width: 26px; }
  .paste i:nth-child(2) { left: 74%; top: 7%; width: 14px; }
  .paste i:nth-child(3) { left: 30%; top: 94%; width: 18px; }
  .paste i:nth-child(4) { left: 52%; top: 91.5%; width: 11px; }
  .paste .fleck, .paste .crystal { width: 10px; }
  .paste .crystal { height: 7px; width: 7px; }
  .casein { top: -12px; right: 10px; padding: 8px 22px 10px; transform: rotate(9deg); }
  .casein b { font-size: 16px; }
  .cellar { grid-template-columns: 1fr; padding: 96px 24px 80px; }
  .rules li { padding: 26px 52px 30px; }
  .rules li:nth-child(2) { margin-left: 18px; }
}
/* the tall wheel section only where the cut really is taller than wide */
@media (max-width: 600px) {
  :root { --cut-mask: url("cut-tall.svg"); }
  .wheel-cut::before, .wheel-cut::after { inset: -14px -14px calc(-10% - 20px); }
  .wheel-cut::before {
    -webkit-mask: var(--cut-mask) 0 0 / 100% calc(90.909% - 2.9px) no-repeat, var(--lip-tall) center / 100% 100% no-repeat;
    mask: var(--cut-mask) 0 0 / 100% calc(90.909% - 2.9px) no-repeat, var(--lip-tall) center / 100% 100% no-repeat;
  }
  .wheel-cut::after { -webkit-mask-image: url("lip-gloss-tall.svg"); mask-image: url("lip-gloss-tall.svg"); }
}
@media (max-width: 420px) {
  .caption { grid-template-columns: repeat(2, auto); }
  .label summary { min-width: 0; padding: 14px 30px 16px; }
  .rules li { max-width: calc(100% - 18px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-cut #molodoy .wheel-cut { clip-path: none; transition: none; }
  .label summary { transition: none; }
}
