/* =========================================================
   ROOT VARIABLES
   ========================================================= */

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --accent: #005fa3;

  --gold: #d0b25a;
  --blue: #3850ca;
  --footer-bg: #a85b31;

  /* Design cap. JS may lower this at runtime so the hero image
     never has to stretch wider than it can support. */
  --max-width: 1440px;

  /* Fallback hero height before JS runs */

  --header-height: 60px;
  --footer-height: 60px;
  --footer-min-height: 171px;
  --hero-height: min(600px, calc(100vh - var(--header-height)));

  --illegal-pad-percent-real: 0%;
  --hero-h1-size: 2.4rem;
}

/* =========================================================
   GLOBAL RESET
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--header-height);
  overscroll-behavior-y: contain;
  font-family: "Alegreya Sans", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

h1, h2, h3, h4 {
  font-family: "Merriweather", serif;
}

a {
  text-decoration: none;
  color: inherit;
}

/* =========================================================
   SCROLL SNAP
   ========================================================= */

/* Top-aligned snaps for content blocks */
.hero,
.section {
  scroll-snap-align: start;
}

/* Final snap: bottom of footer aligned to bottom of viewport */
.site-footer {
  scroll-snap-align: end;
}
/* =========================================================
   HEADER
   ========================================================= */

.site-header {
  height: var(--header-height);  
  width: 100%;
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 9999;

  /* animation hook */
  transform: translateY(0);
  transition: transform 0.3s ease;
}

/* when footer is visible (JS adds this) */
.site-header.site-header--hidden {
  transform: translateY(-186%);
}

/* main header layout */
.site-header-inner {
  width: min(100%, var(--max-width));
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  display: flex;
  position: relative;          /* so header-logo can be absolutely positioned */
}

.header-logo {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(2 * var(--header-height));
  height: calc(2 * var(--header-height));

  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  text-decoration: none;
  z-index: 10000;
}

.header-logo img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

/* the white bar that holds the nav */
.header-bar {
  height: var(--header-height);       
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 24px;
}

/* Navigation (unchanged visual style) */
.main-nav {
  display: flex;
  gap: 32px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.main-nav a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--accent);
}


/* =========================================================
   HERO SECTIONS
   ========================================================= */

.hero {
  position: relative;
  height: var(--hero-height);  /* JS overrides with inline height */
  width: min(100%, var(--max-width));
  max-width: var(--max-width);
  margin: 0 auto;
  background-repeat: no-repeat;
  background-size: auto 100%;
  background-position: top left;
}

.hero:nth-of-type(1) {
  background-image: url("../Assets/topdownBibleStudy.webp");
}

.hero-alt {
  background-image: url("../Assets/huggingLaughingJoyUgandaChildren.webp");
  background-position: top right;
}

.hero-third {
  background-image: url("../Assets/teachingUgandakids.webp");
  scroll-margin-top: calc(-1 * var(--header-height)); /* cancels the global scroll-padding-top */
}

/* =========================================================
   HERO CONTENT
   ========================================================= */

.hero-content {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: var(--illegal-pad-percent-real);

  max-width: 520px;

  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-right: 30px;
}

.hero-content h1 {
  font-size: var(--hero-h1-size);
  font-weight: 400;
  color: #ffffff;
  line-height: 1.3;
}

/* =========================================================
   GLOBAL BUTTON STYLING
   ========================================================= */

button {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  outline: none;

  background: var(--blue);
  color: #ffffff;

  padding: 12px 16px;
  border-radius: 8px;

  font-size: 1.05rem;
  font-family: "Alegreya Sans", sans-serif;
  font-weight: 500;

  cursor: pointer;
  width: auto; /* forms may override this if needed */
  display: inline-block;
  text-align: center;

  transition: opacity 0.2s ease;
}

button:hover {
  opacity: 0.85;
}

button:focus,
button:active {
  outline: none;
  box-shadow: none;
}

/* =========================================================
   SECTIONS
   ========================================================= */

.section {
  min-height: var(--hero-height);
  padding: 60px 0;                             /* vertical padding only */
  width: min(100%, var(--max-width));         /* same width logic as .hero */
  max-width: var(--max-width);
  margin: 0 auto;                             /* center the section like .hero */
  display: flex;
  align-items: center;
}


.section:last-of-type {
  min-height: max(
    var(--hero-height),
    calc(100vh - var(--header-height) - var(--footer-min-height))
  );
}

.section-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 20px;
}

.section-body {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.5;
}

.section-quote {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--muted);
  text-align: center;
  font-weight: 500;
  line-height: 1.6;
}

.section-quote-ref {
  margin-top: 8px;
  font-size: 1rem;
  color: var(--muted);
}

.link {
  color: var(--blue);
  text-decoration: underline;
}

/* =========================================================
   CONTACT FORM
   ========================================================= */

.contact-section {
  padding-top: 80px;
  margin-bottom: 60px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.contact-text .section-body {
  max-width: 560px;
  line-height: 1.6;
}

.contact-form {
  background: #f7f3ea;
  padding: 24px;
  border-radius: 12px;

  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #ddd;
  padding: 14px 16px;
  font-size: 1rem;
  border-radius: 6px;
  font-family: "Alegreya Sans", sans-serif;
  transition: border 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--blue);
  outline: none;
}

.contact-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px 0;
  cursor: pointer;
}

@media (max-width: 820px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  width: 100%;
  background: var(--footer-bg);
  color: #ffffff;
  position: relative;
  height: var(--footer-height);    /* bar height only */
}

/* inner content aligned to site width */
.site-footer-inner {
  position: relative;
  width: min(100%, var(--max-width));
  max-width: var(--max-width);
  height: 100%;    
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.footer-logo {
  position: absolute;
  left: 0;
  bottom: 0;             
  width: calc(2 * var(--footer-height));
  height: calc(2 * var(--footer-height));
  background: var(--footer-bg);
  border-top-right-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none; 
}

.footer-logo img {
  width: 70%;
  height: 70%;
  opacity: 0.8;
}

.footer-bar {
  flex: 1;
  height: 100%;    
  display: flex;
  align-items: center;
  justify-content: space-between;

  /* leave space so text doesn't run under the logo */
  padding: 0 24px 0 calc(2 * var(--footer-height)); 
}

/* left-side copy */
.footer-copy {
  font-size: 0.85rem;
  opacity: 0.9;
  white-space: nowrap;
}

/* right-side nav */
.footer-nav {
  display: flex;
  gap: 16px;
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
}

.footer-nav a {
  color: #ffffff;
}

.footer-nav a:hover {
  opacity: 0.75;
}

/* separators */
.separator {
  position: relative;
  top: -2px;
  color: #ffffff;
}

/* Footer reveal animation */

.site-footer {
  /* you already have width/background etc. keep those */
  transition: transform 0.4s ease;
}

/* JS will add this when using the animated behavior */
body.footer-anim-init .site-footer {
  transform: translateY(100%);
  opacity: 0;
}

/* Footer fully visible */
body.footer-show-footer .site-footer {
  transform: translateY(0);
  opacity: 1;
}


/* =========================================================
   DEBUG BOX
   ========================================================= */

#hero-debug { 
  display: none !important;
  position: fixed;
  bottom: 20px;
  left: 20px;
       background: rgba(0,0,0,0.85);
       color: #fff;
       padding: 20px 26px;
       font-size: 14px;
       line-height: 1.45;
       border-radius: 10px;
       z-index: 99999;
       white-space: pre-line;
       pointer-events: none; 
} 

