/* =========================================================================
   Bike Fix Townsville — shared styles
   Identity: a repair-workshop. Gunmetal + manila worksheet + blaze-orange
   signal. Signature = the manila "service tag" a mechanic ties to a bike.
   Type: Archivo (signage display) / IBM Plex Sans (body) / IBM Plex Mono (data)
   ========================================================================= */

:root {
  --ink:        #16181c;   /* base dark — oiled gunmetal              */
  --steel:      #22262e;   /* raised surface                          */
  --steel-2:    #2c313b;   /* hover / lines                           */
  --paper:      #ece6d8;   /* manila worksheet — light text & light bg */
  --paper-dim:  #b7ae9b;   /* muted paper                             */
  --signal:     #009d4c;   /* Bike FIX green — the brand signal          */
  --signal-2:   #17b862;   /* signal hover / brighter                    */
  --hair:       rgba(236,230,216,.14);

  --font-display: "Archivo", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1120px;
  --gap: clamp(1.25rem, 3vw, 2.5rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- pegboard texture, used behind dark sections --------------------- */
.pegboard {
  background-image: radial-gradient(rgba(236,230,216,.05) 1.4px, transparent 1.5px);
  background-size: 26px 26px;
}

a { color: var(--signal); text-decoration: none; }
a:hover { color: var(--signal-2); }

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

code {
  font-family: var(--font-mono); font-size: .88em;
  background: rgba(0,0,0,.07); padding: .06em .38em; border-radius: 3px;
}

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* ---- type -------------------------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.02; margin: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .75rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--signal); margin: 0 0 1rem;
}
.eyebrow.dim { color: var(--paper-dim); }

/* ---- focus ------------------------------------------------------------- */
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; border-radius: 2px; }

/* =========================================================================
   Top bar
   ========================================================================= */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(22,24,28,.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}
.topbar .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 68px; }

.brandmark { display: flex; align-items: center; margin-right: auto; }
.brandmark img.logo-img {
  height: 42px; width: auto; display: block;
  background: #fff; padding: 5px 8px; border-radius: 5px;
}
@media (max-width: 480px) { .brandmark img.logo-img { height: 36px; } }

.nav { display: flex; gap: 1.4rem; align-items: center; }
.nav a {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--paper-dim);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paper); }
.nav a[aria-current="page"] { text-shadow: 0 2px 0 var(--signal); }

.callbtn {
  font-family: var(--font-mono); font-weight: 500; font-size: .82rem;
  letter-spacing: .04em;
  background: var(--signal); color: var(--ink) !important;
  padding: .6rem .95rem; border-radius: 3px; white-space: nowrap;
}
.callbtn:hover { background: var(--signal-2); color: var(--ink) !important; }

.menu-toggle { display: none; }

@media (max-width: 720px) {
  .topbar .wrap {
    flex-wrap: wrap; gap: .5rem 1rem; min-height: 0;
    padding-top: .7rem; padding-bottom: .7rem;
  }
  .brandmark { margin-right: auto; }
  .callbtn { order: 2; }
  .nav {
    order: 3; width: 100%; justify-content: center; gap: 1.6rem;
    padding-top: .6rem; margin-top: .1rem; border-top: 1px solid var(--hair);
  }
}

/* =========================================================================
   Buttons
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-mono); font-size: .85rem; letter-spacing: .04em;
  padding: .85rem 1.3rem; border-radius: 3px;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--signal); color: var(--ink); }
.btn-primary:hover { background: var(--signal-2); color: var(--ink); }
.btn-ghost { border-color: var(--hair); color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--paper-dim); color: var(--paper); }

/* =========================================================================
   Hero
   ========================================================================= */
.hero { position: relative; overflow: clip; border-bottom: 1px solid var(--hair); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(105deg, rgba(18,20,24,.95) 0%, rgba(18,20,24,.86) 38%, rgba(18,20,24,.45) 72%, rgba(18,20,24,.30) 100%),
    linear-gradient(rgba(18,20,24,.12), rgba(18,20,24,.5)),
    url("images/shopfront.jpg");
  background-size: cover; background-position: center 32%;
}
.hero .wrap { position: relative; z-index: 2; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5.5rem); }

.hero .wheel {
  position: absolute; z-index: 1; color: var(--paper);
  opacity: .05; width: min(52vw, 460px); height: auto;
  right: 3%; top: 50%; transform: translateY(-50%);
  pointer-events: none;
}

.hero h1 {
  font-size: clamp(2.7rem, 8.5vw, 6.2rem);
  text-transform: uppercase; letter-spacing: -.01em;
  max-width: 14ch;
}
.hero h1 .fix { color: var(--signal); }
.hero .lede {
  margin: 1.4rem 0 2rem; max-width: 46ch; font-size: 1.15rem; color: #ded7c7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* the signature service tag */
.svc-tag {
  position: absolute; z-index: 3; right: clamp(1rem, 5vw, 4rem); bottom: clamp(1.5rem, 3vw, 2.5rem);
  width: 210px; background: var(--paper); color: var(--ink);
  padding: 1rem 1.1rem 1.1rem; border-radius: 4px;
  transform: rotate(-4deg);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  font-family: var(--font-mono);
}
.svc-tag::before { /* punched hole + string anchor */
  content: ""; position: absolute; top: 12px; left: 14px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--ink); box-shadow: inset 0 0 0 3px var(--paper);
}
.svc-tag .hole-string {
  position: absolute; top: 4px; left: 18px; width: 2px; height: 22px;
  background: var(--signal); transform: rotate(20deg); transform-origin: top;
}
.svc-tag dl { margin: 1.4rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .28rem .7rem; font-size: .72rem; }
.svc-tag dt { color: #7a7468; letter-spacing: .1em; }
.svc-tag dd { margin: 0; text-align: right; font-weight: 600; }
.svc-tag .status { color: var(--signal); }
@media (max-width: 760px) { .svc-tag { display: none; } }

/* =========================================================================
   Generic section rhythm
   ========================================================================= */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section.on-paper { background: var(--paper); color: var(--ink); }
.section.on-paper .eyebrow.dim { color: #8a8271; }
.section.on-paper h2 { color: var(--ink); }

.section-head { max-width: 60ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); text-transform: uppercase; }
.section-head p { margin: 1rem 0 0; color: #d8d1c1; }
.on-paper .section-head p { color: #4b4738; }

/* =========================================================================
   Services — service-tag cards
   ========================================================================= */
.tags { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.1rem; }
.tag-card {
  position: relative; background: var(--steel); border: 1px solid var(--hair);
  border-radius: 4px; padding: 1.6rem 1.4rem 1.5rem;
}
.on-paper .tag-card { background: #fff; border-color: #ddd5c2; }
.tag-card .num {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em;
  color: var(--signal); display: block; margin-bottom: .9rem;
}
.tag-card h3 { font-size: 1.15rem; text-transform: uppercase; margin-bottom: .5rem; }
.tag-card p { margin: 0; font-size: .96rem; color: #cfc8b8; }
.on-paper .tag-card p { color: #5a5545; }
.tag-card::after { /* punch hole */
  content: ""; position: absolute; top: 1.1rem; right: 1.1rem;
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--signal); opacity: .5;
}

/* =========================================================================
   Credibility band
   ========================================================================= */
.band { border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.band .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 1rem; padding: clamp(2rem,5vw,3rem) 0; }
.stat .n { font-family: var(--font-display); font-weight: 900; font-size: clamp(2rem,5vw,3rem);
  color: var(--signal); line-height: 1; }
.stat .l { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--paper-dim); margin-top: .5rem; }

/* =========================================================================
   Photo slots — auto-fill from /images (see site.js). Styled placeholder
   until a file exists, so the page always looks intentional.
   ========================================================================= */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 1rem; }
.shot {
  position: relative; margin: 0; aspect-ratio: 4/3; border-radius: 4px; overflow: hidden;
  background: var(--steel);
  background-image:
    repeating-linear-gradient(45deg, rgba(236,230,216,.04) 0 10px, transparent 10px 20px);
  border: 1px solid var(--hair);
  display: grid; place-items: center;
}
.shot.wide { grid-column: span 2; }
@media (max-width: 560px) { .shot.wide { grid-column: span 1; } }
.shot .label {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em;
  color: var(--paper-dim); text-align: center; padding: .8rem;
}
.shot .label b { color: var(--paper); display: block; font-weight: 600; }
.shot.has-photo { background-size: cover; background-position: center; }
.shot.has-photo .label { display: none; }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em;
  padding: .8rem; color: var(--paper);
  background: linear-gradient(transparent, rgba(0,0,0,.72));
  opacity: 0; transition: opacity .2s ease;
}
.shot.has-photo:hover figcaption, .shot.has-photo:focus-within figcaption { opacity: 1; }

/* =========================================================================
   Quote
   ========================================================================= */
.quote { max-width: 40ch; }
.quote blockquote { margin: 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(1.4rem, 3.4vw, 2.2rem); line-height: 1.2; }
.quote .cite { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--paper-dim); margin-top: 1.1rem; }
.on-paper .quote .cite { color: #8a8271; }

/* =========================================================================
   Brands
   ========================================================================= */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 1rem; }
.brand {
  background: var(--steel); border: 1px solid var(--hair); border-radius: 4px;
  padding: 1.6rem 1.4rem; min-height: 168px;
  display: flex; flex-direction: column;
}
.brand .logo {
  height: 54px; margin-bottom: 1.1rem; display: flex; align-items: center;
}
.brand .logo img { max-height: 54px; width: auto; object-fit: contain; }
.brand .logo .placeholder {
  font-family: var(--font-display); font-weight: 900; font-size: 1.4rem;
  letter-spacing: .02em; color: var(--paper); text-transform: uppercase;
}
.brand h3 { font-size: 1.05rem; text-transform: uppercase; margin-bottom: .4rem; }
.brand p { margin: 0; font-size: .9rem; color: #cfc8b8; }
.brand .kind { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--signal); margin-bottom: auto; }

/* =========================================================================
   About
   ========================================================================= */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem,5vw,4rem); align-items: start; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.prose p { margin: 0 0 1.1rem; color: #d8d1c1; }
.on-paper .prose p { color: #4b4738; }
.prose p:first-of-type { font-size: 1.2rem; color: var(--paper); }
.on-paper .prose p:first-of-type { color: var(--ink); }

.value-list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1rem; }
.value-list li { display: grid; grid-template-columns: auto 1fr; gap: .9rem; align-items: baseline; }
.value-list .k { font-family: var(--font-mono); color: var(--signal); font-size: .8rem; letter-spacing: .06em; }
.value-list b { display: block; font-family: var(--font-display); text-transform: uppercase; font-size: 1rem; }
.value-list span.d { color: #cfc8b8; font-size: .95rem; }
.on-paper .value-list span.d { color: #5a5545; }

/* =========================================================================
   Visit / footer
   ========================================================================= */
.visit { background: var(--paper); color: var(--ink); }
.visit .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(2rem,5vw,4rem);
  padding: clamp(3rem,7vw,5rem) 0; }
@media (max-width: 720px) { .visit .wrap { grid-template-columns: 1fr; } }
.visit h2 { color: var(--ink); font-size: clamp(1.8rem,4.5vw,2.8rem); text-transform: uppercase; }
.visit .detail { font-family: var(--font-mono); font-size: .92rem; margin: 1.4rem 0 0; display: grid; gap: .7rem; }
.visit .detail div { display: grid; grid-template-columns: 84px 1fr; gap: .8rem; }
.visit .detail .k { color: var(--signal); letter-spacing: .08em; text-transform: uppercase; font-size: .72rem; padding-top: .15rem; }
.visit .detail a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.visit .detail a:hover { color: var(--signal); }

footer.foot { background: var(--ink); border-top: 1px solid var(--hair); }
footer.foot .wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  align-items: center; padding: 2rem 0; }
footer.foot .fnav { display: flex; gap: 1.2rem; }
footer.foot a, footer.foot p { font-family: var(--font-mono); font-size: .76rem; letter-spacing: .06em; color: var(--paper-dim); margin: 0; }
footer.foot a:hover { color: var(--paper); }

.skip-link {
  position: absolute; left: .5rem; top: -3rem; background: var(--signal); color: var(--ink);
  padding: .5rem .9rem; border-radius: 3px; font-family: var(--font-mono); font-size: .8rem;
  z-index: 100; transition: top .15s ease;
}
.skip-link:focus { top: .5rem; color: var(--ink); }
