/* Shared layout: reset, nav, buttons, footer. Section-specific styles live in
   hero.css, explode.css, shop.css, cart.css. */
*, *::before, *::after { box-sizing: border-box; }
/* Selected text: a dark tint of the accent under the page's own text colour. (At
   full strength, "select all" turned a fifth of the screen sea-green, and a
   third of it on a phone; the accent is never a large area.) At 42% the tint
   still stands 3.2 to 1 against the page, and the text 5.4 to 1 on the tint,
   as Chrome draws it. Safari's engine lays the tint on thinner: 2.4 to 1 against
   the page, the text 7.1 to 1. (A lighter tint would put that right there and
   take the text under 4.5 to 1 in Chrome.) */
::selection { background: color-mix(in srgb, var(--pop) 42%, var(--bg)); color: var(--text); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 350;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--pop); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.eyebrow {
  font-size: 12px; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--text-muted); font-weight: 450;
}
.gold { color: var(--gold); }
.gold-text {
  background: var(--gold-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  /* The same column as .wrap, so the wordmark and the cart line up with the page on
     wide screens. --nav-width is the width that column is measured from (cart.css
     adjusts it while the open drawer holds the page still). */
  --nav-width: 100%;
  padding: 22px max(var(--gutter), calc((var(--nav-width) - var(--max)) / 2 + var(--gutter)));
}
/* The frosted bar, shown once the page has scrolled. It reaches a little below the
   nav and fades out there, so bright content slides under a soft edge instead of
   being cut along a hard line. */
.nav::before {
  content: ""; position: absolute; inset: 0 0 -36px 0; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(10, 10, 11, 0.92), rgba(10, 10, 11, 0.8) 62%, rgba(10, 10, 11, 0.5));
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  -webkit-mask-image: linear-gradient(#000 56%, transparent); mask-image: linear-gradient(#000 56%, transparent);
  opacity: 0; transition: opacity 0.6s var(--ease-out);
}
.nav.is-scrolled::before { opacity: 1; }
.wordmark {
  font-weight: 500; font-size: 15px; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 12px; white-space: nowrap;
}
.wordmark .mark { width: 31px; height: 30px; margin-block: -4px; }      /* the mark is a thin ring: it needs this size to read, and must not make the bar taller */
/* Every control in the nav is a touch target at least 44 px high (and 44 px wide
   where it is small): padding makes the box, negative margins keep the layout. */
.nav .wordmark { padding-block: 11px; margin-block: -11px; }
.nav-links { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); font-size: 14px; letter-spacing: 0.04em; }
.nav-links a { padding: 11px 6px; margin: -11px -6px; color: var(--text-muted); transition: color 0.3s; }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--text); }
/* A small dot marks the page one is on, or on the home page the part of it in
   view (nav.js). It is gold, not the accent: the navigation is on every screen,
   and with the count on the cart beside it the dot made two accents there
   before the page had shown its own (the rule is one or two in view, tokens.css). */
.nav-links a[aria-current] { position: relative; }
.nav-links a[aria-current]::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 4px; height: 4px; margin-left: -2px;
  border-radius: 50%; background: var(--gold);
}
.currency-toggle {
  display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 2px; font-size: 12px;
}
/* The buttons are 44 px high targets inside a slim pill: the chosen state and the
   focus ring are drawn by ::before at the visible size. */
.currency-toggle button {
  position: relative; z-index: 0; min-width: 28px; height: 44px; margin-block: -9px; padding: 0 10px;
  color: var(--text-muted); letter-spacing: 0.06em; transition: color 0.3s;
}
.currency-toggle button::before {
  content: ""; position: absolute; inset: 9px 0; z-index: -1; border-radius: var(--radius); transition: background 0.3s;
}
.currency-toggle button[aria-pressed="true"] { color: var(--text); }
.currency-toggle button[aria-pressed="true"]::before { background: var(--bg-raised-2); }
.currency-toggle button:focus-visible { outline: none; }
.currency-toggle button:focus-visible::before { outline: 1px solid var(--pop); outline-offset: 3px; }
@media (pointer: coarse) { .currency-toggle button { min-width: 44px; } }   /* touch: full width too */
.cart-button { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 12px; margin: -12px -12px -12px -6px; color: var(--text); }
.cart-button svg { width: 20px; height: 20px; }
.cart-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; line-height: 18px; text-align: center;
  background: var(--pop); color: #0a0a0b; font-weight: 600;      /* something is in the cart: the accent colour */
}
.cart-count[data-empty="true"] { display: none; }
@media (max-width: 720px) {
  .nav { padding-block: 16px; }
  .nav-links .hide-sm { display: none; }
  .wordmark { font-size: 13px; letter-spacing: 0.24em; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px; border-radius: var(--radius);
  font-size: 15px; letter-spacing: 0.06em; font-weight: 450;
  transition: transform 0.3s var(--ease-out), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.btn:active { transform: scale(0.98); }
.btn-gold { background: var(--gold-gradient); color: #0a0a0b; font-weight: 550; }
.btn-gold:hover { box-shadow: 0 0 0 1px var(--gold-light), 0 10px 40px -10px rgba(220, 166, 45, 0.6); }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

/* ---------- The page for an address that does not exist (404.html) ---------- */
.lost { min-height: 78vh; min-height: 78svh; display: grid; align-items: center; padding: 140px 0 96px; }
.lost-title { margin: 18px 0 0; font-size: clamp(48px, 7vw, 104px); font-weight: 300; line-height: 1; letter-spacing: -0.015em; }
.lost-title strong { font-weight: 600; }
.lost-text { margin: 22px 0 0; max-width: 40ch; color: var(--text-muted); }
.lost-links { margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 64px 0 40px; color: var(--text-muted); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer h4 { margin: 0 0 14px; font-size: 12px; font-weight: 500; letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a:hover { color: var(--gold-light); }
/* The line that identifies the company: --text-muted (5.8:1 on the page), not the
   dimmer tone, which is only for switched-off controls. */
.legal { margin-top: 48px; font-size: 12px; line-height: 1.7; color: var(--text-muted); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Slow reveal as a block scrolls into view (classes set by nav.js) ---------- */
[data-reveal].is-waiting { opacity: 0; transform: translateY(16px); }
[data-reveal].is-revealing { transition: opacity 1.6s cubic-bezier(0.45, 0, 0.2, 1), transform 1.9s cubic-bezier(0.3, 0, 0.1, 1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
