/* =========================================================
   RRW Tour — Rolling River Weekend Tour
   Stylesheet: mobile-first, responsive, accessible
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --c-fairway: #0a3d2e;
  --c-fairway-2: #0f5a42;
  --c-sage: #7fa183;
  --c-cream: #f6f1e2;
  --c-cream-2: #ece4cc;
  --c-gold: #c9a961;
  --c-gold-2: #b8932f;
  --c-ink: #14181a;
  --c-ink-2: #2a2f33;
  --c-muted: #5b6166;
  --c-line: rgba(20, 24, 26, 0.12);
  --c-line-dark: rgba(246, 241, 226, 0.18);
  --c-bg: #fbf8ee;
  --c-card: #ffffff;

  --shadow-sm: 0 1px 2px rgba(20,24,26,.06), 0 1px 3px rgba(20,24,26,.06);
  --shadow-md: 0 6px 18px rgba(10,61,46,.08), 0 2px 6px rgba(10,61,46,.06);
  --shadow-lg: 0 24px 48px -16px rgba(10,61,46,.25), 0 8px 16px rgba(10,61,46,.08);

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --container: 1180px;
  --header-h: 68px;

  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--c-fairway); text-decoration: none; }
a:hover { color: var(--c-gold-2); }
button { font: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-ink);
  letter-spacing: -0.01em;
  margin: 0 0 .6em;
}
h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.5rem); }

p { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 2vw, 1.2rem); color: var(--c-ink-2); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-gold-2);
  margin-bottom: 0.9rem;
}
.eyebrow.on-dark { color: var(--c-gold); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--tight { padding: clamp(36px, 6vw, 64px) 0; }
.section--dark {
  background: linear-gradient(180deg, var(--c-fairway) 0%, #07301f 100%);
  color: var(--c-cream);
}
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--c-cream); }
.section--cream { background: var(--c-cream); }

.center { text-align: center; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--c-fairway);
  color: var(--c-cream);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--c-fairway-2); color: var(--c-cream); }
.btn-gold {
  background: var(--c-gold);
  color: var(--c-ink);
  box-shadow: var(--shadow-md);
}
.btn-gold:hover { background: var(--c-gold-2); color: var(--c-cream); }
.btn-ghost {
  background: transparent;
  color: var(--c-fairway);
  border-color: var(--c-fairway);
}
.btn-ghost:hover { background: var(--c-fairway); color: var(--c-cream); }
.btn-ghost.on-dark {
  color: var(--c-cream);
  border-color: var(--c-cream);
}
.btn-ghost.on-dark:hover { background: var(--c-cream); color: var(--c-fairway); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 248, 238, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-line);
}
.nav {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--c-fairway);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}
.brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0 6%, var(--c-cream) 6% 38%, var(--c-fairway) 38% 100%);
  box-shadow: inset 0 -6px 12px rgba(0,0,0,.18), 0 2px 4px rgba(0,0,0,.15);
  position: relative;
}
.brand .brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 28%, transparent 0 8%, rgba(0,0,0,.06) 9% 11%, transparent 12%),
    radial-gradient(circle at 65% 38%, transparent 0 6%, rgba(0,0,0,.06) 7% 9%, transparent 10%),
    radial-gradient(circle at 48% 64%, transparent 0 6%, rgba(0,0,0,.06) 7% 9%, transparent 10%);
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--c-muted);
  text-transform: uppercase;
}
.nav-toggle {
  display: inline-flex;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--c-line);
  border-radius: 12px;
  color: var(--c-fairway);
}
.nav-toggle svg { width: 22px; height: 22px; }

.nav-list {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
  padding: 12px 20px 22px;
  display: none;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  margin: 0;
  box-shadow: var(--shadow-md);
}
.nav-list.open { display: flex; }
.nav-list a {
  display: block;
  padding: 12px 10px;
  border-radius: 10px;
  font-weight: 600;
  color: var(--c-ink);
}
.nav-list a:hover, .nav-list a.is-active {
  background: rgba(10,61,46,.07);
  color: var(--c-fairway);
}
.nav-cta { margin-top: 8px; }
.nav-cta .btn { width: 100%; justify-content: center; }

@media (min-width: 880px) {
  .nav-toggle { display: none; }
  .nav-list {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .nav-list a { padding: 10px 14px; }
  .nav-cta { margin: 0 0 0 6px; }
  .nav-cta .btn { width: auto; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--c-cream);
  background: radial-gradient(1200px 600px at 80% -10%, #14704f 0%, transparent 60%),
              radial-gradient(900px 500px at -10% 30%, #0e5238 0%, transparent 55%),
              linear-gradient(180deg, #0a3d2e 0%, #062618 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: clamp(80px, 12vw, 140px) 0 clamp(80px, 10vw, 120px);
  display: grid;
  gap: 28px;
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 980px) {
  .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 56px; }
}
.hero h1 { color: var(--c-cream); }
.hero p { color: rgba(246,241,226,.85); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

.hero-art {
  position: relative;
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  overflow: hidden;
  box-shadow: var(--shadow-lg), inset 0 0 0 1px rgba(255,255,255,.06);
}
.hero-art svg { width: 100%; height: 100%; display: block; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--c-line-dark);
  max-width: 520px;
}
.hero-stats .stat .num {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  color: var(--c-gold);
  line-height: 1;
}
.hero-stats .stat .label {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(246,241,226,.7);
}

/* Subtle ground texture in hero */
.hero::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 40%;
  background:
    radial-gradient(circle at 20% 100%, rgba(127,161,131,.25) 0, transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(127,161,131,.18) 0, transparent 55%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- Cards ---------- */
.card {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(10,61,46,.2);
}
.card h3 { margin: 0; }
.card .meta {
  font-size: 0.82rem;
  color: var(--c-muted);
  letter-spacing: 0.04em;
}
.card .pill {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(10,61,46,.08);
  color: var(--c-fairway);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Tournament card */
.tournament {
  position: relative;
  overflow: hidden;
  padding: 0;
}
.tournament .img {
  aspect-ratio: 16/10;
  background: var(--c-fairway);
  position: relative;
}
.tournament .img svg { width: 100%; height: 100%; display: block; }
.tournament .body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.tournament .date {
  font-weight: 700;
  color: var(--c-gold-2);
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  text-transform: uppercase;
}

/* ---------- Feature row ---------- */
.feature {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--c-card);
  border: 1px solid var(--c-line);
}
.feature .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(10,61,46,.08);
  color: var(--c-fairway);
  display: inline-flex; align-items: center; justify-content: center;
}
.feature .icon svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.15rem; margin: 6px 0 0; }

/* ---------- Page header ---------- */
.page-head {
  position: relative;
  padding: clamp(64px, 9vw, 110px) 0 clamp(40px, 6vw, 70px);
  background:
    radial-gradient(700px 320px at 90% 0%, rgba(201,169,97,.18) 0, transparent 60%),
    linear-gradient(180deg, var(--c-fairway) 0%, #082c20 100%);
  color: var(--c-cream);
  overflow: hidden;
}
.page-head::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
  background: linear-gradient(180deg, transparent, var(--c-bg));
  pointer-events: none;
}
.page-head h1 { color: var(--c-cream); margin-bottom: .35em; }
.page-head p { color: rgba(246,241,226,.85); max-width: 720px; }

/* ---------- Tables (schedule / standings) ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--c-line);
  background: var(--c-card);
  box-shadow: var(--shadow-sm);
}
table.data {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
}
table.data th, table.data td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-line);
  font-size: 0.95rem;
}
table.data th {
  background: var(--c-cream);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-ink-2);
  position: sticky; top: 0;
}
table.data tbody tr:hover { background: rgba(10,61,46,.04); }
table.data tr:last-child td { border-bottom: 0; }
.rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--c-cream-2); color: var(--c-ink); font-weight: 700; font-size: 0.85rem;
}
.rank.gold { background: linear-gradient(180deg, #eecf76, var(--c-gold-2)); color: #fff; }
.rank.silver { background: linear-gradient(180deg, #e6e6e6, #b0b0b0); color: #fff; }
.rank.bronze { background: linear-gradient(180deg, #e2a173, #a86a3a); color: #fff; }
.score-good { color: #1c7a4f; font-weight: 700; }
.score-bad { color: #b3402b; font-weight: 700; }

/* ---------- Players grid ---------- */
.player {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 18px;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease;
}
.player:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-fairway), var(--c-sage));
  color: var(--c-cream);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700;
  box-shadow: inset 0 -4px 10px rgba(0,0,0,.18), var(--shadow-sm);
}
.player h3 { font-size: 1.1rem; margin: 0; }
.player .meta { color: var(--c-muted); font-size: 0.85rem; }
.player .badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: rgba(201,169,97,.16);
  color: var(--c-gold-2);
  text-transform: uppercase;
}

/* ---------- Gallery ---------- */
.gallery {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.tile {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.tile svg { width: 100%; height: 100%; display: block; }
.tile.tall { aspect-ratio: 4/5; }
.tile.wide { aspect-ratio: 16/10; }
.tile .caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 16px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.6));
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---------- Forms ---------- */
.form-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 36px);
  box-shadow: var(--shadow-md);
}
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--c-ink-2);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--c-line);
  background: var(--c-bg);
  font: inherit;
  color: var(--c-ink);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--c-fairway);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(10,61,46,.12);
}
.field textarea { min-height: 130px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: 0.85rem; color: var(--c-muted); }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, #082c20 0%, #051c14 100%);
  color: rgba(246,241,226,.85);
  padding: 60px 0 28px;
  margin-top: 40px;
}
.site-footer a { color: var(--c-cream); }
.site-footer a:hover { color: var(--c-gold); }
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  margin-bottom: 36px;
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand h4 { font-family: var(--font-display); color: var(--c-cream); margin: 0 0 8px; font-size: 1.5rem; }
.footer-brand p { color: rgba(246,241,226,.7); max-width: 360px; }
.footer-col h5 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin: 0 0 12px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid var(--c-line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(246,241,226,.55);
}

/* ---------- Misc utilities ---------- */
.divider {
  height: 1px;
  background: var(--c-line);
  margin: 32px 0;
}
.kicker {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--c-gold-2);
  font-size: 1.1rem;
}
.callout {
  border-left: 4px solid var(--c-gold);
  padding: 14px 18px;
  background: rgba(201,169,97,.1);
  border-radius: 8px;
  color: var(--c-ink-2);
}

.fade-in { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Skip link for a11y */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-fairway); color: var(--c-cream);
  padding: 10px 14px; border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip:focus { left: 0; }
