/* =========================================================
   Ooty Central Open Bible Church of God
   Design tokens
   Palette drawn from the Nilgiri hills that surround Ooty:
   deep navy (from the church mark), mist cream, tea-estate
   green, and a brass/candlelight gold used only for emphasis.
   ========================================================= */

:root {
  --navy-900: #0f2338;
  --navy-800: #16314c;
  --navy-700: #1b3a5c;
  --navy-600: #2a4e73;
  --navy-600-80: #2a4e7380;
  --cream:    #f6f3ec;
  --paper:    #ffffff;
  --tea-700:  #3f5c43;
  --tea-600:  #526f55;
  --tea-100:  #e4ebe1;
  --gold-600: #b1872e;
  --gold-100: #f1e6c9;
  --text:       #232b34;
  --text-muted: #5b6672;
  --text-inverse: #f3f1ea;
  --text-inverse-muted: #b9c4d1;
  --rule: #dcd6c7;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --font-label: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --container: 1120px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--tea-700); text-decoration-color: rgba(63,92,67,0.35); text-underline-offset: 3px; }
a:hover { color: var(--tea-600); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-800);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tea-700);
  margin-bottom: 0.9em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--gold-600);
}

.lede {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 62ch;
}

/* -----------------------------------------------------------
   Skip link (accessibility)
----------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy-900);
  color: var(--text-inverse);
  padding: 12px 18px;
  z-index: 200;
  border-radius: var(--radius);
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* -----------------------------------------------------------
   Header / Nav
----------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 243, 236, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--navy-800);
}
.brand img { height: 44px; width: auto; }
.brand-text {
  font-family: var(--font-display);
  line-height: 1.15;
}
.brand-text .line1 {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy-800);
}
.brand-text .line2 {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy-800);
}
.brand-text .line3 {
  display: block;
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tea-700);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  font-family: var(--font-label);
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--navy-700);
  text-decoration: none;
  border-radius: var(--radius);
}
.nav-links a:hover { background: var(--tea-100); color: var(--tea-700); }
.nav-links a.active {
  color: var(--tea-700);
  box-shadow: inset 0 -2px 0 var(--gold-600);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--navy-700);
  border-radius: var(--radius);
  padding: 8px 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy-700);
  margin: 4px 0;
}

/* -----------------------------------------------------------
   Ridge divider — the signature motif.
   A thin layered mountain-ridge line used wherever the page
   needs to change register (hero to content, section to
   section). It stands in for the Nilgiri skyline that frames
   Ooty, without illustrating it literally.
----------------------------------------------------------- */
.ridge {
  display: block;
  width: 100%;
  height: 46px;
}
.ridge--hero-navy { color: var(--navy-900); }
.ridge--to-cream { color: var(--cream); }
.ridge-divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 3.2em 0;
  color: var(--gold-600);
}
.ridge-divider svg { flex: none; width: 96px; height: 16px; }
.ridge-divider .line { flex: 1; height: 1px; background: var(--rule); }

/* -----------------------------------------------------------
   Hero (page-top band, navy)
----------------------------------------------------------- */
.hero {
  position: relative;
  /*background: linear-gradient(155deg, var(--navy-900) 0%, var(--navy-700) 62%, var(--navy-600) 100%);*/
  background-image: url("../images/home-banner-bg.png");
  color: var(--text);
  padding: 76px 0 0;
  overflow: hidden;
}
.hero .container { position: relative; z-index: 2; padding-bottom: 88px; }

.hero-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--text-inverse);
  border-radius: 999px;
  padding: 14px;
  width: 84px;
  height: 84px;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.hero-mark img { width: 100%; height: 100%; object-fit: contain; }

.hero h1 {
  color: var(--text);
  font-size: clamp(2.1rem, 1.5rem + 2.6vw, 3.4rem);
  max-width: 30ch;
  margin-bottom: 0.4em;
  text-shadow: 2px 2px 4px rgb(247, 243, 243);
}
.hero .verse {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--navy-800);
  max-width: 100ch;
  margin-bottom: 1.1em;
  text-shadow: 2px 2px 4px rgb(195, 195, 195);
}
.hero .verse cite {
  display: block;
  font-style: normal;
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 0.5em;
  text-shadow: 2px 2px 4px rgb(247, 243, 243);
}
.hero p.lede { 
  color: var(--text-inverse); 
  max-width: 100ch;
  background-color: var(--navy-600-80);
  padding:10px;
  border-radius: 10px;
 }

.hero--page { padding-bottom: 0; }
.hero--page .container { padding-bottom: 64px; padding-top: 8px;}
.hero--page h1 { max-width: 22ch; }

.hero-ridge-wrap { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; z-index: 1; }

/* -----------------------------------------------------------
   Buttons
----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 13px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--gold-600);
  color: var(--navy-900);
}
.btn-primary:hover { background: #c79a3d; color: var(--navy-900); }
.btn-ghost {
  background: transparent;
  border-color: rgba(243,241,234,0.45);
  color: var(--text-inverse);
}
.btn-ghost:hover { background: rgba(243,241,234,0.1); color: var(--text-inverse); }
.btn-outline-navy {
  background: transparent;
  border-color: var(--navy-700);
  color: var(--navy-700);
}
.btn-outline-navy:hover { background: var(--navy-700); color: var(--text-inverse); }

.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* -----------------------------------------------------------
   Sections / layout
----------------------------------------------------------- */
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.section--tea { background: var(--tea-100); }
.section--paper { background: var(--paper); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px 30px;
}

/* Verse callout, used across pages */
.verse-card {
  position: relative;
  background: var(--navy-800);
  color: var(--text-inverse);
  padding: 34px 36px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
}
.verse-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--gold-600);
}
.verse-card cite {
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-100);
}

/* Vision pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.pillar {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--tea-700);
  border-radius: var(--radius);
  padding: 24px 26px;
}
.pillar h3 { margin-bottom: 0.4em; }
.pillar p { color: var(--text-muted); }

/* Schedule table */
.schedule-wrap {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
table.schedule {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}
table.schedule caption { display: none; }
table.schedule thead th {
  text-align: left;
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-inverse-muted);
  background: var(--navy-800);
  color: var(--text-inverse);
  padding: 14px 20px;
}
table.schedule tbody td {
  padding: 15px 20px;
  border-top: 1px solid var(--rule);
  vertical-align: top;
}
table.schedule tbody tr:nth-child(odd) { background: rgba(63,92,67,0.04); }
table.schedule td.time { color: var(--tea-700); font-weight: 600; white-space: nowrap; }
table.schedule td .day-label { display: none; }

/* Pastor profile */
.pastor {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 30px;
  align-items: start;
  padding: 8px 0 44px;
}
.pastor + .pastor { border-top: 1px solid var(--rule); padding-top: 44px; }
.pastor-avatar {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  background: var(--navy-800);
  border: 3px solid var(--gold-600);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
  font-family: var(--font-display);
  font-size: 2.4rem;
}
.pastor-role {
  font-family: var(--font-label);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tea-700);
  font-weight: 600;
  margin-bottom: 0.3em;
  display: block;
}
.pastor h3 { margin-bottom: 0.15em; }
.pastor p { color: var(--text-muted); }

/* Beliefs list */
.creed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.creed li {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.creed li:first-child { border-top: none; }
.creed .mark {
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--tea-100);
  color: var(--tea-700);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 0.92rem;
  margin-top: 2px;
}

/* Story / about layout */
.story-figure {
  background: var(--navy-800);
  border-radius: var(--radius);
  padding: 40px 34px;
  color: var(--text-inverse);
}
.story-figure .stat { font-family: var(--font-display); font-size: 3rem; color: var(--gold-100); line-height: 1; }
.story-figure .stat-label {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-inverse-muted);
  margin-top: 8px;
}
.story-figure hr { border: none; border-top: 1px solid rgba(243,241,234,0.15); margin: 26px 0; }

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.contact-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.contact-list .icon {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--tea-100);
  color: var(--tea-700);
  display: flex; align-items: center; justify-content: center;
}
.contact-list .label {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: block;
  margin-bottom: 2px;
}
.map-frame {
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 320px;
  background: var(--tea-100);
}
.map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }

.cta-band {
  background: var(--tea-700);
  color: var(--text-inverse);
  padding: 54px 0;
  text-align: center;
}
.cta-band h2 { color: var(--text-inverse); }
.cta-band p { color: rgba(243,241,234,0.85); max-width: 52ch; margin: 0 auto 24px; }

/* -----------------------------------------------------------
   Footer
----------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: var(--text-inverse-muted);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(243,241,234,0.12);
}
.footer-brand { display: flex; gap: 14px; align-items: flex-start; }
.footer-brand img { height: 46px; width: auto; }
.footer-brand .name { font-family: var(--font-display); color: var(--text-inverse); font-size: 1.05rem; margin-bottom: 6px; }
.footer-brand p { color: var(--text-inverse-muted); font-size: 0.92rem; max-width: 34ch; }

.footer-col h4 {
  color: var(--text-inverse);
  font-family: var(--font-label);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--text-inverse-muted); text-decoration: none; font-size: 0.94rem; }
.footer-col a:hover { color: var(--text-inverse); }

.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-inverse-muted);
}

/* -----------------------------------------------------------
   Responsive
----------------------------------------------------------- */
@media (max-width: 860px) {
  .grid-2, .contact-grid { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .pastor { grid-template-columns: 96px 1fr; gap: 20px; }
  .pastor-avatar { width: 96px; height: 96px; font-size: 1.6rem; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--rule);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 20px 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 6px; border-bottom: 1px solid var(--rule); border-radius: 0; }
  .nav-links li:last-child a { border-bottom: none; }

  table.schedule thead { display: none; }
  table.schedule, table.schedule tbody, table.schedule tr, table.schedule td { display: block; width: 100%; }
  table.schedule tr { padding: 16px 20px; border-top: 1px solid var(--rule); }
  table.schedule tbody tr:first-child { border-top: none; }
  table.schedule td { padding: 2px 0; border-top: none; }
  table.schedule td.day-label {
    display: block;
    font-family: var(--font-label);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tea-700);
    margin-top: 6px;
  }
  table.schedule td.ministry { font-weight: 600; color: var(--navy-800); font-family: var(--font-display); font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
