/* ==========================================
   SOTERIA COVENANT — MASTER STYLESHEET
   Responsive, modern Chancery aesthetic
   ========================================== */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --gold: #d4af37;
  --gold-dark: #8b6508;
  --gold-light: #f0d875;
  --deep-black: #0a0a0a;
  --parchment: #fafaf6;
  --parchment-dark: #f0ede4;
  --ink: #111;
  --ink-muted: #444;
  --border-soft: #e0dcd0;
  --max-width: 1200px;
  --scroll-width: 1060px;
}

html { scroll-behavior: auto; }

body {
  margin: 0;
  padding: 0;
  background: var(--parchment);
  font-family: 'Georgia', 'Times New Roman', serif;
  color: var(--ink);
  font-weight: 450;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ── HEADER ── */
.header-wrapper {
  width: 100%;
  background: var(--deep-black);
  padding: 2rem 1rem;
  text-align: center;
}

.header-wrapper h1 {
  color: var(--gold);
  margin: 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 1.6rem;
}

.header-wrapper .subtitle {
  color: #aaa;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-top: 0.3rem;
}

@media (min-width: 768px) {
  .header-wrapper h1 { font-size: 2.2rem; }
  .header-wrapper { padding: 2.5rem 1rem; }
}

/* ── SEAL BANNER ── */
.seal-banner {
  width: 100%;
  background: linear-gradient(180deg, var(--deep-black) 0%, #111 100%);
  padding: 1.5rem 1rem 2.2rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.seal-item {
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(0.6) saturate(0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.seal-item:hover {
  transform: scale(1.12);
  filter: brightness(1) saturate(1);
}

.seal-item img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.3);
  transition: border-color 0.3s ease;
}

.seal-item:hover img {
  border-color: var(--gold);
}

.seal-item .seal-label {
  font-size: 0.65rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-family: sans-serif;
}

.seal-item:hover .seal-label {
  opacity: 1;
}

@media (min-width: 768px) {
  .seal-banner { gap: 1.6rem; padding: 1.8rem 1rem 2.5rem; }
  .seal-item img { width: 72px; height: 72px; }
  .seal-item .seal-label { font-size: 0.7rem; }
}

/* ── NAVIGATION ── */
.nav-bar {
  width: 100%;
  background: var(--parchment-dark);
  border-bottom: 1px solid var(--border-soft);
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  position: relative;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 1.2rem;
  padding: 0.3rem 0.6rem;
  border-radius: 3px;
  cursor: pointer;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  width: 100%;
}

.nav-links a {
  background: white;
  color: var(--gold-dark);
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--gold);
  text-decoration: none;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.7rem;
  border-radius: 3px;
  transition: all 0.2s ease;
  letter-spacing: 0.05em;
  font-family: sans-serif;
}

.nav-links a:hover, .nav-links a.active {
  background: var(--gold);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

@media (min-width: 768px) {
  .nav-links { gap: 0.6rem; }
  .nav-links a { padding: 0.6rem 1.2rem; font-size: 0.75rem; }
}

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--parchment-dark);
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-soft);
    z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-links a { text-align: center; }
}

/* ── MAIN CONTENT SCROLL ── */
.page-wrapper {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

.document-scroll {
  background: white;
  padding: 2rem 1.5rem;
  border: 4px double var(--gold);
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
  position: relative;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .document-scroll {
    padding: 3.5rem 4rem;
    border-width: 6px;
    max-width: var(--scroll-width);
    margin: 0 auto 2rem;
  }
  .page-wrapper { padding: 3rem 1.5rem; }
}

.document-scroll h1 {
  color: var(--gold-dark);
  text-align: center;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.8rem;
  margin-top: 0;
  font-size: 1.5rem;
  line-height: 1.3;
}

.document-scroll h2 {
  color: var(--gold-dark);
  margin-top: 2rem;
  font-size: 1.25rem;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 0.4rem;
}

.document-scroll h3 {
  color: var(--ink);
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.document-scroll p {
  margin: 1rem 0;
  text-align: justify;
}

.document-scroll a {
  color: var(--gold-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.document-scroll a.service-card {
  text-decoration: none;
}

.document-scroll a.cta-button:not(.outline) {
  color: #fff;
  text-decoration: none;
}

.document-scroll a.cta-button:not(.outline):hover {
  color: white;
}

.document-scroll a.cta-button.outline {
  text-decoration: none;
}

.document-scroll a:hover {
  color: var(--gold);
}

.document-scroll ul, .document-scroll ol {
  padding-left: 1.5rem;
}

.document-scroll li {
  margin-bottom: 0.5rem;
}

.document-scroll blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.5rem 0;
  padding: 0.8rem 1.2rem;
  background: var(--parchment);
  font-style: italic;
  color: var(--ink-muted);
}

.document-scroll table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.document-scroll th {
  background: var(--gold-dark);
  color: white;
  font-weight: 600;
  text-align: left;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--gold-dark);
}

.document-scroll td {
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--border-soft);
  vertical-align: top;
}

.document-scroll tr:nth-child(even) td {
  background: var(--parchment);
}

.document-scroll tr:hover td {
  background: var(--parchment-dark);
}

/* ── SEAL MODAL ── */
.seal-modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.seal-modal-overlay.active {
  display: flex;
}

.seal-modal {
  background: white;
  border: 4px double var(--gold);
  max-width: 560px;
  width: 100%;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-height: 90vh;
  overflow-y: auto;
}

.seal-modal-close {
  position: absolute;
  top: 0.8rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--ink-muted);
  font-family: sans-serif;
}

.seal-modal-close:hover { color: var(--ink); }

.seal-modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gold);
}

.seal-modal-header img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--gold);
}

.seal-modal-header h2 {
  color: var(--gold-dark);
  margin: 0;
  font-size: 1.3rem;
  border: none;
  padding: 0;
}

.seal-modal-header .seal-subtitle {
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-style: italic;
  margin-top: 0.2rem;
}

.seal-modal p {
  line-height: 1.7;
  text-align: justify;
  margin: 0.8rem 0;
}

.seal-modal .jurisdiction-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.seal-modal .jurisdiction-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.9rem;
}

.seal-modal .jurisdiction-list li strong {
  color: var(--gold-dark);
}

/* ── HERO STATS ── */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 80px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-dark);
  line-height: 1;
  font-family: sans-serif;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  font-family: sans-serif;
}

@media (min-width: 768px) {
  .hero-stats { gap: 3.5rem; }
  .stat-number { font-size: 2.4rem; }
}

/* ── SERVICES GRID ── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 600px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

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

.service-card {
  border: 2px solid var(--border-soft);
  padding: 1rem;
  text-align: center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.service-card:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.15);
  color: inherit;
}

.service-card img {
  width: 40px;
  height: 40px;
  margin-bottom: 0.4rem;
  border-radius: 50%;
}

.service-card h3 {
  margin: 0.3rem 0;
  font-size: 1rem;
  color: var(--gold-dark);
}

.service-card p {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin: 0.3rem 0 0;
  text-align: center;
  line-height: 1.4;
}

/* ── CTA ROW & BUTTONS ── */
.cta-row {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold-dark) 0%, #5a3d00 100%);
  color: #fff;
  padding: 0.7rem 2rem;
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-family: sans-serif;
  box-shadow: 0 2px 8px rgba(139, 101, 8, 0.2);
  position: relative;
  overflow: hidden;
}

.cta-button::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.cta-button:hover::after {
  left: 100%;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
  color: white;
}

.cta-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(139, 101, 8, 0.25);
}

.cta-button.outline {
  background: transparent;
  color: var(--gold-dark);
  border: 2px solid var(--gold);
  box-shadow: none;
}

.cta-button.outline:hover {
  background: linear-gradient(135deg, var(--gold-dark) 0%, #5a3d00 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.cta-button.navy {
  background: linear-gradient(135deg, #2c3e6b 0%, #1a2744 100%);
  box-shadow: 0 2px 8px rgba(26, 39, 68, 0.25);
}

.cta-button.navy:hover {
  box-shadow: 0 6px 20px rgba(44, 62, 107, 0.4);
}

/* ── CONTACT FORM ── */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: var(--gold-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 0.95rem;
  color: var(--ink);
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.form-group textarea {
  resize: vertical;
}

/* ── FOOTER ── */
footer {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--border-soft);
  font-size: 0.85rem;
}

footer a {
  color: var(--gold-dark);
  text-decoration: none;
}

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

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
  font-family: sans-serif;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── UTILITY ── */
.text-center { text-align: center; }
.text-gold { color: var(--gold-dark); }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

.divider {
  border: none;
  border-top: 1px solid var(--gold);
  margin: 2rem auto;
  width: 60%;
}
