:root {
  --kga-ink: #12372b;
  --kga-forest: #0b563f;
  --kga-moss: #dbe8de;
  --kga-cream: #fffdf7;
  --kga-sand: #f4ecda;
  --kga-gold: #84611e;
  --kga-muted: #50675d;
  --kga-sun: #ffe176;
  --kga-panel: linear-gradient(135deg, #063e2d 0%, #006446 100%);
  --kga-action: linear-gradient(135deg, #ffe58a 0%, #ffc52f 100%);
}

html { background: var(--kga-cream); }
body {
  background:
    radial-gradient(circle at 92% 4%, rgba(217, 233, 223, .76), transparent 29rem),
    linear-gradient(135deg, #fffdf7 0%, #f1f7f1 100%) !important;
  color: var(--kga-ink) !important;
}

main, .page, .sponsor-main { position: relative; }
.hero, .sponsor-hero, .page > .hero {
  background: transparent !important;
  color: var(--kga-ink) !important;
  min-height: 0 !important;
  padding-block: clamp(44px, 8vw, 92px) !important;
}

h1, .hero h1, .sponsor-hero h1 {
  color: var(--kga-heading, var(--kga-ink)) !important;
  font-family: Georgia, serif !important;
  font-size: clamp(2.2rem, 5vw, 4.25rem) !important;
  font-weight: 600 !important;
  letter-spacing: -.055em !important;
  line-height: .98 !important;
  max-width: 16ch;
  text-wrap: balance;
}

h2, h3 { color: var(--kga-heading, var(--kga-ink)) !important; }
p, li { color: var(--kga-copy, var(--kga-muted)); line-height: 1.6; }
.eyebrow, .hero .eyebrow { color: var(--kga-label, var(--kga-gold)) !important; font-size: .76rem !important; font-weight: 800 !important; letter-spacing: .16em !important; }

.section, .form-card, .card, .hero-card, .sponsor-section, .sponsor-card, .rate-card, .booking-section, .brand-section, .about-section {
  border-color: rgba(18, 55, 43, .16) !important;
  box-shadow: 0 16px 36px rgba(17, 61, 44, .09) !important;
}

.section, .form-card, .card, .sponsor-section, .booking-section, .brand-section, .about-section {
  background: rgba(255, 253, 247, .88) !important;
  border-radius: 24px !important;
}

.button, button[type="submit"], input[type="submit"] {
  border-radius: 999px !important;
  box-shadow: none !important;
  font-weight: 800 !important;
  min-height: 46px;
}
.button-primary, button[type="submit"], input[type="submit"] { background: var(--kga-forest) !important; color: #fffdf7 !important; }
.button-secondary { background: var(--kga-cream) !important; border: 1px solid var(--kga-forest) !important; color: var(--kga-forest) !important; }
.button:hover, button[type="submit"]:hover, input[type="submit"]:hover { transform: translateY(-2px); }

.kg-align {
  margin: clamp(44px, 8vw, 88px) auto 0;
  max-width: 1120px;
  padding: clamp(34px, 6vw, 64px);
  border: 1px solid rgba(189, 139, 46, .55);
  border-radius: 30px;
  background: var(--kga-panel);
  box-shadow: 0 24px 54px rgba(9, 58, 40, .22);
}
.kg-align > p { color: #e8c36c !important; font-size: .76rem; font-weight: 800; letter-spacing: .16em; margin: 0 0 13px; }
.kg-align h2 { color: #fffaf0 !important; font: 600 clamp(2rem, 4vw, 3.4rem)/1 Georgia,serif !important; letter-spacing: -.045em; margin: 0; max-width: 18ch; }
.kg-align > div > p { color: #dceade !important; font-size: 1.06rem; margin: 20px 0 34px; max-width: 66ch; }
.kg-align-grid { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kg-align-grid article { min-height: 190px; padding: 20px; border: 1px solid rgba(255, 250, 240, .2); border-radius: 18px; background: rgba(255, 253, 247, .08); }
.kg-align-grid span { color: #e8c36c; font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.kg-align-grid h3 { color: #fffaf0 !important; font-size: 1.15rem; margin: 14px 0 9px; }
.kg-align-grid p { color: #dceade !important; font-size: .9rem; margin: 0; }

@media (max-width: 980px) { .kg-align-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { h1, .hero h1, .sponsor-hero h1 { font-size: clamp(2.15rem, 12vw, 3rem) !important; } .kg-align { border-radius: 23px; padding: 30px 22px; } .kg-align-grid { grid-template-columns: 1fr; } .kg-align-grid article { min-height: 0; } }
/* Kingdom Golf ALIGN partner application entry. */
.kg-nav a[href="https://kgalign.com/login/"]{border:1px solid rgba(189,139,46,.5);color:#0b563f!important}.kg-nav a[href="https://kgalign.com/login/"]::before{content:'ALIGN';margin-right:7px;color:#bd8b2e;font-size:.66rem;font-weight:900;letter-spacing:.08em}.kg-site-actions{display:flex;gap:6px}.kg-site-actions button{min-height:40px;padding:8px 11px;border:1px solid rgba(189,139,46,.5);border-radius:999px;background:transparent;color:#0b563f;font:800 .78rem/1 inherit;cursor:pointer}.kg-site-actions button:hover{background:#edf4ed}@media(max-width:920px){.kg-site-actions{width:100%;margin:3px 0}.kg-site-actions button{flex:1;min-height:46px}}
/* One visible access path for share and app installation. */
.kg-toolbar-inner .kg-site-actions{display:flex;align-items:center;gap:7px;margin-left:auto}.kg-toolbar-inner .kg-site-actions button{min-height:40px;padding:8px 12px;border:1px solid rgba(189,139,46,.62);border-radius:999px;background:#fffdf7;color:#0b563f;font:800 .76rem/1 inherit;cursor:pointer}.kg-toolbar-inner .kg-site-actions button:hover{background:#edf4ed}.kgalign-framework{background:var(--kga-panel)!important;border-color:rgba(189,139,46,.58)!important;color:#fffaf0!important}.kgalign-framework h2{color:#fffaf0!important;font:600 clamp(1.8rem,3.5vw,3rem)/1 Georgia,serif!important;letter-spacing:-.045em!important;max-width:18ch}.kgalign-framework>p:not(.eyebrow){color:#dceade!important;max-width:62ch}.kgalign-framework-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-top:26px}.kgalign-framework-grid article{min-height:150px;padding:18px;border:1px solid rgba(255,250,240,.18);border-radius:16px;background:rgba(255,253,247,.08)}.kgalign-framework-grid b{display:block;color:#e8c36c;font-size:.95rem}.kgalign-framework-grid span{display:block;margin-top:10px;color:#dceade;font-size:.88rem;line-height:1.5}.kg-align[hidden]{display:none!important}@media(max-width:760px){.kgalign-framework-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kg-toolbar-inner .kg-site-actions{gap:5px}.kg-toolbar-inner .kg-site-actions button{min-height:38px;padding:7px 8px;font-size:.68rem}}@media(max-width:460px){.kg-toolbar-inner .kg-site-actions button[data-install]{font-size:0;padding:7px 10px}.kg-toolbar-inner .kg-site-actions button[data-install]::after{content:'Install';font-size:.68rem}.kgalign-framework-grid{grid-template-columns:1fr}}
/* Homepage contrast repair: the hero must never rely on pale text over pale art. */
body main :is(.hero, .sponsor-hero) {
  background: linear-gradient(135deg, #fffdf7 0%, #edf6ef 100%) !important;
  color: #12372b !important;
}

body main :is(.hero, [class*="hero"]) :is(p, li, small, .subtitle, .lede, .hero-copy, .hero-description, .hero-text) {
  color: var(--kga-copy, #315447) !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body main :is(.hero, [class*="hero"]) :is(.hero-kicker, .kicker, .eyebrow, .overline) {
  color: var(--kga-label, #8a5a0e) !important;
  opacity: 1 !important;
}

body main :is(.hero-card, .hero-panel, .hero-aside, [class*="hero-card"], [class*="hero-panel"]) {
  background: var(--kga-panel) !important;
  border: 1px solid rgba(189, 139, 46, .58) !important;
  box-shadow: 0 22px 44px rgba(12, 55, 40, .18) !important;
  color: #fffdf7 !important;
}

body main :is(.hero-card, .hero-panel, .hero-aside, [class*="hero-card"], [class*="hero-panel"]) :is(h1, h2, h3) {
  color: #fffdf7 !important;
}

body main :is(.hero-card, .hero-panel, .hero-aside, [class*="hero-card"], [class*="hero-panel"]) :is(p, li, small, span) {
  color: #dbe8de !important;
  opacity: 1 !important;
}

body main :is(.hero-card, .hero-panel, .hero-aside, [class*="hero-card"], [class*="hero-panel"]) :is(.hero-kicker, .kicker, .eyebrow, .overline) {
  color: var(--kga-sun) !important;
}

/* Direct homepage contrast contract. These exact components remain readable on every surface. */
.hero {
  background: linear-gradient(135deg, #fffdf7 0%, #e8f3eb 100%) !important;
  color: #12372b !important;
}
.hero .hero-subheadline {
  color: #1c5b45 !important;
  font-weight: 750 !important;
  text-shadow: none !important;
}
.hero .hero-text {
  color: #2d5043 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
.hero .hero-card {
  background: var(--kga-panel) !important;
  border-color: rgba(189, 139, 46, .62) !important;
  box-shadow: 0 22px 44px rgba(12, 55, 40, .2) !important;
  backdrop-filter: none !important;
}
.hero .hero-card .card-label { color: var(--kga-sun) !important; }
.hero .hero-card h2 { color: #fffdf7 !important; }
.hero .hero-card p,
.hero .hero-card .small-text { color: #dcefe4 !important; opacity: 1 !important; }
.hero .hero-card-line { background: rgba(255, 253, 247, .25) !important; }

/* Full-audit release blockers: keep dark panels readable and every control keyboard-visible. */
body main .hero .hero-card :is(p, li, small, .lead, .small-text) {
  color: #e7f2eb !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
body main .hero .hero-card .eyebrow,
body main .hero .hero-card .card-label {
  color: var(--kga-sun) !important;
  opacity: 1 !important;
}
body :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #b98022 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(255, 253, 247, .94) !important;
}

/* Rate-page secondary action: light panel requires dark, explicit text. */
body main .hero-main .btn-secondary {
  color: #0b563f !important;
  background: #fffdf7 !important;
  border-color: #0b563f !important;
}

/* Phone header: preserve the Kingdom identity while retaining named Share/Install controls for assistive technology. */
@media (max-width: 520px) {
  .kg-toolbar-inner .kg-site-actions { gap: 4px; }
  .kg-toolbar-inner .kg-site-actions button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    font-size: 0;
  }
  .kg-toolbar-inner .kg-site-actions button:first-child::after {
    content: '↗';
    font-size: 1.1rem;
    line-height: 1;
  }
  .kg-toolbar-inner .kg-site-actions button[data-install]::after {
    content: '↓';
    font-size: 1.2rem;
    line-height: 1;
  }
}

/* The small-screen action row must not consume the brand's layout width. */
@media (max-width: 520px) {
  .kg-toolbar-inner {
    width: calc(100% - 20px) !important;
    gap: 8px !important;
  }
  .kg-toolbar-inner .kg-site-actions {
    width: auto !important;
    margin: 0 !important;
    flex: 0 0 auto;
  }
  .kg-brand {
    flex: 1 1 auto;
    min-width: 0;
  }
  .kg-brand-copy strong {
    font-size: .88rem !important;
  }
  .kg-brand-copy span {
    display: none;
  }
  .kg-menu-button {
    flex: 0 0 44px;
    min-width: 44px !important;
    min-height: 44px !important;
  }
}

/* Homepage visual flow: original ALIGN art, clear program choices, then booking. */
.kg-home .hero-grid { grid-template-columns:minmax(0,1.3fr) minmax(280px,.8fr); gap:clamp(28px,5vw,64px); }
.kg-home .hero h1 { font-size:clamp(2.15rem,4.8vw,3.9rem)!important; line-height:1.05!important; max-width:18ch; }
.kg-home .hero .hero-subheadline { font-size:clamp(1.12rem,2vw,1.35rem); line-height:1.5; margin-top:22px; max-width:35ch; }
.kg-home .hero-text { font-size:1.05rem; max-width:61ch; }
.kg-home .hero-actions { margin-top:26px; }
.kg-home .hero-card { padding:26px; text-align:center; }
.kg-home .kg-hero-art { display:block; width:min(100%,248px); height:auto; aspect-ratio:1; object-fit:contain; margin:0 auto 16px; }
.kg-home main .hero .kg-hero-art { background:transparent!important; border:0; box-shadow:none; }
.kg-home .hero-card h2 { font-size:clamp(1.75rem,2.8vw,2.6rem); line-height:1.08; }
.kg-home .hero-card p { margin:12px auto 0; max-width:32ch; font-size:.95rem; }
.kg-home .hero-card .card-label { margin:0 0 10px; font-size:.7rem; }
.kg-home .hero-card-line { margin:18px 0; }
.kg-home .section { padding-block:clamp(38px,6vw,72px); }
.kg-home .section-heading h2,.kg-home .about-grid h2,.kg-home .booking-card h2 { font-size:clamp(1.8rem,3.5vw,3rem); line-height:1.1; }
.kg-home .section-heading { margin-bottom:28px; }
.kg-home .program-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.kg-home .program-card { display:flex; flex-direction:column; padding:28px; border-color:#d8e0d6; box-shadow:0 10px 24px rgba(18,55,43,.05); }
.kg-home .program-card h3 { font-size:1.3rem; line-height:1.25; }
.kg-home .program-card p { max-width:60ch; }
.kg-home .program-card a { display:inline-flex; align-items:center; align-self:flex-start; min-height:44px; margin-top:auto; line-height:1.35; }
.kg-home .wide-card { grid-column:1/-1; background:var(--kga-panel); border-color:#218962; }
.kg-home .wide-card a { color:var(--kga-sun); border-color:var(--kga-sun); }
.kg-home .kgalign-framework { padding:clamp(28px,5vw,56px); }
.kg-home .kgalign-framework .eyebrow { color:var(--kga-sun)!important; }
.kg-toolbar-inner .kg-site-actions button { min-height:44px; }
@media(max-width:760px) {
  .kg-home .hero-grid { grid-template-columns:minmax(0,1fr); gap:28px; }
  .kg-home .hero,.kg-home .hero-card { padding-block:28px!important; }
  .kg-home .hero-card { display:grid; grid-template-columns:120px minmax(0,1fr); column-gap:20px; text-align:left; }
  .kg-home .kg-hero-art { grid-row:1/5; width:120px; margin:0; align-self:center; }
  .kg-home .hero-card .small-text,.kg-home .hero-card-line { display:none; }
  .kg-home .hero-card p { margin:8px 0 0; font-size:.9rem; }
  .kg-home .hero-card .card-label { margin:0 0 8px; }
  .kg-home .program-grid { grid-template-columns:1fr; }
  .kg-home .program-card { padding:24px; }
}
@media(max-width:520px) {
  .kg-toolbar-inner .kg-site-actions button { width:44px; min-width:44px; min-height:44px; }
  .kg-brand-copy strong { white-space:normal; line-height:1.1; }
  .kg-home .hero-card { grid-template-columns:84px minmax(0,1fr); gap:14px; padding:22px 18px!important; }
  .kg-home .kg-hero-art { width:84px; }
  .kg-home .hero-card h2 { font-size:1.7rem; }
  .kg-home .hero-actions { gap:10px; }
  .kg-home .hero-actions .button { padding:12px 16px; }
}


/* Text colors follow the component surface, including the rates hero and price cards. */
:is(.hero-main, .hero-card, .rate-card, .cta-band, .light-box, .kg-align, .kgalign-framework, .kg-home .wide-card, .kg-rates .hero-side, .site-footer, .footer) {
  --kga-heading: #fffdf7;
  --kga-copy: #e3f5e9;
  --kga-label: var(--kga-sun);
}
body main :is(.hero-main, .rate-card, .cta-band, .light-box), body.kg-rates main .hero-side {
  background: var(--kga-panel) !important;
  color: var(--kga-heading);
  border-color: #218962 !important;
}
.kg-home .wide-card h3 { color: var(--kga-heading) !important; }
body main :is(.hero-main, .hero-card) .eyebrow { background: rgba(0,0,0,.18); border-color: rgba(255,225,118,.45); }
.button-primary, .btn-primary, .gold-price, button[type="submit"], input[type="submit"] {
  background: var(--kga-action) !important;
  color: #12372b !important;
  border-color: #ffd75e !important;
}
.gold-price { box-shadow: 0 6px 18px rgba(0,0,0,.16); }
.btn-secondary { background: var(--kga-cream); color: var(--kga-forest); border-color: var(--kga-forest); }
.kg-private .hero > * { min-width: 0; }
@media (max-width: 600px) {
  .kg-private .hero-card h1 { font-size: clamp(1.75rem, 8vw, 2.4rem) !important; line-height: 1.06 !important; overflow-wrap: anywhere; }
}
/* Original Kingdom logo as a quiet watermark beneath the panel content. */
:is(.hero-main, .hero-card, .rate-card, .cta-band, .light-box, .kg-home .wide-card) {
  position: relative;
  isolation: isolate;
}
:is(.hero-main, .hero-card, .rate-card, .cta-band, .light-box, .kg-home .wide-card)::before {
  content: '';
  position: absolute;
  inset: 12px;
  z-index: -1;
  background: url('/.netlify/images?url=/kngdm-logo.png&w=512&h=512&fit=cover&fm=webp&q=85') right center / auto min(90%, 360px) no-repeat;
  opacity: .085;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .btn, .gold-price { transition: none; }
}
