/* ============================================================
   Global Reset & Base
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  color: #111;
  background: #F9F9F9;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  zoom: 1.125;
}

/* ============================================================
   Layout Utilities
   2.5in side margins (240px) rendered; 384px pre-zoom
   ============================================================ */
.wrap {
  max-width: calc(100% - 160px);
  margin: 0 auto;
  padding: 0 32px;
  box-sizing: border-box;
}

.two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 72px;
  align-items: center;
}

/* ============================================================
   Navigation
   ============================================================ */
.nav-shell {
  position: relative;
  z-index: 70;
  max-width: calc(100% - 160px);
  margin: 0 auto;
  padding: 16px 32px 0;
  box-sizing: border-box;
}

.nav {
  position: relative;
  z-index: 65;
  background: rgba(250, 250, 250, 0.68);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  border-radius: 999px;
  min-height: 52px;
  padding: 6px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 500 18px 'Inter', sans-serif;
}

.nav > *:not(.nav-links) {
  flex-shrink: 0;
}

.nav-links {
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.menu-shelf.overflow {
  /* Marker class added by JS when nav items overflow into the shelf.
     The shelf itself is shown/hidden via the .open class on toggle click. */
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  white-space: nowrap;
  color: #111;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
}

.nav-links a svg {
  width: 14px;
  height: 14px;
}

/* Dropdown navigation */
.nav-links a.has-dropdown {
  position: relative;
  padding-right: 32px;
}

.nav-links a.has-dropdown::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #111;
  transition: transform 0.2s ease;
}

.nav-links a.has-dropdown:hover::after {
  transform: translateY(-50%) rotate(180deg);
}

.nav-links .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: #fff;
  border: 1px solid #E5E5EA;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  padding: 8px;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 100;
}

.nav-links a.has-dropdown:hover .dropdown-menu,
.nav-links a.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-links .dropdown-menu a {
  display: block;
  padding: 12px 16px;
  border-radius: 12px;
  font: 400 15px 'Inter', sans-serif;
  white-space: nowrap;
  color: #111;
  text-decoration: none;
}

.nav-links .dropdown-menu a:hover {
  background: #F0F0F2;
  color: #111;
}

.nav-logo {
  width: auto;
  height: 50px;
  border: none;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font: 700 15px 'Inter', sans-serif;
  color: #111;
  text-decoration: none;
  margin-right: auto;
}

.nav-logo img {
  height: 100%;
  width: auto;
  display: block;
}

.menu-toggle {
  display: none;
  margin-left: 12px;
  border: 1px solid #111;
  border-radius: 999px;
  padding: 6px 16px;
  background: transparent;
  font: 500 15px 'Inter', sans-serif;
  color: #111;
  cursor: pointer;
}

.menu-toggle.open {
  background: #111;
  color: #FAFAFA;
}

.menu-shelf {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  justify-content: center;
  background: rgba(250, 250, 250, 0.95);
  padding: 40px 32px;
}

.menu-shelf.open {
  display: flex;
}

.menu-shelf.overflow {
  /* State class: added by JS when nav items overflow into shelf.
     The .open class controls visibility; .overflow is a marker for
     any overflow-aware styling. */
}

.menu-shelf a {
  display: block;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  color: #111;
  text-decoration: none;
  font: 500 18px 'Inter', sans-serif;
}

.menu-shelf a:last-child {
  border-bottom: none;
}

.nav-donate {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #111;
  color: #FAFAFA;
  text-decoration: none;
  font: 500 16px 'Inter', sans-serif;
}

.nav-donate svg {
  width: 14px;
  height: 14px;
}

.nav-donate:hover {
  background: #FAFAFA;
  color: #111;
}

.nav-donate:hover svg path {
  fill: #111;
}

/* ============================================================
   Typography
   ============================================================ */
h1 {
  font: 800 clamp(44px, 7vw, 92px) / 1 'Inter', sans-serif;
  letter-spacing: -0.04em;
  margin: 0;
  max-width: 980px;
  color: #111;
}

.h2 {
  font: 700 clamp(38px, 4.6vw, 60px) / 1.04 'Inter', sans-serif;
  letter-spacing: -0.035em;
  margin: 12px 0 0;
  color: #111;
}

.kick {
  font: 500 13px 'Inter', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #55555C;
}

.p {
  font: 300 19px / 1.75 'Inter', sans-serif;
  margin: 22px 0 0;
  color: #26262A;
}

.more {
  font: 700 19px 'Inter', sans-serif;
  text-transform: uppercase;
  color: #111;
  text-decoration: none;
}

/* ============================================================
   Buttons
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid #111;
  border-radius: 999px;
  font: 300 17px 'Inter', sans-serif;
  text-transform: uppercase;
  color: #111;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill:hover {
  background: #111 !important;
  color: #FAFAFA !important;
  border-color: #111 !important;
}

.pill.pillf {
  color: #FAFAFA;
  background: #111;
}

.pill.pillf:hover {
  background: #FAFAFA !important;
  color: #111 !important;
  border-color: #111 !important;
}

/* ============================================================
   Form Fields
   ============================================================ */
.fld {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: 500 13px 'Inter', sans-serif;
  color: #111;
}

.fld input,
.fld select {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid #A5A5AD;
  border-radius: 14px;
  background: #fff;
  font: 300 16px 'Inter', sans-serif;
  color: #111;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fld input:focus,
.fld select:focus {
  border-color: #111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1);
}

.fld input::placeholder {
  color: #A5A5AD;
}

/* ============================================================
   Placeholder Images
   ============================================================ */
.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
  padding: 16px;
  border: 1px dashed #A5A5AD;
  border-radius: 28px;
  background: #E9E9EC;
  color: #55555C;
  font: 500 12px 'Inter', sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.ph.sh {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}

/* ============================================================
   Layout Helpers
   ============================================================ */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* ============================================================
   Sections
   ============================================================ */
section {
  padding-top: 112px;
  padding-bottom: 112px;
}

/* Campaign, Book, Events sections */
#campaign,
#book,
#events {
  padding-top: 48px;
  padding-bottom: 104px;
}

#book .two {
  padding-top: 40px;
  padding-bottom: 112px;
}

/* Reserve Form Section */
#reserve {
  background: #fff;
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

#reserve > div:first-child {
  grid-column: 1 / -1;
  font: 700 32px 'Inter', sans-serif;
  letter-spacing: -0.03em;
}

/* About Section */
#about {
  background: #F0F0F2;
  padding: 112px 0;
}

#about .ph {
  height: 380px;
}

/* Fasting & Third Book Section */
#fasting {
  padding-top: 112px;
  padding-bottom: 112px;
}

#fasting .ph.sh {
  height: 300px;
}

/* Signup Section */
#signup {
  background: #F0F0F2;
  padding: 112px 0;
}

#signup form {
  background: #fff;
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  display: grid;
  gap: 20px;
}

/* Videos Section */
#videos {
  padding-top: 112px;
  padding-bottom: 112px;
}

#videos .ph {
  aspect-ratio: 16 / 9;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  background: #111;
  color: #C9C9CF;
  padding: 56px 0;
}

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

footer .wrap > div:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
}

footer .wrap > div:first-child span:first-child {
  width: 44px;
  height: 44px;
  border: 2px solid #FAFAFA;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 16px 'Inter', sans-serif;
  color: #FAFAFA;
}

footer .wrap > div:first-child span:last-child {
  font: 500 18px 'Inter', sans-serif;
  color: #FAFAFA;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 15px;
}

footer nav a {
  color: #C9C9CF;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer nav a:hover {
  color: #FAFAFA;
}

footer .copyright {
  font-size: 14px;
}

/* ============================================================
   Background Sections
   ============================================================ */
.bg-light {
  background: #F0F0F2;
}

/* ============================================================
   Video Thumbnails
   ============================================================ */
.video-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background-color: #E9E9EC;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.14);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  width: 100%;
  max-width: 1200px;
}

.video-card::after {
  content: '';
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 12px solid #fff;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.2s ease;
}

.video-card:hover::after {
  transform: scale(1.2);
}

.video-card iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   Responsive Adjustments
   ============================================================ */

/* Tablets */
@media (max-width: 1024px) {
  body {
    zoom: 1;
  }

  .wrap,
  .nav-shell {
    max-width: calc(100% - 80px);
    padding: 0 24px;
  }

  .nav {
    padding: 6px 16px;
    font-size: 17px;
    gap: 6px;
  }

  .nav-links {
    gap: 10px;
  }

  section {
    padding-top: 88px !important;
    padding-bottom: 88px !important;
  }

  #campaign,
  #book,
  #events {
    padding-top: 40px !important;
    padding-bottom: 80px !important;
  }

  .two {
    gap: 48px;
  }

  .pill {
    min-height: 48px;
    padding: 0 24px;
    font-size: 16px;
  }

  .ph.sh {
    height: 340px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  body {
    zoom: 1;
  }

  .wrap,
  .nav-shell {
    max-width: 100%;
    padding: 0 20px;
  }

  .nav-shell {
    padding: 16px 20px 0;
  }

  .nav {
    padding: 6px 16px;
    font-size: 16px;
  }

  .nav a[aria-label="Samuel Macharia home"] {
    height: 36px;
    width: auto;
    font-size: 13px;
  }

  section {
    padding-top: 80px !important;
    padding-bottom: 80px !important;
  }

  #campaign,
  #book,
  #events {
    padding-top: 40px !important;
    padding-bottom: 80px !important;
  }

  .pill {
    min-height: 48px;
    padding: 0 20px;
    font-size: 15px;
  }

  .ph.sh {
    height: 360px;
  }

  #about .ph {
    height: 280px;
  }

  #fasting .ph.sh {
    height: 240px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .nav {
    border-radius: 16px;
    min-height: auto;
    padding: 8px 16px;
  }

  .nav-logo {
    height: 48px;
  }

  .menu-toggle {
    padding: 6px 12px;
    font-size: 13px;
  }

  .nav-donate {
    padding: 8px 12px;
    font-size: 14px;
  }

  h1 {
    font-size: clamp(36px, 10vw, 56px);
  }

  .h2 {
    font-size: clamp(32px, 8vw, 44px);
  }

  .kick {
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .p {
    font-size: 17px;
    line-height: 1.6;
    margin-top: 18px;
  }

  .more {
    font-size: 17px;
  }

  .pill {
    min-height: 48px;
    padding: 0 16px;
    font-size: 15px;
  }

  .fld input,
  .fld select {
    min-height: 48px;
    font-size: 16px;
  }

  .ph.sh {
    height: 320px;
  }

  #about .ph {
    height: 240px;
  }

  #fasting .ph.sh {
    height: 200px;
  }

  footer {
    padding: 40px 0;
  }

  footer .wrap {
    flex-direction: column;
    text-align: center;
    gap: 24px;
  }

  footer nav {
    justify-content: center;
  }
}

/* Ensure images never overflow their containers */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   Secure donation modal
   ============================================================ */
.donate-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'SF Pro Display', sans-serif;
}

.donate-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
}

.donate-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 28px;
  padding: 40px 32px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
  color: #111;
  box-sizing: border-box;
}

.donate-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.donate-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.donate-modal-header h2 {
  margin: 0;
  font: 700 22px/1.2 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

.donate-modal-icon {
  width: 24px;
  height: 24px;
  border-radius: 8px;
}

.donate-toggle-group {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.donate-toggle {
  flex: 1;
  border: 1px solid #A5A5AD;
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  color: #111;
  font: 500 16px/1.2 'Inter', sans-serif;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.donate-toggle:hover {
  border-color: #111;
}

.donate-toggle.donate-toggle-active {
  border-color: #4A90E2;
  background: #EEF4FF;
  color: #111;
}

.donate-amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.donate-amount-btn {
  border: 1px solid #A5A5AD;
  border-radius: 14px;
  padding: 14px 8px;
  background: #fff;
  color: #111;
  font: 500 18px/1.2 'Inter', sans-serif;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.donate-amount-btn:hover {
  border-color: #111;
}

.donate-amount-btn.selected {
  border-color: #4A90E2;
  background: #EEF4FF;
  color: #111;
}

.donate-custom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  border: 1px solid #A5A5AD;
  border-radius: 14px;
  padding: 10px 16px;
  background: #fff;
}

.donate-custom-row.focused {
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

.donate-custom-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: #111;
  font: 400 18px/1.2 'Inter', sans-serif;
  min-width: 0;
}

.donate-custom-input::placeholder {
  color: #A5A5AD;
}

.donate-currency {
  border: none;
  outline: none;
  background: transparent;
  color: #111;
  font: 500 15px/1.2 'Inter', sans-serif;
  padding-right: 16px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23111' d='M3 5.5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
}

.donate-dedicate {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font: 400 16px/1.4 'Inter', sans-serif;
  color: #111;
  cursor: pointer;
}

.donate-dedicate input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #111;
}

.donate-comment {
  margin-bottom: 32px;
}

.donate-comment label {
  display: block;
  font: 500 16px/1.4 'Inter', sans-serif;
  color: #111;
  margin-bottom: 10px;
  text-decoration: underline;
  text-decoration-color: #111;
  cursor: text;
}

.donate-comment-input {
  width: 100%;
  min-height: 64px;
  padding: 14px 16px;
  border: 1px solid #E5E5EA;
  border-radius: 14px;
  background: #F0F0F2;
  color: #111;
  font: 300 16px/1.5 'Inter', sans-serif;
  resize: vertical;
  outline: none;
}

.donate-submit {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 16px;
  background: #4A90E2;
  color: #fff;
  font: 600 18px/1.2 'Inter', sans-serif;
  cursor: pointer;
  margin-bottom: 24px;
}

.donate-submit:hover {
  filter: brightness(0.95);
}

.donate-submit:active {
  filter: brightness(0.9);
}

.donate-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.donate-footer a {
  font: 400 14px/1.4 'Inter', sans-serif;
  color: #111;
  text-decoration: none;
  text-align: center;
}

.donate-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .donate-modal-card {
    padding: 32px 20px 24px;
    border-radius: 24px;
  }

  .donate-amount-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .donate-amount-btn {
    padding: 12px 6px;
    font-size: 16px;
  }
}