/* =========================================================
   F.O.R.E. Base Styles
   Reset, typography defaults, focus states, image behavior.
   ========================================================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-green-dark);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--color-green);
  line-height: 1.2;
  margin: 0 0 var(--space-3);
}

h1 { font-size: var(--text-hero); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p {
  margin: 0 0 var(--space-3);
  max-width: 70ch;
}

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

a {
  color: inherit;
}

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

ul, ol {
  padding-left: 1.25em;
}

/* Visible focus state on every interactive element */
:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 3px;
}

/* Screen-reader-only utility for skip links / hidden labels */
.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: var(--space-2);
  top: -100px;
  background: var(--color-green);
  color: var(--color-white);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--space-2);
}

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

/* =========================================================
   Scroll-reveal system
   Scoped under html.js so content is fully visible with no
   animation whenever JavaScript is unavailable (progressive
   enhancement — see Section 12 of the design spec).
   ========================================================= */

.reveal {
  opacity: 1;
  transform: none;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
}

html.js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children inside revealed sections */
html.js .grid > *,
html.js .gallery-grid > *,
html.js .why-golf-list > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
}

html.js .reveal.is-visible .grid > *,
html.js .reveal.is-visible .gallery-grid > *,
html.js .reveal.is-visible .why-golf-list > * {
  opacity: 1;
  transform: translateY(0);
}

.grid > *:nth-child(1), .gallery-grid > *:nth-child(1), .why-golf-list > *:nth-child(1) { transition-delay: 0ms; }
.grid > *:nth-child(2), .gallery-grid > *:nth-child(2), .why-golf-list > *:nth-child(2) { transition-delay: 90ms; }
.grid > *:nth-child(3), .gallery-grid > *:nth-child(3), .why-golf-list > *:nth-child(3) { transition-delay: 180ms; }
.grid > *:nth-child(4), .gallery-grid > *:nth-child(4), .why-golf-list > *:nth-child(4) { transition-delay: 270ms; }
.grid > *:nth-child(5), .why-golf-list > *:nth-child(5) { transition-delay: 360ms; }

/* Playful icon pop-in, layered on top of the card's own fade/rise */
html.js .card__icon,
html.js .why-golf-list img {
  transform: scale(0.55) rotate(-10deg);
  transition: transform var(--duration-reveal) var(--ease-out);
}

html.js .reveal.is-visible .card__icon,
html.js .reveal.is-visible .why-golf-list img {
  transform: scale(1) rotate(0deg);
}
