/* ==========================================================================
   MAGIC PEN - storefront
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 12px);
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video { max-width: 100%; display: block; }

/* A hidden element is hidden, whatever its class says. */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--glow-soft); color: var(--text-primary); }

:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Film grain: the whole site sits under a very fine tooth ------------- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-3);
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); }

p { margin: 0 0 var(--space-3); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: var(--step-1);
  color: var(--text-secondary);
  max-width: var(--max-text);
  font-weight: 300;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--silver-400);
  margin: 0 0 var(--space-3);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.eyebrow::before {
  content: '';
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-line));
  flex: none;
}

.eyebrow--center { justify-content: center; }
.eyebrow--center::after {
  content: '';
  width: 34px;
  height: 1px;
  background: linear-gradient(270deg, transparent, var(--accent-line));
  flex: none;
}

/* Brushed-silver headline treatment */
.silver {
  background: linear-gradient(
    174deg,
    #ffffff 0%,
    var(--silver-200) 26%,
    var(--silver-400) 52%,
    var(--silver-200) 74%,
    #ffffff 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Inline-block children (the split headline letters) are painted as atomic
   inlines, so they do not contribute to the parent's text clip. Each letter
   therefore carries the same gradient itself. */
.silver .letters span,
.silver span,
.letters.silver span,
.letters.silver .word span {
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Anywhere the clip is unsupported, fall back to solid silver text. */
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .silver,
  .silver span {
    background: none;
    color: var(--silver-100);
  }
}

.muted { color: var(--text-secondary); }
.small { font-size: var(--step--1); }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.wrap {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

.wrap--narrow { width: min(100% - 2.5rem, 820px); }

.section {
  padding-block: var(--space-7);
  position: relative;
}

.section--tight { padding-block: var(--space-6); }

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-5);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.rule {
  height: 1px;
  border: 0;
  margin: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text-primary);
  --btn-border: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0 1.9rem;
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Light sweeps across the button on hover - the brand gesture, quietly */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,0.16) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 700ms var(--ease-out-soft);
  pointer-events: none;
}
.btn:hover::after { transform: translateX(120%); }

.btn--primary {
  --btn-bg: var(--silver-100);
  --btn-fg: var(--ink-1000);
  --btn-border: var(--silver-100);
  box-shadow: 0 0 0 0 var(--glow-soft), 0 16px 40px -18px rgba(207, 224, 255, 0.5);
}
.btn--primary:hover {
  --btn-bg: #ffffff;
  box-shadow: 0 0 30px -6px var(--glow-soft), 0 20px 44px -18px rgba(207, 224, 255, 0.55);
}

.btn--ghost { --btn-border: var(--line-strong); }
.btn--ghost:hover { --btn-border: var(--accent-line); background: var(--surface); }

.btn--quiet {
  --btn-border: transparent;
  min-height: 44px;
  padding: 0 1rem;
  color: var(--text-secondary);
}
.btn--quiet:hover { color: var(--text-primary); }

.btn--block { width: 100%; }
.btn--sm { min-height: 42px; padding: 0 1.2rem; font-size: 0.68rem; }
.btn--lg { min-height: 60px; padding: 0 2.4rem; }

.btn[disabled], .btn[aria-disabled='true'] {
  opacity: 0.4;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.link-underline {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.link-underline:hover { border-color: var(--glow); color: var(--glow); }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}

.header.is-stuck {
  background: rgba(7, 7, 10, 0.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}

.header__inner {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.32rem;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.logo__mark { width: 26px; height: 26px; flex: none; }
.logo__tm {
  font-family: var(--font-sans);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  vertical-align: super;
  color: var(--silver-400);
}

.nav { display: flex; align-items: center; gap: var(--space-4); }

.nav__links {
  display: flex;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-secondary);
  position: relative;
  padding-block: 6px;
  transition: color var(--dur-fast) var(--ease);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--glow);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--ease);
}
.nav__link:hover { color: var(--text-primary); }
.nav__link:hover::after { transform: scaleX(1); transform-origin: left; }

.header__actions { display: flex; align-items: center; gap: var(--space-2); }

.cart-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.05rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.cart-button:hover { border-color: var(--accent-line); background: var(--surface); }

.cart-button__count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--silver-100);
  color: var(--ink-1000);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0;
  display: grid;
  place-items: center;
}
.cart-button__count[hidden] { display: none; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 16px; height: 1px;
  background: var(--text-primary);
  position: relative;
  transition: background-color var(--dur-fast) var(--ease);
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 16px; height: 1px;
  background: var(--text-primary);
  transition: transform var(--dur) var(--ease);
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

.nav-toggle[aria-expanded='true'] span { background: transparent; }
.nav-toggle[aria-expanded='true'] span::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] span::after { transform: translateY(-5px) rotate(-45deg); }

/* --- Mobile sheet -------------------------------------------------------- */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(3, 3, 5, 0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: calc(var(--header-height) + var(--space-4)) var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; }

.mobile-nav a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 300;
  padding-block: 0.45rem;
  border-bottom: 1px solid var(--line);
  color: var(--text-primary);
}
.mobile-nav a:last-of-type { border-bottom: 0; }
.mobile-nav__foot { margin-top: auto; }

/* --------------------------------------------------------------------------
   The reveal beam - hidden text becomes legible only inside the light
   -------------------------------------------------------------------------- */

.reveal-surface {
  position: relative;
  --mx: 50%;
  --my: 50%;
  --beam: 190px;
}

.reveal-text {
  color: var(--glow);
  -webkit-mask-image: radial-gradient(circle var(--beam) at var(--mx) var(--my), #000 0%, rgba(0,0,0,0.65) 45%, transparent 78%);
  mask-image: radial-gradient(circle var(--beam) at var(--mx) var(--my), #000 0%, rgba(0,0,0,0.65) 45%, transparent 78%);
  text-shadow: 0 0 22px var(--glow-soft);
  transition: opacity var(--dur) var(--ease);
}

.reveal-surface.is-revealed .reveal-text {
  -webkit-mask-image: none;
  mask-image: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-text { -webkit-mask-image: none; mask-image: none; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-top: calc(var(--header-height) + var(--space-5));
  padding-bottom: var(--space-6);
  overflow: hidden;
  isolation: isolate;
}

.hero__glow {
  position: absolute;
  z-index: -2;
  width: 900px; height: 900px;
  top: -22%; right: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(207, 224, 255, 0.10) 0%, rgba(207, 224, 255, 0.04) 35%, transparent 68%);
  filter: blur(24px);
  pointer-events: none;
  animation: drift 22s ease-in-out infinite alternate;
}

.hero__vignette {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, transparent 40%, rgba(3, 3, 5, 0.75) 100%),
    linear-gradient(180deg, transparent 55%, var(--ink-900) 100%);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-40px, 30px, 0) scale(1.08); }
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--space-5);
}

.hero__headline {
  font-size: clamp(2.3rem, 1.1rem + 3.4vw, 4.6rem);
  margin-bottom: var(--space-2);
  line-height: 1.0;
}

.hero__sub {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-style: italic;
  font-weight: 300;
  color: var(--glow);
  margin: 0 0 var(--space-3);
  text-shadow: 0 0 40px var(--glow-soft);
}

.hero__body {
  max-width: 46ch;
  color: var(--text-secondary);
  font-size: var(--step-1);
  font-weight: 300;
  margin-bottom: var(--space-4);
}

.hero__ctas { gap: var(--space-2); }

.hero__meta {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--step--1);
  color: var(--text-muted);
  align-items: center;
}

.hero__meta span { display: inline-flex; align-items: center; gap: 0.45rem; }

.hero__stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 480px;
}

.hero__pen {
  width: min(100%, 460px);
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.9));
  animation: float 14s ease-in-out infinite;
  transform-origin: center;
}

@keyframes float {
  0%   { transform: translateY(0) rotate(0deg); }
  50%  { transform: translateY(-16px) rotate(-1.6deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

.hero__pen-glow {
  position: absolute;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-faint) 0%, transparent 70%);
  filter: blur(30px);
  z-index: -1;
  animation: pulse 7s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.12); }
}

.scroll-cue {
  position: absolute;
  bottom: var(--space-4);
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-cue__line {
  width: 1px; height: 46px;
  background: linear-gradient(180deg, var(--accent-line), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-cue__line::after {
  content: '';
  position: absolute;
  top: -46px; left: 0;
  width: 1px; height: 46px;
  background: linear-gradient(180deg, transparent, var(--glow));
  animation: cue 2.6s ease-in-out infinite;
}
@keyframes cue {
  0%   { transform: translateY(0); opacity: 0; }
  35%  { opacity: 1; }
  100% { transform: translateY(92px); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Scroll-triggered reveal
   -------------------------------------------------------------------------- */

.rise {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 1s var(--ease-out-soft), transform 1s var(--ease-out-soft);
  transition-delay: var(--delay, 0ms);
}
.rise.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; }
}

/* Headline letters resolving out of the dark.
   The text is visible by default and only animates once JS has split it,
   so the headline is never invisible if scripting or animation is absent. */
.letters .word { display: inline-block; white-space: nowrap; }
.letters .word span { display: inline-block; }

.letters.is-ready .word span {
  animation: resolve 1.1s var(--ease-out-soft) both;
  animation-delay: calc(var(--i, 0) * 26ms);
}

@keyframes resolve {
  from { opacity: 0; transform: translateY(0.35em); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .letters.is-ready .word span { animation: none; }
}

/* --------------------------------------------------------------------------
   The demonstration
   -------------------------------------------------------------------------- */

.demo {
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(207, 224, 255, 0.045), transparent 70%),
    var(--ink-850);
  border-block: 1px solid var(--line);
}

.demo__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  grid-template-areas:
    "intro paper"
    "panel paper";
  gap: var(--space-4) var(--space-5);
  align-items: center;
}
.demo__intro { grid-area: intro; }
.demo__panel { grid-area: panel; }
.paper-stage { grid-area: paper; align-self: center; }

.demo__steps { margin-top: 2rem; }

/* Where am I in this? Four dots and a plain "Step 2 of 4", because the
   thing people got stuck on was not knowing there was anything after
   their writing vanished. */
.demo__step-of {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 0.7rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.demo__dots { display: inline-flex; gap: 5px; }
.demo__dots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--silver-600);
  opacity: 0.4;
  transition: opacity var(--dur) var(--ease), background-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.demo__dots i.is-done { opacity: 0.75; }
.demo__dots i.is-on {
  background: var(--glow);
  opacity: 1;
  transform: scale(1.35);
  box-shadow: 0 0 10px var(--glow-soft);
}

.demo__panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  backdrop-filter: blur(8px);
}

.demo__steps {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: grid;
  gap: 0.9rem;
  counter-reset: step;
}
.demo__steps li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  font-size: var(--step--1);
  color: var(--text-muted);
  transition: color var(--dur) var(--ease);
}
.demo__steps li::before {
  counter-increment: step;
  content: counter(step);
  width: 26px; height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.66rem;
  font-variant-numeric: tabular-nums;
  transition: all var(--dur) var(--ease);
}
.demo__steps li.is-active { color: var(--text-primary); }
.demo__steps li.is-active::before {
  border-color: var(--glow);
  color: var(--glow);
  box-shadow: 0 0 18px -4px var(--glow-soft);
}
.demo__steps li.is-done::before {
  background: var(--glow);
  border-color: var(--glow);
  color: var(--ink-1000);
}

/* The paper -------------------------------------------------------------- */
.paper-stage {
  --tilt: -1.4deg;
}

.paper {
  position: relative;
  width: min(100%, 560px);
  aspect-ratio: 4 / 3;
  background: linear-gradient(158deg, #fbf9f3 0%, var(--paper) 45%, var(--paper-shade) 100%);
  border-radius: 3px;
  box-shadow: var(--shadow-paper);
  transform: rotate(var(--tilt));
  overflow: hidden;
  touch-action: none;
  cursor: crosshair;
  transition: transform var(--dur-slow) var(--ease-out-soft);
}

.paper::before {
  /* paper fibre */
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23p)' opacity='0.35'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 3;
}

.paper__lines {
  position: absolute;
  inset: 12% 8%;
  background-image: repeating-linear-gradient(
    180deg,
    transparent 0,
    transparent 43px,
    rgba(42, 39, 35, 0.07) 43px,
    rgba(42, 39, 35, 0.07) 44px
  );
  pointer-events: none;
  z-index: 1;
}

/* Everything written on the sheet is drawn here. */
.paper__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* The light spilling from the cap while it is switched on */
.paper__beam {
  position: absolute;
  left: 0;
  top: 0;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 4;
  background: radial-gradient(circle,
    rgba(226, 214, 255, 0.62) 0%,
    rgba(178, 152, 255, 0.42) 26%,
    rgba(150, 122, 255, 0.20) 48%,
    rgba(140, 115, 255, 0.06) 66%,
    transparent 74%);
  filter: blur(2px);
  transition: opacity var(--dur) var(--ease);
}
.paper.is-lit .paper__beam { opacity: 1; }

/* The pen itself, held at the pointer */
.paper__pen {
  position: absolute;
  left: 0;
  top: 0;
  width: 240px;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.35));
  transition: opacity var(--dur) var(--ease);
}
.paper.is-holding .paper__pen { opacity: 1; }

/* A glow around the cap when the light is on */
.paper.is-lit .paper__pen {
  filter: drop-shadow(0 16px 14px rgba(0, 0, 0, 0.35))
          drop-shadow(0 0 14px rgba(170, 140, 255, 0.55));
}

.paper__hint {
  position: absolute;
  inset: auto 0 7% 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(42, 39, 35, 0.4);
  pointer-events: none;
  z-index: 3;
  transition: opacity var(--dur) var(--ease);
}
.paper.is-open .paper__hint { opacity: 0; }

/* Hide the system cursor while the pen is in hand */
.paper.is-holding { cursor: none; }


/* Demo form */
.demo__field { margin-bottom: var(--space-3); }

.demo__caption {
  margin-top: var(--space-3);
  font-size: var(--step--1);
  color: var(--text-muted);
  font-style: italic;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.demo__prompt {
  min-height: 3em;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: var(--step--1);
}

.demo__type {
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}
.demo__type summary {
  cursor: pointer;
  font-size: var(--step--1);
  color: var(--text-muted);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: color var(--dur-fast) var(--ease);
}
.demo__type summary::-webkit-details-marker { display: none; }
.demo__type summary::before {
  content: '+';
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-size: 0.7rem;
}
.demo__type[open] summary::before { content: '2'; }
.demo__type summary:hover { color: var(--text-primary); }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.field { margin-bottom: var(--space-3); }

.label {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver-400);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.input, .select, .textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.85rem 1.05rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  appearance: none;
}

.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }

.input::placeholder, .textarea::placeholder { color: var(--text-muted); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent-line);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 4px rgba(207, 224, 255, 0.08);
}

.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%238d94a1' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.05rem center;
  padding-right: 2.6rem;
  cursor: pointer;
}
.select option { background: var(--ink-800); color: var(--text-primary); }

.hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.4rem; }

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
  min-height: 52px;
}
.checkbox:hover { border-color: var(--line-strong); background: var(--surface); }
.checkbox input { margin-top: 0.25rem; }

/* Quiet, custom controls - the native ones read as bright white blocks here. */
input[type='checkbox'],
input[type='radio'] {
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  flex: none;
  margin: 0;
  border: 1px solid var(--silver-500);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
input[type='checkbox'] { border-radius: 5px; }
input[type='radio'] { border-radius: 50%; }

input[type='checkbox']:hover,
input[type='radio']:hover { border-color: var(--silver-300); }

input[type='checkbox']::before {
  content: '';
  width: 10px;
  height: 10px;
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease);
  background: var(--ink-1000);
  clip-path: polygon(14% 44%, 0 65%, 39% 100%, 100% 22%, 84% 8%, 39% 70%);
}
input[type='radio']::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  transform: scale(0);
  transition: transform var(--dur-fast) var(--ease);
  background: var(--ink-1000);
}

input[type='checkbox']:checked,
input[type='radio']:checked {
  background: var(--glow);
  border-color: var(--glow);
  box-shadow: 0 0 14px -3px var(--glow-soft);
}
input[type='checkbox']:checked::before,
input[type='radio']:checked::before { transform: scale(1); }

input[type='checkbox']:focus-visible,
input[type='radio']:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.checkbox span { font-size: var(--step--1); color: var(--text-secondary); }
.checkbox strong { color: var(--text-primary); font-weight: 500; display: block; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.honeypot {
  position: absolute !important;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

/* --------------------------------------------------------------------------
   Flash messages
   -------------------------------------------------------------------------- */

.flash-stack {
  position: fixed;
  top: calc(var(--header-height) + 10px);
  right: 20px;
  z-index: 200;
  display: grid;
  gap: 0.6rem;
  width: min(calc(100vw - 40px), 380px);
}

.flash {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: rgba(14, 14, 20, 0.96);
  backdrop-filter: blur(10px);
  font-size: var(--step--1);
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  animation: slide-in var(--dur) var(--ease-out-soft);
}
.flash--success { border-left: 2px solid var(--good); }
.flash--error   { border-left: 2px solid var(--danger); }
.flash--notice  { border-left: 2px solid var(--warning); }

@keyframes slide-in {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: none; }
}

.flash__close {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0 0 0.5rem;
}

/* --------------------------------------------------------------------------
   Video
   -------------------------------------------------------------------------- */

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 70% at 50% 40%, var(--ink-700), var(--ink-1000));
  box-shadow: var(--shadow-lift);
}

.video-frame video, .video-frame iframe {
  width: 100%; height: 100%;
  object-fit: cover;
  border: 0;
  display: block;
}

.video-frame__poster {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.video-frame__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--space-2);
  text-align: center;
  padding: var(--space-4);
  background: linear-gradient(180deg, rgba(3,3,5,0.25), rgba(3,3,5,0.75));
}

.play-button {
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.play-button:hover {
  transform: scale(1.06);
  border-color: var(--glow);
  background: rgba(207, 224, 255, 0.12);
}
.play-button::before {
  content: '';
  width: 0; height: 0;
  margin-left: 5px;
  border-left: 18px solid var(--text-primary);
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
}

.video-frame__ring {
  position: absolute;
  width: 84px; height: 84px;
  border-radius: 50%;
  border: 1px solid var(--glow-soft);
  animation: ripple 3s ease-out infinite;
  pointer-events: none;
}
@keyframes ripple {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.1); opacity: 0; }
}

/* --------------------------------------------------------------------------
   Product slider - photos and video
   -------------------------------------------------------------------------- */

.product {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-5);
  align-items: start;
}

.gallery {
  position: sticky;
  top: calc(var(--header-height) + var(--space-3));
  /* Kept deliberately compact - the pen should not swallow the screen. */
  width: 100%;
  max-width: 440px;
  min-width: 0;
  margin-inline: auto;
}

.slider { width: 100%; min-width: 0; max-width: 100%; }

.slider__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  background:
    radial-gradient(60% 60% at 50% 45%, rgba(207, 224, 255, 0.07), transparent 70%),
    linear-gradient(160deg, var(--ink-700), var(--ink-1000));
  touch-action: pan-y;
}

.slider__track { position: absolute; inset: 0; }

.slider__slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.03);
  transition: opacity 520ms var(--ease-out-soft),
              transform 620ms var(--ease-out-soft),
              visibility 520ms;
}
.slider__slide.is-current {
  opacity: 1;
  visibility: visible;
  transform: none;
  z-index: 2;
}

/* Where the change came from decides which way it drifts in. */
.slider__slide.is-leaving { opacity: 0; transform: scale(0.985); z-index: 1; }
.slider--forward .slider__slide.is-entering { transform: translateX(3%) scale(1.02); }
.slider--back .slider__slide.is-entering { transform: translateX(-3%) scale(1.02); }

.slider__media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7%;
  -webkit-user-drag: none;
  user-select: none;
}
.slider__slide[data-kind="file"] .slider__media,
.slider__slide[data-kind="embed"] .slider__media { padding: 0; object-fit: cover; }

.slider__embed { position: relative; width: 100%; height: 100%; }
.slider__embed iframe { width: 100%; height: 100%; border: 0; display: block; }

.slider__play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(10, 10, 15, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease);
}
.slider__play svg { width: 26px; height: 26px; margin-left: 3px; }
.slider__play:hover {
  transform: scale(1.06);
  border-color: var(--glow);
  background: rgba(207, 224, 255, 0.16);
}

.slider__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: rgba(10, 10, 15, 0.7);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
  pointer-events: none;
}

.slider__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--dur) var(--ease), border-color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease);
}
.slider__arrow svg { width: 18px; height: 18px; }
.slider__arrow--prev { left: 10px; }
.slider__arrow--next { right: 10px; }
.slider:hover .slider__arrow,
.slider__arrow:focus-visible { opacity: 1; }
.slider__arrow:hover { border-color: var(--accent-line); background: rgba(207, 224, 255, 0.14); }

.slider__thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.7rem;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: var(--silver-600) transparent;
}
.slider__thumbs::-webkit-scrollbar { height: 4px; }
.slider__thumbs::-webkit-scrollbar-track { background: transparent; }
.slider__thumbs::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
}
.slider__thumbs::-webkit-scrollbar-thumb:hover { background: var(--silver-600); }

.slider__thumb {
  position: relative;
  flex: none;
  width: 62px;
  height: 62px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--ink-800);
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
  scroll-snap-align: start;
}
.slider__thumb img { width: 100%; height: 100%; object-fit: cover; }
.slider__thumb:hover { opacity: 0.85; }
.slider__thumb.is-active {
  opacity: 1;
  border-color: var(--accent-line);
  transform: translateY(-2px);
}

.slider__thumb-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--silver-400);
}
.slider__thumb-fallback svg { width: 20px; height: 20px; }

.slider__thumb-play {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(7, 7, 10, 0.8);
  display: grid;
  place-items: center;
  color: #fff;
}
.slider__thumb-play svg { width: 10px; height: 10px; margin-left: 1px; }

@media (prefers-reduced-motion: reduce) {
  .slider__slide { transition: opacity 1ms linear; transform: none !important; }
}

.price {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-block: var(--space-2) var(--space-3);
}
.price__now {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: var(--step-3);
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.price__was {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: var(--step-0);
}
.price__save {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--glow);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.7rem;
}

.includes {
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.includes li {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  font-size: var(--step--1);
  color: var(--text-secondary);
}
.includes li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--glow);
  box-shadow: 0 0 10px var(--glow-soft);
  flex: none;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  overflow: hidden;
  height: 52px;
}
.qty button {
  width: 48px; height: 100%;
  background: none;
  border: 0;
  color: var(--text-secondary);
  font-size: 1.15rem;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.qty button:hover { color: var(--text-primary); background: var(--surface); }
.qty input {
  width: 44px;
  height: 100%;
  border: 0;
  background: none;
  color: var(--text-primary);
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: var(--step-0);
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.buy-row {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: var(--space-3);
}

/* --------------------------------------------------------------------------
   Resellers
   -------------------------------------------------------------------------- */

.reseller__card {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: var(--space-5);
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  background:
    radial-gradient(70% 120% at 100% 0%, rgba(207, 224, 255, 0.07), transparent 60%),
    var(--ink-850);
}
.reseller__card h2 { font-size: var(--step-3); }
.reseller__body { color: var(--text-secondary); margin-top: var(--space-3); max-width: 52ch; }
.reseller__body p { margin: 0 0 0.8rem; }
.reseller__min {
  margin-top: var(--space-3);
  font-size: var(--step--1);
  color: var(--text-secondary);
}
.reseller__min strong { color: var(--glow); font-weight: 500; }

.reseller__ways { display: grid; gap: 0.6rem; align-content: start; }
.reseller__ways-title {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--silver-400);
  margin: 0 0 0.2rem;
}
.reseller__way {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
              background-color var(--dur) var(--ease);
}
.reseller__way:hover {
  border-color: var(--accent-line);
  background: var(--ink-800);
  transform: translateY(-2px);
}
.reseller__way-icon {
  width: 34px; height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--glow);
}
.reseller__way-icon svg { width: 17px; height: 17px; }
.reseller__way strong { display: block; font-size: 0.9rem; font-weight: 500; }
.reseller__way span span { font-size: 0.74rem; color: var(--text-muted); }
.reseller__way--whatsapp .reseller__way-icon { color: #4ad07d; border-color: rgba(74, 208, 125, 0.35); }
.reseller__more { font-size: var(--step--1); margin-top: 0.4rem; justify-self: start; }

@media (max-width: 900px) {
  .reseller__card { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: var(--space-4); }
  .reseller__card h2 { font-size: var(--step-2); }
}

/* Buy more, pay less - shown beside the buy button and in the cart. */
.bulk-tiers {
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(207, 224, 255, 0.06), transparent 60%),
    var(--surface);
}
.bulk-tiers__title {
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--glow);
  margin: 0 0 0.7rem;
}
.bulk-tiers ul {
  list-style: none;
  margin: 0 0 0.6rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.bulk-tiers li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--step--1);
  color: var(--text-secondary);
}
.bulk-tiers li strong { color: var(--text-primary); font-weight: 500; white-space: nowrap; }
.bulk-tiers .hint { margin: 0; }

/* "Add 1 more and save N1,200." */
.bulk-nudge {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0 var(--space-2);
  padding: 0.6rem 0.75rem;
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius-sm);
  font-size: var(--step--1);
  color: var(--glow);
  background: rgba(207, 224, 255, 0.04);
}
.bulk-nudge::before { content: '+'; font-weight: 600; opacity: 0.8; }

.stock-line {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--step--1);
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}
.stock-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 12px rgba(55, 196, 139, 0.6);
  flex: none;
}
.stock-dot--low { background: var(--warning); box-shadow: 0 0 12px rgba(224, 166, 60, 0.6); }
.stock-dot--out { background: var(--danger); box-shadow: 0 0 12px rgba(224, 96, 96, 0.6); }

/* --------------------------------------------------------------------------
   Product grid - the shop, and the rest of the range
   -------------------------------------------------------------------------- */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: var(--space-3);
}

.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.product-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.product-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(60% 60% at 50% 45%, rgba(207, 224, 255, 0.06), transparent 70%),
    linear-gradient(160deg, var(--ink-700), var(--ink-1000));
  overflow: hidden;
}
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 9%;
  transition: transform var(--dur-slow) var(--ease-out-soft);
}
.product-card:hover .product-card__media img { transform: scale(1.06); }

.product-card__flag {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent-line);
  background: rgba(10, 10, 15, 0.72);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--glow);
}
.product-card__flag--out { color: var(--danger); border-color: rgba(224, 96, 96, 0.45); }

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: var(--space-3);
  flex: 1;
}

.product-card__name {
  font-family: var(--font-display);
  font-size: var(--step-1);
  margin: 0;
  line-height: 1.2;
}
.product-card__name a { transition: color var(--dur-fast) var(--ease); }
.product-card__name a:hover { color: var(--glow); }

.product-card__tagline {
  font-size: var(--step--1);
  color: var(--text-secondary);
  margin: 0;
}

.product-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: auto;
  padding-top: 0.6rem;
  flex-wrap: wrap;
}

.product-card__price {
  font-size: var(--step-1);
  color: var(--text-primary);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.product-card__was {
  font-size: var(--step--1);
  color: var(--text-muted);
  text-decoration: line-through;
}

@media (max-width: 760px) {
  .product-card__foot .btn { width: auto; }
}

/* --------------------------------------------------------------------------
   Features
   -------------------------------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (min-width: 1000px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .features { grid-template-columns: 1fr; }
}

.feature {
  background: var(--ink-900);
  padding: var(--space-4);
  transition: background-color var(--dur) var(--ease);
  position: relative;
}
.feature:hover { background: var(--ink-800); }

.feature__icon {
  width: 34px; height: 34px;
  margin-bottom: var(--space-3);
  color: var(--glow);
  opacity: 0.85;
}

.feature h3 {
  font-family: var(--font-sans);
  font-size: 0.94rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.feature p {
  font-size: var(--step--1);
  color: var(--text-secondary);
  margin: 0;
}

/* --------------------------------------------------------------------------
   Urgency
   -------------------------------------------------------------------------- */

.urgency {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(207, 224, 255, 0.07), transparent 65%),
    var(--ink-850);
  position: relative;
  overflow: hidden;
}

.urgency__count {
  font-family: var(--font-sans);
  font-weight: 200;
  font-size: var(--step-4);
  color: var(--glow);
  text-shadow: 0 0 50px var(--glow-soft);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.urgency__bar {
  width: min(100%, 420px);
  height: 3px;
  margin: var(--space-3) auto 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.urgency__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--glow), var(--silver-100));
  border-radius: var(--radius-pill);
  box-shadow: 0 0 16px var(--glow-soft);
}

.sold-out {
  font-family: var(--font-display);
  font-size: var(--step-4);
  color: var(--danger);
  letter-spacing: 0.06em;
}

/* --------------------------------------------------------------------------
   Gift
   -------------------------------------------------------------------------- */

.gift {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}

.gift__card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background:
    linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
  position: relative;
  overflow: hidden;
}

.gift__ribbon {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px)),
    linear-gradient(0deg, transparent calc(50% - 1px), var(--line) 50%, transparent calc(50% + 1px));
}

.gift__list {
  list-style: none;
  margin: var(--space-3) 0 0;
  padding: 0;
  display: grid;
  gap: 0.8rem;
  position: relative;
}
.gift__list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: var(--step--1);
  color: var(--text-secondary);
}
.gift__list li strong { color: var(--text-primary); font-weight: 500; }

/* --------------------------------------------------------------------------
   Reviews
   -------------------------------------------------------------------------- */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: var(--space-3);
}

.review {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
  background: var(--surface);
  display: grid;
  gap: 0.8rem;
  align-content: start;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.review:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.review--featured { border-color: var(--accent-line); }

.review__head { display: flex; align-items: center; gap: 0.75rem; }

.review__avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--silver-600), var(--ink-600));
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--silver-200);
  flex: none;
}

.review__name { font-weight: 500; font-size: 0.92rem; }
.review__meta { font-size: 0.72rem; color: var(--text-muted); }

.review__photo {
  border-radius: var(--radius-sm);
  max-height: 220px;
  width: 100%;
  object-fit: cover;
}

.stars { display: inline-flex; gap: 2px; color: var(--glow); }
.stars svg { width: 15px; height: 15px; }
.stars--muted { color: var(--silver-600); }

.rating-input {
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
}
.rating-input input { position: absolute; opacity: 0; width: 0; height: 0; }
.rating-input label {
  cursor: pointer;
  color: var(--silver-600);
  transition: color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  line-height: 1;
}
.rating-input label svg { width: 26px; height: 26px; display: block; }
.rating-input input:checked ~ label,
.rating-input label:hover,
.rating-input label:hover ~ label { color: var(--glow); }
.rating-input label:hover { transform: scale(1.12); }
.rating-input input:focus-visible + label { outline: 2px solid var(--glow); outline-offset: 3px; }

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq { border-top: 1px solid var(--line); }

.faq__item { border-bottom: 1px solid var(--line); }

.faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 1.35rem 0;
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 400;
  color: var(--text-primary);
  transition: color var(--dur-fast) var(--ease);
}
.faq__q:hover { color: var(--glow); }

.faq__icon {
  width: 22px; height: 22px;
  flex: none;
  position: relative;
}
.faq__icon::before, .faq__icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.faq__icon::before { top: 50%; left: 0; width: 100%; height: 1px; }
.faq__icon::after  { left: 50%; top: 0; height: 100%; width: 1px; }
.faq__q[aria-expanded='true'] .faq__icon::after { transform: rotate(90deg); opacity: 0; }

.faq__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur) var(--ease);
}
.faq__a > div { overflow: hidden; }
.faq__item.is-open .faq__a { grid-template-rows: 1fr; }
.faq__a p {
  color: var(--text-secondary);
  max-width: var(--max-text);
  padding-bottom: 1.35rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Trust
   -------------------------------------------------------------------------- */

.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
}

.trust__item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.trust__item svg { width: 22px; height: 22px; color: var(--glow); flex: none; margin-top: 2px; }
.trust__item p { font-size: var(--step--1); color: var(--text-secondary); margin: 0; }
.trust__item strong { display: block; color: var(--text-primary); font-weight: 500; font-size: 0.9rem; margin-bottom: 0.2rem; }

.pay-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: var(--space-3);
}
.pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-6) var(--space-4);
  background: var(--ink-1000);
  margin-top: var(--space-6);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.footer h4 {
  font-family: var(--font-sans);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--silver-400);
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.65rem; }
.footer a { color: var(--text-secondary); font-size: var(--step--1); transition: color var(--dur-fast) var(--ease); }
.footer a:hover { color: var(--glow); }

.footer__tagline {
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  max-width: 34ch;
  margin-top: var(--space-2);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.socials { display: flex; gap: 0.75rem; }
.socials a {
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.socials a:hover { border-color: var(--accent-line); color: var(--glow); }
.socials svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   Cart drawer
   -------------------------------------------------------------------------- */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(3, 3, 5, 0.72);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  z-index: 151;
  width: min(100%, 440px);
  height: 100svh;
  background: var(--ink-850);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  transition: transform var(--dur) var(--ease-out-soft);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lift);
}
.drawer.is-open { transform: none; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--line);
  flex: none;
}
.drawer__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
}
.drawer__close {
  width: 42px; height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.drawer__close:hover { border-color: var(--line-strong); color: var(--text-primary); }

/* The list of items gets whatever the head and foot do not need, and it is
   the part that scrolls. min-height:0 is what lets a flex child shrink far
   enough for its own scrollbar to appear. */
.drawer__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-3) var(--space-4);
}

/* The foot is kept small on purpose - it used to push the items into a
   sliver on shorter screens. The cap is a last resort for very short
   windows; normally the foot is well under it and never scrolls. */
.drawer__foot {
  flex: 0 0 auto;
  max-height: 58vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--line);
  padding: var(--space-3) var(--space-4);
}

.coupon-toggle {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0 0 var(--space-3);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.coupon-toggle:hover { color: var(--text-primary); }
.coupon-toggle::after {
  content: '';
  display: inline-block;
  width: 0.42rem; height: 0.42rem;
  margin-left: 0.45rem;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform var(--dur-fast) var(--ease);
}
.coupon-toggle[aria-expanded="true"]::after { transform: translateY(1px) rotate(-135deg); }

.drawer__foot .coupon-row { margin-bottom: var(--space-3); }
.drawer__foot .totals { gap: 0.45rem; margin-bottom: var(--space-3); }
.drawer__continue {
  display: block;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.35rem 0;
  background: none;
  border: 0;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease);
}
.drawer__continue:hover { color: var(--text-primary); }

/* The drawer draws its own line. It is a narrow column at every screen
   size, so the name and total share the top row and the stepper shares the
   bottom row with Remove - two rows instead of four, and nothing collides.
   The full cart page keeps its own roomier layout. */
.drawer-line {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: var(--space-2);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.drawer-line:last-child { border-bottom: 0; }

.drawer-line__img {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--ink-800);
  object-fit: contain;
  padding: 4px;
}
.drawer-line__main { min-width: 0; }
.drawer-line__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
}
.drawer-line__name {
  font-size: 0.84rem;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}
.drawer-line__total {
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: none;
}
.drawer-line__price { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }
.drawer-line__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-top: 0.45rem;
}
.drawer-line__controls .qty--sm { flex: none; }
.drawer-line__remove {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0.4rem 0;
  flex: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.drawer-line__remove:hover { color: var(--danger); }

/* Short windows - laptops at 100% zoom, phones in landscape. Everything
   loses a few pixels so the items keep the room they need. */
@media (max-height: 820px) {
  .drawer__head { padding-block: var(--space-2); }
  .drawer__title { font-size: 1.25rem; }
  .drawer__close { width: 36px; height: 36px; }
  .drawer__body { padding-block: var(--space-2); }
  .drawer__foot { padding: var(--space-2) var(--space-4); }
  .drawer__foot .totals { gap: 0.3rem; margin-bottom: var(--space-2); }
  .drawer__foot .coupon-row { margin-bottom: var(--space-2); }
  .coupon-toggle { padding-bottom: var(--space-2); }
}

.cart-line {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: var(--space-2);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.cart-line:last-child { border-bottom: 0; }

.cart-line__img {
  width: 62px; height: 62px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--ink-800);
  object-fit: contain;
  padding: 5px;
}
.cart-line__name { font-size: 0.9rem; font-weight: 500; margin-bottom: 0.3rem; }
.cart-line__price { font-size: 0.78rem; color: var(--text-muted); }
.cart-line__total { font-variant-numeric: tabular-nums; font-size: 0.9rem; }

.cart-line__remove {
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0.35rem 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cart-line__remove:hover { color: var(--danger); }

.qty--sm { height: 38px; }
.qty--sm button { width: 34px; font-size: 0.95rem; }
.qty--sm input { width: 34px; font-size: 0.82rem; }

.totals { display: grid; gap: 0.6rem; margin-bottom: var(--space-3); }
.totals__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--step--1);
  color: var(--text-secondary);
}
.totals__row span:last-child { font-variant-numeric: tabular-nums; color: var(--text-primary); }
.totals__row--discount span:last-child { color: var(--good); }
.totals__row--total {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  margin-top: 0.2rem;
  font-size: var(--step-1);
  color: var(--text-primary);
}
.totals__row--total span:first-child { font-family: var(--font-display); }
.totals__row--total span:last-child {
  font-size: var(--step-2);
  font-weight: 300;
  letter-spacing: -0.01em;
}

.coupon-row { display: flex; gap: 0.5rem; margin-bottom: var(--space-3); }
.coupon-row .input { min-height: 46px; text-transform: uppercase; letter-spacing: 0.1em; }
.coupon-row .btn { min-height: 46px; flex: none; }

.coupon-applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.7rem 1rem;
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius);
  font-size: var(--step--1);
  margin-bottom: var(--space-3);
  color: var(--glow);
}

.empty-state {
  text-align: center;
  padding: var(--space-5) var(--space-3);
  color: var(--text-muted);
  display: grid;
  gap: var(--space-3);
  justify-items: center;
}
.empty-state svg { width: 46px; height: 46px; opacity: 0.4; }

/* --------------------------------------------------------------------------
   WhatsApp button
   -------------------------------------------------------------------------- */

.whatsapp-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  height: 54px;
  padding: 0 1.15rem 0 1rem;
  border-radius: var(--radius-pill);
  background: rgba(14, 14, 20, 0.92);
  border: 1px solid var(--line-strong);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft);
  transition: transform var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease);
}
.whatsapp-button:hover {
  transform: translateY(-2px);
  border-color: rgba(37, 211, 102, 0.55);
  background: rgba(18, 22, 20, 0.96);
}
.whatsapp-button svg { width: 24px; height: 24px; color: #25d366; flex: none; }
.whatsapp-button__label {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (max-width: 760px) {
  /* Out of the way of the buy bar, and icon only. */
  .whatsapp-button {
    right: 14px;
    bottom: 92px;
    height: 50px;
    width: 50px;
    padding: 0;
    justify-content: center;
  }
  .whatsapp-button__label { display: none; }
}

@media print {
  .whatsapp-button { display: none !important; }
}

/* --------------------------------------------------------------------------
   Sticky mobile buy bar
   -------------------------------------------------------------------------- */

.buy-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 90;
  display: none;
  align-items: center;
  gap: var(--space-2);
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform var(--dur) var(--ease-out-soft);
}
.buy-bar.is-visible { transform: none; }
.buy-bar__price { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.1; }
.buy-bar__label { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
.buy-bar .btn { flex: 1; margin-left: auto; max-width: 220px; }

/* --------------------------------------------------------------------------
   Checkout
   -------------------------------------------------------------------------- */

.checkout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: var(--space-5);
  align-items: start;
  padding-top: calc(var(--header-height) + var(--space-4));
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  background: var(--surface);
}

.panel + .panel { margin-top: var(--space-3); }

.panel__title {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--silver-400);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 500;
}
.panel__title::before {
  content: '';
  width: 22px; height: 1px;
  background: var(--accent-line);
}

.summary { position: sticky; top: calc(var(--header-height) + var(--space-3)); }

.summary__lines { display: grid; gap: var(--space-3); margin-bottom: var(--space-3); }

.summary__line {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 0.8rem;
  align-items: center;
  font-size: var(--step--1);
}
.summary__line img {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--ink-800);
  object-fit: contain;
  padding: 4px;
}

.choice-group { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: var(--space-3); }

.choice {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
  display: block;
  min-height: 60px;
}
.choice input { position: absolute; opacity: 0; }
.choice__label { font-size: 0.86rem; font-weight: 500; display: block; }
.choice__hint { font-size: 0.72rem; color: var(--text-muted); }
.choice:hover { border-color: var(--silver-500); }
.choice:has(input:checked) {
  border-color: var(--glow);
  background: rgba(207, 224, 255, 0.06);
  box-shadow: 0 0 0 1px var(--accent-line) inset;
}
.choice:has(input:focus-visible) { outline: 2px solid var(--glow); outline-offset: 3px; }

.pay-option {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  margin-bottom: 0.65rem;
  transition: border-color var(--dur-fast) var(--ease), background-color var(--dur-fast) var(--ease);
}
.pay-option:hover { border-color: var(--silver-500); }
.pay-option:has(input:checked) { border-color: var(--glow); background: rgba(207, 224, 255, 0.05); }
.pay-option input { margin-top: 0.2rem; }
.pay-option strong { display: block; font-weight: 500; font-size: 0.92rem; }
.pay-option span { font-size: 0.76rem; color: var(--text-muted); }

.gift-fields {
  display: none;
  border-top: 1px solid var(--line);
  margin-top: var(--space-3);
  padding-top: var(--space-3);
}
.gift-fields.is-visible { display: block; animation: fade-in var(--dur) var(--ease); }

@keyframes fade-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* --- Order / transfer pages --------------------------------------------- */

.order-hero {
  text-align: center;
  padding-block: var(--space-5) var(--space-4);
}

.order-ref {
  font-family: var(--font-mono);
  font-size: var(--step-2);
  letter-spacing: 0.14em;
  color: var(--glow);
  background: rgba(207, 224, 255, 0.06);
  border: 1px dashed var(--accent-line);
  border-radius: var(--radius);
  padding: 0.7rem 1.4rem;
  display: inline-block;
}

.bank-details {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-block: var(--space-3);
}
.bank-details__row {
  background: var(--ink-850);
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.bank-details__label {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver-400);
}
.bank-details__value {
  font-size: var(--step-1);
  font-family: var(--font-mono);
  color: var(--text-primary);
  letter-spacing: 0.05em;
}

.copy-btn {
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.copy-btn:hover { border-color: var(--glow); color: var(--glow); }
.copy-btn.is-copied { border-color: var(--good); color: var(--good); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--text-secondary);
}
.status-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-pill--paid { color: var(--good); border-color: rgba(55, 196, 139, 0.4); }
.status-pill--pending { color: var(--warning); border-color: rgba(224, 166, 60, 0.4); }
.status-pill--cancelled { color: var(--danger); border-color: rgba(224, 96, 96, 0.4); }

.status-pill--failed {
  color: var(--danger);
  border-color: rgba(224, 96, 96, 0.45);
  background: rgba(224, 96, 96, 0.08);
}
.steps-line__step.is-failed {
  color: var(--danger);
  white-space: nowrap;
}
.steps-line--stalled .steps-line__step:not(.is-done):not(.is-failed) { opacity: 0.35; }
.status-pill--shipped { color: var(--glow); border-color: var(--accent-line); }

.steps-line {
  display: flex;
  gap: 0;
  margin-block: var(--space-4);
  counter-reset: s;
}
.steps-line__step {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-top: 26px;
}
.steps-line__step::before {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 11px; height: 11px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--ink-900);
  z-index: 1;
}
.steps-line__step::after {
  content: '';
  position: absolute;
  top: 11px; left: 50%;
  width: 100%; height: 1px;
  background: var(--line);
}
.steps-line__step:last-child::after { display: none; }
.steps-line__step.is-done { color: var(--glow); }
.steps-line__step.is-done::before {
  background: var(--glow);
  border-color: var(--glow);
  box-shadow: 0 0 14px var(--glow-soft);
}

/* --------------------------------------------------------------------------
   Notices on an order - something the customer needs to read
   -------------------------------------------------------------------------- */

.notice {
  border: 1px solid var(--line-strong);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: var(--space-3);
  margin-bottom: var(--space-3);
  background: var(--surface);
}
.notice--bad {
  border-left-color: var(--danger);
  background: rgba(224, 96, 96, 0.07);
}
.notice__title {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--danger);
  margin: 0 0 0.6rem;
  font-weight: 600;
}
.notice__reason {
  font-size: var(--step-0);
  color: var(--text-primary);
  margin: 0;
  line-height: 1.65;
}
.notice .small { color: var(--text-secondary); }

/* --------------------------------------------------------------------------
   Simple content pages
   -------------------------------------------------------------------------- */

.page-body {
  max-width: var(--max-text);
  color: var(--text-secondary);
}
.page-body p { margin-bottom: var(--space-3); }
.page-head { padding-top: calc(var(--header-height) + var(--space-5)); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
}
.contact-card strong { display: block; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--silver-400); margin-bottom: 0.5rem; font-weight: 500; }
.contact-card a, .contact-card p { font-size: var(--step-0); color: var(--text-primary); }

/* --------------------------------------------------------------------------
   Responsive - the mobile experience is designed, not shrunk
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .hero__stage { min-height: 320px; order: -1; }
  .hero__pen { width: min(78%, 320px); }
  /* On a narrow screen the paper comes first and the controls sit directly
     under it, so the next thing to press is always within reach of the
     thumb that just wrote. Before this, the buttons were above the paper
     and people wrote, watched it vanish, and thought that was the end. */
  .demo__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "paper"
      "panel";
    gap: var(--space-3);
  }
  .paper-stage { justify-self: center; width: 100%; }
  .paper { margin-inline: auto; }
  .demo__steps { margin-top: var(--space-3); }

  /* The panel reads as part of the sheet above it rather than a separate
     card floating below. */
  .demo__panel {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    padding: var(--space-3);
  }
  .demo__prompt { min-height: 0; font-size: var(--step-0); color: var(--text-primary); }

  /* One clear thing to press, full width, impossible to miss. */
  .demo__actions { gap: 0.6rem; }
  .demo__actions .btn--primary { width: 100%; }
  .demo__actions .btn--sm { flex: 1 1 auto; }
  .product { grid-template-columns: minmax(0, 1fr); }
  .gallery { position: static; max-width: 420px; }
  .gift { grid-template-columns: 1fr; }
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --header-height: 64px; }

  .nav__links { display: none; }
  .nav-toggle { display: inline-flex; }

  .section { padding-block: var(--space-5); }
  .hero { min-height: auto; padding-top: calc(var(--header-height) + var(--space-4)); }
  .hero__headline { font-size: clamp(2.4rem, 10vw, 3.4rem); }
  .scroll-cue { display: none; }

  .wrap { width: min(100% - 2rem, var(--max-width)); }

  .buy-bar { display: flex; }
  body.has-buy-bar { padding-bottom: 78px; }

  .field-row { grid-template-columns: 1fr; }
  .choice-group { grid-template-columns: 1fr; }

  .footer__grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .flash-stack { right: 12px; left: 12px; width: auto; }

  .drawer { width: 100%; height: 100svh; }
  /* A shorter sheet on the phone. Handwriting needs width, not height, and
     this is what lets the page and the button underneath it share one
     screen - which is the whole point of the order they are drawn in. */
  .paper { aspect-ratio: 3 / 2.15; }
  .paper__message { font-size: clamp(1.35rem, 6vw, 2rem); }

  /* Every control stays comfortably tappable on a phone. */
  .qty--sm { height: 46px; }
  .qty--sm button { width: 44px; font-size: 1.05rem; }
  .qty--sm input { width: 40px; font-size: 0.9rem; }
  .cart-line__remove { min-height: 40px; padding: 0.6rem 0; }
  .copy-btn { min-height: 40px; }

  /* On a phone the slider is edge to edge, but never taller than the screen. */
  .gallery { max-width: 100%; }
  .slider__stage {
    aspect-ratio: 1 / 0.9;
    border-radius: var(--radius);
  }
  .slider__media { padding: 5%; }
  .slider__arrow { opacity: 1; width: 38px; height: 38px; }
  .slider__arrow--prev { left: 6px; }
  .slider__arrow--next { right: 6px; }
  .slider__thumb { width: 54px; height: 54px; }

  .cart-line { grid-template-columns: 54px 1fr; }
  .cart-line__img { width: 54px; height: 54px; }
  .cart-line__end { grid-column: 2; display: flex; justify-content: space-between; align-items: center; }

  .btn { width: 100%; }
  .btn-row .btn { width: auto; flex: 1 1 auto; min-width: 180px; }
  .qty { width: 100%; justify-content: space-between; }
  /* ...except in the drawer, where the stepper shares its row with Remove
     and stretching it would push Remove off the edge. */
  .drawer-line__controls .qty { width: auto; justify-content: flex-start; }
}

@media (max-width: 420px) {
  .btn-row .btn { min-width: 100%; }
  .bank-details__row { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
}

/* --------------------------------------------------------------------------
   Print - a customer printing their order should get something readable
   -------------------------------------------------------------------------- */

@media print {
  body { background: #fff; color: #000; }
  .header, .footer, .buy-bar, .drawer, .drawer-backdrop, .flash-stack, .scroll-cue { display: none !important; }
  body::after { display: none; }
  .panel, .bank-details__row { border-color: #ccc; background: #fff; color: #000; }
}

/* --------------------------------------------------------------------------
   Content protection - storefront only, never the dashboard
   -------------------------------------------------------------------------- */

body.is-protected {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Anything people genuinely need to copy stays copyable. */
body.is-protected input,
body.is-protected textarea,
body.is-protected [contenteditable='true'],
body.is-protected .selectable,
body.is-protected .selectable * {
  -webkit-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
  cursor: text;
}

body.is-protected img,
body.is-protected svg {
  -webkit-user-drag: none;
  user-drag: none;
}

/* --- our own right-click menu --------------------------------------------- */

.context-menu {
  position: fixed;
  z-index: 300;
  min-width: 232px;
  padding: 0.45rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: rgba(12, 12, 18, 0.97);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: var(--shadow-lift);
  opacity: 0;
  transform: scale(0.96) translateY(-4px);
  transform-origin: top left;
  transition: opacity 140ms var(--ease), transform 140ms var(--ease);
}
.context-menu.is-open { opacity: 1; transform: none; }

.context-menu__title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--silver-400);
  margin: 0.25rem 0.7rem 0.5rem;
}

.context-menu__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  color: var(--text-secondary);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.context-menu__item:hover,
.context-menu__item:focus-visible {
  background: rgba(207, 224, 255, 0.09);
  color: var(--text-primary);
  outline: none;
}
.context-menu__item svg { width: 17px; height: 17px; flex: none; opacity: 0.8; }

.context-menu__rule {
  height: 1px;
  margin: 0.4rem 0.5rem;
  background: var(--line);
}

@media (max-width: 480px) {
  .context-menu { min-width: 210px; }
}

@media print {
  .context-menu { display: none !important; }
}

/* --------------------------------------------------------------------------
   Breadcrumbs
   -------------------------------------------------------------------------- */

.breadcrumbs {
  padding-top: calc(var(--header-height) + var(--space-3));
  padding-bottom: 0;
}
.breadcrumbs__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.breadcrumbs__item { display: flex; align-items: center; gap: 0.55rem; }
.breadcrumbs__item + .breadcrumbs__item::before {
  content: '';
  width: 0.32rem; height: 0.32rem;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
}
.breadcrumbs__item a { color: var(--text-muted); transition: color var(--dur-fast) var(--ease); }
.breadcrumbs__item a:hover { color: var(--glow); }
.breadcrumbs__item [aria-current] { color: var(--text-secondary); }

/* A page that opens with breadcrumbs does not need the usual top gap again. */
.breadcrumbs + .section,
.breadcrumbs + .page-head { padding-top: var(--space-4); }

/* Somewhere to go from a page that does not exist. */
.error-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.4rem;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.error-links a {
  font-size: var(--step--1);
  color: var(--text-muted);
  transition: color var(--dur-fast) var(--ease);
}
.error-links a:hover { color: var(--glow); }

/* ==========================================================================
   Polish layer
   Each rule below answers something that was measured, not guessed at:
   anchor jumps landing under the header, hover states sticking on touch,
   tap targets under the thumb-sized minimum, figures that jitter, and a
   skip link that never appeared.
   ========================================================================== */

/* --- Anchor links used to scroll a section's heading under the fixed header.
       Everything with an id now stops clear of it. */
:where([id]) { scroll-margin-top: calc(var(--header-height) + 1.5rem); }

/* --- The skip link existed but was permanently 1x1, so a keyboard user could
       reach it and still see nothing. It now announces itself properly. */
[data-cart-announce]:focus,
[data-cart-announce]:focus-visible { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; clip: rect(0 0 0 0) !important; }

a.visually-hidden:focus,
a.visually-hidden:focus-visible {
  position: fixed !important;
  top: 12px;
  left: 12px;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0.8rem 1.2rem !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  z-index: 400;
  background: var(--ink-800);
  color: var(--text-primary);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lift);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
}

/* --- Figures should never shuffle sideways as they change. Prices sit in
       columns, count up and down in the cart, and tick over in the dashboard. */
.price__now, .price__was, .price__save,
.product-card__price, .product-card__was,
.totals__row span:last-child, .drawer-line__total, .cart-line__total,
.order-total, .buy-bar__price, .urgency__count, .bulk-tiers li strong,
.summary__row span:last-child,
.cart-line__price, .drawer-line__price, .price, .totals__row,
.bulk-nudge, .checkbox, .checkbox span, .checkbox strong, .money, .hint,
.product-card__flag, .gift__list li, .includes li, .stock-line, .panel__title {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

/* --- On a touch screen there is no hover, so a hover style applies on tap and
       then stays stuck until you tap elsewhere. These are the ones that moved
       something; they are pointer-only now. */
@media (hover: none) {
  .btn:hover { transform: none; }
  .product-card:hover { transform: none; border-color: var(--line); }
  .product-card:hover .product-card__media img { transform: none; }
  .review:hover { transform: none; border-color: var(--line); }
  .reseller__way:hover { transform: none; }
  .rating-input label:hover { transform: none; }
  .trust__item:hover { border-color: var(--line); }
}

/* --- A button should acknowledge a press. Without this the tap feels dead on
       a phone, where there is no hover to confirm the target. */
.btn:active { transform: translateY(1px) scale(0.985); }
.btn { -webkit-tap-highlight-color: transparent; }
@media (prefers-reduced-motion: reduce) {
  .btn:active { transform: none; }
}

/* --- 24px is the minimum target for any pointer, a mouse included, so this
       one is not gated behind touch. Stacked link lists had 16px boxes. */
.footer ul a,
.error-links a,
.breadcrumbs__item a,
.contact-card .link-underline,
.nav__link,
.demo__type summary,
.logo,
.flash__close {
  min-height: 24px;
  min-width: 24px;
  display: inline-flex;
  align-items: center;
}
.flash__close { justify-content: center; }

/* --- Thumbs are not mouse pointers. Every control that can be tapped clears
       44px on a touch screen. Stated as a minimum height rather than padding,
       because padding depends on the line box and lands a few pixels short. */
@media (hover: none), (max-width: 760px) {
  .btn--sm { min-height: 44px; padding-inline: 1.15rem; }

  .qty, .qty--sm { height: 46px; }
  .qty button, .qty--sm button { width: 46px; min-width: 46px; height: 46px; }
  .qty input, .qty--sm input { height: 46px; }

  .faq__q { min-height: 52px; }

  .nav__link,
  .mobile-nav a,
  .footer a,
  .footer ul a,
  .error-links a,
  .breadcrumbs__item a,
  .contact-card .link-underline,
  .demo__type summary,
  .cart-line__remove,
  .drawer-line__remove,
  .coupon-toggle,
  .drawer__continue,
  .logo {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .footer ul { gap: 0; }
  .mobile-nav a { display: flex; }
  .coupon-toggle, .drawer__continue { width: 100%; }
  .coupon-toggle { justify-content: flex-start; }
  .drawer__continue { justify-content: center; }

  .slider__thumb { min-width: 48px; min-height: 48px; }
  .slider__arrow { width: 46px; height: 46px; }

  /* Controls that were a couple of pixels short of the mark. */
  .drawer__close { width: 46px; height: 46px; }
  .contact-card .link-underline { min-height: 44px; }
  .flash__close { min-width: 44px; min-height: 44px; }
  .rating-input label svg { width: 34px; height: 34px; }
  .demo__type summary { min-height: 44px; display: flex; align-items: center; }
  .demo__type .input, #demo-input { min-height: 46px; }
  .product-card__name a { min-height: 44px; display: inline-flex; align-items: center; }

  /* A 19px tickbox is a miss waiting to happen. The box keeps its size; the
     label around it becomes the target. */
  .checkbox { min-height: 44px; }
  .checkbox input[type='checkbox'],
  .checkbox input[type='radio'] { width: 22px; height: 22px; }
}

/* --- Notched and gesture-bar phones: anything pinned to an edge keeps clear
       of the hardware rather than sitting under it. */
.buy-bar { padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); }
.drawer__foot { padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px)); }
.mobile-nav { padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); }
.whatsapp-fab { bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px)); }

/* --- Images reserve their space before they arrive, so nothing below them
       jumps once they load. */
.cart-line__img, .drawer-line__img, .slider__thumb img { aspect-ratio: 1 / 1; }
.product-card__media img { aspect-ratio: 1 / 1; }
