/* Northcote Garage concept. Colours come from his logo: lime green and black. */
:root {
  --canvas: #F1F2EC;
  --surface: #FFFFFF;
  --ink: #15170F;
  --ink-soft: #4A5040;
  --line: #D5D8CB;
  --accent: #52A400;        /* logo green, used as a fill with dark text */
  --accent-ink: #15170F;
  --accent-text: #356B00;   /* same hue, dark enough for text on light grounds */
  --accent-on-dark: #7CCB1F;
  --notice: #FFF1C2;
  --ph: #FFE58A;

  --display: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --text: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(36px, 6vw, 80px);
  --radius: 10px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --e1: 0 1px 2px rgba(21, 23, 15, .08), 0 2px 6px rgba(21, 23, 15, .06);
  --e2: 0 2px 4px rgba(21, 23, 15, .06), 0 12px 28px -6px rgba(21, 23, 15, .18);
  --actionbar-h: 0px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 400 16px/1.55 var(--text);
  padding-bottom: var(--actionbar-h);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
input, textarea { caret-color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 6px; }
.skip:focus { left: 8px; }

.h2 { font: 400 clamp(1.6rem, 4.5vw, 2.6rem)/1.05 var(--display); text-transform: uppercase; letter-spacing: .01em; text-wrap: balance; }
.lede { font-size: 1.02rem; line-height: 1.55; color: var(--ink); max-width: 46ch; text-wrap: pretty; }
.muted { color: var(--ink-soft); }
.opt { font-weight: 500; color: var(--ink-soft); font-size: .85em; margin-left: 4px; }
.link { color: var(--accent-text); font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
p a { color: inherit; }

/* Placeholders for Ian to confirm. Bright on purpose so nobody mistakes them for copy. */
.ph { background: var(--ph); color: #3A2E00; font: 600 .78rem/1.3 var(--text); padding: 2px 6px; border-radius: 4px; letter-spacing: .01em; display: inline-block; vertical-align: middle; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 2px solid transparent;
  font: 700 1rem/1 var(--text); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn--lg { min-height: 50px; padding: 0 24px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--ink { background: var(--ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn--accent:hover { background: #5DB800; }
  .btn--ink:hover { background: #2B2F20; }
  .btn--ghost:hover { background: var(--ink); color: #fff; }
}

/* Notice */
.notice { background: var(--notice); border-bottom: 1px solid #E8D58F; color: #2E2600; }
.notice[data-show="no"] { display: none; }
.notice__inner { max-width: 1180px; margin: 0 auto; padding: 10px var(--gutter); display: flex; gap: 6px 14px; flex-wrap: wrap; align-items: baseline; font-size: .95rem; line-height: 1.45; }
.notice__date { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .74rem; }
.notice__text { flex: 1 1 32ch; }
.notice a { font-weight: 700; color: inherit; text-underline-offset: 2px; }

/* Header */
.top {
  /* Sticks 8px early, so the bar tightens from 68px to 60px as you scroll, with no layout shift. */
  position: sticky; top: -8px; z-index: 40; padding-top: 8px;
  background: rgba(241, 242, 236, .94); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line);
  transition: background-color 220ms var(--ease-out), box-shadow 220ms var(--ease-out);
}
.top.is-stuck { background: rgba(241, 242, 236, .985); box-shadow: 0 6px 18px -10px rgba(21, 23, 15, .28); }
.top__inner { display: flex; align-items: center; gap: var(--s5); min-height: 60px; }
.top__logo { display: block; }
.top__logo img { width: 168px; height: auto; transform-origin: left center; transition: transform 260ms var(--ease-out); }
.top.is-stuck .top__logo img { transform: scale(.86); }
.top__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left center; pointer-events: none; }
.top__nav { display: none; gap: var(--s5); margin-left: auto; }
.top__nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color 160ms var(--ease-out); }
.top__nav a:hover { border-color: var(--accent); }
.top__call { margin-left: auto; min-height: 44px; padding: 0 16px; font-size: .95rem; }
@media (min-width: 900px) {
  .top__nav { display: flex; }
  .top__call { margin-left: var(--s4); }
  .top__logo img { width: 200px; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(32px, 5vw, 72px) 0 clamp(36px, 6vw, 80px); }
.hero__bars { position: absolute; inset: 0; pointer-events: none; }
/* Speed bars from his logo, on three planes. The page script drifts each at its own rate (data-depth). */
.bar { position: absolute; display: block; translate: calc(var(--px, 0) * 1px) calc(var(--py, 0) * 1px); will-change: translate; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transform: skewX(-24deg); }
.bar--a { top: 18px; right: -40px; width: 46%; height: 14px; }
.bar--b { bottom: 26px; left: -60px; width: 38%; height: 14px; }
.bar--b i { opacity: .9; }
.bar--c { top: 40px; right: -40px; width: 26%; height: 5px; }
.bar--c i { opacity: .55; }
.hero__grid { position: relative; display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero__title { font: 400 clamp(2.1rem, 8vw, 4.2rem)/1 var(--display); text-transform: uppercase; letter-spacing: .005em; text-wrap: balance; max-width: 13ch; }
.hero__sub { margin-top: var(--s4); font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.5; max-width: 40ch; color: var(--ink-soft); text-wrap: pretty; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

.jobcard { position: relative; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: var(--s5); }
.jobcard__head { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.jobcard__title { font: 400 1.3rem/1 var(--display); text-transform: uppercase; }
.status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .86rem; padding: 6px 12px; border-radius: 999px; background: #EEF0E8; color: var(--ink); }
.status__dot { width: 9px; height: 9px; border-radius: 50%; background: #8A8F80; }
.status[data-open="yes"] { background: #E5F3D3; color: #234700; }
.status[data-open="yes"] .status__dot { background: var(--accent); box-shadow: 0 0 0 3px rgba(82, 164, 0, .25); }
.hours li { font-size: .94rem; display: flex; justify-content: space-between; gap: var(--s4); padding: 8px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.hours li span:first-child { font-weight: 600; }
.hours li span:last-child { text-align: right; white-space: nowrap; }
.hours li.is-today { font-weight: 700; }
.hours li.is-today span:first-child::after { content: " (today)"; white-space: nowrap; font-weight: 500; color: var(--ink-soft); }
.hours__closed { color: var(--ink-soft); }
.jobcard__note { margin-top: var(--s3); font-size: .9rem; color: var(--ink-soft); }
.jobcard__addr { margin-top: var(--s5); padding-top: var(--s4); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: end; gap: var(--s4); flex-wrap: wrap; }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.25fr 1fr; }
  .jobcard { padding: var(--s6); }
  .bar--a { top: 46px; width: 40%; height: 30px; }
  .bar--c { top: 86px; width: 30%; height: 6px; }
}

/* Services */
.services { padding: var(--section) 0; background: var(--surface); border-top: 1px solid var(--line); }
.services__intro { display: grid; gap: var(--s3); margin-bottom: var(--s5); }
.services__grid { display: grid; gap: var(--s5) var(--s6); }
.svc { border: 1px solid var(--line); border-radius: var(--radius); padding: var(--s4); display: grid; gap: var(--s3); align-content: start; justify-items: start; }
.svc .ticks { justify-self: stretch; }
.svc__note { font-size: .94rem; color: var(--ink-soft); }
.svc__title { font: 800 1.05rem/1.3 var(--text); }
.ticks li { position: relative; padding: 6px 0 6px 24px; border-bottom: 1px solid #EDEEE7; line-height: 1.4; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 13px; width: 12px; height: 8px; background: var(--accent); transform: skewX(-24deg); border-radius: 1px; }
.extras { margin-top: var(--s5); display: grid; gap: var(--s2); padding: var(--s4); background: var(--canvas); border-radius: var(--radius); }
.ph-line { margin-top: var(--s1); }
.services__cta { margin-top: var(--s4); }
@media (min-width: 760px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .svc:first-child { grid-row: span 2; }
}
@media (min-width: 1040px) {
  .services__intro { grid-template-columns: 1fr 1fr; align-items: end; }
  .services__grid { grid-template-columns: 1.1fr 1fr 1fr; }
  .svc:first-child { grid-row: auto; }
  .extras { grid-template-columns: 1fr 1fr; align-items: center; }
  .extras .ph-line { grid-column: 1 / -1; }
}

/* Meet Ian */
.ian { padding: 0 0 var(--section); background: var(--surface); }
.ian__wrap { display: grid; gap: var(--s4); }
.ian__wrap > * { max-width: 720px; }
.ian__head { display: flex; align-items: center; gap: var(--s4); }
.ian__photo svg { display: block; width: 72px; height: 72px; }
.ian__motto { margin-top: var(--s1); font-weight: 700; color: var(--accent-text); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.facts li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: .94rem; line-height: 1.35; }
.facts strong { font-weight: 800; display: block; }
.trust { display: flex; gap: var(--s3); align-items: center; }
.trust img { width: 52px; height: auto; border-radius: 6px; }
.trust__text { font-size: .94rem; }

/* Booking */
.book { padding: var(--section) 0; }
.book__grid { display: grid; gap: var(--s6); }
.book__intro { display: grid; gap: var(--s4); align-content: start; }
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); padding: clamp(18px, 4vw, 36px); }
.form { display: grid; gap: var(--s4); }
.field { display: grid; gap: var(--s2); border: 0; padding: 0; margin: 0; min-width: 0; }
.field label, .field legend { font-weight: 700; font-size: .98rem; padding: 0; }
.field legend { margin-bottom: var(--s2); }
.field-row { display: grid; gap: var(--s5); }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
input[type="text"], input[type="tel"], textarea {
  width: 100%; font: 500 1.05rem/1.4 var(--text); color: var(--ink); background: #FAFBF7;
  border: 2px solid #C9CDBE; border-radius: 8px; padding: 12px 14px; min-height: 52px;
  transition: border-color 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}
textarea { resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: #666C5A; }
input:focus, textarea:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px rgba(82, 164, 0, .22); }
.is-invalid input, .is-invalid textarea, .is-invalid .plate { border-color: #B3261E !important; }
.err { color: #B3261E; font-weight: 600; font-size: .9rem; }

/* The plate: rego field as a number plate */
.plate { position: relative; display: flex; align-items: center; width: min(100%, 300px); background: #FFFFFF; border: 3px solid var(--ink); border-radius: 8px; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--ink), var(--e1); padding: 6px 14px; }
.plate input { border: 0 !important; background: transparent; box-shadow: none !important; padding: 0; min-height: 48px; font: 400 2rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; text-align: center; color: var(--ink); }
.plate input::placeholder { color: #9DA290; }
.plate:focus-within { box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--ink), 0 0 0 4px rgba(82, 164, 0, .35); }
.plate__nz { position: absolute; right: 9px; bottom: 6px; font: 800 .58rem/1 var(--text); letter-spacing: .1em; color: var(--ink-soft); }
.plate--static { width: auto; display: inline-flex; padding: 8px 30px 8px 18px; font: 400 1.6rem/1 var(--display); letter-spacing: .14em; text-transform: uppercase; }

.chips { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 2px solid #C9CDBE; background: #FAFBF7; font-weight: 700; transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), transform 120ms var(--ease-out); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.chip:active span { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .chip:hover span { border-color: var(--ink); } }
.form__small { font-size: .88rem; color: var(--ink-soft); text-align: center; }

.done { display: grid; gap: var(--s4); justify-items: start; }
.done:focus { outline: none; }
.done__tick { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.done__title { font: 400 clamp(1.4rem, 4vw, 2rem)/1.05 var(--display); text-transform: uppercase; }
.done__summary { font-weight: 600; }
.done .form__small { text-align: left; }
@media (prefers-reduced-motion: no-preference) {
  .done:not([hidden]) { animation: rise 260ms var(--ease-out) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
}
@media (min-width: 960px) { .book__grid { grid-template-columns: 5fr 7fr; gap: var(--s8); } .book__intro { position: sticky; top: 110px; } }

/* Contact */
.contact { padding: var(--section) 0; background: var(--surface); border-top: 1px solid var(--line); }
.contact__grid { display: grid; gap: var(--s4); }
.contact__label { font: 800 .8rem/1.2 var(--text); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin-bottom: var(--s2); }
.contact__col p { margin-bottom: var(--s2); line-height: 1.7; }
@media (min-width: 900px) { .contact__grid { grid-template-columns: 1.2fr 1fr 1fr; align-items: start; } }

/* Footer */
.foot { background: var(--ink); color: #C9CDBE; padding: var(--s6) 0; font-size: .9rem; }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); }
.foot__mock { color: #9AA08D; font-size: .82rem; }

/* Phone action bar */
.actionbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 1px; background: #2B2F20; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 18px rgba(21, 23, 15, .18); }
.actionbar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; font-size: 1rem; }
.actionbar a.actionbar__book { background: var(--accent); color: var(--accent-ink); }
.actionbar a:active { filter: brightness(1.15); }
@media (max-width: 899px) { :root { --actionbar-h: 56px; } .top__call span { display: none; } .top__call { width: 44px; padding: 0; } }
@media (min-width: 900px) { .actionbar { display: none; } }

/* ---------- Motion (an enhancement: everything is visible with motion or JS off) ---------- */
.svc { transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .svc:hover { transform: translateY(-2px); border-color: #BFC3B3; box-shadow: var(--e1); }
}
[data-count] { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: no-preference) {
  /* Hero entrance: bars sweep in like the logo's speed lines, then the copy and hours card rise. */
  .bar i { animation: bar-in 760ms var(--ease-out) both; }
  .bar--a i { --from: 70%; animation-delay: 40ms; }
  .bar--c i { --from: 90%; animation-delay: 140ms; }
  .bar--b i { --from: -70%; animation-delay: 220ms; }
  @keyframes bar-in { from { opacity: 0; transform: skewX(-24deg) translateX(var(--from, 60%)); } }
  .rise { animation: rise-in 560ms var(--ease-out) var(--d, 0ms) both; }
  .rise--card { animation-name: card-in; }
  @keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
  @keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.985); } }

  /* Scroll reveals. Only content that starts below the screen is ever hidden (see site.js). */
  [data-reveal].is-pending { opacity: 0; transform: translateY(16px); }
  [data-reveal].is-in { opacity: 1; transform: none; transition: opacity 460ms var(--ease-out) var(--rd, 0ms), transform 560ms var(--ease-out) var(--rd, 0ms); }
  .svc.is-pending .ticks li::before { transform: skewX(-24deg) scaleX(0); }
  .svc.is-in .ticks li::before { transition: transform 420ms var(--ease-out); transition-delay: calc(var(--rd, 0ms) + 160ms); }
  .svc.is-in .ticks li:nth-child(2)::before { transition-delay: calc(var(--rd, 0ms) + 210ms); }
  .svc.is-in .ticks li:nth-child(3)::before { transition-delay: calc(var(--rd, 0ms) + 260ms); }
  .svc.is-in .ticks li:nth-child(4)::before { transition-delay: calc(var(--rd, 0ms) + 310ms); }
  .svc.is-in .ticks li:nth-child(5)::before { transition-delay: calc(var(--rd, 0ms) + 360ms); }
  .ticks li::before { transform-origin: left center; }

  /* Open-now dot breathes, only while open. */
  .status__dot { position: relative; }
  .status[data-open="yes"] .status__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 2.4s var(--ease-out) infinite; }
  @keyframes ping { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.6); opacity: 0; } }
}
