/* Bob — 2020 Royal Enfield Interceptor 650, for sale. Site by mediawright.uk */

:root {
  --ink: #1b1410;
  --paper: #faf6f2;
  --paper-alt: #f1e9e1;
  --charcoal: #201a17;
  --charcoal-alt: #2b2320;
  --orange: #c8501c;
  --orange-dark: #8f350f;
  --light-orange: #f0a878;
  --muted: #5a4f48;
  --muted-on-dark: #8f8478;
  --line: #e2d5c9;
  --line-dark: #3a2f2a;
  --max-width: 1100px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

a { color: var(--orange-dark); }
a:hover, a:focus-visible { color: var(--ink); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--charcoal);
  color: var(--paper);
  padding: 16px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--paper);
  text-decoration: none;
}
.brand span.tag {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--light-orange);
}
.header-price {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--light-orange);
  background: var(--charcoal-alt);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 6px 16px;
}

/* Hero */
.hero {
  position: relative;
  color: var(--paper);
  background: var(--charcoal);
}
.hero picture, .hero img {
  width: 100%;
  height: min(70vh, 620px);
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(32, 26, 23, 0.15) 0%, rgba(32, 26, 23, 0.85) 82%);
}
.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  padding: 32px 0 40px;
}
.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
}
.hero .lede {
  margin: 0 0 20px;
  max-width: 60ch;
  font-size: 1.15rem;
  color: var(--paper-alt);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 22px;
  font-size: 1rem;
}
.hero-meta strong {
  display: block;
  font-size: 1.3rem;
  color: var(--light-orange);
}
.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--orange);
  color: #ffffff;
}
.btn-primary:hover, .btn-primary:focus-visible {
  background: var(--orange-dark);
  color: #ffffff;
}
.btn-ghost {
  background: transparent;
  border-color: var(--paper);
  color: var(--paper);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

/* Sections */
main section {
  padding: 56px 0;
}
/* Alternating background is an explicit class, not nth-of-type(even) — the
   dark sections (.hero, .contact-section) already set their own background,
   and an nth-of-type rule would beat those on specificity regardless of
   source order, silently overriding a dark section back to a light one
   while its text stayed white (exactly the color-contrast failure axe
   caught here). */
.section-alt {
  background: var(--paper-alt);
}
.section-head {
  max-width: 68ch;
  margin: 0 0 32px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  margin: 0 0 10px;
}
.section-head p {
  color: var(--muted);
  margin: 0;
}
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* About / story */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: start;
}
.about-grid p { margin: 0 0 16px; }
.quote {
  margin: 24px 0 0;
  padding: 18px 22px;
  border-left: 4px solid var(--orange);
  background: var(--paper);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1.1rem;
  font-style: italic;
}
.fact-card {
  background: var(--charcoal);
  color: var(--paper);
  border-radius: var(--radius);
  padding: 26px;
}
.fact-card h3 {
  margin-top: 0;
  color: var(--light-orange);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-dark);
}
.fact-list li:last-child { border-bottom: none; }
.fact-list dt, .fact-list dd { margin: 0; }
.fact-list dt { color: var(--paper-alt); }
.fact-list dd { font-weight: 700; text-align: right; }

/* Upgrades */
.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.upgrade-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.upgrade-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.upgrade-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}
.upgrade-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.gallery-grid button {
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.gallery-grid button:hover img, .gallery-grid button:focus-visible img {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 12, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: 10px;
}
.lightbox figure {
  margin: 0;
  text-align: center;
}
.lightbox figcaption {
  color: var(--paper-alt);
  margin-top: 10px;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255, 255, 255, 0.28); }

/* Maintenance table */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
table.maintenance {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  min-width: 560px;
}
table.maintenance caption {
  text-align: left;
  padding: 14px 18px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
table.maintenance th, table.maintenance td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.maintenance thead th {
  background: var(--charcoal);
  color: var(--paper);
}
table.maintenance tbody tr:last-child td { border-bottom: none; }
table.maintenance tbody tr:nth-child(even) { background: var(--paper-alt); }

/* Contact / CTA */
.contact-section {
  background: var(--charcoal);
  color: var(--paper);
}
.contact-section .section-head p { color: var(--paper-alt); }
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.contact-card {
  background: var(--charcoal-alt);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 24px;
}
.contact-card h3 {
  margin-top: 0;
  color: var(--light-orange);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.contact-card a.value {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-top: 4px;
}
.contact-card a.value:hover, .contact-card a.value:focus-visible { color: var(--light-orange); }
.price-banner {
  margin-top: 28px;
  padding: 22px 26px;
  background: var(--orange);
  color: #fff;
  border-radius: var(--radius);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: baseline;
  justify-content: space-between;
}
.price-banner .amount { font-size: 2rem; font-weight: 800; }
.price-banner .note { font-size: 0.95rem; }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper-alt);
  padding: 24px 0;
  font-size: 0.88rem;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer a { color: var(--light-orange); }
.build-number { color: var(--muted-on-dark); }

/* Changelog (/updates.html) */
.changelog {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 72ch;
}
.changelog li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.changelog li:first-child { padding-top: 0; }
.changelog li:last-child { border-bottom: none; }
.changelog p { margin: 6px 0 0; color: var(--muted); }
.changelog-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.changelog-build { font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--orange-dark); }
.changelog-author { font-weight: 600; }
.changelog-date { color: var(--muted); font-size: 0.9rem; }

@media (max-width: 760px) {
  .about-grid { grid-template-columns: 1fr; }
  .hero-content { padding: 24px 0 28px; }
}
