:root {
  color-scheme: dark;
  --bg: #070604;
  --bg-2: #0e0b08;
  --panel: rgba(20, 17, 13, 0.86);
  --panel-solid: #14110d;
  --panel-2: #1d1812;
  --ink: #f7efe2;
  --muted: #b7aa98;
  --faint: #776b5c;
  --gold: #c7a461;
  --gold-2: #ebd39a;
  --espresso: #241910;
  --line: rgba(235, 211, 154, 0.18);
  --danger: #ffae9f;
  --ok: #c8dfa7;
  --glow: rgba(199, 164, 97, 0.2);
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.5);
  --radius: 8px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 4%, rgba(199, 164, 97, 0.12), transparent 24rem),
    linear-gradient(180deg, var(--bg-2) 0, var(--bg) 45rem);
  color: var(--ink);
  text-rendering: optimizeLegibility;
}

body.drawer-open,
body.modal-open { overflow: hidden; }

button,
input,
select,
textarea { font: inherit; }

button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
a { color: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  background: var(--ink);
  color: #080604;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 3px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.62rem clamp(0.9rem, 3vw, 1.5rem);
  border-bottom: 1px solid rgba(235, 211, 154, 0.12);
  background: rgba(7, 6, 4, 0.78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.brand-mark,
.brand-logo {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(235, 211, 154, 0.52);
  color: var(--gold-2);
  background: rgba(18, 14, 10, 0.9);
}
.brand-logo {
  display: block;
  border-radius: 999px;
  object-fit: cover;
  padding: 0;
}
.brand strong,
.brand small { display: block; }
.brand strong { font-size: 0.95rem; }
.brand small { color: var(--muted); font-size: 0.64rem; }

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(0.7rem, 2.5vw, 2rem);
  color: #d8cbb9;
  font-size: 0.86rem;
}
.site-nav a {
  text-decoration: none;
  transition: color 160ms ease;
}
.site-nav a:hover { color: var(--gold-2); }

.header-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 0.45rem;
}

.social-link {
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  height: 2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-2);
  font-size: 0.95rem;
  font-weight: 900;
  text-decoration: none;
  background:
    radial-gradient(circle at 35% 18%, rgba(235, 211, 154, 0.16), transparent 42%),
    rgba(14, 11, 8, 0.8);
}
.social-link:hover {
  color: var(--gold-2);
  border-color: rgba(235, 211, 154, 0.45);
}

.header-cart {
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid rgba(235, 211, 154, 0.28);
  border-radius: 999px;
  padding: 0.32rem 0.45rem 0.32rem 0.8rem;
  background: rgba(20, 17, 13, 0.9);
  color: var(--ink);
}
.header-cart strong {
  display: grid;
  place-items: center;
  min-width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(235, 211, 154, 0.92);
  color: #0b0805;
  font-size: 0.82rem;
  line-height: 1;
}

main {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 8rem;
}

.hero {
  min-height: clamp(360px, 52svh, 500px);
  display: grid;
  align-items: end;
  margin-inline: calc(50% - 50vw);
  padding: 4.5rem max(1rem, calc((100vw - 1180px) / 2)) 2.4rem;
  background:
    linear-gradient(90deg, rgba(7, 6, 4, 0.9) 0%, rgba(7, 6, 4, 0.68) 37%, rgba(7, 6, 4, 0.25) 100%),
    linear-gradient(0deg, rgba(7, 6, 4, 0.94) 0%, rgba(7, 6, 4, 0) 34%),
    url("./assets/brand/kracked-bg.png") 58% center / cover;
}

.hero-copy { max-width: 620px; }
.eyebrow {
  margin: 0 0 0.7rem;
  color: var(--gold-2);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }
h1,
h2,
h3 {
  letter-spacing: 0;
  max-width: 100%;
}
h1 {
  max-width: 620px;
  margin-bottom: 0.75rem;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.94;
}
h2 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.65rem, 3vw, 2.7rem);
  line-height: 1;
}
h3 { font-size: 1.02rem; line-height: 1.12; }

.hero p:not(.eyebrow),
.section-heading > p,
.feature-grid p {
  color: #e4d7c5;
  font-size: clamp(0.92rem, 1.35vw, 1.05rem);
  line-height: 1.45;
}
.hero p:not(.eyebrow) { max-width: 440px; }

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.64rem 0.85rem;
  background: rgba(255, 255, 255, 0.035);
  color: var(--ink);
  text-decoration: none;
  font-weight: 850;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-1px); border-color: rgba(235, 211, 154, 0.45); }
.button.primary {
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #0c0804;
  border-color: rgba(235, 211, 154, 0.85);
}
.button.ghost { background: rgba(255, 255, 255, 0.035); }
.button.wide { width: 100%; }

.shop-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 1.25rem;
  align-items: start;
  padding-top: 1.35rem;
  min-width: 0;
}

.section-heading { margin-bottom: 0.9rem; }
.section-heading.compact h2 { font-size: 1.22rem; }

.product-area {
  min-width: 0;
}

.category-filter {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  max-width: 100%;
  padding: 0.1rem 0 0.9rem;
  scrollbar-width: thin;
}
.filter-button {
  min-height: 2.25rem;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: rgba(16, 13, 10, 0.9);
  color: var(--muted);
}
.filter-button.active {
  color: #0b0805;
  background: var(--gold-2);
  border-color: var(--gold-2);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.72rem;
  min-width: 0;
}

.product-card,
.cart-panel,
.checkout-panel,
.payment-panel,
.confirmation-panel,
.admin-test,
.drawer-sheet,
.modal-card,
.feature-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 18% 0%, rgba(235, 211, 154, 0.12), transparent 36%),
    linear-gradient(145deg, rgba(44, 31, 20, 0.94), rgba(10, 8, 6, 0.96) 58%),
    var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 16px 42px rgba(0, 0, 0, 0.28);
}

.product-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
.product-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1.22;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: #15110d;
}
.product-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.06) brightness(0.86);
  transform: scale(1.02);
  transition: transform 260ms ease, filter 260ms ease;
}

.product-body { padding: 0.68rem; }
.product-top {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: flex-start;
  min-width: 0;
}
.product-top > div,
.product-body,
.card-actions,
.button,
.quantity-control {
  min-width: 0;
}
.product-card h3 { margin: 0 0 0.18rem; font-size: 0.94rem; }
.pack,
.description,
.cart-note,
.trust-note,
.privacy-note,
.optional,
.empty-cart,
.admin-test p {
  color: var(--muted);
}
.price {
  color: var(--gold-2);
  font-weight: 900;
  white-space: nowrap;
  font-size: 0.94rem;
}
.description {
  margin-bottom: 0;
  font-size: 0.8rem;
  line-height: 1.35;
}

.modal-copy .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.8rem 0;
}
.tag {
  border: 1px solid rgba(199, 164, 97, 0.28);
  border-radius: 999px;
  padding: 0.25rem 0.5rem;
  color: #d7c7aa;
  font-size: 0.76rem;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.36rem;
  margin-top: 0.55rem;
}
.quantity-control {
  min-height: 2.05rem;
  display: grid;
  grid-template-columns: 2.05rem 1fr 2.05rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(7, 6, 4, 0.92);
}
.quantity-control button {
  height: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.1rem;
}
.quantity-control span {
  text-align: center;
  font-weight: 900;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.cart-panel {
  position: sticky;
  top: 3.6rem;
  padding: 0.85rem;
}
.cart-list {
  display: grid;
  gap: 0.8rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.cart-item {
  display: grid;
  gap: 0.6rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(235, 211, 154, 0.12);
}
.cart-item-title {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  font-weight: 900;
}
.cart-item small { color: var(--muted); }
.cart-item-actions {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 0.6rem;
  align-items: center;
}

.promo-box {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}
label {
  display: grid;
  gap: 0.45rem;
  color: #eadfce;
  font-weight: 800;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 6, 4, 0.94);
  color: var(--ink);
  padding: 0.88rem;
}
textarea { resize: vertical; }
.field-error,
.promo-message {
  min-height: 1.1rem;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 760;
}
.promo-message.ok { color: var(--ok); }

.totals {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
}
.total-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}
.total-line.strong {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 900;
}

.feature-grid h2 { font-size: clamp(1.25rem, 2vw, 1.7rem); }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.8rem;
}
.feature-grid article {
  padding: clamp(1rem, 2vw, 1.2rem);
}

.checkout-panel,
.payment-panel,
.confirmation-panel,
.admin-test {
  margin-top: 0.9rem;
  padding: clamp(0.9rem, 2vw, 1.2rem);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.fulfilment-options,
.delivery-fields {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}
.fulfilment-options legend {
  padding: 0 0.4rem;
  color: var(--ink);
  font-weight: 900;
}
.radio-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.7rem;
  padding: 0.8rem 0;
}
.radio-card input { width: auto; margin-top: 0.2rem; }
.radio-card small { grid-column: 2; color: var(--muted); font-weight: 500; }
.delivery-fields {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 1rem;
}
.delivery-fields[hidden] { display: none; }
.delivery-fields .trust-note { grid-column: 1 / -1; margin-bottom: 0; }
.privacy-note { margin: 1rem 0; line-height: 1.5; }

.payment-layout,
.confirmation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 1rem;
  align-items: start;
}
.paynow-box,
.summary-box {
  border: 1px solid rgba(235, 211, 154, 0.14);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(7, 6, 4, 0.64);
}
.qr-placeholder {
  display: grid;
  place-items: center;
  gap: 0.25rem;
  aspect-ratio: 1;
  margin-bottom: 1rem;
  border: 1px dashed rgba(235, 211, 154, 0.5);
  color: var(--gold-2);
  text-align: center;
  font-weight: 900;
  background:
    repeating-linear-gradient(45deg, rgba(235, 211, 154, 0.07) 0 8px, transparent 8px 16px),
    #100c08;
}
.qr-placeholder span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(235, 211, 154, 0.35);
  border-radius: 999px;
  padding: 0.45rem 0.65rem;
  color: var(--gold-2);
  font-weight: 900;
}

.admin-test { margin-bottom: 3rem; opacity: 0.8; }
.admin-test summary { cursor: pointer; font-weight: 900; }
.admin-test pre {
  max-height: 260px;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--line);
  background: #050403;
  color: var(--muted);
}

.mobile-cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: none;
  padding: 0.75rem;
  background: linear-gradient(180deg, transparent, rgba(7, 6, 4, 0.96) 25%);
}
.mobile-cart-bar button {
  width: min(680px, 100%);
  min-height: 3.45rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.8rem;
  align-items: center;
  border: 1px solid rgba(235, 211, 154, 0.62);
  border-radius: var(--radius);
  padding: 0 1rem;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  color: #0b0805;
  font-weight: 900;
  box-shadow: var(--shadow);
}

.cart-drawer,
.product-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}
.cart-drawer.open,
.product-modal.open { display: block; }
.drawer-backdrop,
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}
.drawer-sheet {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  overflow: auto;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.icon-button {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(7, 6, 4, 0.9);
  color: var(--ink);
  font-size: 1.5rem;
}
.modal-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(900px, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  overflow: auto;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow);
}

.quiz-prompt {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
}
.quiz-prompt.open { display: block; }
.quiz-card {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(390px, calc(100% - 2rem));
  transform: translate(-50%, -50%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  background:
    radial-gradient(circle at 20% 0%, rgba(235, 211, 154, 0.16), transparent 40%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.018)),
    rgba(14, 11, 8, 0.96);
  box-shadow: var(--shadow);
}
.quiz-card h2 {
  font-size: 1.45rem;
  margin-right: 2.8rem;
}
.quiz-card p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.45;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.2rem;
  padding: 1.2rem 0 0;
  border-top: 1px solid rgba(235, 211, 154, 0.14);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.8rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-links a {
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--gold-2);
}
.modal-close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 2;
}
.modal-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.modal-product .product-visual { aspect-ratio: auto; min-height: 460px; }
.modal-copy { padding: clamp(1rem, 3vw, 1.6rem); }

@media (hover: hover) and (pointer: fine) {
  .product-card:hover img { transform: scale(1.07); filter: saturate(1) contrast(1.08) brightness(0.92); }
}

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

@media (max-width: 980px) {
  main { width: min(100% - 1rem, 760px); }
  .site-header { grid-template-columns: 1fr auto; }
  .site-nav { display: none; }
  .shop-shell { grid-template-columns: 1fr; padding-top: 2rem; }
  .cart-panel { display: none; }
  .mobile-cart-bar:not([hidden]) { display: block; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .feature-grid,
  .form-grid,
  .delivery-fields,
  .payment-layout,
  .confirmation-layout,
  .modal-product { grid-template-columns: 1fr; }
  .modal-product .product-visual { min-height: 270px; aspect-ratio: 1.2; }
  .drawer-sheet {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(86svh, 740px);
    border-radius: 16px 16px 0 0;
  }
}

@media (max-width: 540px) {
  main {
    width: 100%;
    padding-inline: 1rem;
  }
  .site-header { padding: 0.7rem 0.75rem; }
  .site-header {
    grid-template-columns: auto auto;
    justify-content: start;
    gap: 0.6rem;
  }
  .header-actions {
    gap: 0.25rem;
    margin-left: 0;
    min-width: 0;
    justify-self: start;
  }
  .social-link {
    min-width: 1.9rem;
    height: 1.9rem;
    font-size: 0.68rem;
  }
  .header-cart { padding-left: 0.75rem; }
  .header-cart span { display: none; }
  .hero {
    min-height: 340px;
    padding-top: 3.8rem;
    padding-bottom: 1.3rem;
    background-position: 58% center;
  }
  .hero-copy,
  .section-heading,
  .product-area,
  .feature-grid,
  .checkout-panel,
  .payment-panel,
  .confirmation-panel,
  .admin-test {
    width: 100%;
    max-width: 100%;
  }
  h1 {
    font-size: 2rem;
    line-height: 0.98;
    max-width: 10ch;
  }
  h2 {
    font-size: 1.4rem;
    line-height: 1.02;
  }
  .hero p:not(.eyebrow) {
    max-width: 19ch;
  }
  .section-heading > p,
  .feature-grid p {
    font-size: 0.95rem;
    max-width: 29ch;
  }
  .hero-actions .button,
  .feature-grid .button { width: 100%; }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, calc((100vw - 2.5rem) / 2)));
    gap: 0.5rem;
    width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
    overflow: hidden;
  }
  .product-card {
    display: block;
    width: calc((100vw - 2.5rem) / 2);
    max-width: calc((100vw - 2.5rem) / 2);
  }
  .product-visual { aspect-ratio: 1.05; min-height: 0; }
  .product-body { padding: 0.58rem; }
  .product-top { display: grid; }
  .product-card h3 {
    font-size: 0.76rem;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }
  .pack,
  .price {
    font-size: 0.76rem;
  }
  .pack { display: none; }
  .product-card .description { display: none; }
  .product-card .link-button { display: none; }
  .product-card .button {
    min-height: 1.85rem;
    padding: 0.42rem 0.2rem;
    font-size: 0.76rem;
    white-space: nowrap;
  }
  .quantity-control {
    min-height: 1.75rem;
    grid-template-columns: 1.55rem minmax(0, 1fr) 1.55rem;
    font-size: 0.82rem;
  }
  .cart-item-actions { grid-template-columns: 1fr; }
  .mobile-cart-bar { padding: 0.65rem; }
  .mobile-cart-bar button { font-size: 0.92rem; }
  .quiz-card {
    left: 50%;
    right: auto;
    top: 50%;
    bottom: auto;
    width: min(330px, calc(100vw - 2rem));
    transform: translate(-50%, -50%);
  }
  .site-footer {
    display: grid;
    align-items: start;
  }
  .footer-links {
    justify-content: start;
  }
}
