/* ==========================================================================
   Westhead Gates Ltd — site stylesheet.
   Plain CSS, no build step.
   Change the tokens in :root and the whole site follows.
   ========================================================================== */
:root {
  /* --- Brand: taken from the supplied logo artwork and the flyer -----------
     Black ground, brass accent, silver secondary. The brass in the logo is
     CMYK C38 M56 Y98 K25 — too dark to use as a button next to white, so
     --accent is a brighter screen equivalent. If a screen hex is agreed with
     the designer, put it here and the whole site follows. ----------------- */
  --dark:     #111111;   /* headings, header mark, footer, CTA ground         */
  --darker:   #000000;   /* footer base — true black, as the signage          */
  --accent:   #d9a227;   /* the brand gold: buttons, links, active states     */
  --accent-d: #a87814;   /* the shadow under a button                         */
  --accent-t: #111111;   /* text that sits on the gold                        */
  --silver:   #b9b9b9;   /* the flyer's secondary band                        */
  --head:     #1a1a1a;   /* header bar — a touch off true black so the logo's
                            darkest letters still separate from the ground    */
  --warm:     #f5f4f2;   /* alternating section ground                        */
  --line:     #e2e0dc;   /* borders                                           */

  --paper:    #ffffff;
  --ink:      #2b2b2b;
  --ink-2:    #474747;
  --muted:    #6b6b6b;
  --field:    #d6d4d0;

  --wrap: 1140px;
  --pad:  clamp(1.15rem, 4vw, 2.5rem);
  --r:    6px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Libre Franklin", "Segoe UI", system-ui, -apple-system, sans-serif;
  /* 17px base: the audience is 45–70, often reading outdoors on a phone */
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }
a { color: var(--dark); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3 {
  font-family: "Bitter", Georgia, "Times New Roman", serif;
  font-weight: 700; color: var(--dark);
  line-height: 1.22; text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 4.2vw, 2.7rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { text-wrap: pretty; }

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

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

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: clamp(2.75rem, 6vw, 4.25rem); }
.warm { background: var(--warm); border-block: 1px solid var(--line); }
.lede { font-size: 1.08rem; color: var(--ink-2); max-width: 60ch; margin-top: .7rem; }
.head-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; justify-content: space-between; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: 1rem 1.7rem; border: 0; border-radius: var(--r);
  font-size: 1.06rem; font-weight: 600; text-align: center;
  transition: filter .18s ease, transform .12s ease, background-color .18s ease, color .18s ease;
}
.btn:active { transform: translateY(2px); }
.btn--go { background: var(--accent); color: var(--accent-t); box-shadow: 0 2px 0 var(--accent-d); }
.btn--go:hover { filter: brightness(.94); color: var(--accent-t); }
.btn--go:active { box-shadow: none; }
.btn--out { background: transparent; color: var(--dark); border: 2px solid var(--dark); padding: .875rem 1.55rem; }
.btn--out:hover { background: var(--dark); color: #fff; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }

/* --- Header --------------------------------------------------------------- */
/* Dark, because the logo is drawn for a dark ground: its wordmark runs from
   white through to near-black, so on a white bar the left half disappears. */
.top { position: sticky; top: 0; z-index: 60; background: var(--head); border-bottom: 1px solid #2c2c2c; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; padding-block: .95rem; }

.brand { display: flex; align-items: center; gap: .75rem; }
.brand:hover { color: inherit; }
.brand i { width: 46px; height: 46px; flex: none; border-radius: var(--r); background: rgba(255,255,255,.08); display: grid; place-items: center; overflow: hidden; }
.brand i svg { width: 25px; height: 25px; }
/* The logo, converted from the artwork the client supplied. The header uses
   the side-by-side lockup (logo-h.svg) because the supplied stack is too tall
   to stay readable in a 60px bar; the footer uses the stack as drawn. If a
   logo is ever replaced, drop the new file in and main.js swaps it in on
   load, falling back to the mark-and-wordmark below if it is missing. */
.brand__logo { display: none; height: 52px; width: auto; }
.brand--haslogo .brand__logo { display: block; }
.brand--haslogo i, .brand--haslogo .brand__text { display: none; }
.brand b { font-family: "Bitter", Georgia, serif; font-size: 1.3rem; color: #fff; display: block; line-height: 1.2; }
.brand b em { font-style: normal; font-size: .72em; color: rgba(255,255,255,.55); }
.brand span { font-size: .82rem; color: rgba(255,255,255,.6); display: block; }

.right { display: flex; align-items: center; gap: 1.75rem; }
.nav { display: flex; gap: 1.5rem; }
.nav a { padding: .3rem 0; font-size: 1.03rem; color: rgba(255,255,255,.8); border-bottom: 3px solid transparent; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; font-weight: 600; border-bottom-color: var(--accent); }
.tel { font-family: "Bitter", Georgia, serif; font-weight: 700; font-size: 1.35rem; color: var(--accent); white-space: nowrap; }
.tel:hover { color: #fff; }

.burger { display: none; width: 46px; height: 46px; border: 2px solid rgba(255,255,255,.4); border-radius: var(--r); background: none; place-items: center; }
.burger span { display: block; width: 20px; height: 2.5px; background: #fff; border-radius: 2px; transition: transform .25s ease, opacity .2s; }
.burger span + span { margin-top: 5px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 860px) {
  .burger { display: grid; }
  .tel { display: none; }
  .nav {
    position: fixed; inset: auto 0 auto 0; top: var(--menutop, 76px);
    flex-direction: column; gap: 0; background: var(--head);
    border-bottom: 1px solid #2c2c2c; box-shadow: 0 12px 26px rgba(0,0,0,.4);
    padding: .25rem var(--pad) 1rem;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a { padding: 1rem 0; font-size: 1.12rem; border-bottom: 1px solid #2c2c2c; }
  .brand__logo { height: 46px; }
}

/* --- Hero / page head ----------------------------------------------------- */
.hero { background: var(--warm); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding-block: clamp(2.25rem, 5vw, 3.5rem); }
/* Without this the image's intrinsic width sets the track minimum and the
   whole page grows sideways. Same reason as .grid > * below. */
.hero .wrap > * { min-width: 0; }
.hero img { border-radius: var(--r); border: 1px solid var(--line); width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }
.under { margin-top: 1.1rem; font-size: .98rem; color: var(--muted); }
@media (max-width: 820px) { .hero .wrap { grid-template-columns: 1fr; } .hero img { order: -1; } }

.page-head { background: var(--warm); border-bottom: 1px solid var(--line); padding-block: clamp(2rem, 4vw, 3rem); }

/* --- Simple content grids ------------------------------------------------- */
.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.25rem); }
/* Grid items default to min-width:auto, which lets a wide image set the
   track's minimum and push the whole page sideways. */
.grid > * { min-width: 0; }
.grid img { width: 100%; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.item h3 { margin-bottom: .35rem; }
.item p { color: var(--ink-2); font-size: 1rem; }
.item > svg { width: 36px; height: 36px; color: var(--accent); margin-bottom: .7rem; }

.ticks { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.5rem; }
.ticks li { display: grid; grid-template-columns: 24px 1fr; gap: .7rem; align-items: start; }
.ticks svg { width: 24px; height: 24px; color: var(--accent); margin-top: .2rem; }
.ticks strong { color: var(--dark); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 1.75rem; }
.thumbs img { border-radius: var(--r); border: 1px solid var(--line); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.thumbs strong { color: var(--dark); }
.thumbs span { color: var(--muted); font-size: .95rem; }

/* --- Gallery -------------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filters button {
  padding: .6rem 1.15rem; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--paper); color: var(--ink); font-size: 1rem;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}
.filters button:hover { border-color: var(--dark); }
.filters button[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: #fff; }
.filters .n { opacity: .6; margin-left: .3rem; font-variant-numeric: tabular-nums; }
.filters[hidden] { display: none; }
.gbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.count { color: var(--muted); font-variant-numeric: tabular-nums; }

.gallery { columns: 3 280px; column-gap: 1rem; }
.tile {
  display: block; width: 100%; padding: 0; margin: 0 0 1rem;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--paper); break-inside: avoid; cursor: zoom-in;
  transition: box-shadow .2s ease, transform .2s ease;
}
.tile:hover { box-shadow: 0 8px 22px rgba(0,0,0,.16); transform: translateY(-2px); }
.tile img { width: 100%; height: auto; }
.tile figcaption { padding: .75rem .9rem; text-align: left; }
.tile b { display: block; color: var(--dark); font-size: 1rem; }
.tile small { color: var(--muted); font-size: .9rem; }
.tile.loading { min-height: 220px; background: var(--warm); }

.note {
  border: 1px dashed var(--line); border-radius: var(--r);
  background: var(--warm); padding: clamp(1.5rem, 4vw, 2.5rem); text-align: center;
}
.note p { color: var(--ink-2); max-width: 52ch; margin: .5rem auto 0; }
.note code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: rgba(0,0,0,.07); padding: .1rem .4rem; border-radius: 4px; }
.note[hidden] { display: none; }

/* --- Lightbox ------------------------------------------------------------- */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.96); display: grid; grid-template-rows: auto 1fr auto; opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s; }
.lb.open { opacity: 1; visibility: visible; }
.lb[hidden] { display: none; }
.lb__bar { display: flex; align-items: center; justify-content: space-between; padding: 1rem var(--pad); color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; }
.lb__stage { position: relative; display: grid; place-items: center; padding-inline: clamp(1rem, 8vw, 5rem); min-height: 0; }
.lb__stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r); }
.lb__meta { padding: 1rem var(--pad) 1.5rem; text-align: center; color: rgba(255,255,255,.75); min-height: 2.8rem; }
.lb__meta b { font-family: "Bitter", Georgia, serif; display: block; color: #fff; font-size: 1.08rem; }
.rnd { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff; display: grid; place-items: center; transition: background-color .18s ease, border-color .18s ease; }
.rnd:hover { background: var(--accent); border-color: var(--accent); }
.rnd svg { width: 21px; height: 21px; }
.lb__nav { position: absolute; top: 50%; transform: translateY(-50%); }
.lb__nav--p { left: clamp(.35rem, 2vw, 1.25rem); }
.lb__nav--n { right: clamp(.35rem, 2vw, 1.25rem); }
body.locked { overflow: hidden; }

/* --- Contact -------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.contact > * { min-width: 0; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(1.25rem, 3vw, 1.75rem); }
.card h3 { font-size: 1.05rem; }
.card p { color: var(--ink-2); }
.card a[href^="tel"], .card a[href^="mailto"] { font-family: "Bitter", Georgia, serif; font-weight: 700; font-size: 1.28rem; color: var(--accent); word-break: break-word; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; margin-top: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.full { grid-column: 1 / -1; }
.field label { font-size: .95rem; font-weight: 600; color: var(--dark); }
.field input, .field textarea, .field select {
  font: inherit; width: 100%; padding: .8rem .9rem;
  border: 1px solid var(--field); border-radius: var(--r);
  background: var(--paper); color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field textarea { min-height: 120px; resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d6860' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .9rem center; background-size: 18px; padding-right: 2.6rem; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(217,162,39,.28);
}
.field.bad input, .field.bad textarea, .field.bad select { border-color: #b4231f; }
.err { font-size: .88rem; color: #9c2320; min-height: 1.1rem; }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .96rem; color: var(--ink-2); margin-top: .7rem; }
.consent input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--accent); flex: none; }
.small { font-size: .9rem; color: var(--muted); text-align: center; margin-top: .7rem; }
.result { margin-top: 1rem; padding: .95rem 1.1rem; border-radius: var(--r); font-size: 1rem; border: 1px solid transparent; }
.result[hidden] { display: none; }
.result--ok { background: #edf3ee; border-color: #bcd8c3; color: #14603a; }
.result--err { background: #fbeeed; border-color: #e5c2be; color: #8e1c19; }
@media (max-width: 560px) { .fields { grid-template-columns: 1fr; } }

/* Spam honeypot: in the DOM for bots, zero-size and invisible for people. */
.hp { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

.detail { display: flex; flex-direction: column; gap: 1rem; }
.hours li { display: flex; justify-content: space-between; gap: 1rem; padding-block: .45rem; border-bottom: 1px solid var(--line); }
.hours li:last-child { border-bottom: 0; }
.hours strong { color: var(--dark); font-variant-numeric: tabular-nums; }

/* --- CTA and footer ------------------------------------------------------- */
.cta { background: var(--dark); color: rgba(255,255,255,.82); text-align: center; }
.cta h2 { color: #fff; }
.cta p { margin: .8rem auto 0; max-width: 52ch; font-size: 1.06rem; }
.cta .actions { justify-content: center; }
.cta .btn--out { border-color: rgba(255,255,255,.5); color: #fff; }
.cta .btn--out:hover { background: #fff; color: var(--dark); }

.foot { background: var(--darker); color: rgba(255,255,255,.7); padding-block: 2.25rem 1.25rem; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; justify-content: space-between; }
.foot a { color: rgba(255,255,255,.85); }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot b { font-family: "Bitter", Georgia, serif; color: #fff; font-size: 1.1rem; display: block; margin-bottom: .4rem; }
.foot__logo { width: 200px; height: auto; margin-bottom: .9rem; }
.foot .wrap.foot__base {
  display: block; border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 1.75rem; padding-top: 1rem;
  font-size: .9rem; color: rgba(255,255,255,.5);
}

/* --- Sticky mobile call bar ----------------------------------------------- */
.callbar { display: none; }
@media (max-width: 780px) {
  .callbar {
    position: fixed; inset: auto 0 0 0; z-index: 80;
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    background: var(--field); border-top: 1px solid var(--field);
  }
  .callbar a { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1.05rem; font-weight: 600; color: #fff; }
  .callbar a:first-child { background: var(--accent); color: var(--accent-t); }
  .callbar a:last-child { background: var(--dark); }
  .callbar a:hover { color: #fff; }
  .callbar svg { width: 20px; height: 20px; }
  body { padding-bottom: 60px; }
}

.skip { position: absolute; top: -100px; left: 1rem; z-index: 999; padding: .7rem 1.2rem; background: var(--dark); color: #fff; border-radius: 0 0 var(--r) var(--r); }
.skip:focus { top: 0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media print {
  .top, .foot, .callbar, .cta, .actions, .lb, .filters, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; padding-bottom: 0; }
  .section, .hero, .page-head { padding-block: 1rem; background: #fff !important; }
  .gallery { columns: 2; }
}
