/* ==========================================================================
   Kill Me — Full Throttle to the Afterlife
   Design tokens + components. Colors authored in oklch per the design spec.
   ========================================================================== */

:root {
  --bg:            oklch(13% 0.014 45);
  --bg-nav:        oklch(11% 0.014 45);
  --bg-deep:       oklch(9%  0.02  30);
  --surface:       oklch(17% 0.014 45);
  --surface-2:     oklch(15% 0.014 45);
  --border:        oklch(28% 0.015 45);
  --border-strong: oklch(38% 0.015 45);
  --rust:          oklch(53% 0.17  32);
  --rust-hover:    oklch(60% 0.17  32);
  --text:          oklch(93% 0.015 70);
  --text-on-rust:  oklch(97% 0.01  70);
  --text-2:        oklch(80% 0.015 65);
  --text-muted:    oklch(68% 0.015 60);
  --text-faint:    oklch(58% 0.015 60);
  --tile:          oklch(90% 0.01  70);
  --scrim:         oklch(0% 0 0 / 0.6);

  --display: 'Rye', 'Georgia', serif;
  --ui: 'Oswald', 'Arial Narrow', sans-serif;

  --band: radial-gradient(ellipse at 50% -10%, oklch(20% 0.03 35) 0%, oklch(13% 0.014 45) 60%);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--rust); color: oklch(96% 0.01 70); }

img { max-width: 100%; }

a { color: inherit; }

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes flicker { 0%,100% { opacity: 1; } 45% { opacity: .85; } 50% { opacity: 1; } 78% { opacity: .9; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Nav ------------------------------------------------------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
}

.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__brand img { height: 46px; width: 46px; object-fit: contain; flex: none; }
.nav__wordmark { font-family: var(--display); font-size: 26px; letter-spacing: 1px; color: var(--text); line-height: 1; }

.nav__links { display: flex; align-items: center; gap: 28px; }
.nav__links a {
  color: var(--text-muted); text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: 1.5px;
  transition: color .15s ease;
}
.nav__links a:hover { color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--text); }

.cart-btn {
  position: relative; background: none; border: 1px solid var(--border);
  color: var(--text); padding: 9px 16px; border-radius: 3px;
  font-family: var(--ui); font-size: 13px; font-weight: 600; letter-spacing: 1px;
  cursor: pointer; transition: border-color .15s ease;
}
.cart-btn:hover { border-color: var(--rust); }

.cart-badge {
  position: absolute; top: -8px; right: -8px;
  background: var(--rust); color: oklch(96% 0.01 70);
  font-size: 11px; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.cart-badge[hidden] { display: none; }

.nav__toggle {
  display: none; background: none; border: 1px solid var(--border);
  color: var(--text); border-radius: 3px; padding: 8px 10px;
  cursor: pointer; line-height: 0;
}
.nav__toggle:hover { border-color: var(--rust); }
.nav__toggle svg { width: 20px; height: 20px; }

/* ---------- Buttons --------------------------------------------------- */

.btn {
  display: inline-block; text-align: center; text-decoration: none;
  font-family: var(--ui); font-size: 15px; font-weight: 700; letter-spacing: 1.5px;
  padding: 16px 34px; border-radius: 3px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--rust); color: var(--text-on-rust); border-color: var(--rust); }
.btn--primary:hover { background: var(--rust-hover); border-color: var(--rust-hover); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--text); }
.btn--block { display: block; width: 100%; padding: 16px; }
.btn--sm { font-size: 13px; letter-spacing: 1px; padding: 11px 20px; }

/* ---------- Shared page furniture ------------------------------------- */

.page { flex: 1; width: 100%; }
.wrap { width: 100%; margin: 0 auto; padding: 60px 28px 100px; }
.wrap--640 { max-width: 640px; }
.wrap--760 { max-width: 760px; }
.wrap--900 { max-width: 900px; }
.wrap--1200 { max-width: 1200px; }

.eyebrow {
  color: var(--rust); font-size: 13px; font-weight: 700;
  letter-spacing: 3px; margin-bottom: 8px; text-transform: uppercase;
}
.page-head { text-align: center; }
.page-head h1 { font-family: var(--display); margin: 0; font-size: 44px; font-weight: 400; }
.page-head p { color: var(--text-muted); margin: 14px 0 0; }

.footer {
  border-top: 1px solid var(--border);
  padding: 36px 28px; text-align: center;
  color: var(--text-faint); font-size: 13px;
}
.footer__mark { font-family: var(--display); font-size: 20px; color: var(--text-2); margin-bottom: 10px; }

/* ---------- Home ------------------------------------------------------ */

.hero {
  position: relative; padding: 100px 28px 80px;
  text-align: center; overflow: hidden; background: var(--band);
}
.hero__inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 2; }
.hero__logo {
  width: 240px; height: 200px; margin: 0 auto 20px;
  filter: drop-shadow(0 0 40px oklch(30% 0.1 32 / 0.5));
}
.hero__logo img { width: 100%; height: 100%; object-fit: contain; }
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(48px, 9vw, 96px); line-height: 1;
  margin: 0 0 18px; letter-spacing: 2px; text-wrap: pretty;
  animation: flicker 6s infinite;
}
.hero p { font-size: 18px; color: var(--text-muted); max-width: 560px; margin: 0 auto 34px; line-height: 1.5; }
.hero__cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.marquee {
  background: var(--bg-deep);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 14px 0; overflow: hidden; white-space: nowrap;
}
.marquee__track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee span {
  font-family: var(--display); font-size: 20px; letter-spacing: 3px;
  color: oklch(60% 0.02 60); padding-right: 40px; white-space: nowrap;
}

/* ---------- Shop ------------------------------------------------------ */

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; overflow: hidden; display: flex; flex-direction: column;
  min-width: 0; /* let the grid size columns evenly instead of to image width */
}
.card__media {
  aspect-ratio: 1; flex: none; min-height: 0; overflow: hidden;
  background: var(--tile);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.card__media img { width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.card__media--empty {
  color: oklch(45% 0.01 60); font-size: 13px; text-align: center;
  padding: 24px; line-height: 1.5;
}
.card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card__cat { color: var(--rust); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; margin-bottom: 6px; text-transform: uppercase; }
.card__name { font-weight: 600; font-size: 17px; margin-bottom: 6px; }
.card__blurb { color: var(--text-muted); font-size: 13px; line-height: 1.5; margin: 0 0 16px; flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__price { font-weight: 700; font-size: 18px; }

.stepper {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 3px; padding: 6px 10px;
}
.stepper button { background: none; border: none; color: var(--text); font-size: 16px; cursor: pointer; width: 20px; font-family: var(--ui); }
.stepper span { min-width: 16px; text-align: center; font-weight: 600; }

/* ---------- Manifesto ------------------------------------------------- */

.band { position: relative; padding: 90px 28px 70px; text-align: center; overflow: hidden; background: var(--band); }
.band h1 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 6vw, 52px); margin: 0; }

.figure {
  position: relative; margin: -20px 0 48px; border-radius: 4px; overflow: hidden;
  border: 1px solid oklch(30% 0.02 40); box-shadow: 0 0 70px oklch(30% 0.12 32 / 0.35);
}
.figure img { width: 100%; display: block; }
.figure::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, oklch(13% 0.014 45 / 0) 60%, oklch(13% 0.014 45 / 0.9) 100%);
}

.prose { font-size: 17px; line-height: 1.9; color: var(--text-2); }

.rules { margin-top: 56px; padding: 32px 0; display: flex; align-items: center; gap: 28px; }
.rules img { width: 110px; height: 110px; object-fit: contain; flex: none; }
.rules h2 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 0 0 6px; }
.rules p { color: var(--text-muted); margin: 0; line-height: 1.7; font-size: 15px; }

/* ---------- Complaints ------------------------------------------------ */

.empty {
  margin-top: 48px; padding: 64px 32px; text-align: center;
  border: 1px dashed var(--border-strong); border-radius: 4px; background: var(--surface-2);
}
.empty__stars { color: var(--rust); letter-spacing: 3px; font-size: 20px; margin-bottom: 16px; }
.empty h2 { font-family: var(--display); font-weight: 400; font-size: 28px; margin: 0 0 12px; }
.empty p { color: oklch(70% 0.015 60); max-width: 440px; margin: 0 auto; line-height: 1.6; }

.review {
  background: var(--surface); border: 1px solid var(--border); border-radius: 4px;
  padding: 24px 26px;
}
.review + .review { margin-top: 20px; }
.review__head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.review__name { font-weight: 700; }
.review__stars { color: var(--rust); font-size: 14px; letter-spacing: 2px; }
.review__meta { font-size: 12px; color: var(--text-faint); margin-bottom: 12px; }
.review__quote { line-height: 1.6; color: var(--text-2); margin: 0 0 14px; }
.review__reply { border-top: 1px solid var(--border); padding-top: 12px; font-size: 13px; color: var(--text-muted); }
.review__reply b { color: var(--text-muted); }

/* ---------- Forms ----------------------------------------------------- */

.form { display: flex; flex-direction: column; gap: 16px; }
.form--tight { gap: 14px; }
.field {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 14px 16px; border-radius: 3px; font-family: var(--ui); font-size: 14px; width: 100%;
}
.field::placeholder { color: var(--text-faint); }
.field:focus { outline: 2px solid var(--rust); outline-offset: 1px; }
textarea.field { resize: vertical; }
.field-row { display: flex; gap: 14px; }
.field-row .field:first-child { flex: 1; }
.field-row .field--zip { width: 120px; flex: none; }

.form-note { text-align: center; color: var(--text-faint); font-size: 12px; }
.form-ok { color: var(--rust); text-align: center; font-weight: 600; letter-spacing: 1px; }

/* ---------- Cart drawer ----------------------------------------------- */

.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 90; }
.scrim[hidden], .drawer[hidden] { display: none; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw); background: var(--surface-2);
  border-left: 1px solid var(--border); z-index: 91;
  display: flex; flex-direction: column; padding: 24px;
}
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.drawer__title { font-family: var(--display); font-size: 24px; }
.drawer__close { background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; line-height: 1; }
.drawer__empty { color: var(--text-muted); text-align: center; margin-top: 40px; }
.drawer__items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.drawer__foot { border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.drawer__subtotal { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; margin-bottom: 16px; }

.line { display: flex; gap: 14px; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.line__thumb {
  width: 56px; height: 56px; background: var(--tile); border-radius: 3px; flex: none;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.line__thumb img { width: 100%; height: 100%; object-fit: contain; }
.line__info { flex: 1; }
.line__name { font-weight: 600; font-size: 14px; }
.line__price { color: var(--text-muted); font-size: 12px; }
.line__qty { display: flex; align-items: center; gap: 8px; }
.line__qty button {
  background: none; border: 1px solid var(--border); color: var(--text);
  width: 24px; height: 24px; border-radius: 3px; cursor: pointer; font-family: var(--ui);
}
.line__qty span { min-width: 14px; text-align: center; font-size: 13px; }

/* ---------- Checkout -------------------------------------------------- */

.summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 4px; padding: 8px 24px; margin-bottom: 24px;
}
.summary__row { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.summary__sub { color: var(--text-muted); font-size: 13px; }
.summary__total { display: flex; justify-content: space-between; padding: 20px 0; font-weight: 700; font-size: 18px; }
.checkout h1 { font-family: var(--display); font-weight: 400; font-size: 36px; margin: 0 0 28px; text-align: center; }
.due { display: flex; justify-content: space-between; padding: 16px 0; font-weight: 700; font-size: 17px; border-top: 1px solid var(--border); margin-top: 8px; }
.confirmed { text-align: center; }
.confirmed__title { font-family: var(--display); font-size: 40px; color: var(--rust); margin-bottom: 14px; }

/* ---------- Mobile ---------------------------------------------------- */

@media (max-width: 860px) {
  .nav { padding: 12px 18px; }
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: 0 0 auto 0; top: 71px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-nav); border-bottom: 1px solid var(--border);
    padding: 8px 18px 20px; z-index: 49;
  }
  .nav__links[hidden] { display: none; }
  .nav__links a { padding: 14px 2px; font-size: 16px; border-bottom: 1px solid var(--border); }
  .nav__links .cart-btn { margin-top: 16px; width: 100%; padding: 14px; font-size: 14px; }
  .cart-badge { top: 6px; right: 12px; }
  .nav__wordmark { font-size: 22px; }
  .nav__brand img { height: 38px; width: 38px; }

  .wrap { padding: 44px 20px 72px; }
  .hero { padding: 64px 20px 56px; }
  .hero__logo { width: 190px; height: 158px; }
  .band { padding: 64px 20px 56px; }
  .rules { flex-direction: column; text-align: center; gap: 18px; }
  .field-row { flex-direction: column; }
  .field-row .field--zip { width: 100%; }
  .page-head h1 { font-size: 34px; }
}

/* ---------- Password gate --------------------------------------------- */

html.is-locked body > *:not(.gate) { display: none !important; }

.gate {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg); background-image: var(--band);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.gate__box { max-width: 380px; width: 100%; }
.gate__box img { width: 150px; margin: 0 auto 18px; display: block; }
.gate h1 { font-family: var(--display); font-weight: 400; font-size: 30px; margin: 0 0 6px; }
.gate p { color: var(--text-muted); font-size: 14px; margin: 0 0 22px; }
.gate form { display: flex; flex-direction: column; gap: 12px; }
.gate__err { color: var(--rust); font-size: 13px; letter-spacing: 1px; min-height: 18px; }


/* ---------- shop note + contact form ------------------------------------ */

/* Shop page: fulfilment / shipping note under the heading. */
.shop-note {
  max-width: 62ch; margin: 14px 0 0; color: var(--text-muted);
  font-size: 14px; line-height: 1.6;
}
.shop-note strong { color: var(--rust); font-weight: 700; letter-spacing: .5px; }

/* Netlify Forms honeypot — must be in the DOM but never visible or focusable. */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Contact form error state (.form-ok is defined further up). */
.form-err { color: oklch(62% 0.19 27); font-size: 13px; line-height: 1.5; }
