/* ARC Rides — ARC One
   Tokens: porcelain paper, ink, electric cobalt accent.
   Type: Archivo (wide) display / Instrument Sans body / IBM Plex Mono data. */

:root {
  --paper: #EEF0EF;
  --panel: #FFFFFF;
  --ink: #10151B;
  --ink-soft: #232A32;
  --muted: #5C6670;
  --line: #D7DBD9;
  --accent: #2244EE;
  --accent-dark: #1834C4;
  --frame: #B9BFB2; /* sage default */
  --radius: 10px;
  --display: "Archivo", sans-serif;
  --body: "Instrument Sans", sans-serif;
  --mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-stretch: 118%;
  line-height: 1.04;
  letter-spacing: -0.015em;
}

a { color: inherit; }

button { font: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- product photos ---------- */

.hero-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  animation: bike-in 0.9s cubic-bezier(.2,.7,.2,1) both;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  border: 1.5px solid var(--line);
  background: var(--panel);
  transition: border-color .15s ease;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb:hover { border-color: var(--muted); }

.thumb[aria-selected="true"] { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  padding: 0.9rem clamp(1.25rem, 4vw, 3rem);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--display);
  font-stretch: 118%;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.brand-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin: 0 3px;
}

.nav-links {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
}

.nav-links a:hover { color: var(--ink); }

.cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1.5px solid var(--ink);
  background: transparent;
  border-radius: 999px;
  padding: 0.42rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-btn:hover { background: var(--ink); color: var(--paper); }

.cart-count {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  min-width: 1.35rem;
  height: 1.35rem;
  display: inline-grid;
  place-items: center;
  padding: 0 0.3rem;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(320px, 5fr) 7fr;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 3rem) 3rem;
  max-width: 1440px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 4.6vw, 4rem);
  font-weight: 850;
  margin-bottom: 1.1rem;
}

.hero-sub {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 1.6rem;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.price {
  font-family: var(--display);
  font-stretch: 118%;
  font-weight: 850;
  font-size: 2.1rem;
  letter-spacing: -0.02em;
}

.price-note {
  font-size: 0.86rem;
  color: var(--muted);
}

.cta-row { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 2rem; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 0.85rem 1.7rem;
  font-weight: 600;
  font-size: 1rem;
  transition: background .15s ease, transform .12s ease;
}

.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink-soft);
  background: transparent;
}

.btn-ghost:hover { border-color: var(--ink); }

.variant { margin-bottom: 1.4rem; }

.chips { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.chip {
  border: 1.5px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-soft);
  transition: border-color .15s ease, background .15s ease;
}

.chip:hover { border-color: var(--ink); }

.chip[aria-checked="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.colorway-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.colorway-label strong { color: var(--ink); font-weight: 500; }

.swatches { display: flex; gap: 0.7rem; }

.swatch {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--sw);
  border: 2px solid var(--panel);
  box-shadow: 0 0 0 1.5px var(--line);
  transition: box-shadow .15s ease;
}

.swatch[aria-checked="true"] { box-shadow: 0 0 0 2px var(--ink); }

.hero-stage { position: relative; }

.bike-hero {
  width: 100%;
  height: auto;
  display: block;
  animation: bike-in 0.9s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes bike-in {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: none; }
}

.callout {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateY(-50%);
  animation: callout-in .5s ease both;
  animation-delay: var(--d);
}

@keyframes callout-in {
  from { opacity: 0; transform: translateY(calc(-50% + 6px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}

.callout-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
  flex: none;
}

.callout-text {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  white-space: nowrap;
}

/* ---------- stat bar ---------- */

.statbar {
  background: var(--ink);
  color: var(--paper);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 1.6rem clamp(1.25rem, 4vw, 3rem);
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.4rem clamp(1.2rem, 3.5vw, 3.2rem);
  border-left: 1px solid #2A3038;
}

.stat:first-child { border-left: none; }

.stat-num {
  font-family: var(--display);
  font-stretch: 118%;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
}

.stat-num em {
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 500;
  color: #8B939D;
  margin-left: 3px;
}

.stat-key {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8B939D;
}

/* ---------- shared section chrome ---------- */

.details, .specs, .reviews, .faq {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 5.5rem) clamp(1.25rem, 4vw, 3rem);
}

.section-head { margin-bottom: 2.4rem; }

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 850;
  margin-bottom: 0.5rem;
}

.section-head p { color: var(--muted); max-width: 52ch; }

/* ---------- details ---------- */

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.2rem;
}

.detail-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.detail-art {
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.detail-art img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.detail-card h3 { font-size: 1.12rem; margin: 1.1rem 1.25rem 0.45rem; }

.detail-card p {
  font-size: 0.94rem;
  color: var(--muted);
  margin: 0 1.25rem 1.3rem;
}

/* ---------- specs ---------- */

.specs { padding-top: 0; }

.spec-table {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.spec-table > div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
  border-top: 1px solid var(--line);
}

.spec-table > div:first-child { border-top: none; }
.spec-table > div:nth-child(odd) { background: color-mix(in srgb, var(--paper) 45%, var(--panel)); }

.spec-table dt {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  align-self: center;
}

.spec-table dd { font-size: 0.95rem; font-weight: 500; }

/* ---------- reviews ---------- */

.reviews { padding-top: 0; }

.rating-num {
  font-family: var(--display);
  font-stretch: 118%;
  font-weight: 800;
  color: var(--ink);
  font-size: 1.15rem;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.2rem;
}

.review {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.review p { font-size: 0.97rem; }

.review footer {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: auto;
}

/* ---------- faq ---------- */

.faq { padding-top: 0; max-width: 860px; }

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list details:first-child { border-top: 1px solid var(--line); }

.faq-list summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  padding: 1.1rem 2.2rem 1.1rem 0;
  position: relative;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 0.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--muted);
  transition: transform .2s ease;
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list details p {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0 2.2rem 1.2rem 0;
  max-width: 62ch;
}

/* ---------- footer ---------- */

.footer {
  background: var(--ink);
  color: #B7BEC6;
  margin-top: 2rem;
  padding: 3rem clamp(1.25rem, 4vw, 3rem) 1.6rem;
}

.footer .brand { color: #fff; }

.footer-inner {
  max-width: 1180px;
  margin: 0 auto 2.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand p { margin-top: 0.9rem; font-size: 0.9rem; }

.footer-col { display: flex; flex-direction: column; gap: 0.55rem; }

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6C757F;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.footer-col a {
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-col a:hover { color: #fff; }

.footer-legal {
  max-width: 1180px;
  margin: 0 auto;
  border-top: 1px solid #2A3038;
  padding-top: 1.3rem;
  font-size: 0.8rem;
  color: #6C757F;
}

/* ---------- sticky buy bar ---------- */

.buybar {
  position: fixed;
  left: 50%;
  bottom: 1.1rem;
  transform: translate(-50%, 130%);
  display: flex;
  align-items: center;
  gap: 1.4rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(16, 21, 27, 0.18);
  padding: 0.7rem 0.7rem 0.7rem 1.4rem;
  z-index: 30;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}

.buybar.visible { transform: translate(-50%, 0); }

.buybar-info { display: flex; flex-direction: column; }

.buybar-name { font-weight: 600; font-size: 0.92rem; }

.buybar-price {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- cart drawer ---------- */

.cart[hidden], .cart-backdrop[hidden] { display: none; }

.cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 21, 27, 0.45);
  z-index: 50;
}

.cart {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 100vw);
  background: var(--panel);
  z-index: 51;
  display: flex;
  flex-direction: column;
  box-shadow: -16px 0 50px rgba(16, 21, 27, 0.2);
  animation: cart-in .3s cubic-bezier(.2,.7,.2,1);
}

@keyframes cart-in {
  from { transform: translateX(30px); opacity: 0.4; }
  to   { transform: none; opacity: 1; }
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--line);
}

.cart-head h3 { font-size: 1.1rem; }

.cart-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--muted);
  padding: 0.3rem;
}

.cart-close:hover { color: var(--ink); }

.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; }

.cart-empty {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 2.5rem 0;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-item-swatch {
  width: 44px; height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex: none;
}

.cart-item-info { flex: 1; }

.cart-item-name { font-weight: 600; font-size: 0.94rem; }

.cart-item-price {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.qty button {
  border: none;
  background: none;
  width: 28px; height: 30px;
  font-size: 0.95rem;
  color: var(--muted);
}

.qty button:hover { background: var(--paper); color: var(--ink); }

.qty span {
  font-family: var(--mono);
  font-size: 0.85rem;
  min-width: 26px;
  text-align: center;
}

.cart-foot { border-top: 1px solid var(--line); padding: 1.2rem 1.4rem 1.4rem; }

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.cart-subtotal span:last-child { font-family: var(--mono); }

.cart-shipnote { font-size: 0.82rem; color: var(--muted); margin-bottom: 1rem; }

.btn-wide { width: 100%; }

.cart-msg {
  margin-top: 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-stage { order: -1; }
  .callout { display: none; }
  .nav-links { display: none; }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 1.2rem;
    padding-bottom: 2.2rem;
    gap: 1.4rem;
  }

  .hero h1 { font-size: 2.35rem; }

  .hero-sub { font-size: 1rem; margin-bottom: 1.3rem; }

  .price { font-size: 1.85rem; }

  .cta-row { margin-bottom: 1.6rem; }

  .cta-row .btn-primary,
  .cta-row .btn-ghost {
    flex: 1 1 auto;
    justify-content: center;
    text-align: center;
    padding: 0.95rem 1rem;
  }

  .swatch { width: 40px; height: 40px; }

  /* stat strip becomes a tidy grid instead of a wrapped row */
  .statbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem 0;
    padding: 1.4rem 1rem;
  }

  .stat { border-left: none; padding: 0; }

  .stat-num { font-size: 1.45rem; }

  .detail-art svg { height: 170px; }

  /* specs stack: label above value */
  .spec-table > div {
    grid-template-columns: 1fr;
    gap: 0.15rem;
    padding: 0.75rem 1.1rem;
  }

  .spec-table dt { align-self: start; }

  .footer-inner { grid-template-columns: 1fr; }

  .buybar {
    width: calc(100vw - 1.4rem);
    justify-content: space-between;
    bottom: calc(0.7rem + env(safe-area-inset-bottom));
    padding: 0.6rem 0.6rem 0.6rem 1.1rem;
  }

  .buybar .btn-primary { padding: 0.8rem 1.3rem; }

  .cart-foot { padding-bottom: calc(1.4rem + env(safe-area-inset-bottom)); }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bike-hero, .callout, .cart { animation: none; }
  .buybar { transition: none; }
}
