/* ===================================================================
   LaLiga Golf Society — main.css
   Variables, reset, layout, navigation, hero, footer
   =================================================================== */

/* ─── Custom Properties ──────────────────────────────────────────── */
:root {
  /* Brand palette */
  --color-primary:       #1A3A2A;
  --color-primary-light: #2D5C40;
  --color-primary-dark:  #0F2218;
  --color-accent:        #C9A84C;
  --color-accent-light:  #E8D5A3;
  --color-accent-dark:   #A5852E;

  /* Surface */
  --color-surface:       #F7F5F0;
  --color-surface-alt:   #FFFFFF;
  --color-surface-dark:  #1A3A2A;
  --color-tint:          #F0EDE6;

  /* Text */
  --color-text:          #1C1C1C;
  --color-text-muted:    #6B6B6B;
  --color-text-light:    #9A9A9A;
  --color-text-inverse:  #FFFFFF;

  /* Semantic */
  --color-border:        #E2DDD5;
  --color-border-focus:  #C9A84C;
  --color-error:         #B33A3A;
  --color-error-bg:      #FDF2F2;
  --color-success:       #2D7A4F;
  --color-success-bg:    #F0FAF5;

  /* Typography */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;

  /* Type scale */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;
  --text-5xl:   3rem;
  --text-6xl:   3.75rem;
  --text-7xl:   4.5rem;

  /* Line heights */
  --leading-tight:  1.25;
  --leading-snug:   1.375;
  --leading-normal: 1.5;
  --leading-relaxed:1.7;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radii */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;
  --radius-2xl: 32px;
  --radius-full:9999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(26,58,42,0.06);
  --shadow-sm:  0 1px 3px rgba(26,58,42,0.08), 0 1px 2px rgba(26,58,42,0.05);
  --shadow-md:  0 4px 12px rgba(26,58,42,0.10), 0 2px 4px rgba(26,58,42,0.06);
  --shadow-lg:  0 16px 40px rgba(26,58,42,0.12), 0 4px 8px rgba(26,58,42,0.06);
  --shadow-xl:  0 24px 60px rgba(26,58,42,0.16);

  /* Transitions */
  --ease-fast:   150ms cubic-bezier(0.4,0,0.2,1);
  --ease-base:   250ms cubic-bezier(0.4,0,0.2,1);
  --ease-slow:   400ms cubic-bezier(0.4,0,0.2,1);
  --ease-bounce: 350ms cubic-bezier(0.34,1.56,0.64,1);

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 720px;
  --nav-height: 76px;
  --section-pad-y: var(--space-20);
}

/* ─── Reset ──────────────────────────────────────────────────────── */
*, *::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-body);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-surface-alt);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font: inherit; }
input, select, textarea { font: inherit; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--leading-tight);
  font-weight: 600;
  color: var(--color-text);
}

/* Focus visible — keyboard users */
:focus-visible {
  outline: 2px solid var(--color-border-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ─── Container ──────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container--narrow {
  max-width: var(--container-narrow);
}

@media (max-width: 480px) {
  .container { padding-inline: var(--space-4); }
}

/* ─── Section ────────────────────────────────────────────────────── */
.section {
  padding-block: var(--section-pad-y);
}
.section--tinted  { background-color: var(--color-tint); }
.section--accent  { background-color: var(--color-accent-light); }
.section--dark    { background-color: var(--color-primary); color: var(--color-text-inverse); }
.section--full-height { min-height: 100vh; display: flex; align-items: center; }

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-header--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  text-align: left;
  flex-wrap: wrap;
  gap: var(--space-4);
}
.section-eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}
.section-title {
  font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}
.section-title--left { text-align: left; }
.section--dark .section-title { color: var(--color-text-inverse); }
.section--dark .section-eyebrow { color: var(--color-accent-light); }
.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 540px;
  margin-inline: auto;
}
.section--dark .section-subtitle { color: rgba(255,255,255,0.7); }
.section-divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin-block: var(--space-16);
}

/* ─── Navigation ─────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background-color var(--ease-base), box-shadow var(--ease-base), backdrop-filter var(--ease-base);
}
.site-header.scrolled {
  background-color: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}
/* On non-hero pages, always show white nav */
.page-about .site-header,
.page-events .site-header,
.page-results .site-header,
.page-join .site-header,
.page-error .site-header {
  background-color: rgba(255,255,255,0.97);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  height: var(--nav-height);
  margin-inline: auto;
  padding-inline: var(--space-6);
  gap: var(--space-8);
}

/* Logo */
.nav-logo, .footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}
.logo-mark {
  font-size: 1.5rem;
  line-height: 1;
}
.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.logo-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}
.logo-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Hero page: white logo text */
.page-home .site-header:not(.scrolled) .logo-title { color: white; }
.page-home .site-header:not(.scrolled) .logo-subtitle { color: rgba(255,255,255,0.7); }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-full);
  transition: color var(--ease-fast), background-color var(--ease-fast);
  white-space: nowrap;
}
.nav-link:hover {
  background-color: var(--color-tint);
  color: var(--color-primary);
}
.nav-link.active {
  color: var(--color-primary);
  font-weight: 600;
}

/* Nav CTA */
.nav-link--cta {
  background-color: var(--color-accent);
  color: var(--color-primary-dark);
  font-weight: 600;
  padding: var(--space-2) var(--space-5);
}
.nav-link--cta:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-primary-dark);
}

/* Hero page nav: white links */
.page-home .site-header:not(.scrolled) .nav-link {
  color: rgba(255,255,255,0.9);
}
.page-home .site-header:not(.scrolled) .nav-link:hover {
  background-color: rgba(255,255,255,0.15);
  color: white;
}
.page-home .site-header:not(.scrolled) .nav-link.active {
  color: white;
}
.page-home .site-header:not(.scrolled) .nav-link--cta {
  background-color: var(--color-accent);
  color: var(--color-primary-dark);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: background-color var(--ease-fast);
}
.nav-toggle:hover { background-color: var(--color-tint); }
.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform var(--ease-base), opacity var(--ease-base);
}
.page-home .site-header:not(.scrolled) .hamburger-bar { background-color: white; }

/* Nav open state */
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    flex-direction: column;
    align-items: stretch;
    background-color: var(--color-surface-alt);
    padding: var(--space-6);
    gap: var(--space-1);
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
  }
  .nav-links.is-open { display: flex; }
  .nav-link {
    padding: var(--space-4);
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
  }
  .nav-link--cta { text-align: center; margin-top: var(--space-4); }
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Rich golf-course gradient — works beautifully without a photo */
  background-color: var(--color-primary-dark);
  background-image:
    radial-gradient(ellipse at 70% 30%, rgba(45,92,64,0.6) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(201,168,76,0.12) 0%, transparent 45%),
    linear-gradient(
      160deg,
      #0a1f12 0%,
      #1A3A2A 45%,
      #0F2218 100%
    );
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center bottom, rgba(201,168,76,0.1) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* Decorative gold accent line across the top of the hero */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-24) var(--space-6) var(--space-16);
  max-width: 800px;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: var(--space-4);
}

.hero-title {
  font-size: clamp(var(--text-5xl), 10vw, var(--text-7xl));
  font-weight: 700;
  color: white;
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(var(--text-base), 2.5vw, var(--text-xl));
  color: rgba(255,255,255,0.82);
  max-width: 520px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
  line-height: var(--leading-relaxed);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-bottom {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.hero-attribution {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.45);
  text-align: center;
  max-width: min(90vw, 28rem);
  line-height: var(--leading-normal);
}

.hero-attribution a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
}

.hero-attribution a:hover {
  color: var(--color-accent-light);
  text-decoration: underline;
}
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollPulse 2.5s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.5; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); }
}

/* ─── Page Hero (inner pages) ────────────────────────────────────── */
.page-hero {
  position: relative;
  background-color: var(--color-primary);
  background-image:
    radial-gradient(ellipse at 80% 20%, rgba(45,92,64,0.5) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 90%, rgba(201,168,76,0.08) 0%, transparent 40%),
    linear-gradient(135deg, #0a1f12 0%, #1A3A2A 60%, #0F2218 100%);
  color: white;
}
.page-hero--short {
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-16);
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.06) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero__content { position: relative; z-index: 1; }
.page-title {
  font-size: clamp(var(--text-3xl), 6vw, var(--text-5xl));
  color: white;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: var(--space-3);
  margin-bottom: var(--space-3);
}
.page-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
}
.breadcrumb {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--color-accent-light); }
.breadcrumb a:hover { color: white; }

/* ─── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  background-color: var(--color-primary-dark);
  color: rgba(255,255,255,0.8);
}

.footer-container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-16) var(--space-6) var(--space-12);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-12);
}

.footer-brand { display: flex; flex-direction: column; gap: var(--space-4); }
.footer-logo .logo-title { color: white; }
.footer-logo .logo-subtitle { color: rgba(255,255,255,0.6); }
.footer-tagline {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: rgba(255,255,255,0.6);
  max-width: 280px;
}

.footer-nav-heading {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}
.footer-nav ul { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-nav a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.7);
  transition: color var(--ease-fast);
}
.footer-nav a:hover { color: white; }

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer-contact p { font-size: var(--text-sm); color: rgba(255,255,255,0.6); }

.footer-bottom {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

.footer-bottom a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--color-accent-light);
  text-decoration: underline;
}

.footer-disclaimer {
  margin: 0;
  max-width: 42rem;
  line-height: var(--leading-normal);
}

/* CM Solutions / credits on content pages */
.site-credit {
  margin: var(--space-10) 0 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  line-height: var(--leading-normal);
}

.site-credit--compact {
  margin-top: var(--space-8);
  font-size: var(--text-xs);
}

.site-credit a {
  color: var(--color-primary);
  text-decoration: none;
}

.site-credit a:hover {
  text-decoration: underline;
}

@media (max-width: 1024px) {
  .footer-container { grid-template-columns: 1fr 1fr; gap: var(--space-8); }
}
@media (max-width: 640px) {
  .footer-container { grid-template-columns: 1fr; gap: var(--space-8); padding-block: var(--space-10); }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ─── Utilities ──────────────────────────────────────────────────── */
.prose {
  max-width: 68ch;
  line-height: var(--leading-relaxed);
}
.prose h2 {
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}
.prose p + p { margin-top: var(--space-4); }

.back-link { margin-top: var(--space-10); }

.empty-state {
  text-align: center;
  padding: var(--space-20) var(--space-6);
  color: var(--color-text-muted);
}
.empty-state__icon {
  margin-inline: auto;
  margin-bottom: var(--space-6);
  opacity: 0.35;
  color: var(--color-primary);
}
.empty-state h3 {
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.contact-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  background-color: var(--color-tint);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--color-accent);
  margin-top: var(--space-8);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}
.contact-note svg { flex-shrink: 0; color: var(--color-accent); margin-top: 2px; }
.contact-note a { color: var(--color-primary); font-weight: 500; }
.contact-note a:hover { text-decoration: underline; }

.cta-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-8);
  background-color: var(--color-tint);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
  flex-wrap: wrap;
  margin-top: var(--space-10);
}
.cta-inline h3 { font-size: var(--text-xl); color: var(--color-primary); margin-bottom: var(--space-1); }
.cta-inline p  { font-size: var(--text-sm); color: var(--color-text-muted); }
