/* ==========================================================================
   Perth Futsal Collective — foundations
   Palette and shapes are taken straight off the club's shield and fixture
   graphics: deep indigo ground, crimson panel, blush type.
   ========================================================================== */

:root {
  /* brand */
  --navy-950: #150826;
  --navy-900: #1c0f31;
  --navy-800: #241546;   /* page ground */
  --navy-700: #2d1a55;   /* raised surface */
  --navy-600: #3a2268;
  --navy-500: #4a2d80;

  --crimson-700: #8f2f3e;
  --crimson-600: #a83b4b;  /* shield red */
  --crimson-500: #c2485a;
  --crimson-400: #d75f70;

  --blush: #fce3de;
  --cream: #fff7f4;

  /* signals */
  --live: #34d399;
  --warn: #f5b841;
  --danger: #f2585f;

  /* derived */
  --ink: var(--blush);
  --ink-soft: rgba(252, 227, 222, 0.66);
  --ink-faint: rgba(252, 227, 222, 0.40);
  --line: rgba(252, 227, 222, 0.12);
  --line-strong: rgba(252, 227, 222, 0.22);
  --surface: rgba(252, 227, 222, 0.045);
  --surface-hi: rgba(252, 227, 222, 0.08);

  /* type */
  /* League tints for the admin grid. Deliberately dull: they sit on the navy
     ground as a wash a few shades off it, enough to group a league at a glance
     without turning the night into a colour chart. Each has a stronger line
     colour for the cell edge. */
  --lg-1: #3a1f33;  --lg-1-line: #7c3f5c;
  --lg-2: #221a44;  --lg-2-line: #4b3f86;
  --lg-3: #16303a;  --lg-3-line: #356b74;
  --lg-4: #33291a;  --lg-4-line: #745c34;
  --lg-5: #1d2a2a;  --lg-5-line: #3f6360;
  --lg-6: #2c1c3d;  --lg-6-line: #5d3f7c;

  --font: "Poppins", "Montserrat", -apple-system, BlinkMacSystemFont,
          "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
  --step-0:  clamp(0.94rem, 0.91rem + 0.15vw, 1.02rem);
  --step-1:  clamp(1.12rem, 1.05rem + 0.35vw, 1.35rem);
  --step-2:  clamp(1.42rem, 1.25rem + 0.85vw, 2rem);
  --step-3:  clamp(1.9rem, 1.5rem + 2vw, 3.1rem);
  --step-4:  clamp(2.6rem, 1.7rem + 4.4vw, 5.4rem);

  /* space + shape */
  --shell: 1240px;
  --gap: clamp(1rem, 0.7rem + 1.4vw, 1.75rem);
  --pad-block: clamp(3.25rem, 2rem + 5vw, 6.5rem);
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 20px;
  --shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.85);
  --shadow-lg: 0 34px 90px -30px rgba(0, 0, 0, 0.9);
}

/* -------------------------------------------------------------- reset */

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

/* The browser hides [hidden] with a rule weaker than any class, so a panel
   styled `display: grid` and toggled with `hidden` opens and never shuts.
   This is the one place that is worth !important. */
[hidden] { display: none !important; }

* { margin: 0; }

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

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--navy-800);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* A faint pitch-light wash so the flat navy never reads as dead space. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(70rem 40rem at 78% -10%, rgba(168, 59, 75, 0.30), transparent 60%),
    radial-gradient(50rem 34rem at 5% 8%, rgba(74, 45, 128, 0.42), transparent 62%);
}

body > * { position: relative; z-index: 1; }

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

button, input, select, textarea { font: inherit; color: inherit; }

/* A time field has to show all of "07:45 pm" at once. Left to itself in a
   tight row it shrinks until the hour scrolls out of sight as you type. */
input[type="time"] { min-width: 9.5rem; }

a { color: inherit; }

h1, h2, h3, h4 {
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 800;
  text-wrap: balance;
}

p { text-wrap: pretty; }

::selection { background: var(--crimson-500); color: var(--cream); }

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

/* -------------------------------------------------------------- layout */

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

@media (max-width: 640px) {
  .shell { width: min(100% - 1.75rem, var(--shell)); }
}

.view { flex: 1 0 auto; }

.section { padding-block: var(--pad-block); }
.section--tight { padding-block: clamp(2.25rem, 1.5rem + 3vw, 4rem); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: clamp(1.5rem, 1rem + 2vw, 2.75rem);
}

.section-head h2 { font-size: var(--step-2); text-transform: uppercase; }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--crimson-400);
  margin-bottom: 0.6rem;
}

.lead {
  font-size: var(--step-1);
  color: var(--ink-soft);
  max-width: 56ch;
  line-height: 1.5;
}

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); }

.stack > * + * { margin-top: var(--flow, 1rem); }
.cluster { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

/* -------------------------------------------------------------- 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: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--crimson-600);
  color: var(--cream);
  padding: 0.7rem 1.1rem;
  border-radius: var(--r-sm);
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.tnum { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.mt-0 { margin-top: 0; }

.hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin-block: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

/* The crimson brand banner, straight from the brand sheet. */
.foot-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  margin-top: 3rem;
  padding: 1.6rem 1.5rem;
  border-radius: var(--r-lg, 1rem);
  background: var(--crimson-600);
}
.foot-brand__word {
  color: var(--cream);
  font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
}
.foot-brand__word strong { display: block; font-weight: 800; }

/* The list a dropdown opens. Windows draws it on white unless told, and the
   site's pale text then cannot be read; this gives every dropdown a dark
   list with pale text, whatever the box itself looks like. */
select option,
select optgroup {
  background-color: var(--navy-800);
  color: var(--ink);
}
