/* YKS Garage. Night-street livery: black tarmac, one red stripe, white decals.
   Single dark look by design (brand colours from the brief). */
:root {
  --tarmac: #080808;      /* page background */
  --panel: #181818;       /* cards and form */
  --field: #0f0f0f;       /* input wells */
  --line: #2b2627;        /* hairlines, red-biased grey */
  --red: #e32636;         /* livery red */
  --red-press: #b81c2a;
  --white: #ffffff;
  --dim: #aaaaaa;         /* secondary text */
  --good: #3ccf7a;
  --warn: #f2b33d;

  --logo: "Saira", "Arial Black", Impact, sans-serif;
  --display: "Saira Extra Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Zen Kaku Gothic New", "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;

  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --max: 1080px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--tarmac);
  color: var(--white);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* ---------- Windscreen banner (top bar) ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--tarmac);
}
.banner {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--tarmac);
  color: var(--white);
  border-bottom: 3px solid var(--red);
}
.banner .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
}
/* Logo: red YKS plate + GARAGE, as on the workshop sign */
.logo {
  display: inline-flex;
  align-items: stretch;
  gap: 0.28em;
  font-family: var(--logo);
  font-style: italic;
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
  color: var(--white);
  white-space: nowrap;
}
.logo-box {
  background: var(--red);
  color: var(--white);
  padding: 0.12em 0.26em 0.1em 0.2em;
  letter-spacing: 0.01em;
}
.logo-word {
  align-self: center;
  letter-spacing: 0.015em;
}
.logo-lg { font-size: clamp(30px, 8vw, 40px); }
.banner-nav { display: flex; gap: 4px; align-items: center; }
.banner-nav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 10px;
  border-radius: 4px;
}
.banner-nav a:hover { background: rgba(255, 255, 255, 0.08); }
.banner-nav .nav-book {
  background: var(--red);
  color: var(--white);
  padding: 8px 14px;
}
.banner-nav .nav-book:hover { background: var(--red-press); }
@media (max-width: 640px) { .banner-nav .nav-hide-sm { display: none; } }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  position: relative;
  padding-block: 56px 48px;
  display: grid;
  gap: 28px;
}
.hero-mark { position: relative; }
.hero-stripe {
  position: absolute;
  left: -40vw;
  right: -40vw;
  top: 47%;
  height: 46px;
  background: var(--red);
  transform: rotate(-7deg);
  box-shadow: 0 64px 0 -38px var(--red);
  opacity: 0.95;
  pointer-events: none;
}
.hero-kana {
  position: absolute;
  right: var(--gutter-r);
  top: 28px;
  writing-mode: vertical-rl;
  font-family: var(--body);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.35em;
  color: var(--dim);
  pointer-events: none;
}
@media (max-width: 640px) { .hero-kana { display: none; } }
.hero h1 {
  position: relative;
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(72px, 22vw, 168px);
  line-height: 0.84;
  letter-spacing: 0.005em;
  transform: skewX(-9deg);
  transform-origin: left bottom;
  margin-left: 4px;
  padding-right: 28px;
}
.hero h1 span { display: block; }
.hero h1 .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--white);
}
.hero-copy {
  position: relative;
  display: grid;
  gap: 20px;
  max-width: 34rem;
}
.hero-copy p { color: var(--dim); font-size: 17px; }
.hero-copy p strong { color: var(--white); font-weight: 700; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 4px;
  border: 0;
  font-family: var(--body);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-press); }
.btn-ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1.5px var(--white); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-block { width: 100%; }

@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.5fr 1fr; align-items: end; padding-block: 88px 72px; }
}

/* ---------- Sections ---------- */
.section { padding-block: 64px; border-bottom: 1px solid var(--line); }
.section-head {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
  max-width: 40rem;
}
.section-head h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(40px, 9vw, 64px);
  line-height: 0.95;
  text-transform: uppercase;
  transform: skewX(-9deg);
  transform-origin: left bottom;
}
.section-head p { color: var(--dim); }

/* ---------- Services ---------- */
.services { display: grid; gap: 0; border-top: 1px solid var(--line); }
.svc {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}
.svc-jp {
  font-weight: 900;
  font-size: 22px;
  line-height: 1.3;
  color: var(--red);
  padding-top: 2px;
}
.svc-body { display: grid; gap: 12px; min-width: 0; }
.svc-body h3 { font-size: 19px; font-weight: 700; line-height: 1.3; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 500;
  color: var(--white);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  min-height: 40px;
  cursor: pointer;
  text-align: left;
}
.chip:hover { border-color: var(--red); }
.chip::after { content: " +"; color: var(--red); font-weight: 700; }
@media (min-width: 900px) {
  .services { grid-template-columns: 1fr 1fr; column-gap: 48px; }
  .svc { grid-template-columns: 72px 1fr; }
}

/* ---------- Booking form ---------- */
.book-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .book-grid { grid-template-columns: 1fr 1.4fr; align-items: start; } }
.book-aside { display: grid; gap: 16px; color: var(--dim); }
.book-aside ol { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.book-aside strong { color: var(--white); }

.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  border-radius: 6px;
  padding: 24px 20px;
}
@media (min-width: 640px) { .form-card { padding: 32px; } }
form { display: grid; gap: 18px; }
.row-2 { display: grid; gap: 18px; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 700; font-size: 15px; }
.field label .opt { font-weight: 400; color: var(--dim); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* stops iPhone zooming in */
  color: var(--white);
  background: var(--field);
  border: 1px solid #333;
  border-radius: 4px;
  appearance: none;
  -webkit-appearance: none;
}
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 20px) 22px, calc(100% - 14px) 22px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
.field input[type="date"] { min-height: 50px; }
.field input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.7; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(227, 38, 54, 0.25); }
.field .hint { font-size: 13px; color: var(--dim); }
.field .err { font-size: 14px; color: #ff7682; font-weight: 500; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #ff7682; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-msg {
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid;
}
.form-msg.error { color: #ffd6da; border-color: #7a1e27; background: #2a0d11; }
.form-msg.demo { color: #ffe9bf; border-color: #6b5016; background: #241b08; }
.fine { font-size: 13px; color: var(--dim); }

.success { display: grid; gap: 16px; text-align: left; }
.success-mark {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red); color: var(--white);
  font-size: 28px; font-weight: 900;
}
.success h3 { font-family: var(--display); font-size: 40px; font-weight: 800; text-transform: uppercase; line-height: 1; transform: skewX(-9deg); transform-origin: left bottom; }
.success p { color: var(--dim); }
.success .ref { font-variant-numeric: tabular-nums; color: var(--white); font-weight: 700; letter-spacing: 0.08em; }

/* ---------- Builds: Instagram carousel ---------- */
#builds { padding-bottom: 48px; }
.ig-head { display: grid; gap: 20px; margin-bottom: 24px; }
.ig-head .section-head { margin-bottom: 0; }
.ig-id { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.ig-id-text { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.ig-handle-link { font-weight: 700; font-size: 17px; text-decoration-color: var(--red); text-underline-offset: 4px; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
@media (min-width: 900px) {
  .ig-head { grid-template-columns: 1fr auto; align-items: end; }
}

.ig-carousel { display: grid; gap: 14px; }
.ig-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72vw, 300px);
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(16px, env(safe-area-inset-left, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: 4px;
  scrollbar-width: none;
}
.ig-track::-webkit-scrollbar { display: none; }
@media (min-width: 1112px) {
  .ig-track {
    padding-left: calc((100vw - var(--max)) / 2 + 16px);
    scroll-padding-inline: calc((100vw - var(--max)) / 2 + 16px);
  }
}
.ig-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  border-radius: 6px;
  overflow: hidden;
  background: var(--panel);
  scroll-snap-align: start;
  text-decoration: none;
  color: var(--white);
}
.ig-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.ig-tile:hover img { transform: scale(1.04); }
.ig-cap {
  position: absolute;
  inset: auto 0 0;
  padding: 40px 14px 14px;
  background: linear-gradient(to top, rgba(8, 8, 8, 0.92), rgba(8, 8, 8, 0));
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Fallback tiles: service categories as Instagram-highlight style covers */
.ig-cat {
  display: grid;
  align-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  background:
    linear-gradient(-7deg, transparent 46%, var(--red) 46%, var(--red) 58%, transparent 58%) no-repeat,
    var(--panel);
}
.ig-cat-jp { font-size: 64px; font-weight: 900; line-height: 1; color: var(--white); }
.ig-cat-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 34px;
  line-height: 0.95;
  text-transform: uppercase;
  transform: skewX(-9deg);
  transform-origin: left bottom;
}
.ig-cat-go { font-size: 14px; font-weight: 700; color: var(--dim); }
.ig-cat:hover { border-color: var(--red); }
.ig-cat:hover .ig-cat-go { color: var(--white); }

.ig-nav { display: flex; justify-content: flex-end; gap: 8px; }
.ig-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--white);
  background: transparent;
  color: var(--white);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding-bottom: 3px;
}
.ig-arrow:hover:not([disabled]) { background: var(--red); border-color: var(--red); }
.ig-arrow[disabled] { opacity: 0.3; cursor: default; }
@media (prefers-reduced-motion: reduce) { .ig-tile img { transition: none; } }

/* ---------- Visit ---------- */
.visit { display: grid; gap: 24px; }
@media (min-width: 760px) { .visit { grid-template-columns: repeat(3, 1fr); } }
.visit-item { display: grid; gap: 6px; align-content: start; }
.visit-item h3 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.visit-item p, .visit-item a { font-size: 18px; font-weight: 500; }
.visit-item a { text-decoration-color: var(--red); text-underline-offset: 4px; }
.hours { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 16px; }
.hours dt { color: var(--dim); }
.hours dd { margin: 0; }

.footer { padding-block: 32px 120px; color: var(--dim); font-size: 14px; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; }
.footer .logo { font-size: 18px; }
@media (min-width: 900px) { .footer { padding-bottom: 32px; } }

/* ---------- Mobile bottom bar ---------- */
.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 25;
  background: rgba(8, 8, 8, 0.94);
  border-top: 1px solid var(--line);
  padding-top: 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 10px;
  transition: transform 0.2s ease;
}
.dock.away { transform: translateY(110%); }
.dock .btn { min-height: 48px; }
@media (min-width: 900px) { .dock { display: none; } }
@media (prefers-reduced-motion: reduce) { .dock { transition: none; } }

/* ---------- Demo notice ---------- */
.demo-bar {
  background: #241b08;
  color: #ffe9bf;
  border-bottom: 1px solid #6b5016;
  font-size: 14px;
}
.demo-bar .wrap { padding-block: 8px; }
