/* Bikes On Roof – site styles */

:root {
  color-scheme: light dark;
  --hivis: #EAE625;
  --ink: #000000;
  --paper: #FFFFFF;
  --tarmac: #3A3A3A;
  --tarmac-text: #F2F2EE;
  --sign-red: #D7261E;
  --bg: #FFFFFF;
  --text: #000000;
  --muted: #4A4A4A;
  --line: #000000;
  --card: #F5F5F2;

  --display: "Outfit", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --body: "Barlow", "Bahnschrift", "DIN Alternate", "Helvetica Neue", Arial, sans-serif;
  --measure: 62ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --text: #F4F4EE;
    --muted: #B9B9B2;
    --line: #F4F4EE;
    --card: #1A1A1A;
    --tarmac: #262626;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sign-red); outline-offset: 3px; }

.wrap { width: min(1160px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* ---------- Header ---------- */
.site-head {
  background: var(--hivis);
  color: var(--ink);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: 1rem;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; font-family: var(--display); font-weight: 900;
  font-size: 1.25rem; letter-spacing: -.01em; line-height: 1;
}
.brand svg { width: 2.6rem; height: auto; }
.head-link {
  font-weight: 700; text-decoration: none;
  border: 3px solid var(--ink); padding: .45rem 1rem; border-radius: 999px;
}
.head-link:hover { background: var(--ink); color: var(--hivis); }

/* ---------- Hero ---------- */
.hero {
  background: var(--hivis);
  color: var(--ink);
  position: relative;
  overflow: hidden;
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.barrier {
  position: relative;
  height: clamp(28px, 4vw, 40px);
  background: repeating-linear-gradient(-45deg, var(--ink) 0 26px, var(--hivis) 26px 52px);
  border-block: 4px solid var(--ink);
  transform-origin: left center;
  animation: lower 900ms cubic-bezier(.3,1.4,.5,1) 200ms both;
}
@keyframes lower {
  from { transform: rotate(-9deg) translateY(-120%); }
  to   { transform: rotate(0) translateY(0); }
}
@media (prefers-reduced-motion: reduce) { .barrier { animation: none; } }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
}
.hero h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(3.6rem, 12vw, 9.5rem);
  line-height: .86; letter-spacing: -.035em;
  margin: 0;
  text-transform: uppercase;
}
.hero h1 .on {
  display: flex; align-items: center; gap: .12em;
  font-size: .42em; letter-spacing: -.01em;
  margin-block: .06em .02em;
}
.hero h1 .on svg { width: 3.3em; height: auto; }
.hero-copy { margin-top: 2rem; max-width: 34ch; font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 500; }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.btn {
  display: inline-block;
  font-family: var(--body); font-weight: 700; font-size: 1.1rem;
  text-decoration: none; text-align: center;
  background: var(--ink); color: var(--hivis);
  border: 3px solid var(--ink);
  padding: .85rem 1.6rem; border-radius: 999px;
  cursor: pointer;
}
.btn:hover { background: transparent; color: var(--ink); }
.hero .note { font-weight: 600; }

.sign-col { display: grid; justify-items: center; gap: 1rem; }
.height-sign { width: min(280px, 70vw); filter: drop-shadow(0 6px 0 rgba(0,0,0,.18)); }
.sign-post { width: 14px; height: 70px; background: var(--ink); margin-top: -1rem; }
.sign-caption { font-weight: 600; text-align: center; max-width: 24ch; }

/* ---------- Story ---------- */
.story { background: var(--tarmac); color: var(--tarmac-text); padding-block: clamp(3.5rem, 8vw, 6rem); }
.story-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 4rem); }
.story h2 {
  font-family: var(--display); font-weight: 900; margin: 0;
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: .95; letter-spacing: -.02em;
}
.story p { max-width: var(--measure); margin: 0 0 1.1em; }
.story p:last-child { margin-bottom: 0; }
.story strong { color: var(--hivis); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-head { max-width: 40rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 {
  font-family: var(--display); font-weight: 900; margin: 0 0 .5rem;
  font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: .95; letter-spacing: -.02em;
}
.section-head p { margin: 0; color: var(--muted); }

/* ---------- Kit ---------- */
.kit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.item h3 { font-family: var(--display); font-weight: 800; font-size: 1.6rem; margin: 1.25rem 0 .35rem; letter-spacing: -.01em; }
.item p { margin: 0 0 .5rem; max-width: 46ch; }
.item .spec { color: var(--muted); font-size: 1rem; }
.ast { color: var(--sign-red); font-weight: 800; }
.footnote { color: var(--muted); font-size: .95rem; margin-top: .75rem; padding-left: .9em; text-indent: -.9em; }

.hanger-stage { display: grid; justify-items: center; background: var(--card); border-radius: 20px; padding: 2rem 1rem 1.5rem; }
.hanger { perspective: 1200px; width: min(220px, 60vw); aspect-ratio: 105 / 216; }
.hanger-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 650ms cubic-bezier(.4,.1,.2,1);
}
.hanger.flipped .hanger-inner { transform: rotateY(180deg); }
.hanger-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; filter: drop-shadow(0 4px 0 rgba(0,0,0,.2)); }
.hanger-face.back { transform: rotateY(180deg); }
@media (prefers-reduced-motion: reduce) { .hanger-inner { transition: none; } }
.flip-btn {
  margin-top: 1.25rem;
  font: 600 1rem var(--body);
  background: transparent; color: var(--text);
  border: 2px solid var(--line); border-radius: 999px;
  padding: .5rem 1.1rem; cursor: pointer;
}
.flip-btn:hover { background: var(--text); color: var(--bg); }

.sticker-stage {
  display: grid; gap: 1.25rem; border-radius: 20px; padding: clamp(1.5rem, 3vw, 2.5rem);
  background:
    repeating-linear-gradient(-45deg, #000 0 14px, #EAE625 14px 28px) 0 34% / 100% 16px no-repeat,
    linear-gradient(#8FBFE0 0%, #D8EBF6 52%, #7A7A76 52%, #4E4E4B 100%);
}
.sticker { filter: drop-shadow(0 2px 3px rgba(0,0,0,.25)); }
.sticker:nth-child(2) { margin-left: 8%; transform: rotate(-1.5deg); }

/* ---------- Packs ---------- */
.packs-section { background: var(--hivis); color: var(--ink); }
.packs-section .section-head p { color: var(--ink); }
.packs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}
.pack {
  background: var(--paper); color: var(--ink);
  border: 4px solid var(--ink);
  border-radius: 18px;
  padding: 1.75rem 1.5rem 1.5rem;
  display: flex; flex-direction: column;
  position: relative;
}
.pack.featured { background: var(--ink); color: var(--paper); transform: translateY(-.75rem); }
.pack.selected { outline: 6px solid var(--sign-red); outline-offset: 4px; }
.pack .tag {
  position: absolute; top: -1rem; left: 1.5rem;
  background: var(--sign-red); color: #fff;
  font-weight: 700; font-size: .95rem;
  padding: .2rem .8rem; border-radius: 999px;
}
.pack h3 { font-family: var(--display); font-weight: 900; font-size: 1.75rem; margin: 0 0 .25rem; letter-spacing: -.01em; }
.pack .for { margin: 0 0 1.25rem; font-weight: 500; opacity: .85; }
.price { font-family: var(--display); font-weight: 900; font-size: 3.4rem; line-height: 1; letter-spacing: -.03em; margin: 0 0 .25rem; }
.price small { font-family: var(--body); font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.contents { list-style: none; padding: 0; margin: 1rem 0 1.5rem; display: grid; gap: .4rem; font-weight: 600; }
.contents li { display: flex; gap: .6rem; align-items: center; }
.contents li::before { content: ""; width: .7rem; height: .7rem; background: var(--hivis); border: 2px solid currentColor; flex: none; }
.pack .btn { margin-top: auto; width: 100%; }
.pack.featured .btn { background: var(--hivis); color: var(--ink); border-color: var(--hivis); }
.pack.featured .btn:hover { background: transparent; color: var(--hivis); }
.delivery { margin-top: 2rem; font-weight: 600; max-width: 60ch; }

/* ---------- Steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem); counter-reset: step; }
.steps li { counter-increment: step; border-top: 4px solid var(--line); padding-top: 1rem; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 2.6rem; height: 2.6rem; border-radius: 50%;
  background: var(--hivis); color: var(--ink);
  font-family: var(--display); font-weight: 900; font-size: 1.3rem;
  margin-bottom: .9rem;
}
.steps h3 { font-family: var(--display); font-weight: 800; font-size: 1.4rem; margin: 0 0 .35rem; }
.steps p { margin: 0; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 48rem; }
.faq details { border-top: 2px solid var(--line); }
.faq details:last-of-type { border-bottom: 2px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 700; font-size: 1.2rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 1rem; height: 1rem;
  background: linear-gradient(currentColor, currentColor) center / 100% 3px no-repeat,
              linear-gradient(currentColor, currentColor) center / 3px 100% no-repeat;
  transition: transform 200ms ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 1.25rem; max-width: var(--measure); color: var(--muted); }

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: #F4F4EE; padding-block: 2.5rem; font-size: 1rem; }
@media (prefers-color-scheme: dark) { .site-foot { border-top: 1px solid #333; } }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-foot a { text-decoration-color: var(--hivis); text-underline-offset: 3px; }

/* ---------- Basket ---------- */
.basket-btn { display: inline-flex; align-items: center; gap: .5rem; background: transparent; color: var(--ink); font: 700 1rem var(--body); cursor: pointer; }
.basket-btn .count {
  display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 .35rem;
  border-radius: 999px; background: var(--ink); color: var(--hivis); font-size: .9rem;
}
.basket-btn:hover .count { background: var(--hivis); color: var(--ink); }
.pack .btn.added { background: var(--sign-red); border-color: var(--sign-red); color: #fff; }

dialog.basket {
  margin: 0 0 0 auto; padding: 0; border: 0;
  width: min(440px, 100%); height: 100%; max-height: 100%; max-width: 100%;
  background: var(--bg); color: var(--text);
  border-left: 4px solid var(--line);
}
dialog.basket::backdrop { background: rgba(0,0,0,.55); }
dialog.basket[open] { display: flex; flex-direction: column; animation: slide-in 220ms ease-out; }
@keyframes slide-in { from { transform: translateX(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.basket[open] { animation: none; } }
.basket-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; background: var(--hivis); color: var(--ink); }
.basket-head h2 { font-family: var(--display); font-weight: 900; font-size: 1.6rem; margin: 0; letter-spacing: -.01em; }
.basket-close { background: transparent; border: 3px solid var(--ink); color: var(--ink); border-radius: 999px; font: 700 1rem var(--body); padding: .3rem .9rem; cursor: pointer; }
.basket-close:hover { background: var(--ink); color: var(--hivis); }
.basket-body { flex: 1; overflow-y: auto; padding: .5rem 1.25rem; }
.basket-empty { color: var(--muted); padding: 1.5rem 0; }
.basket-lines { list-style: none; margin: 0; padding: 0; }
.basket-line { display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; padding: 1rem 0; border-bottom: 2px solid var(--line); }
.basket-line h3 { font-family: var(--display); font-weight: 800; font-size: 1.2rem; margin: 0; }
.basket-line .what { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .95rem; }
.basket-line .line-total { font-weight: 700; text-align: right; }
.qty { justify-self: start; display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty button { width: 2.2rem; height: 2.2rem; border: 0; background: transparent; color: var(--text); font: 700 1.2rem var(--body); cursor: pointer; }
.qty button:hover { background: var(--text); color: var(--bg); }
.qty output { min-width: 2rem; text-align: center; font-weight: 700; }
.remove { background: none; border: 0; padding: 0; color: var(--muted); font: 600 .95rem var(--body); text-decoration: underline; cursor: pointer; justify-self: end; align-self: center; }
.basket-foot { padding: 1.25rem; border-top: 4px solid var(--line); display: grid; gap: .75rem; }
.basket-row { display: flex; justify-content: space-between; font-weight: 600; }
.basket-row.total { font-family: var(--display); font-weight: 900; font-size: 1.6rem; }
.basket-foot .btn { width: 100%; }
.basket-foot .btn[disabled] { opacity: .55; cursor: not-allowed; }
@media (prefers-color-scheme: dark) {
  .basket-foot .btn { background: var(--hivis); color: var(--ink); border-color: var(--hivis); }
  .basket-foot .btn:hover:not([disabled]) { background: transparent; color: var(--hivis); }
}
.basket-error { color: var(--sign-red); font-weight: 700; margin: 0; }
.basket-error:empty { display: none; }
.basket-secure { margin: 0; color: var(--muted); font-size: .9rem; text-align: center; }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 50;
  max-width: 44rem; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem;
  padding: 1rem 1.25rem;
  background: var(--ink); color: #F4F4EE;
  border: 3px solid var(--hivis); border-radius: 18px;
  box-shadow: 0 6px 0 rgba(0,0,0,.25);
}
.consent[hidden] { display: none; }
.consent-text { margin: 0; flex: 1 1 18rem; font-size: 1rem; line-height: 1.45; }
.consent-text a { color: inherit; text-decoration-color: var(--hivis); text-underline-offset: 3px; }
.consent-actions { display: flex; gap: .6rem; flex: none; }
.consent-btn {
  font: 700 1rem var(--body); cursor: pointer;
  padding: .55rem 1.3rem; border-radius: 999px;
  border: 2px solid #F4F4EE; background: #F4F4EE; color: var(--ink);
}
.consent-btn.primary { background: var(--hivis); border-color: var(--hivis); }
.consent-btn:hover { background: transparent; color: #F4F4EE; }
.consent-btn.primary:hover { color: var(--hivis); }
.site-foot [data-cookie-settings] { cursor: pointer; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .story-grid, .kit { grid-template-columns: 1fr; }
  .sign-col { justify-items: start; grid-template-columns: auto 1fr; align-items: center; }
  .height-sign { width: 140px; }
  .sign-post { display: none; }
  .sign-caption { text-align: left; }
  .packs { grid-template-columns: 1fr; gap: 1.75rem; }
  .pack.featured { transform: none; order: -1; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand span { display: none; }
}
