/* ===================================================================
   BESA WEST COUNTRY CLUB — STYLESHEET
   A topographic motif (contour lines, like a yardage book's elevation
   map) runs through the site as its signature visual idea.
   =================================================================== */

:root {
  /* Color */
  --ink:          #16201A;   /* near-black, green-tinted, for text */
  --green-deep:   #0F2E1F;   /* dark fairway, used for hero/footer */
  --green-fair:   #1F5C3F;   /* primary brand green */
  --green-mid:    #2D6A4A;
  --cream:        #F3F1E6;   /* scorecard paper */
  --cream-soft:   #FAF9F3;
  --brass:        #B6873A;   /* trophy / clubhouse fixtures */
  --brass-light:  #D8AE6B;
  --sand:         #DCCFAC;   /* bunker */
  --line:         rgba(22, 32, 26, 0.12);
  --white:        #FFFFFF;

  /* Type */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'Space Mono', 'Courier New', monospace;

  /* Layout */
  --max-width: 1180px;
  --radius: 2px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.6rem, 5vw + 1rem, 4.6rem); font-weight: 500; }
h2 { font-size: clamp(1.9rem, 2.6vw + 1rem, 2.7rem); }
h3 { font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem); }

p { margin: 0 0 1em; }
.lede { font-size: 1.15rem; color: rgba(22,32,26,0.75); max-width: 56ch; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--brass);
  display: inline-block;
}

section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }

.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 15px 28px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn-primary { background: var(--brass); color: var(--green-deep); }
.btn-primary:hover { background: var(--brass-light); transform: translateY(-2px); }

.btn-ghost { border-color: rgba(243,241,230,0.45); color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); background: rgba(243,241,230,0.08); transform: translateY(-2px); }

.btn-outline { border-color: var(--green-fair); color: var(--green-fair); }
.btn-outline:hover { background: var(--green-fair); color: var(--cream); transform: translateY(-2px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15,46,31,0.94);
  backdrop-filter: blur(6px);
  color: var(--cream);
  border-bottom: 1px solid rgba(243,241,230,0.1);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.wordmark small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-top: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 0.92rem;
  position: relative;
  padding: 4px 0;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  height: 1px;
  width: 0;
  background: var(--brass-light);
  transition: width 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { width: 100%; }
.nav-links a[aria-current="page"] { color: var(--brass-light); }

.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  padding: 8px;
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 880px) {
  .nav-links {
    position: fixed;
    top: 61px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: var(--green-deep);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 36px 28px 48px;
    gap: 26px;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.is-open { transform: translateX(0); }
  .nav-links a { font-size: 1.15rem; }
  .nav-toggle { display: inline-flex; z-index: 201; }
  .nav-cta { margin-left: 0; width: 100%; }
  .nav-cta .btn { width: 100%; justify-content: center; margin-top: 8px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--green-deep);
  color: var(--cream);
  overflow: hidden;
  padding: 150px 0 130px;
}
.hero-contours {
  position: absolute;
  inset: 0;
  color: var(--brass-light);
  opacity: 0.55;
  animation: driftContours 50s linear infinite alternate;
}
@keyframes driftContours {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-2%, 1%) scale(1.04); }
}
.hero-inner { position: relative; z-index: 2; max-width: 720px; }
.hero h1 { color: var(--white); }
.hero .lede { color: rgba(243,241,230,0.82); font-size: 1.2rem; margin-bottom: 2.2em; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 48px;
  margin-top: 80px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
}
.hero-stats div { min-width: 110px; }
.hero-stats .num { font-size: 1.7rem; color: var(--brass-light); display: block; }
.hero-stats .label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(243,241,230,0.65); }

.hero-contours svg,
.contours-bg svg,
.contours-fill svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* contour divider between sections */
.contour-divider {
  height: 70px;
  color: var(--green-fair);
  opacity: 0.18;
  margin: -1px 0;
  overflow: hidden;
}
.contour-divider svg { width: 100%; height: 140%; }

/* ---------- Page header (non-home pages) ---------- */
.page-header {
  background: var(--green-deep);
  color: var(--cream);
  padding: 96px 0 70px;
  position: relative;
  overflow: hidden;
}
.page-header .contours-bg {
  position: absolute; inset: 0;
  color: var(--brass-light);
  opacity: 0.4;
}
.page-header .inner { position: relative; z-index: 2; max-width: 640px; }
.page-header h1 { color: var(--white); margin-bottom: 0.3em; }
.page-header p { color: rgba(243,241,230,0.78); font-size: 1.08rem; }

/* ---------- Cards ---------- */
.grid {
  display: grid;
  gap: 32px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 36px 30px;
  border-radius: var(--radius);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(15,46,31,0.10); }
.card .icon { color: var(--brass); margin-bottom: 18px; }
.card .icon svg { width: 34px; height: 34px; }
.card h3 { margin-bottom: 10px; }
.card p { color: rgba(22,32,26,0.72); margin-bottom: 0; font-size: 0.97rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Split layout (image-style block + text) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.split.reverse .visual { order: 2; }
@media (max-width: 820px) { .split.reverse .visual { order: 0; } }

.visual {
  position: relative;
  background: var(--green-fair);
  color: var(--brass-light);
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.visual .contours-fill { position: absolute; inset: 0; opacity: 0.55; }
.visual .visual-caption {
  position: relative; z-index: 2;
  padding: 22px 24px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: linear-gradient(to top, rgba(15,46,31,0.65), transparent);
  width: 100%;
}

/* ---------- Quote / pull ---------- */
.pull-quote {
  background: var(--green-deep);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.pull-quote .contours-bg { position: absolute; inset: 0; color: var(--brass); opacity: 0.3; }
.pull-quote blockquote {
  position: relative; z-index: 2;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2vw + 1rem, 2.2rem);
  font-weight: 400;
  line-height: 1.4;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.pull-quote cite {
  position: relative; z-index: 2;
  display: block;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass-light);
  text-align: center;
}

/* ---------- Scorecard table (course page) ---------- */
.scorecard {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  background: var(--cream);
  border: 1px solid var(--line);
}
.scorecard caption {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
  padding-bottom: 14px;
}
.scorecard th, .scorecard td {
  border: 1px solid var(--line);
  padding: 12px 10px;
  text-align: center;
}
.scorecard th { background: var(--green-deep); color: var(--cream); font-weight: 400; letter-spacing: 0.05em; }
.scorecard td:first-child, .scorecard th:first-child { text-align: left; padding-left: 16px; }
.scorecard tfoot td { font-weight: 700; background: rgba(182,135,58,0.08); }
.scorecard-wrap { overflow-x: auto; }

/* ---------- Pricing / membership tiers ---------- */
.tier {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 32px;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.tier.featured { border-color: var(--brass); box-shadow: 0 18px 40px rgba(182,135,58,0.14); position: relative; }
.tier.featured::before {
  content: 'Most Popular';
  position: absolute; top: -13px; left: 32px;
  background: var(--brass); color: var(--green-deep);
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 2px;
}
.tier h3 { margin-bottom: 4px; }
.tier .tier-note { font-family: var(--font-mono); font-size: 0.78rem; color: var(--brass); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; }
.tier ul { list-style: none; margin: 0 0 28px; padding: 0; flex-grow: 1; }
.tier li { padding: 9px 0; border-top: 1px solid var(--line); font-size: 0.94rem; display: flex; gap: 10px; }
.tier li:first-child { border-top: none; }
.tier li svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 3px; color: var(--green-fair); }

/* ---------- Events list ---------- */
.event-row {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.event-row:last-child { border-bottom: 1px solid var(--line); }
.event-when { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass); }
.event-name { font-family: var(--font-display); font-size: 1.2rem; }
.event-desc { color: rgba(22,32,26,0.68); font-size: 0.93rem; margin-top: 4px; }
@media (max-width: 680px) {
  .event-row { grid-template-columns: 1fr; gap: 6px; }
  .event-row .btn-outline { justify-self: flex-start; margin-top: 10px; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }

.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.info-list li:first-child { border-top: none; }
.info-list svg { width: 20px; height: 20px; color: var(--brass); flex-shrink: 0; margin-top: 2px; }
.info-list .label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(22,32,26,0.5); margin-bottom: 3px; }

.hours-table { width: 100%; border-collapse: collapse; margin-top: 14px; }
.hours-table td { padding: 8px 0; border-top: 1px solid var(--line); font-size: 0.95rem; }
.hours-table tr:first-child td { border-top: none; }
.hours-table td:last-child { text-align: right; font-family: var(--font-mono); font-size: 0.85rem; }

form.contact-form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(22,32,26,0.6); }
.field input, .field textarea, .field select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
  border-color: var(--brass);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 0.85rem; color: rgba(22,32,26,0.55); }

.alert {
  padding: 16px 18px;
  border-radius: var(--radius);
  font-size: 0.94rem;
  margin-bottom: 22px;
}
.alert-success { background: rgba(31,92,63,0.12); border: 1px solid var(--green-fair); color: var(--green-fair); }
.alert-error { background: rgba(176,60,40,0.1); border: 1px solid #B03C28; color: #8a2f1f; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-deep);
  color: rgba(243,241,230,0.75);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(243,241,230,0.12);
}
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.footer-grid h4 {
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-grid p, .footer-grid a { font-size: 0.92rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.footer-links a:hover { color: var(--cream); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: rgba(243,241,230,0.5);
}
.footer-wordmark { font-family: var(--font-display); color: var(--cream); font-size: 1.05rem; margin-bottom: 10px; }

/* ---------- Visible keyboard focus ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
