/* ============================================================
   KaddieIQ — Main Stylesheet
   kiq-main.css
   ============================================================ */

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

/* ── Design tokens ── */
:root {
  --navy-dark:    #080F1E;
  --navy-mid:     #0F2A5A;
  --green:        #39B54A;
  --green-dim:    rgba(57,181,74,0.15);
  --green-border: rgba(57,181,74,0.35);
  --gold:         #C8A84B;
  --gold-dim:     rgba(200,168,75,0.12);
  --gold-border:  rgba(200,168,75,0.28);
  --white:        #FFFFFF;
  --soft:         rgba(255,255,255,0.72);
  --softer:       rgba(255,255,255,0.42);
  --faint:        rgba(255,255,255,0.18);
  --glass:        rgba(8,15,30,0.60);
  --line:         rgba(255,255,255,0.10);
  --shadow:       0 32px 80px rgba(0,0,0,0.50);
  --hf:           "Montserrat", sans-serif;
  --bf:           "Open Sans", sans-serif;
  --max:          1280px;
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body {
  font-family: var(--bf);
  color: var(--white);
  background: var(--navy-dark);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Layout shell ── */
.shell { position: relative; z-index: 2; min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: min(calc(100% - 48px), var(--max)); margin: 0 auto; }

/* ============================================================
   BACKGROUND SLIDESHOW
   Course-1.png is set directly on .bg-wrap so it renders
   immediately before JS loads. Slides layer on top.
   ============================================================ */
.bg-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url('../images/courses/Course-1.png') center / cover no-repeat;
}
.bg-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2.2s ease-in-out;
}
.bg-slide.active { opacity: 1; }
.bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    150deg,
    rgba(8,15,30,0.88) 0%,
    rgba(15,42,90,0.72) 50%,
    rgba(8,15,30,0.55) 100%
  );
  z-index: 1;
}

/* Slideshow dots */
.bg-dots {
  position: fixed;
  bottom: 90px;
  right: 20px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bg-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  transition: background 0.4s, height 0.4s;
}
.bg-dot.active {
  background: var(--green);
  height: 16px;
  border-radius: 2px;
}

/* ============================================================
   HEADER & NAV
   ============================================================ */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(to bottom, rgba(8,15,30,0.95), rgba(8,15,30,0.50));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

/* Brand */
.brand { display: flex; align-items: center; gap: 13px; flex-shrink: 0; }
.logo-box {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.13);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}
.logo-box img { width: 84%; height: 84%; object-fit: contain; display: block; }
.logo-fallback { display: none; font: 900 1.5rem/1 var(--hf); color: var(--green); }
.brand-text { line-height: 1; }
.brand-name { font: 800 1.12rem/1 var(--hf); letter-spacing: -0.03em; }
.brand-powered { font-size: 0.70rem; color: var(--gold); letter-spacing: 0.05em; margin-top: 4px; }

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.nav-links a {
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  font-size: 0.84rem;
  font-weight: 500;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { background: rgba(255,255,255,0.10); transform: translateY(-1px); }
.nav-survey {
  background: var(--green-dim) !important;
  border-color: var(--green-border) !important;
  color: #86efac !important;
  font-weight: 600 !important;
}
.nav-survey:hover { background: rgba(57,181,74,0.25) !important; }

/* ============================================================
   MAIN / HERO
   ============================================================ */
main { flex: 1; display: flex; align-items: center; padding: 60px 0 80px; }
.hero { max-width: 780px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(200,168,75,0.12);
  border: 1px solid rgba(200,168,75,0.28);
  font: 600 0.75rem/1 var(--hf);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.eyebrow::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

.hero h1 {
  font: 900 clamp(3.4rem, 8.5vw, 6rem)/0.93 var(--hf);
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}
.hero h1 .g { color: var(--green); }

.strap {
  font: 700 clamp(0.9rem, 2.2vw, 1.2rem)/1 var(--hf);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}
.tagline {
  font-size: clamp(0.98rem, 2vw, 1.12rem);
  color: var(--soft);
  line-height: 1.65;
  max-width: 560px;
  margin-bottom: 34px;
}
.tagline strong { color: var(--white); }

/* ── CTA Buttons ── */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font: 700 0.94rem/1 var(--hf);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, #39B54A 0%, #27a03a 100%);
  color: var(--white);
  box-shadow: 0 8px 28px rgba(57,181,74,0.32);
}
.btn-primary:hover { box-shadow: 0 12px 36px rgba(57,181,74,0.48); }
.btn-ghost {
  background: rgba(255,255,255,0.07);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-ghost:hover { background: rgba(255,255,255,0.13); }

/* ============================================================
   GOLF INTELLIGENCE PANEL (blog teaser)
   Auto-populates from blogs.json via JS in index.html
   ============================================================ */
.intelligence-section { margin-bottom: 40px; }

.intelligence-label {
  font: 700 0.68rem/1 var(--hf);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 10px;
}

/* Featured latest post card */
.intel-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: flex;
}
.intel-card:hover { background: rgba(8,15,30,0.78); transform: translateX(4px); }
.intel-meta { flex: 1; min-width: 0; }
.intel-tag {
  font: 600 0.70rem/1 var(--hf);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 5px;
}
.intel-title { font: 700 0.97rem/1.35 var(--hf); color: var(--white); }
.intel-sub { font-size: 0.74rem; color: var(--softer); margin-top: 4px; }
.intel-arrow {
  font-size: 1.2rem;
  color: var(--green);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.intel-card:hover .intel-arrow { transform: translateX(4px); }

/* Loading state */
.intel-loading {
  font: 500 0.80rem/1 var(--hf);
  color: var(--softer);
  letter-spacing: 0.06em;
  padding: 8px 0;
}

/* Recent posts row (up to 3, compact) */
.intel-recents {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.intel-recent-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(8,15,30,0.45);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
}
.intel-recent-card:hover { background: rgba(8,15,30,0.70); transform: translateX(3px); }
.intel-recent-num {
  font: 700 0.62rem/1 var(--hf);
  letter-spacing: 0.08em;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}
.intel-recent-title {
  font: 600 0.84rem/1.3 var(--hf);
  color: var(--soft);
  flex: 1;
  min-width: 0;
}
.intel-recent-arrow { color: var(--softer); font-size: 0.9rem; flex-shrink: 0; transition: transform 0.2s; }
.intel-recent-card:hover .intel-recent-arrow { transform: translateX(3px); color: var(--green); }

/* View all link */
.intel-viewall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font: 600 0.74rem/1 var(--hf);
  letter-spacing: 0.06em;
  color: var(--softer);
  transition: color 0.2s;
}
.intel-viewall:hover { color: var(--green); }

/* ============================================================
   LEGAL SECTIONS (privacy / cookies — :target reveal)
   ============================================================ */
.legal-section {
  display: none;
  margin-top: 16px;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(15,42,90,0.68);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  color: var(--soft);
  font-size: 0.87rem;
  line-height: 1.7;
}
.legal-section:target { display: block; }
.legal-section h3 { font: 700 0.98rem/1 var(--hf); color: var(--white); margin-bottom: 10px; }
.legal-section p { margin-bottom: 8px; }
.legal-date { font-size: 0.73rem; color: rgba(255,255,255,0.32); margin-top: 10px; }

/* ============================================================
   FOOTER
   ============================================================ */
.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.foot a { font-size: 0.78rem; color: var(--softer); transition: color 0.2s; }
.foot a:hover { color: var(--white); }
.foot .sep { width: 1px; height: 10px; background: rgba(255,255,255,0.18); }
.foot-investor { color: var(--gold) !important; font-weight: 600 !important; }
.foot-copy { font-size: 0.76rem; color: rgba(255,255,255,0.25); margin-left: auto; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100;
  display: none;
  animation: slideUp 0.4s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cookie-inner {
  width: min(100%, 980px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  border-radius: 16px;
  background: rgba(6,12,26,0.95);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.cookie-icon { font-size: 1.3rem; flex-shrink: 0; }
.cookie-copy { flex: 1; font-size: 0.86rem; color: var(--soft); line-height: 1.5; }
.cookie-copy strong { color: var(--white); }
.cookie-copy a { color: #86efac; text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.btn-decline {
  background: transparent;
  color: var(--softer);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 9px 18px;
  border-radius: 999px;
  font: 600 0.82rem/1 var(--bf);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-decline:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.btn-accept {
  background: linear-gradient(135deg, #39B54A, #27a03a);
  color: var(--white);
  border: none;
  padding: 9px 20px;
  border-radius: 999px;
  font: 700 0.82rem/1 var(--hf);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(57,181,74,0.28);
  transition: all 0.2s;
}
.btn-accept:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(57,181,74,0.44); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .nav { flex-direction: column; align-items: stretch; }
  .nav-links { justify-content: flex-start; }
}

@media (max-width: 600px) {
  .wrap { width: calc(100% - 32px); }
  main { align-items: flex-end; padding: 32px 0 96px; }
  .hero h1 { font-size: 3.2rem; }
  .cta-row { flex-direction: column; }
  .cta-row .btn { width: 100%; justify-content: center; }
  .cookie-inner { flex-direction: column; align-items: stretch; }
  .cookie-actions { flex-direction: column; }
  .btn-decline, .btn-accept { width: 100%; text-align: center; }
  .bg-dots { display: none; }
  .foot-copy { margin-left: 0; }
  .intel-recents { gap: 6px; }
}
