/* =========================================================
   PREMIUM THE LINES — scroll-driven coffee story
   ========================================================= */
:root {
  --cream: #f2e9df;
  --cream-2: #f8f3ec;
  --paper: #fbf8f3;
  --ink: #2a1a12;
  --ink-2: #6f5b4d;
  --caramel: #c9793a;
  --latte-top: #c47b52;
  --latte-bot: #a95f3b;
  --on-latte: #fbefe2;
  /* Fraunces has no Cyrillic; Russian headings fall back to Merriweather per glyph */
  --display: 'Fraunces', 'Merriweather', 'Georgia', serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --Wpx: 1440px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

.display {
  font-family: var(--display);
  font-weight: 800;
  font-variation-settings: 'SOFT' 100, 'opsz' 96;
  letter-spacing: -0.01em;
  line-height: 0.95;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
}

/* ---------- buttons ---------- */
.pill-dark {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 20px; border-radius: 999px;
  background: var(--ink); color: #fbf3ea;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 16px rgba(42, 26, 18, .18);
  transition: transform .25s ease, background .25s ease;
}
.pill-dark:hover { transform: translateY(-1px); background: #47301f; }
.pill-dark:disabled { opacity: .4; cursor: not-allowed; }
.pill-dark.wide { width: 100%; height: 46px; }
.pill-outline {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 18px; border-radius: 999px;
  border: 1.5px solid var(--ink); font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.pill-outline.small { height: 28px; padding: 0 12px; font-size: 11px; }
.circle-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-grid; place-items: center;
  border: 1.5px solid var(--ink);
  background: transparent;
  transition: transform .25s ease, background .25s;
}
.circle-btn:hover { transform: translateX(2px); background: rgba(42,26,18,.06); }
.circle-btn.mini { width: 28px; height: 28px; border: 0; background: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.12); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: 78px; padding: 0 3.4vw;
  display: flex; align-items: center; justify-content: space-between;
  transition: color .5s ease, background .4s ease, backdrop-filter .4s;
}
.site-header.solid { background: rgba(242, 233, 223, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; line-height: 1; }
.brand-mark { width: 38px; height: 38px; flex: none; border-radius: 50%; box-shadow: 0 6px 14px rgba(64, 44, 33, .22); }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 22px; letter-spacing: -.01em; font-variation-settings: 'SOFT' 60, 'opsz' 48; }

/* language switch */
.lang-switch {
  display: inline-flex; padding: 2px; border-radius: 999px;
  border: 1.3px solid rgba(42, 26, 18, .35); background: rgba(255, 255, 255, .35);
  transition: border-color .5s, background .5s;
}
.lang-switch button {
  height: 28px; min-width: 32px; padding: 0 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .05em; color: var(--ink-2);
  transition: background .25s, color .25s;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.active { background: var(--ink); color: #fbf3ea; }
.nav { display: flex; gap: 30px; font-size: 13px; font-weight: 500; }
.nav-link { position: relative; padding: 6px 0; opacity: .85; transition: opacity .2s; }
.nav-link:hover { opacity: 1; }
.nav-link.active { opacity: 1; }
.nav-link.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.search-pill {
  height: 34px; width: 150px; padding: 0 12px 0 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: space-between;
  border: 1.3px solid rgba(42,26,18,.55); font-size: 12px; color: var(--ink-2);
  background: rgba(255,255,255,.35);
  transition: border-color .5s, color .5s, background .5s;
}
.icon-btn { position: relative; width: 34px; height: 34px; display: grid; place-items: center; }
.cart-badge {
  position: absolute; top: -2px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px; background: var(--caramel); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}
.burger { width: 26px; display: grid; gap: 4px; padding: 6px 0; }
.burger span { height: 1.5px; background: currentColor; border-radius: 2px; }

.site-header.on-latte { color: var(--on-latte); }
.site-header.on-latte .brand { color: var(--ink); }
.site-header.on-latte .search-pill { background: #f6ece2; border-color: transparent; color: var(--ink-2); }
.site-header.on-latte .lang-switch { background: #f6ece2; border-color: transparent; }

/* =========================================================
   SCROLL STAGE — a sticky viewport; #track (the designed page) is moved by
   the timeline while the espresso sphere travels across sections in #fx
   ========================================================= */
.scrolly { position: relative; height: 1100vh; }
.stage {
  position: sticky; top: 0;
  height: 100vh; height: 100lvh;
  overflow: hidden;
  background: var(--cream);
}
.track { position: absolute; left: 0; top: 0; width: 100%; z-index: 2; will-change: transform; }
.film { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; visibility: hidden; }
.film-tile {
  position: absolute; left: 0; top: 0; z-index: 0; visibility: hidden; border-radius: 28px;
  background: #ece2d6; box-shadow: 0 26px 60px rgba(97, 64, 40, .2);
}
.sec { position: relative; width: 100%; height: 100vh; height: 100lvh; overflow: visible; }

/* floating 3D objects (positioned by their centre; JS adds bob/parallax/rotation) */
.obj {
  position: absolute; left: var(--x); top: var(--y); width: var(--w); height: auto;
  transform: translate(-50%, -50%); pointer-events: none; user-select: none;
  filter: drop-shadow(0 18px 22px rgba(90, 55, 30, .22));
  will-change: transform;
}
.obj.blur { filter: blur(3px) drop-shadow(0 10px 14px rgba(90, 55, 30, .15)); opacity: .85; }

/* ---------- SECTION 1 · HERO ---------- */
.hero { background: var(--cream); }
.hero-blob { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: absolute; left: 6.2vw; top: 25vh; width: min(40vw, 640px); z-index: 3; will-change: transform, opacity; }
.hero-title { font-size: clamp(40px, 4.7vw, 76px); margin: 12px 0 18px; color: var(--ink); }
.hero-title span { display: block; }
.hero-text { font-size: 13.5px; line-height: 1.65; color: #5b4636; max-width: 330px; }
.hero-cta { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.hero-copy > * { opacity: 0; transform: translateY(26px); animation: rise 1s cubic-bezier(.2,.8,.2,1) forwards; }
.hero-copy > :nth-child(1) { animation-delay: .15s; }
.hero-copy > :nth-child(2) { animation-delay: .25s; }
.hero-copy > :nth-child(3) { animation-delay: .4s; }
.hero-copy > :nth-child(4) { animation-delay: .5s; }
@keyframes rise { to { opacity: 1; transform: none; } }

.sphere-slot { position: absolute; left: 50%; top: 50%; width: min(17vw, 27vh); aspect-ratio: 1; transform: translate(-50%, -50%); }
.sphere-shadow {
  position: absolute; left: 50%; top: calc(50% + min(13vw, 21vh)); width: min(15vw, 24vh); height: min(2.2vw, 3.4vh);
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(90, 60, 35, .28), rgba(90, 60, 35, 0));
}

.hero-cards { position: absolute; left: 73vw; top: 37vh; display: flex; gap: 1.1vw; z-index: 2; will-change: transform, opacity; }
.hero-cards .photo-card { opacity: 0; transform: translateY(26px); animation: rise 1.1s .45s cubic-bezier(.2,.8,.2,1) forwards; }
.hero-cards .photo-card + .photo-card { animation-delay: .55s; }
.photo-card {
  position: relative; overflow: hidden; flex: none;
  width: 13.4vw; height: 19vw; max-height: 36vh;
  border-radius: 1.8vw; background: #e9ddd0;
  box-shadow: 0 18px 40px rgba(97, 64, 40, .16);
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.06) saturate(.92); }
.photo-card .circle-btn.mini { position: absolute; right: 12px; bottom: 12px; }
.photo-card .chip {
  position: absolute; left: 12px; bottom: 14px; padding: 6px 10px; border-radius: 999px;
  background: #fff; font-size: 10px; font-weight: 600; box-shadow: 0 4px 10px rgba(0,0,0,.1);
}

.dots { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; align-items: center; }
.dots i { width: 6px; height: 6px; border-radius: 50%; border: 1.2px solid currentColor; color: var(--ink); opacity: .55; }
.dots i.on { background: currentColor; opacity: 1; }
.hero-dots { top: 80vh; }
.milk-dots, .latte-dots { bottom: 5vh; }
.milk-dots i.on, .latte-dots i.on { width: 18px; border-radius: 4px; height: 3px; border: 0; }
.latte-dots i { color: var(--on-latte); }

/* ---------- SECTION 2 · COLLECTION ---------- */
.comforts { height: 92vh; height: 92lvh; background: linear-gradient(var(--cream), #f4ece3 40%, var(--cream)); }
.sec-title { position: absolute; left: 0; right: 0; top: 4vh; text-align: center; }
.sec-title h2 { font-size: clamp(36px, 3.6vw, 60px); margin-top: 6px; font-weight: 700; }
.tiles { position: absolute; left: 50%; top: 22vh; transform: translateX(-50%); display: flex; gap: 1.6vw; align-items: flex-start; }
.tile {
  position: relative; width: 15.5vw; height: 20.5vw; max-height: 50vh; border-radius: 2.2vw; overflow: hidden;
  background: #e6dacb; box-shadow: 0 22px 46px rgba(97, 64, 40, .14);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.tile.t2 { margin-top: 3.5vh; }
.tile img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.08) saturate(.9); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.tile:hover { transform: translateY(-6px); }
.tile:hover img { transform: scale(1.04); }
.tile-label {
  position: absolute; left: 12px; bottom: 12px; display: flex; gap: 8px; align-items: center;
  padding: 6px 12px; border-radius: 999px; background: rgba(255, 252, 248, .86); backdrop-filter: blur(8px);
  font-size: 11px; opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .3s;
}
.tile-label em { font-style: normal; color: var(--ink-2); }
.tile:hover .tile-label { opacity: 1; transform: none; }
.tile .circle-btn.mini { position: absolute; right: 12px; bottom: 12px; font-weight: 700; }

/* ---------- SECTION 2 · MILK ---------- */
.milk { background: transparent; }
.milk-title { position: absolute; left: 0; right: 0; top: 10.5vh; text-align: center; z-index: 7; will-change: transform, opacity; }
.milk-title h2 { font-size: clamp(40px, 4.3vw, 70px); margin-top: 4px; }
.milk-tile {
  position: absolute; left: 50%; top: 53vh; width: min(19vw, 33vh); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 2.4vw; overflow: hidden; background: #e7dccd; box-shadow: 0 22px 50px rgba(97, 64, 40, .16);
  z-index: 6; will-change: transform, opacity;
  /* at impact the tile dissolves into the pool through a soft round mask */
  -webkit-mask-image: radial-gradient(closest-side, #000 var(--m0, 150%), transparent var(--m1, 150%));
  mask-image: radial-gradient(closest-side, #000 var(--m0, 150%), transparent var(--m1, 150%));
}
.milk-tile img { width: 100%; height: 100%; object-fit: cover; filter: brightness(1.12) saturate(.85); }
.milk-tile canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.milk-pool {
  position: absolute; left: 50%; top: 64vh; width: min(108vw, 175vh); max-width: none; height: auto;
  transform: translate(-50%, -50%) scale(0); transform-origin: 50% 50%; opacity: 0; z-index: 5;
  filter: drop-shadow(0 30px 40px rgba(110, 80, 50, .18));
  will-change: transform, opacity;
}
.milk-thread {
  position: absolute; left: 50%; width: 1.1vw; border-radius: 0 0 50% 50% / 0 0 20% 20%;
  transform: translateX(-50%); opacity: 0; z-index: 5;
  background: linear-gradient(90deg, #ddd4c9, #fff 35%, #fff 60%, #e7e0d6);
}
.peek {
  position: absolute; top: 34vh; width: 10vw; height: 30vh; border-radius: 2vw; background: #eadfd2;
  box-shadow: 0 20px 40px rgba(97, 64, 40, .1); opacity: .8;
}
.peek-l { left: -6vw; }
.peek-r { right: -6vw; background: #efe3d6; }

.glass-card {
  position: absolute; z-index: 7;
  background: rgba(255, 251, 246, .74);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 20px;
  box-shadow: 0 24px 50px rgba(80, 50, 30, .14);
  padding: 18px;
  will-change: transform, opacity;
}
.blend-card { left: 6.5vw; top: 37vh; width: clamp(230px, 17.5vw, 290px); }
.pair-card { right: 8vw; top: 35vh; width: clamp(170px, 12.5vw, 220px); padding: 12px; }
.glass-top { display: flex; align-items: center; justify-content: space-between; }
.tag { position: relative; display: inline-grid; padding: 5px 10px; border-radius: 999px; background: #f7dccb; color: #8a4a26; font-size: 10.5px; font-weight: 600; }
.tag .swap, .glass-title .swap { grid-area: 1 / 1; }
.heart { color: var(--ink); }
.heart.active { color: #c0392b; }
.heart.active svg { fill: currentColor; }
.glass-title { display: inline-grid; font-size: clamp(30px, 2.6vw, 42px); margin: 12px 0 10px; }
.swap.b { opacity: 0; }
.glass-text { font-size: 11.5px; line-height: 1.6; color: var(--ink-2); }
.glass-actions { display: flex; gap: 8px; margin-top: 16px; }
.glass-actions .pill-dark, .glass-actions .pill-outline { height: 32px; padding: 0 14px; font-size: 12px; }
.pair-card img { width: 100%; height: 9.5vw; max-height: 160px; object-fit: cover; border-radius: 12px; margin: 10px 0; }
.pair-card .x { font-size: 12px; opacity: .6; }
.pair-foot { display: flex; align-items: center; justify-content: space-between; }

/* ---------- SECTION 3 · LATTE ---------- */
.latte { background: transparent; color: var(--on-latte); }
.latte-sun {
  position: absolute; right: -9vw; top: -14vh; width: 34vw; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 40% 60%, #e9cdb7, #dcb89d); opacity: .55;
}
.latte-head { position: absolute; left: 0; right: 0; top: 10vh; text-align: center; z-index: 4; will-change: transform, opacity; }
.latte-head .eyebrow { color: var(--on-latte); opacity: .85; }
.latte-title { font-size: clamp(40px, 4.6vw, 76px); margin-top: 6px; text-shadow: 0 8px 30px rgba(90, 35, 10, .35); }
.latte-title span { display: block; }
.latte-sub { margin-top: 2.6vh; font-size: clamp(14px, 1.4vw, 22px); font-weight: 600; letter-spacing: .04em; }
.latte-cup {
  position: absolute; left: 50%; top: 51vh; width: min(30vw, 54vh); max-width: none; z-index: 3;
  filter: drop-shadow(0 34px 34px rgba(70, 25, 8, .35));
  will-change: transform;
}
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 2; }
.orbit path { fill: none; stroke: #f6e6d6; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }

.flavor {
  position: absolute; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--on-latte); will-change: transform, opacity;
}
.flavor img { width: 100%; height: auto; filter: drop-shadow(0 22px 22px rgba(70, 25, 8, .35)); transition: transform .4s cubic-bezier(.2,.8,.2,1), filter .4s; }
.flavor:hover img { transform: scale(1.05) rotate(-2deg); }
.flv-name {
  font-size: clamp(10px, .8vw, 13px); font-weight: 700; letter-spacing: .08em; padding: 5px 10px; border-radius: 999px;
  transition: background .3s, color .3s;
}
.flavor.active .flv-name { background: var(--on-latte); color: var(--ink); }
#fVanilla { left: 13vw; top: 37vh; width: 15vw; }
#fCaramel { left: 23vw; top: 64vh; width: 22vw; z-index: 4; }
#fMocha { left: 71vw; top: 31vh; width: 14vw; }

.latte-disc {
  position: absolute; left: -15vw; bottom: -34vw; width: 46vw; aspect-ratio: 1; border-radius: 50%;
  background: #efe6da; z-index: 5; box-shadow: 0 -10px 40px rgba(70, 25, 8, .15);
}
.disc-text { position: absolute; left: 18%; top: 4%; width: 46%; height: auto; overflow: visible; color: var(--ink); }
.disc-text text { font-size: 11px; font-weight: 700; letter-spacing: .14em; fill: var(--ink); }
.disc-cube { position: absolute; left: 39%; top: 13%; width: 9%; filter: drop-shadow(0 10px 12px rgba(70, 25, 8, .25)); }

/* milk funnel + stream */
.pour { position: absolute; left: 0; top: 0; width: 100%; overflow: visible; pointer-events: none; z-index: 4; }
#milkPool, .pour { mix-blend-mode: normal; }

/* ---------- travelling sphere ---------- */
.fx { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.sphere { position: absolute; left: 0; top: 0; width: 100px; height: 100px; will-change: transform; }
.sphere .s-drip { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 24px 26px rgba(60, 30, 10, .22)); }
.sphere .bd {
  position: absolute; left: 50%; top: 50%; width: calc(var(--s) * 100%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #c08a5c 0%, #5a2f17 38%, #2a140a 75%, #1a0b05 100%);
  box-shadow: 0 6px 10px rgba(40, 20, 8, .25);
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}

/* ---------- stage chrome ---------- */
.chat-btn {
  position: absolute; right: 2.4vw; bottom: 3.4vh; z-index: 8; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: #fbf3ea; box-shadow: 0 10px 22px rgba(0,0,0,.2);
}
.loader {
  position: absolute; inset: 0; z-index: 30;
  display: grid; place-content: center; justify-items: center; gap: 14px;
  background: var(--cream); color: var(--ink-2); font-size: 13px; letter-spacing: .1em;
  transition: opacity .6s ease, visibility .6s;
}
.loader i { width: 36px; height: 36px; border-radius: 50%; border: 3px solid #e2d3c3; border-top-color: var(--caramel); animation: spin 1s linear infinite; }
.loader.done { opacity: 0; visibility: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   CUSTOMIZER
   ========================================================= */
.make { position: relative; background: var(--cream); padding: 120px 6vw 130px; text-align: center; }
.make-title { font-size: clamp(44px, 7vw, 92px); margin: 12px 0 18px; }
.make-text { max-width: 520px; margin: 0 auto; color: var(--ink-2); line-height: 1.7; font-size: 15px; }
.dock {
  max-width: 1040px; margin: 54px auto 0;
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between;
  padding: 22px 28px; border-radius: 28px;
  background: var(--paper); box-shadow: 0 30px 60px rgba(97, 64, 40, .12);
  text-align: left;
}
.dock-col { display: flex; flex-direction: column; gap: 10px; }
.dock-label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.seg { display: flex; padding: 4px; border-radius: 999px; background: #efe5da; }
.seg button { height: 32px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 600; transition: background .25s, color .25s; }
.seg button.active { background: var(--ink); color: #fbf3ea; }
.dock-select { height: 40px; padding: 0 14px; border-radius: 12px; border: 1.3px solid #dccfc1; background: #fff; font: inherit; font-size: 13px; color: var(--ink); }
#sweetSlider { width: 170px; accent-color: var(--caramel); }
.dock-order { flex-direction: row; align-items: center; gap: 18px; }
.price { font-family: var(--display); font-weight: 800; font-size: 28px; white-space: nowrap; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--ink); color: #f3e8dc; padding: 90px 6vw 40px; }
.footer-mark { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(237, 230, 215, .18); }
.footer-brand h2 { font-size: clamp(44px, 8vw, 110px); margin: 14px 0 18px; }
.footer-brand p { max-width: 460px; color: #cdb9a7; line-height: 1.7; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 40px; margin-top: 60px; }
.footer-grid h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; color: #e8a36b; }
.footer-grid a { display: block; margin-bottom: 10px; color: #cdb9a7; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.news form { display: flex; gap: 8px; }
.news input { flex: 1; height: 40px; border-radius: 999px; border: 1px solid #5a4536; background: transparent; color: #fff; padding: 0 16px; font: inherit; font-size: 13px; }
.news .pill-dark { background: #e8a36b; color: var(--ink); height: 40px; }
.copy { margin-top: 70px; font-size: 12px; color: #8f7a69; }

/* =========================================================
   MODALS / DRAWER / TOASTS
   ========================================================= */
.modal, .drawer { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.modal.open, .drawer.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(30, 18, 10, .45); opacity: 0; transition: opacity .3s; }
.open .modal-backdrop { opacity: 1; }
.modal-box {
  position: relative; width: min(520px, 92vw); margin: 12vh auto 0; padding: 22px;
  background: var(--paper); border-radius: 24px; box-shadow: 0 30px 80px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .3s;
}
.open .modal-box { opacity: 1; transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-head h3 { font-size: 28px; }
.modal-head input { flex: 1; height: 44px; border: 0; border-bottom: 1.5px solid #dccfc1; background: transparent; font: inherit; font-size: 16px; outline: none; }
.x-btn { width: 32px; height: 32px; border-radius: 50%; background: #efe5da; }
.search-list { display: grid; gap: 8px; }
.search-item { display: flex; align-items: center; gap: 14px; padding: 10px; border-radius: 14px; text-align: left; width: 100%; }
.search-item:hover { background: #f1e8de; }
.search-item img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
.search-item span { flex: 1; display: flex; flex-direction: column; }
.search-item small { color: var(--ink-2); }
.search-item em { font-style: normal; font-weight: 700; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.auth-form input { height: 42px; border-radius: 12px; border: 1.3px solid #dccfc1; padding: 0 14px; font: inherit; }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(400px, 100vw);
  background: var(--paper); padding: 24px; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.drawer.open .drawer-panel { transform: none; }
.cart-list { flex: 1; overflow: auto; }
.cart-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #ece2d7; font-size: 14px; }
.cart-row div { flex: 1; }
.cart-row small { display: block; color: var(--ink-2); }
.cart-empty { color: var(--ink-2); text-align: center; margin-top: 40px; }
.cart-foot { display: flex; justify-content: space-between; padding: 18px 0; font-size: 16px; }
.toasts { position: fixed; z-index: 120; left: 50%; bottom: 90px; transform: translateX(-50%); display: grid; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fbf3ea; font-size: 13px;
  box-shadow: 0 10px 24px rgba(0,0,0,.2); animation: toastIn .35s ease; transition: opacity .3s, transform .3s;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* =========================================================
   PORTRAIT / MOBILE
   ========================================================= */
/* mobile menu (burger) */
.mnav {
  position: fixed; z-index: 49; left: 12px; right: 12px; top: 72px; padding: 10px;
  display: grid; gap: 2px; border-radius: 20px;
  background: rgba(251, 248, 243, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 24px 50px rgba(42, 26, 18, .2);
  opacity: 0; transform: translateY(-8px); visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s;
}
.menu-open .mnav { opacity: 1; transform: none; visibility: visible; }
.mnav a { padding: 12px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--ink); }
.mnav a:hover { background: #f1e8de; }
.mnav .pill-dark { margin-top: 6px; height: 44px; }
@media (min-width: 821px) { .mnav { display: none; } }

@media (max-width: 1080px) {
  .nav { gap: 18px; }
  .search-pill { width: 120px; }
}
@media (max-width: 820px) {
  .nav, .search-pill, #signupBtn { display: none; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 19px; }
  .brand-mark { width: 32px; height: 32px; }
  .lang-switch button { min-width: 28px; padding: 0 6px; }
}

@media (max-aspect-ratio: 9/10) {
  .nav, .search-pill { display: none; }
  .site-header { padding: 0 18px; height: 66px; }
  .header-actions { gap: 8px; }

  .hero-copy { left: 6vw; right: 6vw; top: 13vh; width: auto; }
  .hero-title { font-size: clamp(34px, 10vw, 54px); margin: 8px 0 12px; }
  .hero-text { font-size: 13px; max-width: 78vw; }
  .hero-cta { margin-top: 16px; }
  .sphere-slot { top: 67%; width: 40vw; }
  .sphere-shadow { top: calc(67% + 23vw); width: 34vw; height: 4vw; }
  .hero-cards { display: none; }
  .hero-dots { top: 91vh; }
  .hero-blob { opacity: .7; }

  .sec-title { top: 9vh; }
  .tiles { top: 22vh; gap: 3vw; }
  .tile { width: 29vw; height: 40vw; border-radius: 5vw; }
  .tile .circle-btn.mini { right: 6px; bottom: 6px; width: 24px; height: 24px; }

  .milk-title { top: 9vh; }
  .milk-tile { top: 36vh; width: 48vw; border-radius: 6vw; }
  .milk-pool { top: 62vh; width: 190vw; }
  .peek, .pair-card { display: none; }
  .blend-card { left: 5vw; right: 5vw; top: auto; bottom: 4vh; width: auto; padding: 14px 16px; }
  .blend-card .glass-text { display: none; }
  .blend-card .glass-title { font-size: 28px; margin: 6px 0 2px; }
  .blend-card .glass-actions { margin-top: 10px; }

  .latte-head { top: 10vh; }
  .latte-title { font-size: clamp(32px, 10vw, 54px); }
  .latte-cup { top: 56vh; width: 66vw; }
  #fVanilla { left: 3vw; top: 34vh; width: 28vw; }
  #fMocha { left: 70vw; top: 31vh; width: 26vw; }
  #fCaramel { left: 6vw; top: 75vh; width: 44vw; }
  .latte-sun { width: 60vw; right: -24vw; top: -8vh; }
  .latte-disc { width: 80vw; left: -36vw; bottom: -58vw; }
  .disc-text text { font-size: 10px; }
  .chat-btn { width: 38px; height: 38px; right: 16px; bottom: 16px; }
}

@media (max-width: 820px) {
  .dock { flex-direction: column; align-items: stretch; }
  .dock-order { justify-content: space-between; }
  #sweetSlider { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
