/* ==========================================================================
   Bike & Butter — shared design system (v3, dark)
   Near-black canvas, light type, hairlines, tiny tracked labels, photo-led.
   Yellow is used sparingly. Page styles: assets/css/pages/
   ========================================================================== */

@font-face { font-family: "Plex"; src: url("/assets/fonts/ibm-plex-sans-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex"; src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --yellow: #F8CC0A;
  --bg: #121212;
  --bg-2: #1a1a1a;
  --paper: #f4f4f2;
  --ink: #f2f2ef;
  --ink-dark: #121212;
  --muted: #9b9b95;
  --line: rgba(255,255,255,.16);
  --line-dark: rgba(0,0,0,.14);
  --glass: rgba(24,24,24,.58);
  --font: "Plex", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 3px;
  --pad: clamp(16px, 2.2vw, 32px);
  --header-h: 60px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-weight: 400; font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.menu-open { overflow: hidden; }
img, svg, iframe { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 1px solid var(--yellow); outline-offset: 3px; }
::selection { background: var(--yellow); color: #111; }

.skip-link { position: absolute; left: 12px; top: -60px; z-index: 400; background: #fff; color: #111; padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }

/* ---- Type: small, tracked, uppercase labels do most of the work ---------- */
.label { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; line-height: 1.5; }
.label-muted { color: var(--muted); }
.display { font-weight: 300; letter-spacing: -0.02em; line-height: 1.08; font-size: clamp(1.9rem, 4.2vw, 3.6rem); }

/* ---- Buttons: tiny translucent rectangles ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: var(--radius); border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; line-height: 1;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn-glass { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-color: rgba(255,255,255,.2); }
.btn-glass:hover { background: #fff; color: #111; }
.btn-light { background: var(--paper); color: #111; }
.btn-light:hover { background: var(--yellow); }
.btn-line { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-line:hover { background: var(--ink); color: #111; }
.btn-dark { background: #111; color: #fff; }
.btn-dark:hover { background: #333; }

/* ---- Header: floating translucent island -------------------------------- */
.site-header { position: fixed; z-index: 200; top: 12px; left: 12px; right: 12px; }
.header-in {
  height: var(--header-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: 14px; border-radius: 6px; background: var(--glass); border: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2);
  transition: background-color .25s;
}
.site-header.is-scrolled .header-in { background: rgba(18,18,18,.82); }
.header-l, .header-r { display: flex; align-items: center; gap: 6px; }
.header-r { justify-content: flex-end; }
.menu-btn { display: inline-flex; align-items: center; gap: 12px; height: 44px; padding: 0 10px 0 4px; border: 0; background: none; cursor: pointer; }
.menu-btn .bars { position: relative; width: 20px; height: 10px; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; width: 100%; height: 1px; background: #fff; transition: transform .25s, top .25s; }
.menu-btn .bars::before { top: 0; }
.menu-btn .bars::after { top: 9px; }
.menu-btn[aria-expanded="true"] .bars::before { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { top: 4px; transform: rotate(-45deg); }
.menu-btn .label { display: none; }
.brand { display: block; justify-self: center; }
.brand img { height: 40px; width: auto; }
.header-link { display: none; padding: 10px 12px; }
.header-link:hover { color: var(--yellow); }
.header-book { padding: 11px 16px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { color: var(--yellow); }
@media (min-width: 760px) {
  .menu-btn .label { display: inline; }
  .header-link { display: inline-block; }
  .brand img { height: 44px; }
}

/* ---- Menu overlay -------------------------------------------------------- */
.menu-overlay {
  position: fixed; inset: 0; z-index: 150; background: var(--bg); overflow-y: auto;
  padding: 96px var(--pad) 40px; display: grid; gap: 40px; align-content: start;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.menu-overlay.is-open { opacity: 1; visibility: visible; }
.menu-overlay[hidden] { display: none; }
.menu-links a { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: clamp(1.7rem, 5vw, 3rem); font-weight: 300; letter-spacing: -0.02em; line-height: 1.1; }
.menu-links a:hover { color: var(--yellow); }
.menu-links a .label { color: var(--muted); }
.menu-links .sub { font-size: 1.05rem; padding: 12px 0 12px 16px; color: var(--muted); }
.menu-side { display: grid; gap: 22px; align-content: start; }
.menu-side address { font-style: normal; color: var(--muted); font-size: 14px; line-height: 1.8; }
.menu-side address a:hover { color: var(--ink); }
@media (min-width: 900px) {
  .menu-overlay { grid-template-columns: 1.4fr 1fr; gap: 80px; padding-top: 120px; }
}

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--bg); color: var(--ink); border-top: 1px solid var(--line); }
.footer-in { padding: clamp(56px, 7vw, 96px) var(--pad) 28px; }
.footer-grid { display: grid; gap: 52px; }
.footer-col h3 { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { font-size: 14px; color: var(--ink); }
.footer-col a:hover { color: var(--yellow); }
.footer-col address { font-style: normal; font-size: 14px; color: var(--muted); line-height: 1.8; margin-top: 20px; }
.footer-col address a { color: var(--ink); }
.footer-news p.lead { font-size: 22px; font-weight: 300; letter-spacing: -0.01em; line-height: 1.3; max-width: 22ch; margin-bottom: 22px; }
.nl-row { display: flex; border: 1px solid var(--line); border-radius: var(--radius); max-width: 440px; }
.nl-row input[type="email"] { flex: 1; min-width: 0; background: transparent; border: 0; padding: 15px 16px; font-size: 14px; color: var(--ink); }
.nl-row input::placeholder { color: var(--muted); }
.nl-row input:focus { outline: none; }
.nl-row:focus-within { border-color: rgba(255,255,255,.5); }
.nl-row button { background: var(--paper); color: #111; border: 0; padding: 0 20px; font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; cursor: pointer; transition: background-color .2s; }
.nl-row button:hover { background: var(--yellow); }
.nl-row button:disabled { opacity: .6; cursor: wait; }
.nl-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12px; color: var(--muted); max-width: 440px; line-height: 1.5; cursor: pointer; }
.nl-consent input { margin-top: 2px; accent-color: var(--yellow); flex: none; }
.nl-msg { margin-top: 12px; font-size: 13px; min-height: 1.4em; color: var(--muted); }
.nl-msg.ok { color: var(--yellow); }
.nl-msg.err { color: #ff8a80; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.footer-bottom { margin-top: clamp(48px, 7vw, 88px); padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .footer-bottom { padding-bottom: 70px; } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 64px; } }

/* ---- Chat button -------------------------------------------------------- */
.chat-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 90; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.22);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background-color .2s, color .2s;
}
.chat-fab:hover { background: var(--yellow); color: #111; border-color: var(--yellow); }
.chat-fab svg { width: 22px; height: 22px; }

/* ---- Reveal on scroll (only with JS) ------------------------------------ */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ---- Bag button, cart drawer, side drawer (shared) ---------------------- */
.bag-btn { position: relative; }
.bag-btn .count { position: absolute; top: 4px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--yellow); color: #111; font-size: 10px; font-weight: 500; line-height: 16px; text-align: center; }
.bag-btn .count[hidden] { display: none; }
.scrim { position: fixed; inset: 0; z-index: 140; background: rgba(0,0,0,.45); }
.scrim[hidden], .cart-drawer[hidden], .side-drawer[hidden] { display: none; }
body.drawer-open { overflow: hidden; }
.cart-drawer {
  position: fixed; z-index: 190; top: 80px; left: 50%; transform: translateX(-50%);
  width: min(488px, calc(100vw - 24px)); max-height: calc(100svh - 92px); overflow-y: auto;
  background: rgba(36,36,36,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.1); border-radius: 6px; padding: 16px;
}
.cart-line { display: flex; gap: 14px; padding-bottom: 16px; }
.cart-thumb { width: 66px; height: 82px; object-fit: cover; background: #f4f4f2; flex: none; }
.cart-info { flex: 1; min-width: 0; }
.cart-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.cart-row a:hover { color: var(--yellow); }
.cart-var { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-ctl { margin-top: 10px; align-items: center; }
.qty { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; }
.qty button, .x-btn { background: none; border: 0; color: inherit; cursor: pointer; font-size: 18px; line-height: 1; width: 28px; height: 28px; border-radius: 3px; }
.qty button:hover, .x-btn:hover { background: rgba(255,255,255,.12); }
.ship-note { font-size: 12px; color: var(--muted); padding: 12px 0 4px; border-top: 1px solid var(--line); }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals dt, .totals dd { margin: 0; }
.cart-cta { width: 100%; margin: 14px 0; padding: 18px; }
.cart-drawer .btn-dark { background: #0d0d0d; }
.cart-empty { text-align: center; padding: 28px 0 8px; color: var(--muted); }
.acc { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: 0; border-top: 1px solid var(--line); padding: 16px 0; cursor: pointer; text-align: left; }
.acc-panel { padding-bottom: 14px; font-size: 13px; color: #cfcfca; line-height: 1.6; }
.acc-panel p { margin-bottom: 12px; }
.mini-prod { display: flex; gap: 12px; align-items: center; padding: 6px 0; }
.mini-prod img { width: 52px; height: 65px; object-fit: cover; background: #f4f4f2; }
.mini-prod small { display: block; color: var(--muted); font-size: 12px; }
.side-drawer { position: fixed; z-index: 195; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: #fff; color: #111; overflow-y: auto; padding: 24px 28px 48px; }
.side-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.side-drawer .x-btn:hover { background: rgba(0,0,0,.08); }
.side-body h3 { margin: 22px 0 6px; }
.side-body h3:first-child { margin-top: 0; }
.side-body p { font-size: 14px; line-height: 1.6; margin-bottom: 12px; }
.side-body .acc-panel, .side-body p { color: #111; }
.side-body .bullets { margin-top: 0; }
.spec div { display: flex; justify-content: space-between; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line-dark); }
.spec dd { margin: 0; font-size: 14px; text-align: right; }
.refine { display: grid; gap: 4px; }
.refine h3 { margin: 22px 0 8px; color: #6f6f6a; }
.refine h3:first-child { margin-top: 0; }
.opt { display: flex; gap: 12px; align-items: center; padding: 8px 0; font-size: 14px; cursor: pointer; }
.opt input { accent-color: #111; }
.refine .btn { margin-top: 28px; padding: 18px; }
@media (max-width: 640px) { .cart-drawer { top: 78px; } }
