/* =========================================================
   NIVEA — A Journey Through Your Skin
   ========================================================= */
:root {
  --nivea-blue: #0028AA;
  --nivea-blue-bright: #1F4BFF;
  --ink: #0B1426;
  --white: #fff;
  --text-soft: rgba(255, 255, 255, .82);
  --text-mute: rgba(255, 255, 255, .62);
  --glass: rgba(255, 255, 255, .10);
  --glass-strong: rgba(255, 255, 255, .16);
  --glass-brd: rgba(255, 255, 255, .26);
  --pad: clamp(20px, 4.5vw, 72px);
  --f-display: "Inter Tight", Inter, system-ui, sans-serif;
  --f-body: Inter, system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { background: #000; scroll-behavior: auto; overscroll-behavior-y: none; }
body {
  font: 400 16px/1.6 var(--f-body);
  color: var(--white);
  background: #000;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; -webkit-tap-highlight-color: transparent; }

/* ============ FIXED LAYER STACK ============ */
#sequence {
  position: fixed; left: 0; top: 0;
  width: 100%; height: 100vh; height: 100lvh;
  display: block; background: #000;
  z-index: 0;
  opacity: 0;
  contain: strict;
  transform: translateZ(0);
  transition: opacity 1.2s cubic-bezier(.2, .7, .2, 1);
}
#sequence.ready { opacity: 1; }
/* ============ SCRIMS ============ */
.scrim, #words, #scenes, #grain { position: fixed; inset: 0; pointer-events: none; }
.scrim { z-index: 1; opacity: 0; will-change: opacity; }
#scrim-l { background: linear-gradient(90deg, rgba(4, 10, 24, .72) 0%, rgba(4, 10, 24, .38) 32%, rgba(4, 10, 24, 0) 58%); }
#scrim-r { background: linear-gradient(270deg, rgba(4, 10, 24, .72) 0%, rgba(4, 10, 24, .38) 32%, rgba(4, 10, 24, 0) 58%); }
#scrim-top { background: linear-gradient(180deg, rgba(4, 10, 24, .55), rgba(4, 10, 24, 0) 24%); opacity: 1; }
#scrim-bottom {
  background: linear-gradient(0deg, rgba(3, 7, 18, .88) 0%, rgba(3, 7, 18, .45) 45%, rgba(3, 7, 18, 0) 75%);
  opacity: 0;
  transition: opacity .5s;
}
#scrim-full {
  visibility: hidden;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(0, 20, 80, .35), rgba(2, 6, 18, .78) 75%);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
}
#words { z-index: 2; display: grid; place-items: center; overflow: hidden; }
#veil {
  position: fixed; inset: 0; z-index: 5; pointer-events: none;
  background: #02050d; opacity: 0;
  transition: opacity .42s cubic-bezier(.4, 0, .2, 1);
}
#veil.on { opacity: 1; pointer-events: auto; }
#scenes { z-index: 3; }
#grain {
  z-index: 8; opacity: .05; mix-blend-mode: overlay;
  background: 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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============ LOAD BAR ============ */
#loadbar {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  z-index: 10; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--nivea-blue-bright), #9FB6FF, #fff);
  transition: transform .3s ease, opacity .8s ease .4s;
}
#loadbar.done { opacity: 0; }

/* ============ BIG CHAPTER WORDS ============ */
.bigword {
  position: absolute;
  font: 800 clamp(120px, 27vw, 460px)/.8 var(--f-display);
  letter-spacing: -.06em;
  text-transform: lowercase;
  color: #fff;
  mix-blend-mode: overlay;
  opacity: 0;
  user-select: none;
  will-change: transform, opacity;
  white-space: nowrap;
}
.bigword.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, .7);
  mix-blend-mode: normal;
}

/* ============ SCENES ============ */
.scene { position: absolute; inset: 0; visibility: hidden; }
.scene.is-visible { visibility: visible; }
.scene.is-live a, .scene.is-live button { pointer-events: auto; }
[data-r] { opacity: 0; will-change: transform, opacity; }

.copy {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  width: min(500px, 38vw);
  display: grid; gap: 16px;
}
.side-left .copy { left: var(--pad); }
.side-right .copy { right: var(--pad); }

.micro {
  font: 500 11px/1.4 var(--f-body);
  text-transform: uppercase; letter-spacing: .24em;
  color: var(--text-mute);
  display: inline-flex; align-items: center; gap: 10px;
}
.micro i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent, var(--nivea-blue-bright)); flex: none;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent, #fff) 25%, transparent);
}
.product-name {
  font: 600 13px/1.4 var(--f-body);
  letter-spacing: .02em;
  color: var(--white);
  opacity: .9;
}

.headline {
  font: 700 clamp(40px, 5.4vw, 86px)/.94 var(--f-display);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.headline em, .finale-title em {
  font-family: var(--f-serif);
  font-style: italic; font-weight: 400;
  letter-spacing: -.01em;
  color: var(--accent, #fff);
}
.headline .w, .finale-title .w, .hero-title .w {
  display: inline-block; overflow: hidden;
  vertical-align: baseline; padding: .08em .08em .16em; margin: -.08em -.08em -.16em;
}
.headline .w > span, .finale-title .w > span, .hero-title .w > span {
  display: inline-block; will-change: transform;
  transform: translateY(110%);
}

.lead { font: 500 clamp(16px, 1.3vw, 20px)/1.45 var(--f-body); color: var(--white); }
.body { color: var(--text-soft); max-width: 44ch; }
.closing {
  font: 400 italic clamp(18px, 1.6vw, 24px)/1.25 var(--f-serif);
  color: var(--white);
  display: flex; align-items: center; gap: 14px;
}
.closing::before {
  content: ""; width: 36px; height: 1px; flex: none;
  background: var(--accent, #fff);
}
.side-right .copy { text-align: right; justify-items: end; }
.side-right .closing { flex-direction: row-reverse; }
.side-right .body { margin-left: auto; }

/* chips & pills */
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.side-right .chips { justify-content: flex-end; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 32px; padding: 0 14px; border-radius: 999px;
  font: 500 12.5px var(--f-body); color: #fff;
  background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd);
}
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); flex: none; }

.actions { display: flex; gap: 10px; margin-top: 2px; }
.side-right .actions { justify-content: flex-end; }
.explore-btn {
  background: rgba(255, 255, 255, .14) !important;
  border-color: rgba(255, 255, 255, .32) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
}
.explore-btn:hover {
  background: rgba(255, 255, 255, .25) !important;
  border-color: rgba(255, 255, 255, .6) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(31, 75, 255, .4);
}

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 26px; border-radius: 999px;
  font: 600 14px var(--f-body); color: #fff; text-decoration: none;
  border: 0; cursor: pointer;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, background .35s;
}
.pill.solid {
  background: linear-gradient(135deg, var(--nivea-blue-bright), var(--nivea-blue));
  box-shadow: 0 14px 34px rgba(0, 40, 170, .45), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.pill.solid:hover { transform: translateY(-2px); box-shadow: 0 20px 44px rgba(31, 75, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .3); }
.pill.glass {
  background: var(--glass-strong);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-brd);
}
.pill.glass:hover { background: rgba(255, 255, 255, .24); transform: translateY(-2px); }
.pill .arrow { transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.pill:hover .arrow { transform: translateX(4px); }
.pill.sm { height: 40px; padding: 0 18px; font-size: 13px; }

/* ============ INTRO ============ */
.intro .copy { width: min(640px, 52vw); gap: 22px; }
.hero-title {
  font: 800 clamp(52px, 8.2vw, 140px)/.86 var(--f-display);
  letter-spacing: -.06em;
}
.hero-title .serif {
  display: block;
  font: 400 italic clamp(32px, 4.4vw, 76px)/1 var(--f-serif);
  letter-spacing: -.01em;
  color: rgba(255, 255, 255, .9);
  margin-top: .25em;
}
.hint {
  position: absolute; left: 0; right: 0; margin-inline: auto; width: max-content; bottom: 34px;
  display: grid; gap: 12px; justify-items: center;
}
.hint i {
  width: 1px; height: 52px; background: #fff; opacity: .7;
  animation: drip 2s cubic-bezier(.6, 0, .3, 1) infinite;
}
@keyframes drip {
  0% { clip-path: inset(0 0 100% 0); }
  50% { clip-path: inset(0); }
  100% { clip-path: inset(100% 0 0); }
}
.corner { position: absolute; bottom: 34px; }
.corner.l { left: var(--pad); }
.corner.r { right: var(--pad); }

/* ============ FINALE ============ */
.finale {
  position: absolute; inset: 0;
  display: grid; place-content: center; justify-items: center;
  gap: 22px; text-align: center; padding: 0 var(--pad);
}
.finale-title {
  font: 700 clamp(48px, 7.4vw, 124px)/.9 var(--f-display);
  letter-spacing: -.05em;
  max-width: 13ch;
  text-wrap: balance;
}
.finale .body { max-width: 46ch; text-align: center; }
.finale .chips { justify-content: center; max-width: 720px; }
.finale .chip { cursor: pointer; transition: background .3s, transform .3s; }
.finale .chip:hover { background: rgba(255, 255, 255, .22); transform: translateY(-2px); }
.foot {
  position: absolute; inset: auto 0 0 0;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 26px var(--pad);
  font: 400 12px var(--f-body); color: var(--text-mute);
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.foot strong { font-weight: 600; color: #fff; letter-spacing: .02em; }

/* ============ NAV ============ */
#nav {
  position: fixed; inset: 0 0 auto 0; z-index: 6;
  height: 76px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad);
  transition: background .5s, backdrop-filter .5s, height .5s;
}
#nav.scrolled {
  height: 64px;
  background: rgba(6, 12, 28, .36);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo svg { width: 38px; height: 38px; filter: drop-shadow(0 6px 14px rgba(0, 40, 170, .45)); }
.logo span { font: 700 15px var(--f-display); letter-spacing: .02em; }
#nav nav { display: flex; gap: 34px; }
#nav nav a {
  position: relative;
  font: 500 13px var(--f-body); color: rgba(255, 255, 255, .85); text-decoration: none;
  transition: color .3s;
}
#nav nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: #fff; transform: scaleX(0); transform-origin: right;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1);
}
#nav nav a:hover { color: #fff; }
#nav nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-right { display: flex; align-items: center; gap: 12px; }
.dev-contact-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 14px;
  font: 500 12.5px var(--f-body);
  color: rgba(255, 255, 255, .84);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .3s, border-color .3s, color .3s, transform .2s, box-shadow .3s;
}
.dev-contact-btn:hover {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .4);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 20, 60, .3);
}
.dev-contact-btn:active { transform: translateY(0); }
.dev-icon { flex: none; opacity: .82; transition: opacity .3s; }
.dev-contact-btn:hover .dev-icon { opacity: 1; }
.dev-text-full { display: inline; }
.dev-text-short { display: none; }

.cart-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .26);
  cursor: pointer;
  transition: background .3s, transform .2s, border-color .3s;
}
.cart-btn:hover { background: rgba(255, 255, 255, .22); transform: translateY(-1px); }
.bag-icon { flex: none; }
.cart-badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--nivea-blue-bright); color: #fff;
  font: 700 10.5px var(--f-body);
  box-shadow: 0 0 10px rgba(31, 75, 255, 0.6);
  transition: transform .3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-badge.pulse { transform: scale(1.35); }

/* ============ RAIL ============ */
#rail {
  position: fixed; z-index: 6;
  right: 30px; top: 50%; transform: translateY(-50%);
  display: grid; gap: 16px; justify-items: center;
  transition: opacity .6s;
}
#rail .track {
  position: absolute; top: -28px; bottom: -28px; left: 50%; width: 1px;
  background: rgba(255, 255, 255, .18); transform: translateX(-50%);
}
#rail .fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: #fff; transform-origin: 50% 0; transform: scaleY(0);
}
#rail button {
  position: relative;
  width: 10px; height: 10px; border-radius: 50%; padding: 0;
  border: 0; background: var(--dot); cursor: pointer;
  opacity: .55; transition: opacity .4s, transform .4s cubic-bezier(.2, .8, .2, 1), box-shadow .4s;
  touch-action: manipulation;
}
#rail button::before {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 44px; height: 44px;
}
#rail button:hover { opacity: 1; }
#rail button.is-active { opacity: 1; transform: scale(1.5); box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
#rail button span {
  position: absolute; right: 22px; top: 50%; transform: translate(6px, -50%);
  font: 500 10px var(--f-body); letter-spacing: .2em; text-transform: uppercase;
  white-space: nowrap; color: #fff; opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s;
}
#rail button:hover span, #rail button:focus-visible span { opacity: 1; transform: translate(0, -50%); }

/* ============ PRODUCT EXPLORE MODAL ============ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .4s cubic-bezier(.16, 1, .3, 1);
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(3, 8, 20, 0.76);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  cursor: pointer;
}
.modal-card {
  position: relative; z-index: 1;
  width: min(540px, 100%);
  max-height: min(90vh, 760px);
  overflow-y: auto; overscroll-behavior: contain;
  padding: 34px 32px 28px;
  border-radius: 28px;
  background: linear-gradient(145deg, rgba(14, 24, 48, 0.90), rgba(7, 13, 28, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 32px 80px rgba(0, 10, 40, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transform: scale(0.94) translateY(18px);
  transition: transform .45s cubic-bezier(.16, 1, .3, 1);
  display: grid; gap: 20px;
}
.modal-overlay.open .modal-card { transform: scale(1) translateY(0); }
.modal-close {
  position: absolute; top: 22px; right: 22px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: #fff; display: grid; place-items: center;
  cursor: pointer; transition: background .3s, transform .2s;
}
.modal-close:hover { background: rgba(255, 255, 255, 0.25); transform: rotate(90deg); }
.modal-header { display: grid; gap: 8px; padding-right: 36px; }
.modal-title {
  font: 700 clamp(24px, 3.2vw, 32px)/1.15 var(--f-display);
  letter-spacing: -.03em;
}
.modal-subtitle {
  font: 500 14px/1.4 var(--f-body);
  color: rgba(255, 255, 255, 0.78);
}
.modal-body { display: grid; gap: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 18px; }
.modal-section h4 {
  font: 600 11px/1 var(--f-body);
  text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--text-mute); margin-bottom: 6px;
}
.modal-section p {
  font: 400 14px/1.55 var(--f-body);
  color: var(--text-soft);
}
.modal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.modal-tag {
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font: 500 11.5px var(--f-body); color: rgba(255, 255, 255, 0.9);
}
.modal-meta {
  display: flex; gap: 24px; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-spec { display: grid; gap: 2px; }
.modal-spec .label { font: 500 11px var(--f-body); color: var(--text-mute); text-transform: uppercase; letter-spacing: .1em; }
.modal-spec .value { font: 600 15px var(--f-body); color: #fff; }
.modal-spec .value.price { font: 700 20px var(--f-display); color: #7FA2FF; }

.modal-footer {
  display: flex; gap: 14px; align-items: center;
  padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.qty-selector {
  display: inline-flex; align-items: center;
  height: 48px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0 6px;
}
.qty-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: transparent; color: #fff;
  font: 600 18px var(--f-body); cursor: pointer;
  display: grid; place-items: center; transition: background .2s;
}
.qty-btn:hover { background: rgba(255, 255, 255, 0.16); }
.qty-num {
  width: 32px; text-align: center;
  font: 600 15px var(--f-body);
}
.add-to-cart-btn {
  flex: 1; justify-content: center;
}
.modal-nav-links {
  display: flex; justify-content: space-between;
  padding-top: 6px; font-size: 12.5px;
}
.link-btn {
  background: transparent; border: 0; color: var(--text-mute);
  font: 500 12.5px var(--f-body); cursor: pointer; padding: 4px 0;
  transition: color .2s;
}
.link-btn:hover { color: #fff; text-decoration: underline; }

/* ============ CART DRAWER ============ */
.cart-drawer-overlay {
  position: fixed; inset: 0; z-index: 60;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.cart-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(2, 6, 16, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}
.drawer-card {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw);
  background: linear-gradient(180deg, rgba(11, 20, 40, 0.96), rgba(5, 10, 22, 0.98));
  border-left: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.16, 1, .3, 1);
  padding: 28px 24px 24px;
}
.cart-drawer-overlay.open .drawer-card { transform: translateX(0); }
.drawer-header {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.drawer-title-group { display: flex; align-items: baseline; gap: 10px; }
.drawer-title-group h3 { font: 700 22px var(--f-display); letter-spacing: -.02em; }
.item-count-label { font: 500 13px var(--f-body); color: var(--text-mute); }
.drawer-close {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08); color: #fff;
  display: grid; place-items: center; cursor: pointer;
  transition: background .2s;
}
.drawer-close:hover { background: rgba(255, 255, 255, 0.2); }

/* shipping meter */
.shipping-meter {
  padding: 14px 0 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.meter-label { font: 500 12px var(--f-body); color: rgba(255, 255, 255, 0.85); margin-bottom: 8px; }
.meter-bar { width: 100%; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.meter-fill { width: 0%; height: 100%; background: linear-gradient(90deg, #1F4BFF, #7FA2FF); transition: width .5s ease; }

/* items */
.drawer-items {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 0; display: grid; gap: 14px; align-content: start;
}
.cart-empty {
  display: grid; place-items: center; text-align: center;
  padding: 60px 16px; gap: 12px; color: var(--text-mute);
}
.cart-empty-icon { font-size: 38px; opacity: 0.6; }
.cart-item-row {
  display: flex; gap: 14px; align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 14px; border-radius: 16px;
}
.cart-item-dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  box-shadow: 0 0 10px currentColor;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-title { font: 600 14px var(--f-body); color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-spec { font: 400 12px var(--f-body); color: var(--text-mute); margin-top: 2px; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.qty-mini-btn {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent; color: #fff;
  font: 600 13px var(--f-body); display: grid; place-items: center; cursor: pointer;
}
.qty-mini-btn:hover { background: rgba(255, 255, 255, 0.2); }
.cart-item-price-col { text-align: right; display: grid; gap: 6px; }
.cart-item-price { font: 700 14.5px var(--f-display); color: #fff; }
.cart-item-remove {
  font: 500 11px var(--f-body); color: rgba(255, 255, 255, 0.45);
  background: none; border: 0; cursor: pointer; text-decoration: underline;
}
.cart-item-remove:hover { color: #ff6b6b; }

/* drawer footer */
.drawer-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 18px; display: grid; gap: 12px;
}
.subtotal-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font: 600 16px var(--f-body); color: rgba(255, 255, 255, 0.9);
}
.subtotal-val { font: 700 22px var(--f-display); color: #fff; }
.tax-note { font: 400 11.5px var(--f-body); color: var(--text-mute); }
.w-full { width: 100%; justify-content: center; }

/* toast */
.toast-popup {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: rgba(14, 25, 52, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  padding: 12px 24px; border-radius: 999px;
  font: 500 13.5px var(--f-body); color: #fff;
  display: flex; align-items: center; gap: 10px;
  z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity .35s, transform .35s cubic-bezier(.16, 1, .3, 1);
}
.toast-popup.show {
  opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
}

/* ============ FOCUS ============ */
a:focus-visible, button:focus-visible {
  outline: 2px solid #fff; outline-offset: 4px; border-radius: 999px;
}
#nav nav a:focus-visible { border-radius: 4px; }

/* ============ RESPONSIVE BREAKPOINTS ============ */

/* Tablets & Small Laptops (769px to 1080px) */
@media (max-width: 1080px) and (min-width: 769px) {
  :root { --pad: 32px; }
  #nav {
    height: 68px;
    padding: 0 24px;
  }
  #nav nav { gap: 20px; }
  #nav nav a { font-size: 12.5px; }
  .dev-contact-btn {
    height: 36px;
    padding: 0 11px;
    font-size: 12px;
  }
  .dev-text-full { display: none; }
  .dev-text-short { display: inline; }
  .copy { width: min(440px, 44vw); gap: 14px; }
  .intro .copy { width: min(560px, 58vw); }
  .headline { font-size: clamp(34px, 4.8vw, 64px); }
  #rail { right: 18px; }
  #scrim-l { background: linear-gradient(90deg, rgba(4, 10, 24, .78) 0%, rgba(4, 10, 24, .45) 38%, rgba(4, 10, 24, 0) 65%); }
  #scrim-r { background: linear-gradient(270deg, rgba(4, 10, 24, .78) 0%, rgba(4, 10, 24, .45) 38%, rgba(4, 10, 24, 0) 65%); }
}

/* Mobile & Tablets (<= 768px) */
@media (max-width: 768px) {
  :root { --pad: 16px; }

  /* Fixed Navigation Header with Safe-Area Notch Insets */
  #nav {
    height: calc(58px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 16px)) 0 max(16px, env(safe-area-inset-left, 16px));
  }
  #nav.scrolled {
    height: calc(52px + env(safe-area-inset-top, 0px));
    background: rgba(4, 9, 22, 0.72);
  }
  #nav nav { display: none; }
  #nav .logo svg { width: 32px; height: 32px; }
  #nav .logo span { font-size: 14px; }
  .nav-right { gap: 8px; }
  .bag-text { display: none; }
  .cart-btn {
    height: 36px;
    padding: 0 12px;
    gap: 6px;
  }
  .dev-contact-btn {
    height: 36px;
    padding: 0 10px;
    font-size: 11.5px;
    gap: 5px;
  }
  .dev-text-full { display: none; }
  .dev-text-short { display: inline; }
  #nav-shop {
    height: 36px;
    padding: 0 16px;
    font-size: 12.5px;
  }

  /* Right Floating Product Rail */
  #rail {
    right: max(6px, env(safe-area-inset-right, 6px));
    gap: 12px;
  }
  #rail button span { display: none; }
  #rail button {
    width: 8px;
    height: 8px;
  }
  #rail button.is-active {
    transform: scale(1.6);
  }

  /* Mobile Scrim Layer */
  #scrim-bottom {
    display: block;
    background: linear-gradient(0deg, rgba(2, 6, 16, 0.96) 0%, rgba(2, 6, 16, 0.78) 32%, rgba(2, 6, 16, 0.38) 48%, rgba(2, 6, 16, 0) 62%);
    opacity: 1;
  }
  #scrim-l, #scrim-r {
    opacity: 0 !important;
  }

  /* Product Story Scene Copy Stack */
  .copy {
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom, 14px)) !important;
    transform: none;
    left: max(16px, env(safe-area-inset-left, 16px)) !important;
    right: max(40px, calc(env(safe-area-inset-right, 16px) + 26px)) !important;
    width: auto !important;
    max-width: none !important;
    text-align: left !important;
    justify-items: start !important;
    gap: 6px;
  }
  .side-right .copy {
    text-align: left !important;
    justify-items: start !important;
  }
  .side-right .chips { justify-content: flex-start; }
  .side-right .actions { justify-content: flex-start; }
  .side-right .closing { flex-direction: row; }
  .side-right .body { margin-left: 0 !important; }

  .micro { font-size: 10.5px; letter-spacing: .2em; gap: 8px; }
  .micro i { width: 7px; height: 7px; }

  .product-name {
    font-size: 11px;
    letter-spacing: .05em;
    opacity: .88;
  }

  .headline {
    font-size: clamp(23px, 6.4vw, 36px);
    line-height: 1.15;
    letter-spacing: -.035em;
    text-wrap: balance;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .lead {
    font-size: 13px;
    line-height: 1.35;
    max-width: 32ch;
  }

  .body { display: none; }

  .chips {
    gap: 5px;
    margin-top: 2px;
    max-width: 100%;
  }
  .chip {
    height: 26px;
    padding: 0 10px;
    font-size: 11px;
    gap: 6px;
  }
  @media (max-height: 720px) {
    .chips .chip:nth-child(n+3) { display: none; }
  }

  .actions { margin-top: 4px; }
  .explore-btn {
    height: 38px;
    padding: 0 18px;
    font-size: 12.5px;
  }

  .closing { display: none; }

  /* Intro Section */
  .intro .copy {
    bottom: max(88px, calc(env(safe-area-inset-bottom, 16px) + 72px)) !important;
    right: max(16px, env(safe-area-inset-right, 16px)) !important;
    gap: 10px;
  }
  .hero-title {
    font-size: clamp(34px, 9.5vw, 50px);
    line-height: .92;
    letter-spacing: -.05em;
  }
  .hero-title .serif {
    font-size: clamp(22px, 5.8vw, 32px);
    margin-top: .2em;
  }
  .intro .body {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-soft);
    max-width: 34ch;
  }
  .hint {
    bottom: max(16px, env(safe-area-inset-bottom, 14px));
    gap: 6px;
  }
  .hint i {
    height: 22px;
  }
  .corner { display: none; }

  /* Big Words Transition */
  .bigword {
    font-size: clamp(48px, 18vw, 92px);
    max-width: 88vw;
    text-align: center;
    mix-blend-mode: normal !important;
    color: rgba(255, 255, 255, 0.28);
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.45);
  }

  /* Finale Scene */
  .finale {
    gap: 14px;
    padding: calc(64px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    place-content: start center;
  }
  .finale-title {
    font-size: clamp(28px, 7.8vw, 44px);
    line-height: .96;
  }
  .finale .body {
    display: block;
    font-size: 13.5px;
    line-height: 1.4;
    max-width: 36ch;
  }
  .finale .chips {
    gap: 6px;
    max-width: 340px;
    justify-content: center;
  }
  .finale .chip {
    height: 28px;
    padding: 0 10px;
    font-size: 11.5px;
  }
  #cta-find {
    height: 42px;
    padding: 0 20px;
    font-size: 13px;
  }
  .foot {
    position: static;
    margin-top: 18px;
    width: 100%;
    max-width: 480px;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    text-align: center;
    font-size: 11px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Product Modal */
  .modal-overlay {
    padding: 12px;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 14px));
  }
  .modal-card {
    width: min(500px, 100%);
    max-height: min(88dvh, 88vh);
    padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    border-radius: 22px;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
  }
  .modal-close {
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
  }
  .modal-header {
    padding-right: 38px;
    gap: 6px;
  }
  .modal-title {
    font-size: clamp(19px, 5.2vw, 24px);
    line-height: 1.15;
  }
  .modal-subtitle {
    font-size: 12.5px;
    line-height: 1.35;
  }
  .modal-body {
    gap: 12px;
    padding-top: 14px;
  }
  .modal-section h4 {
    font-size: 10.5px;
    margin-bottom: 4px;
  }
  .modal-section p {
    font-size: 12.5px;
    line-height: 1.5;
  }
  .modal-tags { gap: 6px; }
  .modal-tag {
    height: 26px;
    padding: 0 10px;
    font-size: 11px;
  }
  .modal-meta {
    gap: 18px;
    padding-top: 10px;
  }
  .modal-spec .label { font-size: 10px; }
  .modal-spec .value { font-size: 14px; }
  .modal-spec .value.price { font-size: 18px; }
  .modal-footer {
    gap: 10px;
    padding-top: 12px;
  }
  .qty-selector {
    height: 42px;
    padding: 0 4px;
    flex-shrink: 0;
  }
  .qty-btn {
    width: 30px;
    height: 30px;
    font-size: 16px;
  }
  .qty-num {
    width: 26px;
    font-size: 14px;
  }
  .add-to-cart-btn {
    height: 42px;
    font-size: 12.5px;
    padding: 0 14px;
    white-space: nowrap;
  }
  .modal-nav-links {
    padding-top: 4px;
    font-size: 11.5px;
  }

  /* Cart Drawer */
  .drawer-card {
    width: 100vw;
    height: 100%;
    height: 100dvh;
    border-left: 0;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 10px));
    border-radius: 0;
  }
  .drawer-header {
    padding-bottom: 14px;
  }
  .drawer-title-group h3 { font-size: 19px; }
  .drawer-close {
    width: 38px;
    height: 38px;
  }
  .shipping-meter { padding: 10px 0 12px; }
  .meter-label { font-size: 11.5px; }
  .drawer-items {
    padding: 12px 0;
    gap: 10px;
  }
  .cart-item-row {
    padding: 10px 12px;
    gap: 10px;
    border-radius: 14px;
  }
  .cart-item-title { font-size: 13.5px; }
  .cart-item-spec { font-size: 11.5px; }
  .cart-item-qty {
    gap: 6px;
    margin-top: 6px;
  }
  .qty-mini-btn {
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
  .cart-item-price { font-size: 13.5px; }
  .drawer-footer {
    padding-top: 14px;
    gap: 10px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .subtotal-row { font-size: 15px; }
  .subtotal-val { font-size: 20px; }
  .checkout-btn {
    height: 46px;
    font-size: 13.5px;
  }
  .continue-btn {
    height: 38px;
    font-size: 12.5px;
  }

  /* Toast Notification */
  .toast-popup {
    bottom: max(18px, calc(env(safe-area-inset-bottom, 12px) + 12px));
    max-width: calc(100vw - 32px);
    padding: 10px 18px;
    font-size: 12.5px;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }
}

/* Very Small Screens (<= 380px width) */
@media (max-width: 380px) {
  .dev-contact-btn {
    padding: 0 9px;
    gap: 0;
  }
  .dev-text-short { display: none; }
  .dev-icon { width: 15px; height: 15px; }
}

/* Extra Small Phones (<= 360px width, e.g. iPhone SE 1st gen, Galaxy Fold) */
@media (max-width: 360px) {
  #nav {
    padding: env(safe-area-inset-top, 0px) 12px 0 12px;
  }
  #nav .logo span { display: none; }
  .dev-contact-btn {
    padding: 0 8px;
    height: 34px;
  }
  #nav-shop {
    padding: 0 12px;
    font-size: 11.5px;
  }
  .headline { font-size: 22px; }
  .lead { font-size: 12px; max-width: 28ch; }
  .chips { display: none; }
  .modal-card { padding: 18px 14px calc(14px + env(safe-area-inset-bottom, 0px)); }
  .add-to-cart-btn { padding: 0 10px; font-size: 11.5px; }
}

/* Landscape Phones & Short Viewports (height <= 520px and orientation landscape) */
@media (max-height: 520px) and (orientation: landscape) {
  #nav {
    height: calc(48px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right, 20px)) 0 max(20px, env(safe-area-inset-left, 20px));
  }
  #nav nav { display: none; }
  .dev-contact-btn {
    height: 32px;
    padding: 0 8px;
    font-size: 11px;
    gap: 5px;
  }
  .dev-text-full { display: none; }
  .dev-text-short { display: inline; }
  .copy {
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    left: max(20px, env(safe-area-inset-left, 20px)) !important;
    right: auto !important;
    width: min(340px, 45vw) !important;
    gap: 6px;
  }
  .side-right .copy {
    left: auto !important;
    right: max(40px, calc(env(safe-area-inset-right, 20px) + 20px)) !important;
  }
  .headline { font-size: clamp(20px, 4vw, 26px); line-height: 1.05; }
  .lead { font-size: 12px; line-height: 1.3; }
  .chips { gap: 4px; }
  .chip { height: 24px; padding: 0 8px; font-size: 10.5px; }
  .explore-btn { height: 32px; padding: 0 14px; font-size: 11.5px; }
  .closing { display: none; }
  .intro .copy {
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    width: min(380px, 50vw) !important;
  }
  .hero-title { font-size: clamp(28px, 6vw, 40px); }
  .hero-title .serif { font-size: clamp(18px, 4vw, 24px); }
  .hint { display: none; }
  .finale {
    padding: calc(52px + env(safe-area-inset-top, 0px)) 20px calc(40px + env(safe-area-inset-bottom, 0px));
  }
  .finale-title { font-size: clamp(24px, 5vw, 36px); }
  .foot { display: none; }
  .modal-card { max-height: 94dvh; padding: 16px 20px; }
  .drawer-card { width: min(380px, 100vw); }
}

@media (prefers-reduced-motion: reduce) {
  .hint i { animation: none; }
}
