/* ==========================================================================
   Presbyterian Church of South Sudan — shared stylesheet
   Design tokens live at the top. Change a value here and it updates
   everywhere the site uses it.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Karla:wght@400;500;600;700&display=swap');

:root {
  /* ---- Updated Dark Theme Colors ---- */
  --ink:          #fffcf5;   /* Crisp cream text for dark mode legibility */
  --ink-soft:     #cfc9b8;   /* Muted light text for secondary details */
  --parchment:    #121411;   /* Rich, deep dark page background */
  --parchment-dk: #1a1e19;   /* Slightly lighter dark background for alternating sections */
  --green:        #d4ecd5;   /* Lightened green accent tint for high-contrast typography */
  --green-soft:   #2c5940;   /* Preserved deep green for header nav backgrounds */
  --clay:         #e26350;   /* Brighter clay red to remain visible and accessible on dark surfaces */
  --clay-dark:    #c64d3b;
  --gold:         #e3b95c;   /* Striking gold for highlights and structural lines */
  --cream:        #1e221d;   /* Core background color for cards, tables, and standard form inputs */

  /* ---- Type ---- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Karla', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ---- Layout ---- */
  --max-width: 1140px;
  --radius: 4px;
}

/* ---------------------------------------------------------------------- */
/* Reset / base                                                           */
/* ---------------------------------------------------------------------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--parchment);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--clay);
  text-decoration: none;
}
a:hover { text-decoration: underline; color: var(--gold); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--green);
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { color: var(--ink-soft); }

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold); /* Swapped to gold for premium visibility against dark backdrops */
  margin-bottom: 14px;
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--clay);
  color: #fffcf5;
}
.btn-primary:hover { background: var(--clay-dark); }

.btn-outline {
  background: transparent;
  border-color: var(--gold);
  color: var(--gold);
}
.btn-outline:hover { background: var(--gold); color: #121411; }

.btn-light {
  background: #fffcf5;
  color: #121411;
}
.btn-light:hover { background: var(--gold); color: #121411; }





/* ---------------------------------------------------------------------- */
/* Woven divider — the site's signature element                          */
/* ---------------------------------------------------------------------- */

.woven-divider {
  width: 100%;
  height: 14px;
  background-image:
    linear-gradient(135deg, var(--gold) 25%, transparent 25%),
    linear-gradient(225deg, var(--gold) 25%, transparent 25%),
    linear-gradient(45deg, var(--clay) 25%, transparent 25%),
    linear-gradient(315deg, var(--clay) 25%, transparent 25%);
  background-position: 0 0, 7px 0, 7px -7px, 0px 7px;
  background-size: 14px 14px;
  background-color: #1a3223;
}

/* ---------------------------------------------------------------------- */
/* Header / Navigation                                                    */
/* ---------------------------------------------------------------------- */

.site-header {
  background: #151a14; /* Deep uniform header background */
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1350px; /* Changed from var(--max-width) to 1350px to make it wider */
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fffcf5;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
}
.brand:hover { text-decoration: none; }
.brand span { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.08em; color: var(--gold); text-transform: uppercase; }

.brand-mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.nav-toggle { display: none; }
.nav-toggle-label {
  display: none;
  color: #fffcf5;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  padding: 4px 8px;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: #fffcf5;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  text-decoration: none;
  border-bottom-color: var(--gold);
}

.nav-cta {
  background: var(--clay);
  color: #fffcf5 !important;
  padding: 8px 18px;
  border-radius: var(--radius);
  border-bottom: none !important;
}
.nav-cta:hover { background: var(--clay-dark); }

@media (max-width: 820px) {
  .nav-toggle-label { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #1a1e19;
    max-height: 0;
    overflow: hidden;
    gap: 0;
    transition: max-height 0.25s ease;
  }
  .nav-links li { border-top: 1px solid rgba(255,255,255,0.12); }
  .nav-links a { display: block; padding: 16px 24px; }
  .nav-cta { margin: 14px 24px; display: inline-block; }
  .nav-toggle:checked ~ .nav-links { max-height: 480px; }
}

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  background: #151a14;
  color: #fffcf5;
  padding: 72px 0 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.hero h1 { color: #fffcf5; }
.hero p.lead { color: #cfc9b8; font-size: 1.1rem; max-width: 46ch; margin: 18px 0 30px; }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.service-card {
  background: var(--cream);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 32px;
  color: var(--ink);
  position: relative;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: -10px -10px auto auto;
  width: 100%;
  height: 100%;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  z-index: -1;
}
.service-card h3 { color: var(--green); margin-bottom: 4px; }
.service-card .label { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--clay); font-weight: 700; }
.service-item { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.service-item:last-child { border-bottom: none; }
.service-item .time { font-family: var(--font-display); font-size: 1.15rem; color: var(--green); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------------- */
/* Page header (for interior pages)                                       */
/* ---------------------------------------------------------------------- */

.page-hero {
  background: #151a14;
  color: #fffcf5;
  padding: 56px 0 48px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.page-hero h1 { color: #fffcf5; }
.page-hero p { color: #cfc9b8; max-width: 60ch; margin-top: 12px; font-size: 1.05rem; }

/* ---------------------------------------------------------------------- */
/* Section spacing / helpers                                              */
/* ---------------------------------------------------------------------- */

.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-alt { background: var(--parchment-dk); }
.section-head { max-width: 640px; margin-bottom: 42px; }
.section-head p { margin-top: 10px; font-size: 1.05rem; }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------------------------------------------------------------------- */
/* Cards / grids                                                          */
/* ---------------------------------------------------------------------- */

.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--cream);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.card .date-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.card h3 { margin-bottom: 10px; color: var(--green); }
.card p { font-size: 0.95rem; color: var(--ink-soft); }
.card a.card-link { display: inline-block; margin-top: 14px; font-weight: 700; font-size: 0.9rem; color: var(--clay); }
.card a.card-link:hover { color: var(--gold); }

/* Icon medallion used on ministry / value cards */
.medallion {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1a3223;
  margin-bottom: 18px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.medallion::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px solid var(--gold);
  border-radius: 50%;
}

/* ---------------------------------------------------------------------- */
/* Verse / quote block                                                    */
/* ---------------------------------------------------------------------- */

.verse-block {
  background: #151a14;
  color: #fffcf5;
  padding: 64px 24px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.verse-block blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  max-width: 780px;
  margin: 0 auto 16px;
  font-weight: 500;
  color: var(--green);
}
.verse-block cite {
  font-style: normal;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------------- */
/* Video / live stream embed frame                                        */
/* ---------------------------------------------------------------------- */

.video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #000000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.12);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--clay);
  color: #fffcf5;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.live-badge .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #fffcf5;
}

/* ---------------------------------------------------------------------- */
/* Table (service schedule)                                               */
/* ---------------------------------------------------------------------- */

table.schedule {
  width: 100%;
  border-collapse: collapse;
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
table.schedule th, table.schedule td {
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.96rem;
  color: var(--ink);
}
table.schedule th {
  background: #1a3223;
  color: var(--green);
  font-family: var(--font-body);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
table.schedule tr:last-child td { border-bottom: none; }

/* ---------------------------------------------------------------------- */
/* Forms (contact page)                                                   */
/* ---------------------------------------------------------------------- */

.form-field { margin-bottom: 20px; }
.form-field label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: var(--green);
}
.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--gold);
}

/* ---------------------------------------------------------------------- */
/* Leadership / person card                                               */
/* ---------------------------------------------------------------------- */

.person-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  background: linear-gradient(160deg, #1a3223, #151a14);
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.person-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(135deg, var(--gold) 25%, transparent 25%), linear-gradient(225deg, var(--gold) 25%, transparent 25%);
  background-position: 0 0, 10px 0;
  background-size: 20px 20px;
  opacity: 0.05;
}
.person-role { color: var(--gold); font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  background: #0b0c0a; /* Darkest tone for the deep footer baseline */
  color: #cfc9b8;
  padding: 56px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  color: var(--green);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer p, .site-footer a { color: #cfc9b8; font-size: 0.92rem; }
.site-footer a:hover { color: var(--gold); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.82rem;
}
.social-row { display: flex; gap: 12px; margin-top: 4px; }
.social-row a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  color: #fffcf5;
}
.social-row a:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }