/*
Theme Name:  WBA — Warragul Basketball Association
Theme URI:   https://warragulbasketball.com.au
Description: Fully custom WordPress theme for the Warragul Basketball Association. White-dominant, mobile-first, community sports editorial aesthetic.
Version:     1.0.0
Author:      WBA Web Team
Author URI:  https://warragulbasketball.com.au
Text Domain: wba
Tags:        custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES — Brand Token System
   All brand values are defined here. Reference these throughout all partials.
   Never hardcode colours, spacing, or type values — always use variables.
   ========================================================================== */

:root {

  /* --- Colours ---------------------------------------------------------- */
  --color-red:        #C1272D;   /* WBA Red — buttons, key links, max 2× per view */
  --color-orange:     #F7931E;   /* WBA Orange — sparingly, badges, hover states  */
  --color-dark:       #1A1A1A;   /* Near-Black — body text, Warriors section, footer */
  --color-white:      #FFFFFF;   /* White — dominant background                   */
  --color-off-white:  #F8F8F6;   /* Warm White — alternate section backgrounds    */
  --color-border:     #E6E6E2;   /* Light Grey — card borders, dividers           */
  --color-muted:      #888888;   /* Mid Grey — secondary text, labels, captions   */

  /* Derived / semantic aliases */
  --color-primary:    var(--color-red);
  --color-secondary:  var(--color-orange);
  --color-body-text:  var(--color-dark);
  --color-bg:         var(--color-white);
  --color-bg-alt:     var(--color-off-white);

  /* --- Typography ------------------------------------------------------- */
  --font-primary:     'Montserrat', system-ui, -apple-system, sans-serif;

  --weight-regular:   400;
  --weight-bold:      700;
  --weight-extrabold: 800;

  /* Type scale — mobile-first base */
  --text-eyebrow:     0.625rem;  /* 10px — section labels */
  --text-xs:          0.75rem;   /* 12px */
  --text-sm:          0.875rem;  /* 14px */
  --text-base:        1rem;      /* 16px */
  --text-md:          1.125rem;  /* 18px */
  --text-lg:          1.25rem;   /* 20px */
  --text-xl:          1.5rem;    /* 24px */
  --text-2xl:         1.875rem;  /* 30px */
  --text-3xl:         2.25rem;   /* 36px */
  --text-4xl:         3rem;      /* 48px */
  --text-5xl:         3.75rem;   /* 60px */
  --text-6xl:         4.5rem;    /* 72px */

  --leading-tight:    1.1;
  --leading-snug:     1.25;
  --leading-normal:   1.5;
  --leading-relaxed:  1.65;

  --tracking-eyebrow: 0.2em;     /* Wide tracking for eyebrow labels */
  --tracking-tight:  -0.02em;   /* Tight tracking for large headlines */

  /* --- Spacing ---------------------------------------------------------- */
  /* Vertical section padding */
  --section-py-mobile: 3rem;     /* 48px */
  --section-py-desktop: 5.5rem;  /* 88px */

  /* Container */
  --container-max:    1280px;
  --container-px:     1.25rem;   /* 20px mobile gutter */
  --container-px-md:  2rem;      /* 32px tablet */
  --container-px-lg:  3rem;      /* 48px desktop */

  /* Grid gap */
  --gap-sm:   1rem;
  --gap-md:   1.5rem;
  --gap-lg:   2rem;
  --gap-xl:   3rem;

  /* --- Components ------------------------------------------------------- */
  /* Cards */
  --card-radius:      0.875rem;  /* 14px */
  --card-border:      1px solid var(--color-border);
  --card-shadow:      0 2px 12px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.12);

  /* Buttons */
  --btn-radius:       0.375rem;  /* 6px */
  --btn-padding-y:    0.75rem;
  --btn-padding-x:    1.5rem;
  --btn-font-size:    var(--text-sm);
  --btn-font-weight:  var(--weight-bold);
  --btn-letter-spacing: 0.04em;
  --btn-transition:   all 0.2s ease;

  /* Navigation */
  --nav-height-mobile: 3.75rem;  /* 60px */
  --nav-height-desktop: 4.5rem;  /* 72px */
  --nav-bg:           var(--color-white);
  --nav-bg-scrolled:  rgba(255, 255, 255, 0.97);
  --nav-shadow-scrolled: 0 1px 0 var(--color-border), 0 2px 16px rgba(0,0,0,0.06);

  /* --- Motion ----------------------------------------------------------- */
  --transition-fast:   0.15s ease;
  --transition-base:   0.25s ease;
  --transition-slow:   0.4s ease;
  --transition-lift:   transform 0.25s ease, box-shadow 0.25s ease;

  /* --- Z-index scale ---------------------------------------------------- */
  --z-base:       1;
  --z-dropdown:   100;
  --z-nav:        200;
  --z-overlay:    300;
  --z-modal:      400;
}


/* ==========================================================================
   RESET & BASE
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--color-body-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Offset for sticky nav */
body {
  padding-top: var(--nav-height-mobile);
}

@media (min-width: 1024px) {
  body {
    padding-top: var(--nav-height-desktop);
  }
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--container-px-md);
    padding-right: var(--container-px-md);
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: var(--container-px-lg);
    padding-right: var(--container-px-lg);
  }
}

/* Section vertical rhythm */
.section {
  padding-top: var(--section-py-mobile);
  padding-bottom: var(--section-py-mobile);
}

@media (min-width: 1024px) {
  .section {
    padding-top: var(--section-py-desktop);
    padding-bottom: var(--section-py-desktop);
  }
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section--dark {
  background-color: var(--color-dark);
  color: var(--color-white);
}


/* ==========================================================================
   TYPOGRAPHY UTILITIES
   ========================================================================== */

/* Eyebrow / section label */
.eyebrow {
  display: block;
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-muted);
  margin-bottom: 0.75rem;
}

.section--dark .eyebrow {
  color: rgba(255, 255, 255, 0.45);
}

/* Display headlines */
.headline {
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-dark);
}

.headline em {
  font-style: italic;
  font-weight: var(--weight-regular);
}

.section--dark .headline {
  color: var(--color-white);
}

@media (min-width: 768px) {
  .headline { font-size: var(--text-3xl); }
}

@media (min-width: 1024px) {
  .headline { font-size: var(--text-4xl); }
}

/* Section headline (slightly smaller) */
.section-headline {
  font-size: var(--text-xl);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}

@media (min-width: 768px) {
  .section-headline { font-size: var(--text-2xl); }
}

@media (min-width: 1024px) {
  .section-headline { font-size: var(--text-3xl); }
}

/* Body copy */
.body-copy {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-muted);
  max-width: 60ch;
}

.body-copy em {
  font-style: italic;
  color: var(--color-dark);
}

.section--dark .body-copy {
  color: rgba(255, 255, 255, 0.6);
}

.section--dark .body-copy em {
  color: rgba(255, 255, 255, 0.9);
}

@media (min-width: 1024px) {
  .body-copy {
    font-size: var(--text-md);
  }
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: var(--btn-padding-y) var(--btn-padding-x);
  border-radius: var(--btn-radius);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  letter-spacing: var(--btn-letter-spacing);
  text-transform: uppercase;
  transition: var(--btn-transition);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}

/* Primary — Red fill */
.btn--primary {
  background-color: var(--color-red);
  color: var(--color-white);
  border: 2px solid var(--color-red);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background-color: #a82024;
  border-color: #a82024;
  transform: translateY(-1px);
}

/* Secondary — Red outline */
.btn--outline {
  background-color: transparent;
  color: var(--color-red);
  border: 2px solid var(--color-red);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background-color: var(--color-red);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* Ghost white — for dark/hero sections */
.btn--ghost-white {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

.btn--ghost-white:hover,
.btn--ghost-white:focus-visible {
  background-color: var(--color-white);
  color: var(--color-dark);
}

/* White fill — hero CTA */
.btn--white {
  background-color: var(--color-white);
  color: var(--color-dark);
  border: 2px solid var(--color-white);
}

.btn--white:hover,
.btn--white:focus-visible {
  background-color: transparent;
  color: var(--color-white);
}

/* Text link CTA */
.btn--text {
  padding: 0;
  border: none;
  background: none;
  color: var(--color-red);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  letter-spacing: var(--btn-letter-spacing);
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  transition: gap var(--transition-fast);
}

.btn--text::after {
  content: '→';
  transition: transform var(--transition-fast);
}

.btn--text:hover::after {
  transform: translateX(3px);
}

/* Size variants */
.btn--sm {
  padding: 0.5rem 1rem;
  font-size: var(--text-xs);
}

.btn--lg {
  padding: 1rem 2rem;
  font-size: var(--text-base);
}

/* Focus ring — accessibility */
.btn:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 3px;
}


/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
  border: var(--card-border);
  border-radius: var(--card-radius);
  overflow: hidden;
  background-color: var(--color-white);
  box-shadow: var(--card-shadow);
  transition: var(--transition-lift);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.card__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.card__body {
  padding: 1.5rem;
}

.card__label {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.card__title {
  font-size: var(--text-lg);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--color-dark);
  margin-bottom: 0.75rem;
}

.card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-muted);
  line-height: var(--leading-relaxed);
  margin-bottom: 1rem;
}


/* ==========================================================================
   DIVIDERS & HELPERS
   ========================================================================== */

.divider {
  height: 1px;
  background-color: var(--color-border);
  border: none;
  margin: 0;
}

/* Numbered section label (01, 02…) */
.section-number {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-eyebrow);
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

/* Red accent bar — used above headlines in some sections */
.accent-bar {
  display: inline-block;
  width: 2rem;
  height: 3px;
  background-color: var(--color-red);
  margin-bottom: 1.25rem;
  border-radius: 2px;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.2em 0.65em;
  border-radius: 2rem;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge--red    { background-color: var(--color-red);    color: #fff; }
.badge--orange { background-color: var(--color-orange); color: #fff; }
.badge--muted  { background-color: var(--color-border); color: var(--color-muted); }


/* ==========================================================================
   WORDPRESS CORE — Alignment classes, caption, gallery etc.
   ========================================================================== */

.alignleft  { float: left;  margin-right: 1.5rem; margin-bottom: 1rem; }
.alignright { float: right; margin-left: 1.5rem;  margin-bottom: 1rem; }
.aligncenter { margin-left: auto; margin-right: auto; display: block; }
.alignwide  { max-width: calc(var(--container-max) + 4rem); }
.alignfull  { max-width: 100%; }

.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* Gutenberg block margins */
.entry-content > * + * {
  margin-top: 1.5rem;
}

.entry-content h2 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tight);
  margin-top: 2.5rem;
}

.entry-content h3 {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  margin-top: 2rem;
}

.entry-content p em {
  font-style: italic;
  color: var(--color-dark);
}

.entry-content a {
  color: var(--color-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.entry-content a:hover {
  color: #a82024;
}

.entry-content ul,
.entry-content ol {
  list-style: revert;
  padding-left: 1.5rem;
}

.entry-content li {
  margin-bottom: 0.375rem;
}

.entry-content blockquote {
  border-left: 3px solid var(--color-red);
  padding-left: 1.5rem;
  font-style: italic;
  color: var(--color-muted);
  margin: 2rem 0;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-dark);
  color: var(--color-white);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 0;
}

/* Focus ring for interactive elements */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }
}
