/* ── Reset & Base ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: #1a1a2e;
  background: #ffffff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* ── CSS Custom Properties ─────────────────────────────────────────── */
:root {
  --clr-primary:   #FF6B35;   /* energetic orange  */
  --clr-blue:      #1DA1F2;   /* snowboard blue    */
  --clr-dive:      #0077B6;   /* deep dive blue    */
  --clr-game:      #2d1b69;   /* game dark purple  */
  --clr-guard:     #F4A261;   /* lifeguard sand    */
  --clr-utah:      #CC0000;   /* Utah crimson      */
  --clr-dark:      #0f0f1a;   /* near black        */
  --clr-light:     #f8f9ff;   /* near white        */
  --clr-white:     #ffffff;
  --clr-text:      #1a1a2e;
  --clr-muted:     #6c757d;

  --ff-display: 'Bebas Neue', Impact, sans-serif;
  --ff-body:    'Inter', system-ui, sans-serif;

  --nav-h: 64px;
  --section-pad: clamp(4rem, 8vw, 7rem) 0;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.2);
}

/* ── Containers ────────────────────────────────────────────────────── */
.container {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

.container--center {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
  text-align: center;
}

/* ── Navbar ─────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: transparent;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.scrolled {
  background: rgba(15, 15, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.3);
}

.nav-logo {
  font-family: var(--ff-display);
  font-size: 1.6rem;
  color: var(--clr-white);
  letter-spacing: 0.04em;
  z-index: 101;
  transition: color 0.2s;
}

.nav-logo:hover {
  color: var(--clr-primary);
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--clr-primary);
  border-bottom-color: var(--clr-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--clr-white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  padding: var(--nav-h) 1rem 2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    url('https://images.unsplash.com/photo-1517999144091-3d9dca6d1e43?w=1600&auto=format&fit=crop&q=70')
    center / cover no-repeat;
  filter: brightness(0.45);
  transform: scale(1.04);
  transition: transform 8s ease-out;
  animation: heroZoom 10s ease-out forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.08); }
  to   { transform: scale(1.0); }
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}

.hero-name {
  font-family: var(--ff-display);
  font-size: clamp(3.5rem, 12vw, 9rem);
  line-height: 0.9;
  color: var(--clr-white);
  letter-spacing: 0.02em;
  text-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.hero-subhead {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  max-width: 680px;
  text-wrap: balance;
}

.btn-hero {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.8em 2.2em;
  border-radius: 999px;
  background: var(--clr-primary);
  color: var(--clr-white);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 4px 20px rgba(255,107,53,0.45);
}

.btn-hero:hover {
  background: #e85c26;
  transform: translateY(-2px);
}

/* ── Generic Section Styles ────────────────────────────────────────── */
.section {
  padding: var(--section-pad);
}

.section--light { background: var(--clr-light); }
.section--dive  { background: #e8f4fd; }
.section--guard { background: #fff9f4; }

.section-title {
  font-family: var(--ff-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
  line-height: 1;
}

.section-title--light {
  color: var(--clr-white);
}

.section-lead {
  font-size: 1.05rem;
  max-width: 720px;
  margin-inline: auto;
  color: var(--clr-muted);
  margin-bottom: 2.5rem;
}

.section-lead--light {
  color: rgba(255,255,255,0.82);
}

/* ── About ──────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.about-image:hover img {
  transform: scale(1.03);
}

.about-lead {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: var(--clr-text);
}

.about-text p {
  margin-bottom: 1rem;
  color: #3a3a4e;
}

.fact-list {
  margin-top: 1.5rem;
  border-top: 2px solid var(--clr-primary);
  padding-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.fact-list li {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
  align-items: baseline;
}

.fact-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  color: var(--clr-primary);
  min-width: 90px;
  flex-shrink: 0;
}

.fact-val {
  color: var(--clr-text);
}

/* ── Photo-background Sections ─────────────────────────────────────── */
.section--photo {
  position: relative;
  overflow: hidden;
  padding: var(--section-pad);
}

.section-photo-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.section-photo-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,30,70,0.78) 0%, rgba(0,10,40,0.7) 100%);
}

.section--photo .container--center {
  position: relative;
  z-index: 1;
}

/* ── Cards ──────────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.card--glass {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--clr-white);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card--glass h3 {
  color: var(--clr-white);
}

.card--game {
  background: rgba(135,60,255,0.15);
  border: 1px solid rgba(135,60,255,0.3);
  color: rgba(255,255,255,0.9);
}

.card--game h3 {
  color: #d9b4ff;
}

.card--utah-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--clr-white);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card--utah-card h3 {
  color: #ffd6d6;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.85;
}

/* ── Diving Stats ───────────────────────────────────────────────────── */
.diving-stats {
  margin: 2rem 0;
}

.stats-loading {
  color: var(--clr-muted);
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

.stats-block {
  margin-bottom: 2.5rem;
}

.stats-meet-title {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  color: var(--clr-dive);
  letter-spacing: 0.03em;
  border-left: 4px solid var(--clr-dive);
  padding-left: 0.75rem;
  margin-bottom: 1rem;
}

.stats-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.9rem;
}

.stats-table thead {
  background: var(--clr-dive);
  color: white;
}

.stats-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.stats-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.stats-table tbody tr:last-child td {
  border-bottom: none;
}

.stats-table tbody tr:hover {
  background: #f0f7ff;
}

.stats-score {
  font-weight: 700;
  color: var(--clr-dive);
  font-variant-numeric: tabular-nums;
}

.stats-place {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--clr-blue);
  color: white;
  font-weight: 700;
  font-size: 0.8rem;
}

.stats-updated {
  font-size: 0.75rem;
  color: var(--clr-muted);
  text-align: right;
  margin-top: 0.5rem;
}

.dive-info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.dive-info-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--clr-dive);
}

.dive-info-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--clr-dive);
  margin-bottom: 0.4rem;
}

.dive-info-card p {
  font-size: 0.9rem;
  color: var(--clr-text);
}

/* ── Snowboarding section (uses photo bg) already styled above ─────── */

/* ── Gaming Section ─────────────────────────────────────────────────── */
.section--game {
  background: var(--clr-game);
  background-image: radial-gradient(ellipse at 60% 0%, rgba(135,60,255,0.3) 0%, transparent 60%);
  position: relative;
}

/* ── Lifeguarding ───────────────────────────────────────────────────── */
.guard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
}

.guard-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.guard-image img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.guard-image:hover img {
  transform: scale(1.04);
}

.guard-text .about-lead {
  font-size: 1.1rem;
}

.guard-text p {
  color: #5a3a20;
  margin-bottom: 1rem;
}

.section--guard .fact-label {
  color: #c06a20;
}

/* ── Utah Section ───────────────────────────────────────────────────── */
.section--utah {
  background: var(--clr-utah);
  background-image:
    radial-gradient(ellipse at 30% 100%, rgba(0,0,0,0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 0%, rgba(255,100,100,0.3) 0%, transparent 50%);
  position: relative;
}

.utah-block {
  margin-bottom: 1rem;
}

.utah-u {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 3px solid rgba(255,255,255,0.4);
  font-family: var(--ff-display);
  font-size: 3rem;
  color: white;
  letter-spacing: -0.02em;
}

/* ── Contact / Dark ─────────────────────────────────────────────────── */
.section--dark {
  background: var(--clr-dark);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75em 1.5em;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.social-link:hover {
  background: rgba(255,255,255,0.15);
  color: white;
  transform: translateY(-2px);
}

.contact-note {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.4);
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.footer {
  background: #07070f;
  color: rgba(255,255,255,0.45);
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.8rem;
}

.footer-name {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.25rem;
}

.footer-location {
  margin-bottom: 0.5rem;
}

.footer-copy a {
  color: var(--clr-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Scroll-reveal fade-in ──────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    background: rgba(15,15,26,0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    font-size: 1.2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .nav-links.open {
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    font-size: 1.1rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-image img {
    height: 280px;
  }

  .guard-grid {
    grid-template-columns: 1fr;
  }

  .guard-image {
    order: -1;
  }

  .guard-image img {
    height: 240px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .dive-info-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .dive-info-cards {
    grid-template-columns: 1fr;
  }

  .hero-name {
    font-size: clamp(3rem, 16vw, 5rem);
  }
}
