/* ============================================================
   KINGDOM BLUEPRINT — MASTER STYLESHEET
   Palette:  Navy #0B1E3B | Blue #3498db | Gold #C9A227
             White #ffffff | Charcoal #333333
   Fonts:    Playfair Display / Montserrat / Lato 900
   ============================================================ */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* === TOKENS === */
:root {
  --navy:     #0B1E3B;
  --navy-dk:  #06122A;
  --blue:     #3498db;
  --gold:     #C9A227;
  --gold-dk:  #A07A10;
  --white:    #ffffff;
  --charcoal: #333333;
  --gray:     #777777;
  --light:    #f5f7fa;
  --border:   #e4e8ef;
  --ff-display: 'Playfair Display', Georgia, serif;
  --ff-body:    'Montserrat', Arial, sans-serif;
  --ff-label:   'Lato', Arial, sans-serif;
  --max-w: 1100px;
  --radius: 4px;
  --ease: 0.22s ease;
}

/* === BASE === */
html { overflow-x: hidden; }
body { overflow-x: hidden;
  font-family: var(--ff-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color var(--ease); }
a:hover { color: var(--gold); }

.container {
  width: 92%;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5 {
  font-family: var(--ff-display);
  color: var(--navy);
  line-height: 1.25;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.05rem; }
p  { margin-bottom: 1rem; }

.eyebrow {
  display: block;
  font-family: var(--ff-label);
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

/* Signature element: 3px gold rule used as section accent */
.gold-rule {
  display: block;
  width: 48px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  margin: 1rem 0 1.75rem;
}
.center .gold-rule,
.text-center .gold-rule { margin-left: auto; margin-right: auto; }

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 0.9rem 2.25rem;
  font-family: var(--ff-label);
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--ease), color var(--ease), transform var(--ease);
  text-decoration: none;
  border: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dk); color: var(--white); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: var(--navy); }

.btn-white { background: var(--white); color: var(--navy); }
.btn-white:hover { background: var(--gold); color: var(--navy); }

/* === NAVIGATION === */
#kb-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--navy);
  padding: 0.6rem 0;
  box-shadow: 0 2px 24px rgba(0,0,0,0.45);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
/* mix-blend-mode: screen makes the JPG black background invisible on navy */
.nav-logo img {
  height: 52px;
  width: auto;
  mix-blend-mode: screen;
}
.nav-logo-text {
  font-family: var(--ff-display);
  color: var(--white);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.nav-logo-text span { color: var(--gold); }

.nav-links {
  list-style: none;
  display: none;
  gap: 1.75rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--ff-label);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82);
}
.nav-links a:hover { color: var(--gold); }

/* Dropdown */
.nav-links .has-dropdown { position: relative; }
.nav-links .has-dropdown > a::after {
  content: ' ▾';
  font-size: 0.65rem;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 0;
  min-width: 210px;
  background: var(--navy);
  list-style: none;
  padding: 0.5rem 0;
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  border-top: 2px solid var(--gold);
  border-radius: 0 0 var(--radius) var(--radius);
}
.has-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.76rem;
  color: rgba(255,255,255,0.75);
}
.dropdown-menu li a:hover {
  color: var(--gold);
  background: rgba(201,162,39,0.08);
}

/* Hamburger button */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px 4px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 1px;
  transition: var(--ease);
}

/* Mobile open state */
.nav-open .nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--navy);
  padding: 1.5rem 1.25rem 2rem;
  gap: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.nav-open .nav-links .dropdown-menu {
  display: block;
  position: static;
  box-shadow: none;
  border-top: none;
  border-left: 2px solid var(--gold);
  margin-top: 0.75rem;
  padding-left: 0.75rem;
}

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .nav-links {
    display: flex !important;
    flex-direction: row !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
  }
  .has-dropdown:hover .dropdown-menu { display: block; }
  .nav-open .nav-links .dropdown-menu {
    position: absolute;
    border-left: none;
    margin-top: 0;
    padding-left: 0;
  }
}

/* === HERO (homepage) === */
.hero {
  background: var(--navy);
  color: var(--white);
  padding: 8.5rem 0 5.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(52,152,219,0.18) 0%, transparent 68%);
  pointer-events: none;
}
.hero h1 { color: var(--white); max-width: 820px; margin: 0 auto 1.25rem; position: relative; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero .eyebrow { color: var(--gold); }
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.72);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  position: relative;
}
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; position: relative; }

/* === PAGE HERO (inner pages) === */
.page-hero {
  background: var(--navy);
  padding: 7.5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(52,152,219,0.13) 0%, transparent 65%);
  pointer-events: none;
}
.page-hero h1 { color: var(--white); position: relative; }
.page-hero .eyebrow { color: var(--gold); }
.page-hero p {
  color: rgba(255,255,255,0.68);
  max-width: 600px;
  margin: 1rem auto 0;
  font-size: 1.05rem;
  position: relative;
}
.page-hero .gold-rule { margin: 1.25rem auto; }

/* === SECTIONS === */
.section { padding: 5rem 0; }
.section-light { background: var(--light); }
.section-navy { background: var(--navy); }
.section-navy-dk { background: var(--navy-dk); }

.section-navy h2,
.section-navy h3,
.section-navy h4 { color: var(--white); }
.section-navy p,
.section-navy li { color: rgba(255,255,255,0.75); }
.section-navy .eyebrow { color: var(--gold); }

.section-header { margin-bottom: 3rem; }
.section-header.center { text-align: center; }

/* === CARDS === */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .card-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  transition: box-shadow var(--ease);
}
.card:hover { box-shadow: 0 8px 32px rgba(11,30,59,0.1); }
.card-accent { border-left: 4px solid var(--gold); }
.card h3 { margin-bottom: 0.5rem; }
.card-icon { font-size: 2.25rem; margin-bottom: 1rem; }

/* === TWO-COL LAYOUT === */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 768px) {
  .two-col { grid-template-columns: 1fr 1fr; }
  .two-col.reverse .two-col-media { order: 2; }
}
.two-col-media {
  background: var(--light);
  border-radius: 8px;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.two-col-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === CTA BANNER === */
.cta-banner {
  background: var(--navy);
  padding: 5rem 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 0.75rem; }
.cta-banner p {
  color: rgba(255,255,255,0.7);
  max-width: 540px;
  margin: 0 auto 2rem;
}

/* === SCRIPTURE BLOCK === */
.scripture-block {
  background: var(--navy-dk);
  padding: 4rem 0;
  text-align: center;
}
.scripture-block blockquote {
  font-family: var(--ff-display);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-style: italic;
  color: rgba(255,255,255,0.88);
  max-width: 700px;
  margin: 0 auto 1rem;
  line-height: 1.5;
}
.scripture-block cite {
  font-family: var(--ff-label);
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  font-style: normal;
}

/* === ABOUT PAGE === */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) { .bio-grid { grid-template-columns: repeat(2, 1fr); } }

.bio-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-bottom: 4px solid var(--gold);
}
.bio-initials {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--ff-display);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}
.bio-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
  display: block;
  margin: 0 auto 1.25rem;
  background: var(--navy);
}
.bio-card h3 { margin-bottom: 0.25rem; }
.bio-card .bio-title {
  font-size: 0.82rem;
  color: var(--blue);
  font-family: var(--ff-label);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: block;
}
.bio-card p { font-size: 0.95rem; color: #555; }

/* === CONTACT PAGE === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1.2fr 1fr; } }

.info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.5rem;
  background: var(--light);
  border-radius: var(--radius);
  border-left: 4px solid var(--gold);
  margin-bottom: 1rem;
}
.info-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1.4; }
.info-text strong { display: block; font-family: var(--ff-label); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.25rem; }
.info-text a { color: var(--charcoal); }
.info-text a:hover { color: var(--gold); }

.consult-card {
  background: var(--navy);
  border-radius: 8px;
  padding: 2.5rem;
  text-align: center;
  position: sticky;
  top: 100px;
}
.consult-card h3 { color: var(--white); margin-bottom: 0.75rem; }
.consult-card p { color: rgba(255,255,255,0.7); margin-bottom: 1.75rem; font-size: 0.95rem; }
.consult-card .btn { width: 100%; display: block; }

/* === PROSE (blog posts, inner copy) === */
.prose {
  max-width: 760px;
  margin: 0 auto;
}
.prose h2 { margin: 2.75rem 0 1rem; }
.prose h3 { margin: 2rem 0 0.75rem; color: var(--blue); }
.prose p { color: #444; margin-bottom: 1.25rem; }
.prose ul,
.prose ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.prose li { margin-bottom: 0.6rem; color: #444; }
.prose blockquote {
  border-left: 4px solid var(--gold);
  padding: 1.25rem 1.75rem;
  margin: 2.5rem 0;
  background: var(--light);
  font-family: var(--ff-display);
  font-style: italic;
  color: var(--navy);
  font-size: 1.1rem;
  line-height: 1.6;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.prose .verse-ref {
  display: block;
  font-family: var(--ff-label);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.75rem;
}

/* === BLOG INDEX === */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--ease), transform var(--ease);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  box-shadow: 0 10px 36px rgba(11,30,59,0.12);
  transform: translateY(-3px);
}
.blog-card-band {
  height: 6px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 100%);
}
.blog-card-body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.blog-card-body h3 { font-size: 1.05rem; margin-bottom: 0.6rem; line-height: 1.35; }
.blog-card-body p { font-size: 0.9rem; color: var(--gray); flex: 1; margin-bottom: 1.25rem; }
.read-more {
  display: inline-block;
  font-family: var(--ff-label);
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: auto;
}
.read-more:hover { color: var(--navy); }
.read-more::after { content: ' →'; }

/* === POST HEADER === */
.post-header {
  background: var(--navy);
  padding: 7.5rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.post-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(52,152,219,0.15) 0%, transparent 65%);
  pointer-events: none;
}
.post-header h1 { color: var(--white); max-width: 800px; margin: 0 auto; position: relative; }
.post-header .eyebrow { color: var(--gold); }
.post-header .gold-rule { margin: 1.25rem auto; }
.post-meta {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  margin-top: 1.5rem;
  font-family: var(--ff-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
}

/* Post CTA inline */
.post-cta-inline {
  background: var(--light);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 3rem 0;
  text-align: center;
}
.post-cta-inline h4 { margin-bottom: 0.5rem; }
.post-cta-inline p { color: var(--gray); font-size: 0.95rem; margin-bottom: 1.25rem; }

/* === FOOTER === */
#kb-footer {
  background: var(--navy-dk);
  color: rgba(255,255,255,0.55);
  padding: 4rem 0 1.5rem;
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; } }

#kb-footer .footer-brand img {
  height: 44px;
  mix-blend-mode: screen;
  margin-bottom: 0.75rem;
}
#kb-footer .footer-brand-name {
  font-family: var(--ff-display);
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
#kb-footer p { color: rgba(255,255,255,0.5); font-size: 0.85rem; }
#kb-footer h5 {
  font-family: var(--ff-label);
  font-weight: 900;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
#kb-footer ul { list-style: none; }
#kb-footer ul li { margin-bottom: 0.6rem; }
#kb-footer a { color: rgba(255,255,255,0.55); }
#kb-footer a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.45); }
.footer-bottom a:hover { color: var(--gold); }

/* === EXIT POPUP === */
#kb-exit-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(6,18,42,0.87);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
#kb-exit-popup.active { display: flex; }
.popup-box {
  background: var(--white);
  border-radius: 8px;
  padding: 3rem 2.5rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  position: relative;
  border-top: 6px solid var(--gold);
  animation: popupIn 0.28s ease;
}
@keyframes popupIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.popup-close {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--gray);
  background: none;
  border: none;
  font-family: var(--ff-body);
}
.popup-close:hover { color: var(--charcoal); }
.popup-box .eyebrow { color: var(--gold); }
.popup-box h2 { font-size: 1.65rem; margin: 0.5rem 0 0.75rem; color: var(--navy); }
.popup-box p { color: var(--gray); font-size: 0.95rem; margin-bottom: 1.75rem; }
.popup-box .btn { width: 100%; }

/* === UTILITIES === */
.text-center { text-align: center; }
.text-gold  { color: var(--gold); }
.text-blue  { color: var(--blue); }
.text-white { color: var(--white); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }

/* === ACCESSIBILITY === */
:focus-visible {
  outline: 2px dashed var(--gold);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ====== FOOTER SOCIAL ICONS ====== */
.footer-social-row {
  display: flex;
  gap: 0.85rem;
  margin-top: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}
.footer-social-link {
  color: rgba(255,255,255,0.45);
  transition: color var(--ease);
  display: inline-flex;
  align-items: center;
}
.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.footer-social-link:hover { color: var(--gold); }
/* ================================= */


/* === MOBILE READABILITY ROOT SCALE (added 2026-06-29) ===
   All body text uses rem (37 of 38 font rules). Raising the ROOT font-size
   on mobile scales every text element by the SAME percentage -> hierarchy/ratio
   preserved exactly. Default 18px = +12.5% (browser default is 16px).
   To dial up: change 18px to 19px (+18.75%) or 20px (+25%). Change ONE number. */
@media (max-width: 600px) {
  html { font-size: 18px; }
}


/* === MOBILE NAV OPEN FIX (2026-06-29) ===
   JS toggles `.open` on .nav-links, but CSS only styled `.nav-open` (a parent class
   that the JS never set). Result: hamburger fired but nothing displayed on ALL pages.
   This rule binds the class the JS actually sets, so the menu drops on tap. */
.nav-links.open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--navy);
  padding: 1.5rem 1.25rem 2rem;
  gap: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  z-index: 1001;
}
.nav-links.open .dropdown-menu {
  display: block;
  position: static;
  box-shadow: none;
  border-top: none;
  border-left: 2px solid var(--gold);
  margin-top: 0.75rem;
  padding-left: 0.75rem;
}
/* safety: if .open lingers on desktop, do not break the row layout */
@media (min-width: 860px) {
  .nav-links.open {
    position: static;
    flex-direction: row;
    padding: 0;
    background: transparent;
    box-shadow: none;
  }
}


/* ==================================================================
   ANDROID / SAMSUNG CORRECTION LAYER  (added 2026-07-18)
   Appended last so it wins the cascade. Nothing above is deleted.
   ================================================================== */

:root { --kb-header-h: 96px; }   /* JS overwrites with the measured value */

/* ---- 1. ANNOUNCEMENT BAR: stop it eating the hero on narrow screens ---- */
@media (max-width: 700px) {
  #kb-announce {
    padding: 0.45rem 0.6rem !important;
    font-size: 0.66rem !important;
    letter-spacing: 0.03em !important;
    line-height: 1.35 !important;
  }
  #kb-announce a { text-underline-offset: 2px; }
}
@media (max-width: 420px) {
  #kb-announce { font-size: 0.6rem !important; padding: 0.4rem 0.5rem !important; }
}

/* ---- 2. HOME HERO: svh + measured header offset ---- */
/* 100vh on Android = viewport WITH the URL bar collapsed, which is taller
   than what is actually visible. Content gets pushed below the fold.
   100svh = the small (URL-bar-visible) viewport. This is the Samsung fix. */
.home-hero {
  min-height: 100vh;                                   /* fallback */
  min-height: 100svh;
  padding-top: calc(var(--kb-header-h) + 1.5rem) !important;
  padding-bottom: 3rem !important;
}
@media (max-width: 700px) {
  .home-hero {
    min-height: auto;
    padding-top: calc(var(--kb-header-h) + 1rem) !important;
    padding-bottom: 3rem !important;
  }
  .home-hero .hero-sub { margin-bottom: 1.5rem; }
  .scroll-hint { bottom: 0.75rem; opacity: 0.6; }
}

/* ---- 3. HERO VIDEO: crop behaviour on tall Android screens ---- */
/* object-fit is GPU compositing only — same bytes, zero load-speed cost
   whichever you pick. DEFAULT below = cover (zoomed in, fills the hero,
   no letterbox bars). The heavy navy overlay hides the edge crop.
   TO SEE THE WHOLE 16:9 FRAME INSTEAD: change 'cover' to 'contain' on the
   line marked <<< SWITCH. The navy letterbox matches the background. */
.hero-bg-video { object-position: center center; }
@media (max-width: 700px) and (orientation: portrait) {
  .hero-bg-video { object-fit: cover !important; background: var(--navy); } /* <<< SWITCH: cover | contain */
}

/* ---- 4. HERO CTAs: stacked full-width on mobile, row on tablet up ---- */
.hero-actions { display: flex; gap: 0.85rem; justify-content: center; }
@media (max-width: 600px) {
  .hero-actions { flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; margin: 0 auto; }
  .hero-actions .btn { width: 100%; min-height: 52px; display: inline-flex; align-items: center; justify-content: center; }
}
@media (min-width: 601px) { .hero-actions { flex-direction: row; flex-wrap: wrap; } }

/* ---- 5. MOBILE MENU: smaller type, bigger tap targets ---- */
@media (max-width: 859px) {
  .nav-logo img { height: 42px; }
  #kb-nav { padding: 0.4rem 0; }

  .nav-toggle { padding: 12px 10px; min-width: 48px; min-height: 48px; align-items: center; justify-content: center; }

  .nav-links.open, .nav-open .nav-links {
    gap: 0 !important;
    padding: 0.5rem 0 1rem !important;
    max-height: calc(100vh - var(--kb-header-h));
    max-height: calc(100svh - var(--kb-header-h));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.open > li, .nav-open .nav-links > li { width: 100%; }
  .nav-links.open > li > a, .nav-open .nav-links > li > a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;              /* WCAG 2.1 AA target size */
    padding: 0.7rem 1.25rem;
    font-size: 0.72rem;            /* smaller type, larger hit box */
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links.open .dropdown-menu li a, .nav-open .nav-links .dropdown-menu li a {
    display: flex; align-items: center; min-height: 44px; padding: 0.55rem 1rem;
  }
  .nav-links.open .nav-cta, .nav-open .nav-links .nav-cta { padding: 1rem 1.25rem 0; }
  .nav-links.open .nav-cta a, .nav-open .nav-links .nav-cta a {
    width: 100%; min-height: 50px; border-bottom: none;
    justify-content: center; font-size: 0.75rem;
  }
}

/* ---- 6. EXIT POPUP: one canonical mobile treatment on every page ---- */
#kb-exit-popup { padding: 1.25rem !important; }
.popup-box {
  max-width: 460px !important;
  width: 100% !important;
  max-height: 85vh;
  max-height: 85svh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 600px) {
  .popup-box { padding: 2.25rem 1.35rem 1.75rem !important; border-radius: 10px; }
  .popup-box h2 { font-size: 1.35rem !important; line-height: 1.25; margin: 0.4rem 0 0.6rem !important; }
  .popup-box p  { font-size: 0.88rem !important; line-height: 1.55; margin-bottom: 1.25rem !important; }
  .popup-box .eyebrow { font-size: 0.62rem; letter-spacing: 0.14em; }
  .popup-box .btn { width: 100%; min-height: 50px; display: inline-flex; align-items: center; justify-content: center; }
  .popup-close { top: 0.4rem !important; right: 0.6rem !important; min-width: 44px; min-height: 44px; font-size: 1.5rem !important; }
}

/* ---- 7. GLOBAL: kill horizontal scroll from fixed header at width:100% ---- */
/* overflow:clip does NOT create a scroll container, so it cannot break the
   scroll-behavior:smooth on <html> or any position:sticky descendant.
   overflow:hidden is the fallback for older engines. */
html { overflow-x: hidden; overflow-x: clip; }
body { overflow-x: hidden; overflow-x: clip; max-width: 100%; }
img, video, svg, iframe { max-width: 100%; }
