/* National Golf Hub — shared styles. No build step required. */

:root {
  --green-950: #0c2418;
  --green-900: #123024;
  --green-800: #184833;
  --green-700: #1f5d3a;
  --green-600: #2a7a4c;
  --green-500: #3a9a62;
  --green-100: #e6f1ea;
  --green-50: #f3f8f4;
  --cream: #f6f3ec;
  --paper: #fffdf8;
  --ink: #1b1f1c;
  --muted: #5a635c;
  --line: #d5ddd4;
  --gold: #a67c2a;
  --gold-soft: #f4e8c8;
  --banner-bg: #fff3cd;
  --banner-ink: #6b5200;
  --private: #5b3a82;
  --private-bg: #f3eef8;
  --public: var(--green-700);
  --public-bg: var(--green-100);
  --danger: #8a3b2a;
  --shadow: 0 8px 28px rgba(12, 36, 24, 0.08);
  --radius: 14px;
  --max: 1080px;
  --header-h: 68px;
  --font: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --serif: "Fraunces", "Palatino Linotype", Georgia, serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  font-size: 1.05rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a { color: var(--green-700); text-underline-offset: 2px; }
a:hover { color: var(--green-600); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--green-950);
}

h1 { font-size: clamp(1.85rem, 4vw, 2.7rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); margin: 0 0 0.7rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }

p { margin: 0 0 1rem; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  background: #fff;
  color: var(--green-900);
  padding: 8px 12px;
  z-index: 100;
  border-radius: 6px;
}
.skip-link:focus { top: 12px; }

/* Sample-data banner — always visible */
.sample-banner {
  background: var(--banner-bg);
  color: var(--banner-ink);
  text-align: center;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  border-bottom: 1px solid #ead79a;
  position: sticky;
  top: 0;
  z-index: 40;
}
.sample-banner strong { font-weight: 700; }

/* Header */
.site-header {
  background: var(--green-900);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 30;
  /* sits under banner when both sticky; banner is first in DOM so this is fine
     if banner is not sticky on small screens we still want header reachable */
}
/* Banner is sticky first; header follows below it naturally when scrolling...
   Actually both sticky at top:0 will overlap. Better: banner sticky, header static
   OR header below banner with top equal to banner height.
   I'll keep banner sticky at 0 and header sticky at banner height. */

.site-header {
  top: 0;
}

/* Recalc: if both are sticky at 0, header covers banner. Make only banner sticky,
   header scrolls away? No, nav should stay. Make a wrapper? Simpler: don't sticky the banner,
   sticky the header, and leave the banner at the top of the page (and repeat a slim
   chip on inner pages). Requirement is a visible site-wide banner — it can be
   non-sticky under the header, or a bar above a sticky header.

   Structure: banner then header. Header sticky with top: 0 will slide over banner
   on scroll, which is OK if the banner was already read. I'll also put a compact
   "SAMPLE DATA" pill in the header so it stays visible. */

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo:hover { color: var(--gold-soft); }

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
}
.logo-mark svg { width: 34px; height: 34px; display: block; }

.logo-tag {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gold);
  color: #fff;
  padding: 2px 6px;
  border-radius: 99px;
  vertical-align: middle;
}

.nav-toggle {
  display: none;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  align-items: center;
}

.site-nav a {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.site-nav a[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,0.14);
}

/* Hero */
.hero {
  background:
    radial-gradient(1200px 420px at 80% -10%, rgba(166, 124, 42, 0.18), transparent 50%),
    linear-gradient(160deg, var(--green-950), var(--green-800) 55%, #1a5a38);
  color: #fff;
  padding: 56px 20px 48px;
  text-align: center;
}
.hero h1 { color: #fff; }
.hero .lede {
  margin: 0 auto 1.4rem;
  max-width: 640px;
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.btn-primary {
  background: #fff;
  color: var(--green-900);
}
.btn-primary:hover { background: var(--gold-soft); color: var(--green-950); }
.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); color: #fff; }
.btn-green {
  background: var(--green-700);
  color: #fff;
}
.btn-green:hover { background: var(--green-600); color: #fff; }
.btn-outline {
  background: #fff;
  color: var(--green-800);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--green-700); color: var(--green-700); }
.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

main {
  flex: 1;
  width: 100%;
}

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

.page-head {
  margin: 0 0 22px;
}
.page-head .lede { color: var(--muted); max-width: 680px; }

/* Filters / finder */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.filters input,
.filters select,
.field input,
.field select,
.field textarea {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}
.filters input { flex: 1 1 200px; min-width: 160px; }
.filters select { flex: 0 1 180px; }

.table-wrap {
  overflow-x: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
@media (max-width: 900px) {
  table.data { min-width: 0; }
  table.data th,
  table.data td { padding: 10px 8px; font-size: 0.92rem; }
  /* Keep price visible; hide only location / extra columns via .hide-sm */
  table.data td.num { font-size: 0.88rem; }
}
table.data th,
table.data td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
  vertical-align: top;
}
table.data th {
  color: var(--muted);
  font-weight: 650;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--green-50);
}
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #f3f8f4; }
table.data .num,
table.data th.num { text-align: right; }
table.data a.course-link {
  font-weight: 650;
  text-decoration: none;
  color: var(--green-900);
}
table.data a.course-link:hover { text-decoration: underline; color: var(--green-700); }

.rank {
  font-weight: 750;
  color: var(--green-700);
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 650;
  background: var(--public-bg);
  color: var(--public);
  white-space: nowrap;
}
.tag.private { background: var(--private-bg); color: var(--private); }
.tag.sample {
  background: var(--gold-soft);
  color: #6b5200;
}
.tag.open { background: #e5f3e8; color: #1a5a30; }
.tag.closed { background: #f4e6e4; color: var(--danger); }
.tag.neutral { background: #eee; color: #555; }

.muted { color: var(--muted); font-size: 0.9rem; }
.count-line { margin: 10px 0 0; color: var(--muted); font-size: 0.92rem; }

/* Cards / resource grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 12px 0 8px;
}
.card {
  display: block;
  padding: 18px 18px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
a.card:hover {
  border-color: var(--green-700);
  transform: translateY(-1px);
  color: inherit;
}
.card h3 { margin-bottom: 0.35rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card .meta { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }

.section { margin: 42px 0 8px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

/* Accuracy / promise */
.promise {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.promise article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.promise h3 { font-size: 1.05rem; }

/* FAQ */
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.faq summary {
  font-weight: 650;
  cursor: pointer;
  color: var(--green-900);
}
.faq details p:last-child { margin-bottom: 0.2rem; }
.faq details[open] summary { margin-bottom: 0.5rem; }

/* State tiles */
.state-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.state-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: inherit;
}
.state-tile:hover { border-color: var(--green-700); color: inherit; }
.state-tile strong { display: block; font-size: 1.1rem; color: var(--green-900); }
.state-tile span { color: var(--muted); font-size: 0.9rem; }

/* Compare */
.compare-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.compare-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}
.compare-panel .card h3 { font-size: 1.1rem; }
.compare-panel .kv { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; font-size: 0.95rem; margin-top: 10px; }
.compare-panel .kv dt { color: var(--muted); }
.compare-panel .kv dd { margin: 0; text-align: right; font-weight: 650; }

/* Calculator */
.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 800px) {
  .calc-grid { grid-template-columns: 1fr; }
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.field { margin-bottom: 12px; }
.field label {
  display: block;
  font-weight: 650;
  font-size: 0.9rem;
  margin-bottom: 4px;
}
.field .hint { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.field input, .field select, .field textarea { width: 100%; }
.calc-result {
  background: var(--green-50);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 8px;
}
.calc-result .figure {
  font-family: var(--serif);
  font-size: 1.8rem;
  color: var(--green-800);
  font-weight: 650;
}
.calc-result table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.calc-result td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.calc-result tr:last-child td { border-bottom: 0; font-weight: 700; }

/* Gear */
.disclosure {
  background: #f8f1e0;
  border: 1px solid #e6d6a8;
  color: #5a4710;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
  margin-bottom: 20px;
}
.product {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.affiliate-note {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--gold-soft);
  color: #6b5200;
  padding: 2px 7px;
  border-radius: 99px;
  margin-left: 6px;
}

/* Tournaments */
.event {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.event-date {
  text-align: center;
  background: var(--green-50);
  border-radius: 10px;
  padding: 10px 6px;
  color: var(--green-800);
}
.event-date .mon {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.event-date .day {
  display: block;
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 650;
  line-height: 1;
}
.event-date .range { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 2px; }

/* Course detail */
.detail-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
}
.stat .label { display: block; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.stat .value { font-weight: 700; font-size: 1.15rem; color: var(--green-900); }

/* Forms */
.form-actions { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.form-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  display: none;
}
.form-status.is-on { display: block; }
.form-status.ok { background: var(--green-100); color: var(--green-900); }
.form-status.err { background: #f8e8e6; color: var(--danger); }

/* About */
.prose { max-width: 740px; }
.prose ol, .prose ul { margin: 0 0 1rem; padding-left: 1.25rem; }
.prose li { margin-bottom: 0.35rem; }
.label-table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; }
.label-table th, .label-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.label-table th { width: 34%; color: var(--green-900); }

/* Footer */
.site-footer {
  background: var(--green-950);
  color: rgba(255,255,255,0.82);
  padding: 36px 20px 28px;
  margin-top: auto;
  font-size: 0.92rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}
.site-footer a { color: #fff; }
.site-footer h2 {
  color: #fff;
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 6px; }
.site-footer .fine {
  max-width: var(--max);
  margin: 24px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.65);
  font-size: 0.85rem;
}

/* Empty / notes */
.empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

/* 404 */
.not-found { text-align: center; padding: 60px 20px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--green-900);
    flex-direction: column;
    padding: 8px 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 16px 24px rgba(0,0,0,0.2);
  }
  .site-header { position: relative; }
  .site-header.is-open { position: sticky; }
  .site-header.is-open .site-nav { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .product { grid-template-columns: 1fr; }
  .event { grid-template-columns: 72px 1fr; }
}

@media (min-width: 901px) {
  .site-header { position: sticky; top: 0; }
}
