/* ============================================================
   PSJC (Power Swing Junior Golf Championship) — informational site.
   Fairway green + championship gold, distinct from any partner platform's
   own branding — this is PSJC's own identity.
   ============================================================ */

:root {
  --brand-green: #1b7a43;
  --brand-green-dark: #145c33;
  --accent-gold: #ca8a04;
  --accent-gold-muted: #fef3c7;
  --ink: #14201a;
  --ink-muted: #5b6b63;
  --surface: #ffffff;
  --bg: #f6faf7;
  --border: #dfe9e2;
  --on-green: #ffffff;
  --on-green-muted: #d7ecdf;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06);
  --container-w: 1120px;

  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

.container {
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 20px;
}

.container.narrow {
  max-width: 760px;
}

.container.center {
  text-align: center;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

/* Visually hidden but present for screen readers / SEO structure — e.g. a
   page's one required <h1> when the hero is a pure image banner with no
   visible heading of its own. */
.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;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand-green);
  color: var(--on-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.primary-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.primary-nav a:hover,
.primary-nav a[aria-current="page"] {
  color: var(--brand-green-dark);
}

.primary-nav .btn {
  color: var(--on-green);
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 16px;
    display: none;
  }

  .primary-nav.open {
    display: flex;
  }

  .primary-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }

  .primary-nav a:last-child {
    border-bottom: none;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--brand-green);
  color: var(--on-green);
}

.btn-primary:hover {
  background: var(--brand-green-dark);
}

.btn-gold {
  background: var(--accent-gold);
  color: #1a1200;
}

.btn-gold:hover {
  filter: brightness(1.05);
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--brand-green);
  color: var(--brand-green-dark);
}

.btn-stack {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-block: 10px 14px;
  line-height: 1.25;
  text-align: left;
}

.btn-stack .btn-age {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  opacity: 0.85;
  white-space: nowrap;
}

.btn-stack .btn-name {
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  min-height: 620px;
  background-image: url("../image/hero-golf-course.jpg");
  background-image: image-set(
    url("../image/hero-golf-course.webp") type("image/webp") 1x,
    url("../image/hero-golf-course.jpg") type("image/jpeg") 1x
  );
  background-size: cover;
  background-position: center 70%;
}

.hero.power-swing-hero {
  background-image: url("../image/event-power-swing.jpg");
  background-image: image-set(
    url("../image/event-power-swing.webp") type("image/webp") 1x,
    url("../image/event-power-swing.jpg") type("image/jpeg") 1x
  );
  background-position: center;
}

.hero.dream-chaser-hero {
  background-image: url("../image/event-dream-chaser.jpg");
  background-image: image-set(
    url("../image/event-dream-chaser.webp") type("image/webp") 1x,
    url("../image/event-dream-chaser.jpg") type("image/jpeg") 1x
  );
  background-position: center;
}

/* A solid panel the hero text sits on, spanning the full height of the hero
   and two-thirds of its width, clipped to a chevron on the right so it
   reads as cutting into the full-strength photo beside it, rather than a
   plain rectangle floating over it. */
.hero-panel {
  width: 66.6667%;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(6px);
  -webkit-backdrop-filter: saturate(160%) blur(6px);
  padding: 56px clamp(48px, 10vw, 120px) 56px clamp(24px, 5vw, 56px);
  box-shadow: var(--shadow-card);
  clip-path: polygon(0 0, 88% 0, 100% 50%, 88% 100%, 0 100%);
}

.hero-panel-inner {
  max-width: 560px;
  width: 100%;
}

@media (max-width: 780px) {
  .hero {
    display: block;
    min-height: 0;
  }

  .hero-panel {
    width: 100%;
    padding: 32px 20px;
    clip-path: none;
    box-shadow: none;
  }

  .hero-panel-inner {
    max-width: none;
  }

  /* These two heroes have no visible content of their own (the banner IS
     the content) — without an explicit height they'd collapse to 0px once
     .hero's min-height resets above. */
  .power-swing-hero,
  .dream-chaser-hero {
    aspect-ratio: 16 / 9;
  }
}

.hero .eyebrow {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-gold-muted);
  color: #92620a;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}

.hero .lede {
  font-size: 1.15rem;
  color: var(--ink-muted);
  max-width: 62ch;
  margin: 0 0 28px;
}

/* Each button sizes to fit its own one-line text (see .btn-stack below) —
   the row keeps them side by side whenever there's room, and wraps the
   second one below the first otherwise. This adapts to any panel width
   without a hand-picked pixel breakpoint. */
.hero .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Sections ---------- */

section {
  padding-block: 56px;
}

.section-head {
  max-width: 640px;
  margin: 0 0 32px;
}

.section-head .eyebrow {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand-green-dark);
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  margin: 0 0 10px;
}

.section-head p {
  color: var(--ink-muted);
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-card {
  padding: 0;
  gap: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.08), 0 16px 32px rgba(15, 23, 42, 0.1);
}

/* Jumbo image banner at the top of the card — full width/bleed, no padding,
   so it reads as a masthead with the event's own text sitting below it. */
.event-card-image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-card-body {
  padding: 22px 26px 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-card .event-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.event-card.power-swing .event-tag {
  background: var(--accent-gold-muted);
  color: #92620a;
}

.event-card.dream-chaser .event-tag {
  background: var(--on-green-muted);
  color: var(--brand-green-dark);
}

.event-card h3 {
  margin: 4px 0 0;
  font-size: 1.3rem;
}

.event-card p {
  margin: 0;
  color: var(--ink-muted);
}

.event-card .event-link {
  margin-top: 8px;
  font-weight: 700;
  color: var(--brand-green-dark);
}

/* ---------- Fact panel (key event facts) ---------- */

.fact-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 22px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fact .fact-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.fact .fact-value {
  font-size: 1.1rem;
  font-weight: 700;
}

/* ---------- Listings (one card per age-group division / event) ---------- */

.listing-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.listing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.listing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.listing-head-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fact-date {
  font-weight: 700;
  color: var(--ink-muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}

.listing-card .btn {
  align-self: flex-start;
}

.fact-action {
  align-items: center;
  gap: 10px;
}

.fact-action .btn {
  align-self: center;
}

.fact-action .qr-code {
  width: 104px;
  height: 104px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.listing-card.is-completed {
  opacity: 0.85;
}

.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.status-badge.completed {
  background: var(--border);
  color: var(--ink-muted);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Schedule / list ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.timeline li {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.timeline li:last-child {
  border-bottom: none;
}

.timeline .time {
  flex: 0 0 150px;
  font-weight: 700;
  color: var(--brand-green-dark);
}

.timeline .what {
  color: var(--ink-muted);
}

/* ---------- Banner (partner / about) ---------- */

.banner {
  background: var(--brand-green);
  color: var(--on-green);
}

.banner .section-head .eyebrow {
  color: var(--on-green-muted);
}

.banner .section-head p {
  color: var(--on-green-muted);
}

.banner h2 {
  color: var(--on-green);
}

.partner-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.partner-row .btn-outline {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--on-green);
}

.partner-row .btn-outline:hover {
  border-color: var(--on-green);
}

/* ---------- Notice / callout ---------- */

.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-gold);
  background: var(--accent-gold-muted);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  color: #4a3400;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 8px;
}

/* ---------- Contact ---------- */

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.contact-card .contact-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.contact-card .contact-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.contact-card .contact-value {
  font-weight: 700;
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 32px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--ink-muted);
}

.footer-links a:hover {
  color: var(--brand-green-dark);
}
