/* Midnight Detailing · "Showroom" design.
   Inter Tight for headings, Inter for text, the logo's exact red (#F90A12),
   big photography, pill buttons, frosted glass, and one thin highlight line
   on cards as the only "gloss" detail. */

@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --red: #f90a12; /* exact logo red */
  --red-hover: #ff2a31;
  --red-tint: rgba(249, 10, 18, 0.1);
  --bg: #0b0d10;
  --surface: #14171c;
  --surface-2: #1b1f26;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f4f5f7;
  --soft: #c9ced6;
  --muted: #9aa1ab;
  --faint: #6f7680;
  --green: #43c97a;
  --amber: #efb03c;
  --gutter: 20px;
  --radius: 22px;
  --head: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure,
blockquote {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--head);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 11vw, 4.6rem);
}

h2 {
  font-size: clamp(1.9rem, 8vw, 2.9rem);
}

h3 {
  font-size: 1.25rem;
}

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

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: 720px;
}

.muted {
  color: var(--muted);
}

.kicker {
  margin-bottom: 12px;
  color: var(--muted);
  font: 600 0.75rem/1 var(--body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.text-link {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.stock-label {
  position: absolute;
  z-index: 3;
  color: rgba(255, 255, 255, 0.5);
  font: 500 0.625rem/1 var(--body);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Floating frosted nav ---------- */

.nav-shell {
  position: fixed;
  top: 12px;
  right: 12px;
  left: 12px;
  z-index: 30;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  max-width: 1096px;
  margin: 0 auto;
  padding: 7px 7px 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 23, 28, 0.62);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
}

.brand span {
  font: 600 0.95rem/1 var(--head);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-links a:not(.btn) {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:not(.btn):hover,
.nav-links a[aria-current="page"]:not(.btn) {
  color: #fff;
}

/* Inner pages start below the floating nav. */
.page {
  padding-top: 92px;
}

/* ---------- Buttons (pills) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  /* 18.7px bold counts as "large text", so white on the logo red passes contrast. */
  font: 700 1.1667rem/1 var(--body);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: var(--red-hover);
}

.btn:active {
  transform: scale(0.98);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-glass,
.btn-line,
.btn-quiet,
.btn-white {
  box-shadow: none;
  font-size: 1rem;
  font-weight: 600;
}

.btn-glass {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-line {
  border-color: var(--line-2);
  background: transparent;
  color: var(--text);
}

.btn-line:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-quiet {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.btn-quiet:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-white {
  background: #fff;
  color: #000;
}

.btn-white:hover {
  background: #e8eaed;
}

.btn-sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.92rem;
}

.btn-block {
  width: 100%;
}

/* ---------- Home: hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  min-height: 760px;
  height: 100svh;
  max-height: 900px;
  overflow: hidden;
}

.hero-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 40%;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(11, 13, 16, 0.25) 0%, rgba(11, 13, 16, 0) 30%, rgba(11, 13, 16, 0.92) 82%, var(--bg) 100%);
}

.hero .stock-label {
  top: 84px;
  right: 18px;
}

.hero-copy {
  position: absolute;
  right: 0;
  bottom: 36px;
  left: 0;
}

.hero h1 {
  max-width: 9.5ch;
}

.hero .lead {
  max-width: 30ch;
  margin-top: 16px;
  color: #d4d8de;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Sections ---------- */

.section {
  padding: 68px 0;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: 22px;
}

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

/* Segmented pills (vehicle size, owner page switches) */

.seg {
  display: inline-grid;
  grid-auto-columns: minmax(64px, auto);
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.seg input,
.choice input,
.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seg label {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.q-group .seg label,
.switch label {
  padding: 0 8px;
}

.seg input:checked + label {
  background: #fff;
  color: #000;
}

.seg input:focus-visible + label,
.choice input:focus-visible + label,
.check input:focus-visible + label {
  outline: 2px solid var(--red-hover);
  outline-offset: 2px;
}

.seg-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Package cards: swipe on phones, three across on wide screens */

.rail {
  display: flex;
  gap: 12px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 4px var(--gutter) 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}

.rail::-webkit-scrollbar {
  display: none;
}

.pcard {
  position: relative;
  display: flex;
  flex: 0 0 84%;
  flex-direction: column;
  min-height: 430px;
  padding: 26px 22px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  scroll-snap-align: start;
}

/* The one gloss detail: a thin light catching the top edge. */
.pcard::before,
.end-card::before {
  content: "";
  position: absolute;
  top: -1px;
  right: 16%;
  left: 16%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}

.pcard.is-popular {
  border-color: rgba(249, 10, 18, 0.55);
  background: linear-gradient(180deg, #1f1114 0%, var(--surface) 55%);
}

.tag {
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font: 700 0.75rem/1 var(--body);
  letter-spacing: 0.02em;
}

.pcard h3 {
  font-size: 1.75rem;
}

.pcard .dur {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.pcard .price {
  margin: 22px 0 18px;
  font: 700 3.4rem/1 var(--head);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.pcard .price small {
  margin-left: 6px;
  color: var(--muted);
  font: 500 0.9rem/1 var(--body);
  letter-spacing: 0;
}

.pcard ul {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
  padding: 0;
  color: var(--soft);
  font-size: 0.94rem;
  list-style: none;
}

.pcard li {
  position: relative;
  padding-left: 22px;
}

.pcard li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--faint);
}

.pcard .btn {
  margin-top: auto;
}

.after-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Before / after slider */

.ba {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius);
  background: var(--surface);
  touch-action: pan-y;
  --pos: 50%;
}

.ba img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.ba .after {
  clip-path: inset(0 0 0 var(--pos));
}

.ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  pointer-events: none;
}

.ba-line::after {
  content: "‹ ›";
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font: 700 1.1rem/1 var(--body);
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.ba input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.ba-tags {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.ba-tags span {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(11, 13, 16, 0.7);
  font-size: 0.78rem;
  font-weight: 600;
}

.caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Full-bleed mood photo with a line of text */

.mood {
  position: relative;
  isolation: isolate;
  height: 420px;
  overflow: hidden;
}

.mood img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mood::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(11, 13, 16, 0.88), rgba(11, 13, 16, 0.05) 65%);
}

.mood .stock-label {
  top: 14px;
  right: 18px;
}

.mood p {
  position: absolute;
  right: 0;
  bottom: 34px;
  left: 0;
  font: 600 clamp(1.6rem, 7vw, 2.6rem)/1.12 var(--head);
  letter-spacing: -0.02em;
}

.mood p span {
  display: block;
  max-width: 18ch;
}

/* Gallery: uneven grid that opens a full-screen viewer */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-flow: dense;
  grid-auto-rows: 96px;
  gap: 8px;
}

.gallery button {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--surface);
  cursor: zoom-in;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery button:hover img {
  transform: scale(1.03);
}

.gallery button:nth-child(6n + 1) {
  grid-row: span 3;
}

.gallery button:nth-child(6n + 2),
.gallery button:nth-child(6n + 3),
.gallery button:nth-child(6n + 4),
.gallery button:nth-child(6n + 5) {
  grid-row: span 2;
}

.gallery button:nth-child(6n + 6) {
  grid-column: span 2;
  grid-row: span 2;
}

.viewer {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 6, 8, 0.96);
  color: #fff;
}

.viewer::backdrop {
  background: rgba(5, 6, 8, 0.96);
}

.viewer[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.viewer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.viewer figure {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 0 12px;
}

.viewer figure img {
  max-height: 100%;
  border-radius: 12px;
  object-fit: contain;
}

.viewer-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}

/* Detailed by */

.who {
  display: grid;
  grid-template-columns: 136px 1fr;
  align-items: end;
  gap: 18px;
}

.who img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  object-fit: cover;
}

.who h2 {
  font-size: clamp(1.6rem, 7vw, 2.4rem);
}

.who p {
  margin-top: 10px;
  color: var(--soft);
}

.who .text-link {
  display: inline-block;
  margin-top: 12px;
}

/* Reviews: swipe on phones; real reviews only */

.review {
  display: flex;
  flex: 0 0 80%;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-height: 190px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  scroll-snap-align: start;
}

.review blockquote {
  font: 500 1.15rem/1.4 var(--head);
  letter-spacing: -0.01em;
}

.review blockquote::before {
  content: "“";
}

.review blockquote::after {
  content: "”";
}

.review figcaption {
  color: var(--muted);
  font-size: 0.9rem;
}

.review.is-empty {
  border-style: dashed;
  border-color: var(--line-2);
  background: transparent;
}

.review.is-empty blockquote,
.review.is-empty figcaption {
  color: var(--faint);
}

/* Closing card */

.end-card {
  position: relative;
  display: grid;
  gap: 22px;
  padding: 32px 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
}

.end-card p {
  margin-top: 10px;
  color: var(--muted);
}

.steps-inline {
  display: grid;
  gap: 10px;
  padding: 0;
  counter-reset: s;
  list-style: none;
}

.steps-inline li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  color: var(--soft);
  counter-increment: s;
}

.steps-inline li::before {
  content: counter(s);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  font: 700 0.85rem/1 var(--head);
}

.end-card .btn {
  justify-self: start;
}

/* ---------- Footer & floating book button ---------- */

.footer {
  padding: 30px 0 calc(34px + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: 0.9rem;
}

.footer .wrap {
  display: grid;
  gap: 14px;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  color: var(--text);
}

.footer-tag + .footer-tag {
  margin-top: 4px;
}

.has-dock {
  padding-bottom: 84px;
}

.dock {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 25;
  transition: transform 0.25s, opacity 0.25s;
}

.dock .btn {
  width: 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 30px rgba(0, 0, 0, 0.45);
}

.dock.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(140%);
}

/* ---------- Inner pages ---------- */

.page-head {
  padding: 28px 0 26px;
}

.page-head p {
  max-width: 36em;
  margin-top: 14px;
  color: var(--muted);
  font-size: 1.05rem;
}

.panel {
  position: relative;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.panel + .panel {
  margin-top: 12px;
}

.panel > h2 {
  margin-bottom: 14px;
  font-size: 1.45rem;
}

.panel > p {
  color: var(--soft);
}

.panel > p + p {
  margin-top: 10px;
}

.rows > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rows > div:last-child {
  border-bottom: 0;
}

.rows dt {
  font-weight: 600;
}

.rows dd {
  color: var(--muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--soft);
  line-height: 1;
}

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

.faq details p {
  padding: 0 0 16px;
  color: var(--muted);
}

/* ---------- Booking form ---------- */

.form {
  display: grid;
  gap: 12px;
}

.group {
  min-width: 0;
  margin: 0;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  scroll-margin: 96px 0 120px; /* clear the nav and the summary bar */
}

.group legend {
  float: left;
  width: 100%;
  margin: 0 0 16px;
  padding: 0;
  font: 700 1.2rem/1.2 var(--head);
  letter-spacing: -0.01em;
}

.group legend + * {
  clear: both;
}

.group legend .opt {
  margin-left: 6px;
  color: var(--faint);
  font: 400 0.9rem/1 var(--body);
}

.group .seg {
  display: grid;
  grid-auto-columns: 1fr;
}

.choices,
.checks {
  display: grid;
  gap: 8px;
}

.choice label,
.check label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.choice strong {
  display: block;
  font-size: 1.02rem;
}

.choice small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
}

.choice .amt {
  flex: none;
  font: 700 1.15rem/1 var(--head);
  font-variant-numeric: tabular-nums;
}

.choice input:checked + label,
.check input:checked + label {
  border-color: var(--red);
  background: var(--red-tint);
  box-shadow: inset 0 0 0 1px var(--red);
}

.field {
  display: grid;
  gap: 6px;
}

.field + .field {
  margin-top: 16px;
}

.field label {
  font-size: 0.94rem;
  font-weight: 600;
}

.field label small {
  color: var(--faint);
  font-weight: 400;
}

.input {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 var(--body); /* 16px stops iPhones zooming in on focus */
}

.input::placeholder {
  color: var(--faint);
}

.input:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(249, 10, 18, 0.18);
}

.input[aria-invalid="true"] {
  border-color: var(--red-hover);
}

textarea.input {
  min-height: 100px;
  resize: vertical;
}

select.input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 23px, calc(100% - 17px) 23px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.grid-3 {
  display: grid;
  gap: 16px;
}

.grid-3 .field + .field {
  margin-top: 0;
}

.help {
  color: var(--faint);
  font-size: 0.86rem;
}

.err {
  color: var(--red-hover);
  font-size: 0.88rem;
  font-weight: 600;
}

.err:empty {
  display: none;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.gap-top {
  margin-top: 12px;
}

.ready strong {
  color: var(--text);
}

/* Calendar */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cal-head strong {
  font: 700 1.05rem/1 var(--head);
}

.cal-nav {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 1.15rem;
  cursor: pointer;
}

.cal-nav[disabled] {
  opacity: 0.25;
  cursor: default;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-dow {
  padding: 4px 0;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
}

.day {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 40px;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  font: 600 0.95rem/1 var(--body);
}

.day.open {
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}

.day.open:hover {
  border-color: var(--line-2);
}

.day.closed,
.day.blocked,
.day.full {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.2);
}

.day.full::after {
  content: "full";
  position: absolute;
  bottom: 2px;
  color: var(--amber);
  font-size: 0.55rem;
  text-decoration: none;
}

.day.out {
  opacity: 0.4;
}

.day.today {
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.day[aria-pressed="true"] {
  background: #fff;
  color: #000;
}

.cal-legend {
  margin-top: 12px;
  color: var(--faint);
  font-size: 0.82rem;
}

.times {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.time {
  min-height: 48px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: 600 1rem/1 var(--body);
  cursor: pointer;
}

.time[aria-pressed="true"] {
  border-color: #fff;
  background: #fff;
  color: #000;
}

.time[disabled] {
  color: var(--faint);
  text-decoration: line-through;
  cursor: not-allowed;
  opacity: 0.6;
}

.placeholder-text {
  padding: 16px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.placeholder-text p + p {
  margin-top: 10px;
}

.form-error {
  padding: 14px 16px;
  border: 1px solid rgba(249, 10, 18, 0.45);
  border-radius: 14px;
  background: var(--red-tint);
  font-weight: 600;
}

.form-error:empty {
  display: none;
}

/* Floating summary bar with the running total */
.summary-bar {
  position: sticky;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 10;
  margin-top: 4px;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--line-2);
  border-radius: 26px;
  background: rgba(20, 23, 28, 0.85);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.summary-bar .inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.summary-text {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.summary-text strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font: 700 0.98rem/1.25 var(--head);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary-bar .btn {
  flex: none;
  min-height: 46px;
  padding: 0 20px;
}

/* Confirmation after booking */

.done {
  padding: 30px 0 64px;
}

.done-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  border-radius: 50%;
  background: var(--red);
}

.done-mark::after {
  content: "";
  width: 18px;
  height: 10px;
  margin-top: -4px;
  border-bottom: 3px solid #fff;
  border-left: 3px solid #fff;
  transform: rotate(-45deg);
}

.done .lead {
  margin: 14px 0 22px;
  color: var(--soft);
  font-size: 1.05rem;
}

.done .receipt {
  margin-bottom: 18px;
  padding: 6px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.done-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

/* ---------- Owner page ---------- */

.owner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  margin-bottom: 16px;
}

.switch {
  display: grid;
  grid-auto-columns: 1fr;
  margin-bottom: 18px;
  width: 100%;
}

.tabs {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.tabs button {
  min-height: 44px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 600 0.95rem/1 var(--body);
  cursor: pointer;
}

.tabs button[aria-selected="true"] {
  border-bottom-color: var(--red);
  color: var(--text);
}

.tabs .count {
  margin-left: 5px;
  color: var(--faint);
}

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(239, 176, 60, 0.4);
  border-radius: 16px;
  background: rgba(239, 176, 60, 0.07);
}

.bk-list {
  display: grid;
  gap: 10px;
}

.bk {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.bk.is-pending {
  border-color: rgba(239, 176, 60, 0.45);
}

.bk-when {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.bk-when strong {
  font: 700 1.1rem/1.2 var(--head);
}

.status {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.status.pending {
  background: rgba(239, 176, 60, 0.14);
  color: var(--amber);
}

.status.confirmed {
  background: rgba(67, 201, 122, 0.14);
  color: var(--green);
}

.bk-what {
  margin: 4px 0 12px;
  color: var(--muted);
}

.bk dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 14px;
  margin-bottom: 14px;
  font-size: 0.94rem;
}

.bk dt {
  color: var(--faint);
}

.bk dd {
  overflow-wrap: anywhere;
}

.bk dd a {
  font-weight: 600;
}

.bk dd.notes {
  white-space: pre-line;
}

.bk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bk-actions .btn {
  flex: 1 1 auto;
  min-height: 46px;
}

.empty {
  padding: 34px 16px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.owner-more {
  display: grid;
  gap: 10px;
  margin: 28px 0 40px;
}

.owner-more details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.owner-more summary {
  padding: 18px;
  font-weight: 600;
  cursor: pointer;
}

.owner-more .body {
  padding: 0 18px 18px;
}

.off-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 0;
  list-style: none;
}

.off-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.inline {
  display: flex;
  gap: 8px;
}

.inline .input {
  flex: 1;
}

.login {
  max-width: 360px;
  margin: 12vh auto 0;
}

.login img {
  width: 76px;
  margin-bottom: 18px;
  border-radius: 50%;
}

.login h1 {
  font-size: 2rem;
}

.login form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.loading {
  margin-top: 30vh;
}

.toast {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 50;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 600;
  transform: translateX(-50%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.toast:empty {
  display: none;
}

/* Quote tool */

.q-group {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.q-group + .q-group {
  margin-top: 10px;
}

.q-group > h2 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.q-group .seg {
  display: grid;
  grid-auto-columns: 1fr;
}

.vehicle {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg);
}

.vehicle strong {
  display: block;
  font-size: 1.02rem;
}

.vehicle p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.vehicle .tag {
  display: inline-block;
  margin: 0 0 0 6px;
  padding: 2px 7px;
  background: rgba(239, 176, 60, 0.16);
  color: var(--amber);
  font-size: 0.7rem;
  vertical-align: 2px;
}

.vehicle details {
  margin-top: 10px;
}

.vehicle summary {
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.dims {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.dims .field {
  gap: 4px;
}

.dims .field + .field {
  margin-top: 0;
}

.dims label {
  color: var(--muted);
  font-size: 0.8rem;
}

.dims .input {
  min-height: 44px;
  padding: 8px 10px;
}

.level-hint {
  margin-top: 10px;
  font-size: 0.92rem;
}

.level-hint strong {
  margin-right: 6px;
}

.level-hint span {
  color: var(--muted);
}

.result {
  position: relative;
  margin: 12px 0 40px;
  padding: 22px 20px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--surface);
}

.result-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.result-total .display {
  color: var(--text);
  font: 700 2.8rem/1 var(--head);
  letter-spacing: -0.04em;
}

.result-total span {
  color: var(--muted);
}

.result dl {
  margin: 16px 0;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}

.result dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.result dt {
  color: var(--soft);
}

.result dt small {
  display: block;
  color: var(--faint);
  font-size: 0.8rem;
}

.result dd {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Wider screens ---------- */

@media (max-width: 419px) {
  /* Small phones: logo only in the nav, so the links fit. */
  .nav-bar .brand span {
    display: none;
  }
}

@media (min-width: 640px) {
  :root {
    --gutter: 28px;
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 120px;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .times {
    grid-template-columns: repeat(4, 1fr);
  }

  .who {
    grid-template-columns: 240px 1fr;
    gap: 32px;
  }

  .end-card {
    grid-template-columns: 1fr auto;
    align-items: end;
    padding: 44px;
  }
}

@media (min-width: 960px) {
  .hero-copy {
    bottom: 72px;
  }

  .hero .lead {
    font-size: 1.2rem;
  }

  .section {
    padding: 96px 0;
  }

  .rail {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    padding: 4px 0 0;
    overflow: visible;
  }

  .rail .review {
    min-height: 220px;
  }

  .pcard,
  .review {
    flex: none;
  }

  .ba {
    aspect-ratio: 16 / 8;
  }

  .mood {
    height: 520px;
  }

  .has-dock {
    padding-bottom: 0;
  }

  .dock {
    display: none;
  }

  .footer .wrap {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
