/* Hero Merch — brand design system.
   Navy + electric blue + lightning yellow. Self-hosted Bangers for headings. */

@font-face {
  font-family: "Bangers";
  src: url("/assets/fonts/bangers-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --navy-900: #0b0b16;
  --navy-800: #10101f;
  --navy-700: #17172b;
  --navy-600: #1f1f38;
  --navy-500: #2a2a49;
  --blue: #2b8cff;
  --blue-600: #1f6fe0;
  --blue-300: #7db4ff;
  --bolt: #ffd23f;
  --bolt-600: #f4b400;
  --white: #ffffff;
  --muted: #a9b0c6;
  --line: rgba(255, 255, 255, 0.1);
  --danger: #ff5c72;
  --good: #35d69a;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --wrap: 1160px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Bangers", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Keyboard users get a clear focus ring everywhere; mouse clicks don't. */
:focus-visible { outline: 3px solid var(--blue-300); outline-offset: 2px; }

/* ---- Shared size-guide pop-up (HM.sizeGuide) ---- */
.sg-back { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: none; align-items: flex-start; justify-content: center; padding: 22px 14px; overflow-y: auto; z-index: 80; }
.sg-back.open { display: flex; }
.sg-modal { background: var(--navy-700); border: 1px solid var(--line); border-radius: var(--radius-lg); max-width: 640px; width: 100%; padding: 22px; }
.sg-modal h2 { margin: 0 0 4px; font-size: 22px; }
.sg-modal .close { float: right; background: none; border: none; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; }
.sg-toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin: 10px 0 4px; }
.sg-toggle button { background: none; border: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 13px; padding: 6px 16px; cursor: pointer; }
.sg-toggle button.on { background: var(--blue-600); color: #fff; }
.sg-table-wrap { overflow-x: auto; margin-top: 10px; }
table.sg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.sg-table th, table.sg-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.sg-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.sg-help { font-size: 13px; color: var(--muted); margin-top: 14px; line-height: 1.5; background: rgba(255,255,255,0.03); border-radius: 10px; padding: 12px; }
.sizeguide-link { display: inline-flex; align-items: center; gap: 6px; background: rgba(43,140,255,0.1); border: 1px solid rgba(43,140,255,0.4); color: var(--blue-300); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 7px 13px; border-radius: 999px; transition: background 0.15s, border-color 0.15s; }
.sizeguide-link:hover { background: rgba(43,140,255,0.2); border-color: var(--blue); }
.sizeguide-link span { color: var(--muted); font-weight: 400; font-size: 11px; }

/* Respect the OS "reduce motion" setting: kill decorative animation/transitions. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
body {
  margin: 0;
  font-family: var(--font);
  color: var(--white);
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(43, 140, 255, 0.16), transparent 60%),
    radial-gradient(900px 600px at 100% 0%, rgba(255, 210, 63, 0.08), transparent 55%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-300); text-decoration: none; }
a:hover { color: var(--white); }

h1, h2, h3 { line-height: 1.05; margin: 0 0 0.4em; }
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---- Header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 11, 22, 0.72);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; gap: 18px;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 26px; color: var(--white); letter-spacing: 0.04em; white-space: nowrap; }
.brand .bolt { color: var(--bolt); filter: drop-shadow(0 0 8px rgba(255,210,63,0.6)); }
.nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--white); background: rgba(255,255,255,0.06); }
.nav .cart-pill { display: inline-flex; align-items: center; gap: 6px; }
.nav .cart-count { background: var(--bolt); color: #23210a; border-radius: 999px; font-size: 12px; font-weight: 800; padding: 1px 7px; }

/* Hamburger toggle — hidden on desktop, shown on mobile (see responsive nav below) */
.nav-toggle {
  display: none; margin-left: auto; padding: 0;
  width: 42px; height: 42px; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 16px; cursor: pointer;
  padding: 13px 22px; border-radius: 12px; border: 1px solid transparent;
  transition: transform 0.06s ease, background 0.2s, box-shadow 0.2s;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
/* blue-600 -> deeper blue keeps white button text at >=4.5:1 contrast (AA);
   the old --blue top edge measured 3.3:1. */
.btn-primary { background: linear-gradient(180deg, var(--blue-600), #1a5fc7); color: #fff; box-shadow: 0 10px 24px rgba(43,140,255,0.35); }
.btn-primary:hover { color: #fff; box-shadow: 0 12px 30px rgba(43,140,255,0.5); }
.btn-bolt { background: linear-gradient(180deg, var(--bolt), var(--bolt-600)); color: #23210a; box-shadow: 0 10px 24px rgba(255,210,63,0.3); }
.btn-bolt:hover { color: #23210a; }
.btn-ghost { background: rgba(255,255,255,0.05); color: #fff; border-color: var(--line); }
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn-lg { padding: 16px 30px; font-size: 18px; }
.btn-block { width: 100%; }

/* ---- Cards / panels ---- */
.card {
  background: linear-gradient(180deg, var(--navy-700), var(--navy-600));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.pad { padding: 26px; }

/* ---- Forms ---- */
label { display: block; font-weight: 600; margin: 0 0 6px; font-size: 14px; }
input[type="text"], input[type="email"], input[type="password"], select {
  width: 100%; padding: 13px 14px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(0,0,0,0.28); color: #fff; font-size: 16px;
}
input:focus, select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43,140,255,0.25); }
.field { margin-bottom: 16px; }
select option { color: #111; }

/* ---- Messages ---- */
.msg { border-radius: 11px; padding: 12px 14px; font-weight: 600; margin: 12px 0; }
.msg-error { background: rgba(255,92,114,0.14); color: #ffb9c3; border: 1px solid rgba(255,92,114,0.3); }
.msg-ok { background: rgba(53,214,154,0.14); color: #b3f2da; border: 1px solid rgba(53,214,154,0.3); }
.msg-warn { background: rgba(255,210,63,0.14); color: #ffe9a6; border: 1px solid rgba(255,210,63,0.3); }

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); margin-top: 70px; padding: 40px 0; color: var(--muted); }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: #fff; }

/* ---- Badges / chips ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,0.06); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.chip .bolt { color: var(--bolt); }

/* ---- Spinner ---- */
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.25); border-top-color: #fff; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ---- Grids ---- */
.grid { display: grid; gap: 18px; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3,1fr); } }

/* ---- Responsive nav ---- */
@media (max-width: 640px) {
  .brand { font-size: 22px; }
  .nav-toggle { display: inline-flex; }
  /* Collapse the nav into a full-width dropdown below the header. */
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch;
    gap: 4px; margin: 0; padding: 10px 16px 16px;
    background: var(--navy-900); /* opaque so page content never bleeds through */
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; font-size: 16px; border-radius: 10px; }
  .nav .cart-pill { justify-content: flex-start; }
  .nav .btn-primary { justify-content: center; margin-top: 4px; }
}

/* Cookie consent banner (UK PECR — analytics loads only after opt-in) */
#hm-consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 90; display: flex; justify-content: center; }
#hm-consent .hm-consent-inner { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; max-width: 720px; background: var(--navy-600); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,0.5); padding: 14px 18px; }
#hm-consent p { margin: 0; font-size: 14px; color: var(--muted); flex: 1 1 340px; }
#hm-consent p a { color: var(--blue-300); }
#hm-consent .hm-consent-btns { display: flex; gap: 10px; }
#hm-consent .hm-consent-btns .btn { padding: 9px 18px; font-size: 14px; }

/* In-prose links must be distinguishable without relying on colour (WCAG 1.4.1) */
main p a:not(.btn), main li a, main td a, #hm-consent p a { text-decoration: underline; text-underline-offset: 2px; }

/* Newsletter promo — sticky "10% off" tab + polite popup */
#hm-news-tab {
  position: fixed; left: 16px; bottom: 16px; z-index: 60;
  background: var(--bolt); color: #23210a; border: none; cursor: pointer;
  font: inherit; font-weight: 800; font-size: 14px; padding: 11px 16px;
  border-radius: 999px; box-shadow: 0 10px 26px rgba(0,0,0,0.4);
  display: inline-flex; align-items: center; gap: 6px; transition: transform .12s, box-shadow .12s;
}
#hm-news-tab:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0,0,0,0.5); }
#hm-news { position: fixed; inset: 0; z-index: 95; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(4,6,14,0.72); }
#hm-news.open { display: flex; }
#hm-news .hm-news-card {
  position: relative; width: 100%; max-width: 440px; text-align: center;
  background: var(--navy-600); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6); padding: 30px 26px 24px;
}
#hm-news .hm-news-bolt { font-size: 40px; line-height: 1; }
#hm-news h2 { font-family: var(--display); font-size: 26px; letter-spacing: 0.02em; margin: 8px 0 6px; }
#hm-news p { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 auto 16px; max-width: 340px; }
#hm-news .hm-news-form { display: flex; gap: 10px; flex-wrap: wrap; }
#hm-news .hm-news-form input {
  flex: 1 1 200px; padding: 13px 15px; border-radius: 11px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.05); color: var(--white); font-size: 15px;
}
#hm-news .hm-news-form .btn { flex: 0 0 auto; }
#hm-news .hm-news-msg { margin-top: 12px; }
#hm-news .hm-news-x {
  position: absolute; top: 10px; right: 12px; background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 26px; line-height: 1; padding: 4px 8px;
}
#hm-news .hm-news-x:hover { color: var(--white); }
#hm-news .hm-news-decline { display: block; margin: 14px auto 0; background: none; border: none; cursor: pointer; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { #hm-news-tab { transition: none; } }
