/* Pinnacle Detailing Manchester — design system
   porcelain gallery space · ice-grey & signal red pulled from the car · engineering-annotation motifs */

:root {
  --porcelain: #FBF8F2;
  --cream: #F5EFE4;
  --sand: #E8DFCD;
  --line: #E3DACA;
  --ice: #A9C9E2;
  --ice-deep: #3A6E9C;
  --red: #C22A23;
  --espresso: #2A2622;
  --taupe: #6E6150;
  --font-display: "Anton", "Arial Narrow", sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(20px, 6vw, 96px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--porcelain);
  color: var(--espresso);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--ice); color: var(--espresso); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--espresso); color: var(--porcelain); padding: 10px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- nav ---------- */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  transition: background 0.35s, box-shadow 0.35s, padding 0.35s;
}
#nav.scrolled {
  background: rgba(251, 248, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px var(--pad);
}
.nav-brand {
  font-family: var(--font-display); font-size: 20px; letter-spacing: 0.02em;
  text-transform: uppercase; text-decoration: none;
}
.nav-brand span { color: var(--red); }
.nav-links { display: flex; gap: clamp(14px, 2.5vw, 34px); }
.nav-links a {
  text-decoration: none; font-size: 14px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--taupe);
  transition: color 0.2s; padding: 10px 2px;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--espresso); }
.nav-toggle {
  display: none; font-family: var(--font-body); font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: none; border: 1.5px solid var(--espresso); border-radius: 999px;
  padding: 9px 18px; cursor: pointer; color: var(--espresso);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; padding: 12px 26px;
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
  color: var(--espresso); background: transparent;
  border: 1.5px solid var(--espresso); border-radius: 999px;
  cursor: pointer; transition: background 0.25s, color 0.25s, transform 0.15s;
}
.btn:hover, .btn:focus-visible { background: var(--espresso); color: var(--porcelain); }
.btn:active { transform: scale(0.97); }
.btn-solid { background: var(--espresso); color: var(--porcelain); }
.btn-solid:hover, .btn-solid:focus-visible { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 90;
  background: var(--porcelain);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  transition: opacity 0.6s;
}
#loader.done { opacity: 0; pointer-events: none; }
.loader-mark { font-family: var(--font-display); font-size: 22px; text-transform: uppercase; letter-spacing: 0.04em; }
.loader-mark em { font-style: normal; color: var(--red); }
.loader-pct { font-family: var(--font-mono); font-size: 13px; color: var(--taupe); }

/* ---------- hero / 3D pin ---------- */
.hero-wrap { height: 520vh; position: relative; }
.hero-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#stage3d, #stage3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.wordmark {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(70px, 12vh, 130px) var(--pad) clamp(56px, 11vh, 120px);
}
.wordmark h1 { display: contents; }
.wm {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(56px, 12.5vw, 190px);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  will-change: transform, opacity;
}
.wm-left { align-self: flex-start; }
.wm-right { align-self: flex-end; color: var(--red); }
.wm-sub {
  position: absolute; left: 50%; bottom: clamp(22px, 5vh, 50px); transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--taupe); white-space: nowrap;
}

.hint {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  z-index: 3; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--taupe);
  animation: hintPulse 2.2s ease-in-out infinite;
}
@keyframes hintPulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }

.rail {
  position: absolute; right: clamp(14px, 2.5vw, 36px); top: 50%; transform: translateY(-50%);
  width: 2px; height: 130px; background: rgba(42, 38, 34, 0.12); z-index: 3; border-radius: 2px;
}
.rail span { display: block; width: 100%; height: 0%; background: var(--ice-deep); border-radius: 2px; }

/* chapters (annotations over 3D) */
.chapter {
  position: absolute; z-index: 3; max-width: min(420px, 80vw);
  opacity: 0; transform: translateY(18px); pointer-events: none;
  will-change: transform, opacity;
}
.ch-left { left: var(--pad); top: 16vh; }
.ch-right { right: var(--pad); top: 16vh; text-align: right; }
.ch-mid { left: 50%; top: 18vh; transform: translate(-50%, 18px); text-align: center; }
.chapter h2 {
  font-family: var(--font-serif); font-weight: 420; font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.12; margin: 10px 0 10px; letter-spacing: -0.01em;
}
.ch-copy { font-size: 15px; color: var(--taupe); max-width: 36ch; }
.ch-right .ch-copy { margin-left: auto; }
.kicker {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--ice-deep);
}
.chips { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ch-right .chips { justify-content: flex-end; }
.chip {
  font-family: var(--font-mono); font-size: 12px; padding: 6px 14px;
  border: 1px solid rgba(58, 110, 156, 0.4); border-radius: 999px;
  background: rgba(255, 255, 255, 0.92); color: var(--ice-deep);
}
.chip-red { border-color: rgba(194, 42, 35, 0.45); color: var(--red); }
.scroll-arrow { font-size: 26px; margin-top: 14px; color: var(--taupe); animation: hintPulse 2.2s infinite; }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 13vh, 150px) var(--pad); max-width: 1340px; margin: 0 auto; }
.display {
  font-family: var(--font-serif); font-weight: 420; letter-spacing: -0.015em;
  font-size: clamp(34px, 5vw, 64px); line-height: 1.06; margin: 14px 0 18px;
}
.display em { font-style: italic; color: var(--ice-deep); }
.sub-block { margin-top: clamp(70px, 10vh, 120px); }
.lede { max-width: 62ch; font-size: clamp(17px, 1.35vw, 19px); color: #564f45; }
.section-sub { color: var(--taupe); margin: -6px 0 10px; }

.stat-row { display: flex; gap: clamp(20px, 4vw, 60px); margin-top: 44px; flex-wrap: wrap; }
.stat strong { display: block; font-family: var(--font-display); font-size: clamp(26px, 3vw, 40px); letter-spacing: 0.01em; }
.stat span { font-size: 14px; color: var(--taupe); max-width: 22ch; display: block; }

/* cards */
.card-grid { display: grid; gap: 18px; margin-top: 42px; }
.card-grid.three { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.card-grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); max-width: 880px; }
.card {
  background: var(--cream); border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 28px 26px; display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -22px rgba(42, 38, 34, 0.28); }
.card.featured { background: #fff; border-color: var(--ice); box-shadow: 0 1px 0 var(--ice) inset, 0 -1px 0 var(--ice) inset; }
.card-flag {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--ice-deep); margin-bottom: 8px;
}
.card h3 { font-family: var(--font-display); font-size: 24px; letter-spacing: 0.02em; text-transform: uppercase; }
.card-blurb { font-size: 15px; color: var(--taupe); margin-top: 6px; min-height: 2.6em; }
.price { font-family: var(--font-serif); font-size: 16px; margin: 14px 0 4px; color: var(--taupe); }
.price strong { font-size: clamp(30px, 2.6vw, 38px); color: var(--red); font-weight: 500; letter-spacing: -0.01em; }
.price .per { font-size: 15px; color: var(--taupe); }
.card ul { list-style: none; margin: 14px 0 18px; flex: 1; }
.card li { padding: 7px 0 7px 22px; position: relative; font-size: 15px; border-top: 1px solid var(--line); }
.card li::before { content: "—"; position: absolute; left: 0; color: var(--ice-deep); }
.card .meta { font-family: var(--font-mono); font-size: 12px; color: var(--taupe); margin-bottom: 18px; }
.card .btn { align-self: flex-start; }

/* add-ons */
.addons { margin-top: clamp(60px, 8vh, 90px); border-top: 1px solid var(--line); padding-top: 36px; }
.addons-title { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--taupe); }
.addon-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 32px; margin-top: 22px; }
.addon h4 { font-family: var(--font-serif); font-weight: 500; font-size: 20px; }
.addon p { font-size: 14px; color: var(--taupe); margin-top: 6px; }
.addon-price { font-weight: 700; color: var(--red) !important; margin-top: 10px !important; font-size: 17px !important; }
.addon-price span { color: var(--taupe); font-weight: 400; font-size: 13px; }

/* ppf & plans tinted bands */
.ppf { max-width: none; background: var(--cream); }
.ppf > * { max-width: 1340px; margin-left: auto; margin-right: auto; }
.ppf .card { background: var(--porcelain); }
.ppf .card.featured { background: #fff; }
.plans .small-print, .small-print { font-size: 12.5px; color: var(--taupe); margin-top: 18px; }

/* versus */
.versus {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px; margin-top: 42px;
}
.versus-col { border-radius: 18px; padding: 34px 32px; }
.versus-them { background: var(--sand); color: #5e574a; }
.versus-us { background: var(--espresso); color: var(--porcelain); }
.versus-col h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 21px; letter-spacing: 0.03em; margin-bottom: 16px; }
.versus-us h3 { color: var(--ice); }
.versus-col ul { list-style: none; }
.versus-col li { padding: 9px 0 9px 24px; position: relative; font-size: 15px; border-top: 1px solid rgba(120, 110, 95, 0.25); }
.versus-them li::before { content: "✕"; position: absolute; left: 0; font-size: 12px; color: #a89a82; }
.versus-us li { border-top-color: rgba(251, 248, 242, 0.14); }
.versus-us li::before { content: "✓"; position: absolute; left: 0; font-size: 12px; color: var(--ice); }

/* map break — full-bleed, edge to edge, no frame */
.map-break { margin: clamp(40px, 7vh, 90px) 0; }
.map-break img { width: 100%; display: block; }

/* reviews */
.review-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 18px; margin-top: 42px; }
.review-grid blockquote {
  background: var(--cream); border: 1px solid var(--line); border-radius: 18px; padding: 28px;
}
.review-grid p { font-family: var(--font-serif); font-size: 17px; line-height: 1.5; font-weight: 420; }
.review-grid cite { display: block; margin-top: 16px; font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--taupe); }

/* finance */
.finance { max-width: none; background: var(--espresso); color: var(--porcelain); }
.finance-inner { max-width: 1340px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(30px, 6vw, 90px); align-items: end; }
.finance .display { color: var(--porcelain); }
.finance .display em { color: var(--ice); }
.finance .lede { color: #b8b0a3; margin-bottom: 26px; }
.finance .small-print { color: #b8b0a3; font-size: 13px; line-height: 1.6; }
.finance .btn-solid { background: var(--porcelain); color: var(--espresso); border-color: var(--porcelain); }
.finance .btn-solid:hover { background: var(--ice); border-color: var(--ice); color: var(--espresso); }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1.4fr 0.9fr; gap: clamp(28px, 5vw, 70px); margin-top: 42px; }
form label { display: block; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--taupe); margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
input, select, textarea {
  width: 100%; margin-top: 7px; padding: 13px 15px;
  font-family: var(--font-body); font-size: 16px; color: var(--espresso);
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ice-deep); outline-offset: 2px;
}
.finance :focus-visible, footer :focus-visible, .versus-us :focus-visible {
  outline-color: var(--ice);
}
.form-note { margin-top: 14px; font-size: 14px; color: var(--ice-deep); }
.contact-card { background: var(--cream); border: 1px solid var(--line); border-radius: 18px; padding: 34px; height: fit-content; }
.contact-card h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 22px; line-height: 1.15; letter-spacing: 0.02em; }
.contact-card dl { margin-top: 22px; }
.contact-card dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ice-deep); margin-top: 16px; }
.contact-card dd { font-size: 15px; margin-top: 4px; }
.contact-card a { color: var(--espresso); }
.response-note { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--taupe); }

/* footer */
footer { background: var(--espresso); color: var(--porcelain); padding: clamp(50px, 8vh, 90px) var(--pad) 30px; }
.footer-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 40px; align-items: start; max-width: 1340px; margin: 0 auto; }
.footer-mark { font-family: var(--font-display); font-size: 26px; text-transform: uppercase; }
.footer-mark em { font-style: normal; color: var(--red); }
.footer-news p:first-child { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ice); margin-bottom: 12px; }
.footer-news form { display: flex; gap: 8px; }
.footer-news input { background: rgba(251, 248, 242, 0.07); border-color: rgba(251, 248, 242, 0.2); color: var(--porcelain); margin-top: 0; }
.footer-news .btn { color: var(--porcelain); border-color: rgba(251, 248, 242, 0.4); }
.footer-news .btn:hover { background: var(--porcelain); color: var(--espresso); }
.footer-social { display: flex; gap: 22px; justify-content: flex-end; }
.footer-social a { font-size: 14px; color: #b8b0a3; text-decoration: none; }
.footer-social a:hover { color: var(--porcelain); }
.footer-legal { max-width: 1340px; margin: 50px auto 0; padding-top: 22px; border-top: 1px solid rgba(251, 248, 242, 0.12); }
.footer-legal p { font-size: 13px; color: #b8b0a3; margin-top: 4px; }
.footer-legal a { color: #b8b0a3; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* no-JS: never hide content behind the loader or reveal states */
html:not(.js) #loader { display: none; }
html:not(.js) .reveal { opacity: 1; transform: none; }
html:not(.js) .chapter { display: none; }
html:not(.js) .wm { transform: none !important; }

/* responsive */
@media (max-width: 880px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px var(--pad) 18px;
    background: rgba(251, 248, 242, 0.97); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .nav-links a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  #nav.open .nav-links { display: flex; }
  #nav.open { background: rgba(251, 248, 242, 0.97); }
  .finance-inner, .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-social { justify-content: flex-start; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .ch-left, .ch-right { top: auto; bottom: 13vh; }
  .hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hint, .scroll-arrow { animation: none; }
  * {
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
