/* Whangarei Squash Club
   One typeface, white background, club blue. Kept deliberately plain. */

:root {
  --bg:      #ffffff;
  --bg-2:    #f4f4f1;
  --bg-3:    #eaeae6;
  --ink:     #17181a;
  --ink-2:   #46494e;
  --muted:   #767b82;
  --rule:    #e3e3df;
  --blue:    #14508f;
  --blue-dk: #0e3c6d;
  --blue-lt: #eaf1f8;
  --dark:    #16181b;

  --font: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --wrap: 1120px;
  --gut: clamp(20px, 5vw, 52px);
  --sec: clamp(52px, 7vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.015em;
  margin: 0;
}

h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); letter-spacing: -0.02em; }
h3 { font-size: 1.18rem; }

p { margin: 0 0 1.1em; }
.lede { font-size: 1.16rem; line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.dim { color: var(--muted); }
strong { color: var(--ink); font-weight: 600; }
.small { font-size: 0.94rem; }

.label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 0.5rem;
}

.wrap { width: min(100% - (var(--gut) * 2), var(--wrap)); margin-inline: auto; }
.sec { padding-block: var(--sec); }
.band { background: var(--bg-2); }
hr { border: 0; height: 1px; background: var(--rule); margin: 0; }

/* ---------- header ---------- */
.nav {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 52px; height: 52px; }
.brand b { display: block; font-size: 1.02rem; font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.brand span { display: block; font-size: 0.78rem; color: var(--muted); font-weight: 400; }

.nav__links { display: flex; align-items: center; gap: clamp(0.5rem, 1.3vw, 1.35rem); }
.nav__links a {
  text-decoration: none; color: var(--ink-2); font-size: 0.94rem;
  padding: 0.3rem 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav__links a:hover { color: var(--ink); border-bottom-color: var(--rule); }
.nav__links a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--blue); }
.nav__links .book {
  background: var(--blue); color: #fff; padding: 0.5rem 1rem;
  border-radius: 2px; border-bottom: 0; margin-left: 0.4rem; font-weight: 600;
}
.nav__links .book:hover { background: var(--blue-dk); color: #fff; border-bottom-color: transparent; }

.nav__toggle { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 8px; }
.nav__toggle svg { width: 26px; height: 26px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.72em 1.35em;
  background: var(--blue); color: #fff;
  border: 1px solid var(--blue); border-radius: 2px;
  font-size: 0.98rem; font-weight: 600; text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--blue-dk); border-color: var(--blue-dk); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border-color: #c9c9c4; }
.btn.ghost:hover { background: var(--bg-2); color: var(--ink); border-color: var(--muted); }
.btn.white { background: #fff; color: var(--ink); border-color: #fff; }
.btn.white:hover { background: var(--bg-2); border-color: var(--bg-2); color: var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 0.7rem; }

/* ---------- hero ---------- */
.hero { position: relative; background: var(--dark); }
.hero img.hero__photo {
  width: 100%; height: clamp(340px, 56vh, 520px);
  object-fit: cover; object-position: 62% 55%; opacity: 0.55;
}
.hero__text {
  position: absolute; inset: 0; display: flex; align-items: center;
}
.hero__text .wrap { width: min(100% - (var(--gut) * 2), var(--wrap)); }
.hero h1 { color: #fff; max-width: 15ch; }
.hero p { color: #e6e6e3; max-width: 46ch; margin-top: 0.9rem; }
.hero .btns { margin-top: 1.5rem; }
.hero__kicker { color: #a8c6e6; font-size: 0.86rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.7rem; font-weight: 600; }

/* quick facts: a plain line of text, not boxes */
.quickfacts {
  list-style: none; margin: 0; padding: 1rem 0;
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem;
  font-size: 0.95rem; color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
}
.quickfacts b { color: var(--ink); font-weight: 600; }

/* ---------- page intro ---------- */
.intro { padding-block: clamp(2.2rem, 5vw, 3.4rem) clamp(1.4rem, 3vw, 2rem); border-bottom: 1px solid var(--rule); }
.intro p { margin-top: 0.8rem; }

/* ---------- two column text ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(1.6rem, 4vw, 3.4rem); align-items: start; }
.cols--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- timetable ---------- */
.tt { border-top: 1px solid var(--rule); }
.tt__row {
  display: grid; grid-template-columns: 15rem minmax(0, 1fr);
  gap: 0.4rem 2rem; padding: 1.5rem 0; border-bottom: 1px solid var(--rule);
}
.tt__when { font-weight: 600; color: var(--ink); }
.tt__when span { display: block; font-weight: 400; color: var(--muted); font-size: 0.95rem; }
.tt__what h3 { margin-bottom: 0.35rem; }
.tt__what p:last-child { margin-bottom: 0; }

/* ---------- prices ---------- */
.prices { border-top: 1px solid var(--rule); }
.prices > div {
  display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem;
  justify-content: space-between; align-items: baseline;
  padding: 1.15rem 0; border-bottom: 1px solid var(--rule);
}
.prices h3 { font-size: 1.06rem; font-weight: 600; }
.prices p { margin: 0.2rem 0 0; font-size: 0.94rem; color: var(--muted); max-width: 58ch; }
.prices .amt { font-size: 1.35rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.prices .amt span { font-size: 0.88rem; font-weight: 400; color: var(--muted); }

/* ---------- how-to list ---------- */
ol.howto { counter-reset: n; list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
ol.howto > li {
  counter-increment: n; padding: 1.25rem 0 1.25rem 2.6rem;
  border-bottom: 1px solid var(--rule); position: relative;
}
ol.howto > li::before {
  content: counter(n) "."; position: absolute; left: 0; top: 1.25rem;
  font-weight: 700; color: var(--blue);
}
ol.howto h3 { margin-bottom: 0.25rem; }
ol.howto p { margin-bottom: 0; }

/* ---------- plain lists ---------- */
ul.ticks { list-style: none; margin: 0; padding: 0; }
ul.ticks li { padding: 0.5rem 0 0.5rem 1.4rem; position: relative; border-bottom: 1px solid var(--rule); }
ul.ticks li::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 6px; height: 6px; background: var(--blue); }

.namelist { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 3rem; }
.namelist li { break-inside: avoid; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.namelist b { display: block; color: var(--ink); font-weight: 600; }
.namelist span { font-size: 0.92rem; color: var(--muted); }

/* ---------- photos ---------- */
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos > *:first-child { grid-column: span 2; grid-row: span 2; }
.photos figure { margin: 0; overflow: hidden; background: var(--bg-3); aspect-ratio: 3/2; }
.photos > *:first-child { aspect-ratio: 3/2; }
figure.photo { margin: 0; }
figure.photo img { width: 100%; }
figure.photo figcaption { font-size: 0.88rem; color: var(--muted); padding-top: 0.5rem; }

/* ---------- note box (used sparingly) ---------- */
.note { background: var(--blue-lt); border-left: 3px solid var(--blue); padding: 1.1rem 1.3rem; }
.note p:last-child { margin-bottom: 0; }
.band .note { background: #fff; }

/* ---------- sponsors, in colour ---------- */
.logos { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: clamp(1.4rem, 3vw, 2.6rem); align-items: center; }
.logos a, .logos span { display: flex; align-items: center; justify-content: center; min-height: 80px; }
.logos img { max-height: 74px; width: auto; object-fit: contain; }
.logos a:hover img { opacity: 0.75; }

.sponsors { border-top: 1px solid var(--rule); }
.sponsors > div {
  display: flex; flex-wrap: wrap; gap: 0.3rem 1.5rem; justify-content: space-between;
  align-items: baseline; padding: 1.05rem 0; border-bottom: 1px solid var(--rule);
}
.sponsors b { color: var(--ink); font-weight: 600; font-size: 1.04rem; }
.sponsors em { font-style: normal; color: var(--muted); font-size: 0.94rem; }

/* ---------- dark strip ---------- */
.strip { background: var(--dark); color: #ccccc8; }
.strip h2 { color: #fff; }
.strip .label { color: #a8c6e6; }
.strip a:not(.btn) { color: #9fc3e8; }

/* ---------- forms ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.92rem; font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.65rem 0.75rem;
  border: 1px solid #c9c9c4; border-radius: 2px;
  font-family: inherit; font-size: 1rem; color: var(--ink); background: #fff;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
.field textarea { min-height: 130px; resize: vertical; }

/* ---------- contact details ---------- */
.details { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.details li { padding: 0.9rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; }
.details dt, .details .k { color: var(--muted); font-size: 0.94rem; }
.details .v { color: var(--ink); }

/* ---------- footer ---------- */
.foot { background: var(--dark); color: #a9adb2; padding-block: clamp(2.4rem, 4.5vw, 3.4rem) 1.5rem; margin-top: 0; }
.foot__in { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(1.8rem, 4vw, 3rem); }
.foot h4 { color: #fff; font-size: 0.94rem; margin-bottom: 0.8rem; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding: 0.28rem 0; }
.foot a { color: #a9adb2; text-decoration: none; font-size: 0.95rem; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot__end { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid #2c2f33; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; justify-content: space-between; font-size: 0.88rem; color: #767b82; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 10px; z-index: 100; background: var(--blue); color: #fff; padding: 0.6rem 1rem; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[id] { scroll-margin-top: 90px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .cols, .cols--even { grid-template-columns: 1fr; }
  .foot__in { grid-template-columns: 1fr 1fr; }
  .tt__row { grid-template-columns: 11rem minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 76px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--rule);
    padding: 0 var(--gut) 1.2rem; display: none;
  }
  .nav__links.open { display: flex; }
  .nav__links a { padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
  .nav__links .book { margin: 0.9rem 0 0; text-align: center; padding: 0.75rem; }
  .photos { grid-template-columns: repeat(2, 1fr); }
  .photos > *:first-child { grid-column: span 2; grid-row: auto; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .tt__row { grid-template-columns: 1fr; gap: 0.2rem; }
  .namelist { columns: 1; }
  .details li { grid-template-columns: 1fr; gap: 0.1rem; }
  .foot__in { grid-template-columns: 1fr; }
  .photos { grid-template-columns: 1fr; }
  .photos > *:first-child { grid-column: auto; }
  .brand img { width: 44px; height: 44px; }
}

@media print {
  .nav, .hero img, .btn { display: none !important; }
  body { color: #000; background: #fff; }
}
