/* =============================================
   style.css — theseteam.org global stylesheet
   ============================================= */

/* ---------- Custom Properties ---------- */
:root {
  --color-bg: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-text-primary: #1A1A18;
  --color-text-secondary: #5C5C58;
  --color-text-muted: #9C9A92;
  --color-accent: #1B5DB8;
  --color-accent-light: #E6EEF9;
  --color-accent-dark: #0F3D80;
  --color-border: #E4E2DC;
  --color-scripture-bg: #F5F3EE;

  --font-body: 'Noto Sans', system-ui, sans-serif;
  --font-scripture: 'Noto Serif', Georgia, serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --max-width: 680px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.75;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
button { font-family: inherit; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-sm);
}

/* ---------- Language Switcher ---------- */
.lang-switcher {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.875rem;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  color: var(--color-text-primary);
  transition: box-shadow 0.15s;
}
.lang-switcher:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.lang-switcher-globe { font-size: 16px; line-height: 1; }
.lang-switcher-name { max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Language Overlay ---------- */
.lang-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(26,26,24,0.55);
  backdrop-filter: blur(2px);
  align-items: flex-start;
  justify-content: center;
  padding-top: 4rem;
}
.lang-overlay.open { display: flex; }
.lang-overlay-panel {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: min(520px, calc(100vw - 2rem));
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  padding: var(--space-md);
}
.lang-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}
.lang-overlay-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}
.lang-overlay-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-text-muted);
  line-height: 1;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
}
.lang-overlay-close:hover { color: var(--color-text-primary); background: var(--color-bg); }
.lang-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}
.lang-list-item {
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.625rem 0.75rem;
  cursor: pointer;
  text-align: start;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text-primary);
  transition: background 0.1s, border-color 0.1s;
}
.lang-list-item:hover { background: var(--color-accent-light); border-color: var(--color-accent); }
.lang-list-item.active { background: var(--color-accent-light); border-color: var(--color-accent); color: var(--color-accent-dark); font-weight: 500; }
.lang-list-item .lang-native { display: block; font-size: 0.85rem; color: var(--color-text-secondary); }

/* ---------- Navigation ---------- */
.site-nav {
  padding: var(--space-md) 0;
  margin-top: 3.5rem;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-logo-img {
  height: 30px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.1s, border-color 0.1s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  text-decoration: none;
}

/* ---------- Hero Section (default — no image) ---------- */
.hero {
  padding: var(--space-lg) 0 var(--space-md);
}
.hero-headline {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--color-text-primary);
  margin-bottom: var(--space-xs);
}
.hero-subheadline {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* ---------- Hero — Full-bleed image variant (home page) ---------- */
.hero-image {
  position: relative;
  min-height: 58vh;
  background-size: cover;
  background-position: center 70%;
  background-repeat: no-repeat;
  display: flex;
  align-items: flex-end;
  /* pull it edge-to-edge, ignoring the container */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  padding: 0;
}
.hero-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(12, 22, 60, 0.30) 0%,
    rgba(8, 16, 48, 0.60) 100%);
}
.hero-home-bg {
  background-image: url('visual_assets/hero-crowd.jpg');
}
.hero-image .hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-sm) var(--space-lg);
  text-align: center;
}
.hero-image .hero-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
}
.hero-image .hero-logo-img {
  height: 60px;
  width: auto;
}
.hero-image .hero-headline {
  color: #ffffff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.hero-image .hero-subheadline {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* ---------- Gospel Body ---------- */
.gospel-body {
  padding: var(--space-md) 0;
}
.gospel-body p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-primary);
  margin-bottom: var(--space-sm);
}

/* ---------- Scripture Block ---------- */
.scripture-block {
  background: var(--color-scripture-bg);
  border-left: 3px solid var(--color-accent);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-scripture);
  font-size: 1.1em;
  line-height: 1.8;
  color: var(--color-text-primary);
}
.scripture-ref {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875em;
  color: var(--color-text-muted);
  font-style: normal;
  font-weight: 500;
}

/* ---------- CTA Buttons ---------- */
.cta-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md) 0 var(--space-lg);
}
.btn-primary {
  display: block;
  width: 100%;
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  min-height: 52px;
  transition: background 0.15s;
  line-height: 1.4;
}
.btn-primary:hover { background: var(--color-accent-dark); text-decoration: none; color: #fff; }
.btn-secondary {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--color-accent);
  border: 1.5px solid var(--color-accent);
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  min-height: 52px;
  transition: background 0.15s;
  line-height: 1.4;
}
.btn-secondary:hover { background: var(--color-accent-light); text-decoration: none; }
.btn-primary:disabled, .btn-secondary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Video Page ---------- */
.video-section {
  padding: var(--space-md) 0 var(--space-lg);
}
.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #000;
  margin-bottom: var(--space-md);
}
.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.coming-soon {
  font-size: 1rem;
  color: var(--color-text-secondary);
  background: var(--color-accent-light);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  margin-bottom: var(--space-md);
}
.video-contact-link {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  text-align: center;
  margin-top: var(--space-sm);
}
.video-contact-link a { color: var(--color-accent); font-weight: 500; }

/* ---------- Contact Form ---------- */
.contact-section {
  padding: var(--space-md) 0 var(--space-xl);
}

/* Contact page — chinatown image header (muted) */
.contact-image-header {
  position: relative;
  height: 140px;
  background-image: url('visual_assets/contact-chinatown.jpg');
  background-size: cover;
  background-position: center 55%;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--space-lg);
}
.contact-image-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 55, 0.68);
}
.contact-image-header-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.80);
  font-family: var(--font-scripture);
  font-size: 0.95rem;
  font-style: italic;
  text-align: center;
  padding: var(--space-sm);
  line-height: 1.6;
}

.form-group {
  margin-bottom: var(--space-md);
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  margin-bottom: 0.375rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text-primary);
  background: var(--color-surface);
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(27, 93, 184, 0.12);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239C9A92' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.honeypot { display: none !important; }
.form-error-msg {
  color: #C0392B;
  font-size: 0.875rem;
  margin-top: var(--space-sm);
  display: none;
}
.form-error-msg.visible { display: block; }
.form-success {
  display: none;
  background: var(--color-accent-light);
  border: 1px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--color-accent-dark);
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
}
.form-success.visible { display: block; }
.btn-loading { opacity: 0.7; pointer-events: none; }

/* ---------- About Page ---------- */
.about-section {
  padding: var(--space-md) 0 var(--space-xl);
}
.about-body {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
}

/* About page — village image divider */
.about-image-divider {
  position: relative;
  height: 260px;
  background-image: url('visual_assets/about-village.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll; /* parallax on desktop only */
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--space-lg) 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-image-divider::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 55, 0.50);
}
.about-image-quote {
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-align: center;
  font-family: var(--font-scripture);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.75;
  padding: var(--space-md);
  max-width: 500px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.about-image-quote cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-style: normal;
  font-family: var(--font-body);
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
  margin-top: var(--space-lg);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.footer-tagline {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}
.footer-contact-link { font-size: 0.875rem; }
.footer-privacy {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* ---------- Section Divider ---------- */
.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-md) 0;
}

/* ---------- Responsive: Desktop ---------- */
@media (min-width: 640px) {
  html { font-size: 18px; }
  .cta-group { flex-direction: row; }
  .cta-group .btn-primary,
  .cta-group .btn-secondary { width: auto; flex: 1; }
  .about-image-divider {
    height: 320px;
    background-attachment: fixed; /* parallax only on desktop — broken on iOS */
  }
  .hero-image { min-height: 65vh; }
}

/* =============================================
   RTL Overrides
   ============================================= */
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .nav-inner { flex-direction: row-reverse; }
[dir="rtl"] .lang-switcher { right: auto; left: 1rem; }
[dir="rtl"] .scripture-block {
  border-right: 3px solid var(--color-accent);
  border-left: none;
  padding-right: 1.25rem;
  padding-left: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
[dir="rtl"] .form-group input,
[dir="rtl"] .form-group textarea,
[dir="rtl"] .form-group select { text-align: right; }
[dir="rtl"] .form-group select {
  background-position: left 1rem center;
  padding-right: 1rem;
  padding-left: 2.5rem;
}
[dir="rtl"] .lang-overlay-header { flex-direction: row-reverse; }
