/* ==========================================================================
   Guadalajara Sport Club — Base: reset, tokens, typography, layout utilities

   Direction: dusk-court floodlight. A deep dusk teal-charcoal ground lit by
   a warm sodium-vapor amber (the committed field-scale color — page washes,
   numerals, active states, not just a button hue), with a terracotta
   court-clay accent used sparingly. Structure reads through thin court-line
   rules and corner ticks rather than soft glass panels. See DESIGN.md.
   ========================================================================== */

:root{
  /* Color system — dusk-court floodlight ---------------------------------- */
  --c-bg: #0a1315;
  --c-bg-alt: #0d1b1d;
  --c-panel: #112224;
  --c-panel-2: #16292b;
  --c-panel-border: #24393b;
  --c-black: #070d0e;
  --c-black-soft: #0d1516;

  --c-amber: #f2a520;
  --c-amber-strong: #ffc24d;
  --c-amber-dark: #c37e0e;
  --c-clay: #d16a3f;
  --c-clay-dim: #8a4a30;

  --c-text: #f7f3ea;
  --c-text-muted: #aebdb8;
  --c-text-dim: #74857f;
  --c-text-on-amber: #201202;
  --c-text-on-clay: #201202;

  --c-line: rgba(247,243,234,0.14);
  --c-line-strong: rgba(247,243,234,0.26);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-soft: 0 8px 22px -12px rgba(2,6,7,0.55);
  --shadow-card: 0 18px 40px -20px rgba(2,6,7,0.7);
  --shadow-card-lift: 0 28px 58px -22px rgba(2,6,7,0.78);
  --shadow-amber: 0 12px 26px -10px rgba(242,165,32,0.4);
  --shadow-inner-hair: inset 0 1px 0 rgba(255,255,255,0.04);

  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.65,0,.35,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --dur-fast: .2s;
  --dur-mid: .4s;
  --dur-slow: .6s;

  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-heading: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  color-scheme: dark;
}

/* Fluid, correct viewport height for mobile browser chrome (Safari especially) */
:root{
  --vh-full: 100vh;
}
@supports (height: 100svh){
  :root{ --vh-full: 100svh; }
}
@supports (height: 100dvh){
  :root{ --vh-full: 100dvh; }
}

*, *::before, *::after{ box-sizing: border-box; }
html{
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

body{
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; /* safety net; individual wide elements manage their own scroll */
}

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

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

button{ font-family: inherit; }

h1,h2,h3,h4{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.02;
  text-wrap: balance;
}

p{ margin: 0; max-width: 75ch; }

ul{ margin: 0; padding: 0; list-style: none; }

::selection{ background: var(--c-amber); color: var(--c-text-on-amber); }

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

/* Layout ------------------------------------------------------------------ */
.container{
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section{
  position: relative;
  padding-block: clamp(64px, 10vw, 120px);
}

.no-scroll{ overflow: hidden !important; }

.scroll-x{
  display: flex;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.scroll-x::-webkit-scrollbar{ display: none; }

/* Typography helpers -------------------------------------------------------*/
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: clamp(.7rem, 1.4vw, .82rem);
  color: var(--c-amber);
}
.eyebrow::before, .eyebrow::after{
  content: '';
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: .8;
}

.section-title{
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  color: var(--c-text);
}
.section-title em{
  font-style: normal;
  color: var(--c-amber);
}

.section-sub{
  margin-top: 14px;
  max-width: 56ch;
  color: var(--c-text-muted);
  font-size: clamp(.95rem, 1.6vw, 1.05rem);
}

.section-head{
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: clamp(36px, 6vw, 64px);
}
.section-head.center{
  align-items: center;
  text-align: center;
  margin-inline: auto;
}

/* Scroll-reveal (JS toggles .is-visible via IntersectionObserver) ---------
   Crisp rise + fade — no blur/drift. The court doesn't dissolve into view,
   it snaps into frame. */
[data-reveal]{
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-mid) var(--ease-out),
    transform var(--dur-mid) var(--ease-out);
  will-change: transform, opacity;
}
[data-reveal].is-visible{
  opacity: 1;
  transform: translateY(0);
}
[data-reveal="scale"]{ transform: scale(.96); }
[data-reveal="scale"].is-visible{ transform: scale(1); }
@media (prefers-reduced-motion: reduce){
  [data-reveal]{ opacity: 1; transform: none; transition: none; }
}

/* Staggered reveal within a group — small, deliberate cascade instead of
   every tile firing on the same frame. Applied via nth-child in components
   that render a static grid (see sections.css groups). */
.stagger [data-reveal]{ transition-delay: calc(var(--stagger-i, 0) * 60ms); }

/* Court-line divider — thin rule with corner tick marks, used at major
   section transitions instead of a flat rectangular seam. */
.court-line{
  position: relative;
  height: 1px;
  background: var(--c-line);
}
.court-line::before, .court-line::after{
  content: '';
  position: absolute;
  top: -3px;
  width: 1px;
  height: 7px;
  background: var(--c-line-strong);
}
.court-line::before{ left: 0; }
.court-line::after{ right: 0; }

/* Diagonal section separators ---------------------------------------------*/
.diagonal-top{
  clip-path: polygon(0 2.2vw, 100% 0, 100% 100%, 0% 100%);
}
.diagonal-bottom{
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2.2vw), 0 100%);
}

/* Visually hidden (a11y) ---------------------------------------------------*/
.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;
}
