/* ==========================================================================
   Lyttelton Tennis Club
   --------------------------------------------------------------------------
   BRAND COLOURS: when the club logo arrives, change the four --brand-*
   values below and the whole site follows. Nothing else needs editing.
   ========================================================================== */

:root {
  /* --- Brand: sampled from the club logo ---
     Maroon is the wordmark and figure colour, so it leads; the logo's green
     swoosh is the secondary. To swap which one dominates, exchange the
     --brand / --brand-accent values. --brand-light must stay a pale tint of
     whichever colour --brand is. */
  --brand:        #54061c;   /* logo maroon — buttons, links, accents */
  --brand-dark:   #37040f;   /* darker maroon for hover states */
  --brand-light:  #f6ebee;   /* pale maroon tint for panels */
  --brand-accent: #114720;   /* logo green — secondary highlight */

  /* --- Neutrals --- */
  --white:   #ffffff;
  --ink:     #16211c;        /* body text */
  --ink-mut: #5b6b63;        /* muted text */
  --line:    #e6e3e4;        /* hairline borders */
  --paper:   #faf8f9;        /* barely-there section tint */

  /* --- Type --- */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;

  /* --- Layout --- */
  --max:     1120px;
  --gutter:  1.5rem;
  --radius:  10px;
  --shadow:  0 1px 2px rgba(22, 33, 28, .06),
             0 8px 24px rgba(22, 33, 28, .06);
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

/* Any component that sets `display` would otherwise defeat the [hidden]
   attribute. Declared once here so it holds everywhere. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

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

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

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 .6em;
  font-weight: 700;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand);
  color: var(--white);
  padding: .75rem 1.25rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: clamp(3rem, 8vw, 5.5rem) 0; }
.section--tint { background: var(--paper); }

.section__lead {
  max-width: 62ch;
  color: var(--ink-mut);
  font-size: 1.06rem;
}

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .8rem;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: .8rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.btn--primary {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}
.btn--primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--white);
}

.btn--ghost {
  background: transparent;
  color: var(--brand);
  border-color: var(--line);
}
.btn--ghost:hover {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--brand-dark);
}

/* --------------------------------------------------------------------------
   Header / navigation
   -------------------------------------------------------------------------- */

/* Not sticky. A tall header that resizes as you scroll reflows the page on
   every scroll event, which nudges the scroll position and re-triggers the
   resize — visible as stutter. The logo is large enough to be worth its space
   at the top of the page, so the header simply scrolls away. */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 232px;
}

@media (max-width: 820px) {
  .site-header__inner { min-height: 142px; }
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: var(--ink);
}

/* Logo slot — see assets/README.md. The <img> points at assets/logo.png; if
   that file is missing it removes itself and reveals .brand__mark instead.
   Header and footer are sized separately so the mark can lead in the header
   without dominating the footer. */
.brand__logo {
  width: auto;
  object-fit: contain;
}

.site-header .brand__logo { height: 200px; }
.site-footer .brand__logo { height: 96px; }

@media (max-width: 820px) {
  .site-header .brand__logo { height: 120px; }
}
@media (max-width: 420px) {
  .site-header .brand__logo { height: 92px; }
  .brand__name { font-size: .95rem; }
  .brand__sub { font-size: .68rem; }
}

.brand__mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-weight: 700; font-size: 1.05rem; }
.brand__sub {
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mut);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .7rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; }

.nav { display: flex; align-items: center; gap: 1.75rem; }

.nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: .98rem;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--brand); }
.nav a[aria-current="page"] {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
/* `.nav a` (0,1,1) outspecifies `.btn--primary` (0,1,0), so without these the
   button text inherits --ink and goes dark-on-maroon. Keep them together. */
.nav .btn { padding: .6rem 1.3rem; font-size: .95rem; }
.nav .btn:hover { border-bottom-color: transparent; }

.nav .btn--primary,
.nav .btn--primary:hover {
  color: var(--white);
}
.nav .btn--ghost { color: var(--brand); }

@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    box-shadow: var(--shadow);
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding: .85rem 0;
    border-bottom: 1px solid var(--line);
  }
  .nav a[aria-current="page"] { border-bottom-color: var(--line); }
  .nav .btn {
    margin-top: 1rem;
    text-align: center;
    border-bottom: 2px solid var(--brand);
  }
  .site-header__inner { position: relative; }
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Full-width banner photo
   -------------------------------------------------------------------------- */

.banner { width: 100%; }

.banner img {
  display: block;
  width: 100%;
  /* Tall enough to read as a landscape, short enough that the headline below
     stays visible without scrolling on a laptop. */
  height: clamp(200px, 34vw, 440px);
  object-fit: cover;
  object-position: center 58%;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(2.5rem, 6vw, 4rem); }

/* Single column now that the photo runs full width above it. */
.hero__grid { display: block; }

.hero__text { max-width: 720px; }

.hero__text p {
  font-size: 1.12rem;
  color: var(--ink-mut);
  max-width: 52ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 1.75rem;
}

.hero__meta {
  margin-top: 2.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  max-width: 720px;
}
.hero__meta div { min-width: 120px; }
.hero__meta dt {
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mut);
  margin-bottom: .25rem;
}
.hero__meta dd {
  margin: 0;
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--brand);
}
/* Secondary detail alongside a headline figure, e.g. 6 + "2 floodlit".
   A pill reads as a deliberate qualifier rather than stray small text. */
.hero__meta dd span {
  display: inline-block;
  vertical-align: middle;
  margin-left: .5rem;
  padding: .16rem .55rem;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}



/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.card__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.card h3 { margin-bottom: .4rem; }
.card p { margin: 0; color: var(--ink-mut); font-size: .97rem; }

/* Contact block inside a card, e.g. the coach's details */
.card__contact {
  margin-top: 1rem !important;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: .2rem;
  font-size: .9rem !important;
}
.card__contact strong { color: var(--ink); font-weight: 600; }
.card__contact a {
  color: var(--brand);
  text-decoration: none;
  word-break: break-word;
}
.card__contact a:hover { text-decoration: underline; }

/* --------------------------------------------------------------------------
   Membership tiers
   -------------------------------------------------------------------------- */

.tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.tier {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}
.tier--featured {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}
.tier__tag {
  align-self: flex-start;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--brand);
  color: var(--white);
  padding: .25rem .6rem;
  border-radius: 999px;
  margin-bottom: .9rem;
}
.tier__price {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
  margin: .3rem 0 .2rem;
}
.tier__price span {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-mut);
}
.tier ul {
  list-style: none;
  padding: 0;
  margin: 1.1rem 0 1.5rem;
  color: var(--ink-mut);
  font-size: .95rem;
}
.tier li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: .5rem;
}
.tier li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--brand);
}
.tier .btn { margin-top: auto; text-align: center; }

/* --------------------------------------------------------------------------
   Split band (photo beside text)
   -------------------------------------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
/* Applied by the onerror handler when the photo is missing. */
.split--notext-media { grid-template-columns: 1fr; }

.split__media { margin: 0; }
.split__media img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: block;
}

.split__text p { color: var(--ink-mut); max-width: 56ch; }
.split__text .btn { margin-top: .5rem; }

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .split__media img { max-height: 420px; object-position: center 30%; }
}

/* --------------------------------------------------------------------------
   How to join
   -------------------------------------------------------------------------- */

.join {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-top: 2.75rem;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}
@media (max-width: 800px) {
  .join { grid-template-columns: 1fr; }
}

.join h3 { font-size: 1.15rem; margin-bottom: .9rem; }

.join ol {
  margin: 0;
  padding-left: 1.3rem;
  color: var(--ink-mut);
  font-size: .97rem;
}
.join li { margin-bottom: .6rem; padding-left: .25rem; }
.join li::marker { color: var(--brand); font-weight: 700; }

.join__note {
  margin: 1.1rem 0 0;
  font-size: .9rem;
  color: var(--ink-mut);
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.join__cta {
  background: var(--brand-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.join__cta .btn { width: 100%; }
.join__meta {
  margin: .8rem 0 0;
  font-size: .84rem;
  color: var(--ink-mut);
}
.join__fallback {
  margin: 0;
  font-size: .94rem;
  color: var(--ink-mut);
}

/* --- Supporting notes under the membership tiers --- */
.notes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 1.75rem;
}

.note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.65rem;
}
.note h3 { font-size: 1rem; margin-bottom: .7rem; }
.note ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-mut);
  font-size: .94rem;
}
.note li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .55rem;
}
.note li:last-child { margin-bottom: 0; }
.note li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--brand-accent);
}

/* --------------------------------------------------------------------------
   Call to action band
   -------------------------------------------------------------------------- */

.cta {
  background: var(--brand);
  color: var(--white);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.25rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.75rem;
}
.cta h2 { margin: 0 0 .35rem; color: var(--white); }
.cta p { margin: 0; opacity: .9; max-width: 46ch; }
.cta .btn {
  background: var(--white);
  color: var(--brand-dark);
  border-color: var(--white);
  white-space: nowrap;
}
.cta .btn:hover { background: var(--brand-light); color: var(--brand-dark); }

/* --------------------------------------------------------------------------
   Contact page
   -------------------------------------------------------------------------- */

.page-head {
  padding: clamp(2.75rem, 6vw, 4.25rem) 0 clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--line);
}
.page-head p { color: var(--ink-mut); max-width: 58ch; margin-bottom: 0; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* --- Details list --- */
.details { display: grid; gap: 1.5rem; }

.detail {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.detail__icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand);
  display: grid;
  place-items: center;
}
.detail h3 { font-size: 1rem; margin-bottom: .2rem; }
.detail p,
.detail address {
  margin: 0;
  font-style: normal;
  color: var(--ink-mut);
  font-size: .97rem;
}
.detail a { text-decoration: none; }
.detail a:hover { text-decoration: underline; }

/* Committee contact list */
.people {
  list-style: none;
  margin: .6rem 0 0;
  padding: 0;
  font-size: .95rem;
}
.people li {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .75rem;
  justify-content: space-between;
  padding: .45rem 0;
  border-bottom: 1px solid var(--line);
}
.people li:last-child { border-bottom: none; }
.people span { color: var(--ink); }
.people a { color: var(--brand); white-space: nowrap; }

.hours {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.25rem;
  font-size: .95rem;
}
.hours th,
.hours td {
  text-align: left;
  padding: .65rem 0;
  border-bottom: 1px solid var(--line);
}
.hours th { font-weight: 600; }
.hours td { color: var(--ink-mut); text-align: right; }
.hours tr:last-child th,
.hours tr:last-child td { border-bottom: none; }

/* --- Form --- */
.form-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow: var(--shadow);
}

.form-note {
  font-size: .87rem;
  color: var(--ink-mut);
  margin: 1rem 0 0;
}

/* --- Direct contact links (in place of a form) --- */
.reach { display: grid; gap: .75rem; }

.reach__item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .95rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.reach__item:hover {
  border-color: var(--brand);
  background: var(--brand-light);
  color: var(--ink);
}

.reach__icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--brand-light);
  color: var(--brand);
  display: grid;
  place-items: center;
}
.reach__item:hover .reach__icon { background: var(--white); }

.reach__item span:last-child {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  font-size: .95rem;
  color: var(--ink-mut);
  min-width: 0;
  word-break: break-word;
}
.reach__item strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
}

/* --- "What to include" nudge --- */
.tip {
  margin-top: 1.75rem;
  padding: 1.35rem 1.5rem;
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.tip h3 { font-size: 1rem; margin-bottom: .35rem; }
.tip p { margin: 0 0 .7rem; color: var(--ink-mut); font-size: .94rem; }
.tip ul {
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-mut);
  font-size: .94rem;
}
.tip li {
  position: relative;
  padding-left: 1.4rem;
  margin-bottom: .4rem;
}
.tip li:last-child { margin-bottom: 0; }
.tip li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: .45rem;
  height: .45rem;
  border-radius: 50%;
  background: var(--brand);
}

/* --- Map --- */
.map {
  margin-top: 2.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
}
.map iframe {
  width: 100%;
  height: 380px;
  border: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  margin-top: 1rem;
  font-size: .94rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
}
@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 2rem; }
}

.site-footer h4 {
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-mut);
  margin: 0 0 .9rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { text-decoration: none; color: var(--ink); }
.site-footer a:hover { color: var(--brand); text-decoration: underline; }
.site-footer address {
  font-style: normal;
  color: var(--ink-mut);
  margin: .75rem 0 0;
}

.site-footer__bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  justify-content: space-between;
  color: var(--ink-mut);
  font-size: .88rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
