/* dodsonsusmilitary.org — colors and fonts carried over from the WordPress site:
   slate #464655, red #ff4b55, Prata (headings), Taviraj (text). */
:root {
  --slate: #464655;
  --slate-dark: #2c2c37;
  --red: #ff4b55;
  --red-text: #c4121e; /* darker red for text and links (readable on white) */
  --ink: #23232c;
  --muted: #62626f;
  --line: #e7e4e8;
  --paper: #ffffff;
  --wash: #f7f5f3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 35, 44, 0.06), 0 10px 30px rgba(35, 35, 44, 0.08);
  --heading: "Prata", Georgia, "Times New Roman", serif;
  --text: "Taviraj", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: var(--red-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--slate); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--heading); font-weight: 400; line-height: 1.2; color: var(--slate); margin: 0 0 0.6em; }
p { margin: 0 0 1.1em; }
figure { margin: 0; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--slate); color: #fff; padding: 0.6em 1em; z-index: 20; }
.skip-link:focus { left: 1rem; top: 1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { width: min(100% - 2.5rem, 1120px); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, 760px); margin-inline: auto; }

/* --- Header (stays at the top while scrolling) --- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; }
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--slate); }
.brand img { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.brand span { font-family: var(--heading); font-size: 1.35rem; line-height: 1.1; }
.nav-toggle {
  display: none; align-items: center; gap: 0.5rem; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 0.45rem 1rem; font: inherit; font-size: 1rem; color: var(--slate); cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }
.site-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.15rem; margin: 0; padding: 0; }
.site-nav a {
  display: block; color: var(--slate); text-decoration: none; font-size: 1rem; white-space: nowrap;
  padding: 0.35rem 0.75rem; border-radius: 999px; transition: background-color 0.15s, color 0.15s;
}
.site-nav a:hover { background: var(--wash); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--slate); color: #fff; }
.site-nav .ext::after { content: " \2197"; font-size: 0.8em; }

@media (max-width: 1160px) {
  .nav-toggle { display: inline-flex; }
  .header-inner { flex-wrap: wrap; }
  .site-nav { display: none; width: 100%; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0.15rem; padding: 0.4rem 0 0.7rem; }
  .site-nav a { padding: 0.7rem 1rem; border-radius: 10px; }
}

/* --- Page titles: a slim band echoing the home banner --- */
.page-title {
  background: linear-gradient(180deg, var(--slate) 0%, #5a4a5c 100%);
  color: #fff; text-align: center; padding: clamp(2.5rem, 6vw, 3.75rem) 0;
  border-bottom: 4px solid var(--red);
}
.page-title h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin: 0; }
main { padding-bottom: clamp(3rem, 8vw, 5rem); }
.page-title + * { margin-top: clamp(2.5rem, 6vw, 4rem); }

/* --- Home --- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgb(70, 70, 85) 50%, rgb(255, 75, 85) 100%);
  color: #fff; text-align: center; padding: clamp(4.5rem, 12vw, 8rem) 1.25rem clamp(4rem, 10vw, 6.5rem);
}
/* soft light behind the title */
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
}
.hero-inner { position: relative; }
.hero h1 { color: #fff; font-size: clamp(2.8rem, 8vw, 4.5rem); line-height: 1; margin: 0 0 1.4rem; letter-spacing: 0.01em; }
.tagline {
  color: #fff; font-size: clamp(1.15rem, 2.8vw, 1.6rem); line-height: 1.55; margin: 0 auto; max-width: 34em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.18);
}
.intro {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(2rem, 6vw, 5rem); align-items: center;
  margin: clamp(3rem, 8vw, 5rem) auto;
}
.intro img { border-radius: var(--radius); box-shadow: var(--shadow); max-width: 420px; width: 100%; justify-self: center; }
.verse {
  position: relative; margin: 0; padding: 0.5rem 0 0 1.6rem; border-left: 3px solid var(--red);
  font-family: var(--heading); color: var(--slate); font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.6;
}
.verse::before {
  content: "\201C"; position: absolute; left: 1rem; top: -2.6rem; font-size: 6rem; line-height: 1;
  color: var(--red); opacity: 0.25; font-family: var(--heading);
}
.verse p { margin: 0 0 1rem; }
.verse cite { font-style: normal; font-size: 0.8em; color: var(--red-text); letter-spacing: 0.04em; }
@media (max-width: 760px) { .intro { grid-template-columns: 1fr; } .verse { margin-top: 2.75rem; } }

.band { background: var(--wash); border-top: 1px solid var(--line); padding: clamp(3rem, 8vw, 4.5rem) 0; margin-bottom: calc(-1 * clamp(3rem, 8vw, 5rem)); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--slate-dark); margin: 0 0 2.5rem; box-shadow: var(--shadow); }
.video video { position: absolute; inset: 0; width: 100%; height: 100%; }
.cta { text-align: center; font-size: 1.2rem; }
.social { list-style: none; display: flex; justify-content: center; gap: 0.9rem; padding: 0; margin: 1.4rem 0 0; }
.social a {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  border-radius: 50%; background: var(--slate); color: #fff; transition: background-color 0.15s, transform 0.15s;
}
.social a:hover { background: var(--red-text); color: #fff; transform: translateY(-2px); }
.social svg { width: 24px; height: 24px; fill: currentColor; }

/* --- About Us --- */
.testimony {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(1.5rem, 4vw, 2.5rem); margin-bottom: 2rem;
}
.testimony h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.1; padding-bottom: 0.6rem; border-bottom: 2px solid var(--red); display: inline-block; }
.testimony p:last-child { margin-bottom: 0; }

/* --- Statement of Faith: each article separated for easier scanning --- */
.faith p { margin: 0; padding: 1.15rem 0; border-bottom: 1px solid var(--line); }
.faith p:first-child { padding-top: 0; }
.faith strong { color: var(--slate); font-family: var(--heading); font-weight: 400; font-size: 1.12em; }
.faith em { color: var(--muted); }
.faith .closing {
  margin-top: 2.5rem; padding: 1.4rem 1.6rem; border: 0; border-left: 4px solid var(--red);
  background: var(--wash); border-radius: 0 var(--radius) var(--radius) 0;
}

/* --- Prayer letters --- */
.letters-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.letters-layout figure { position: sticky; top: 6rem; }
.letters-layout figure img { border-radius: var(--radius); box-shadow: var(--shadow); }
.letter-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.letter-list li { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 1.1rem; border-bottom: 1px solid var(--line); transition: background-color 0.15s; }
.letter-list li:last-child { border-bottom: 0; }
.letter-list li:hover { background: var(--wash); }
.letter-list a { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.letter-list a::after { content: ""; position: absolute; inset: 0; } /* whole row is clickable */
.letter-list li:hover a { color: var(--red-text); }
.letter-list .doc { width: 22px; height: 22px; flex: none; color: var(--red-text); }
.letter-list .meta { color: var(--muted); font-size: 0.85em; white-space: nowrap; }
.letter-list li:first-child { background: linear-gradient(90deg, rgba(255, 75, 85, 0.08), transparent 70%); }
@media (max-width: 820px) { .letters-layout { grid-template-columns: 1fr; } .letters-layout figure { order: -1; position: static; } }

/* --- Signup --- */
.signup-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.signup-layout > img { border-radius: var(--radius); box-shadow: var(--shadow); max-height: 560px; width: auto; justify-self: center; }
.signup { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 2.5rem); }
.signup h2 { font-size: clamp(1.35rem, 3vw, 1.7rem); margin-bottom: 1.4rem; }
@media (max-width: 820px) { .signup-layout { grid-template-columns: 1fr; } .signup-layout > img { max-height: 300px; } }

.field { margin-bottom: 1.2rem; }
.field-label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.req { color: var(--red-text); }
.name-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.sublabel { display: block; font-size: 0.9rem; color: var(--muted); margin-top: 0.25rem; }
@media (max-width: 480px) { .name-row { grid-template-columns: 1fr; } }
input[type="text"], input[type="email"] {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 0.7rem 0.85rem;
  border: 1px solid #c4c1c9; border-radius: 10px; background: #fcfbfb; color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
input[type="text"]:focus, input[type="email"]:focus { outline: none; border-color: var(--slate); background: #fff; box-shadow: 0 0 0 4px rgba(70, 70, 85, 0.15); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  display: inline-block; font: inherit; font-size: 1.05rem; padding: 0.7rem 1.8rem; border: 0; border-radius: 999px;
  background: var(--red-text); color: #fff; cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 16px rgba(196, 18, 30, 0.25); transition: background-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--slate); color: #fff; transform: translateY(-1px); }
.btn:disabled { opacity: 0.7; cursor: progress; transform: none; }
.form-status { margin: 1rem 0 0; min-height: 1.5em; }
.form-status:empty { margin: 0; }
.form-status.ok { color: #1d6b35; font-weight: 600; }
.form-status.err { color: var(--red-text); font-weight: 600; }
.signup.done form { display: none; }

/* --- Donations --- */
.donate-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.donate-text p:has(.btn) { margin: 1.6rem 0; }
.qr-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; }
.qr { width: 100%; max-width: 340px; margin: 0 auto; }
@media (max-width: 760px) { .donate-layout { grid-template-columns: 1fr; } .qr-card { max-width: 340px; margin: 0 auto; } }

/* --- Footer --- */
.site-footer { background: var(--slate-dark); color: #d9d9e3; padding: 1.8rem 0; font-size: 1rem; border-top: 4px solid var(--red); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 1.5rem; }
.site-footer a { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .social a:hover, .btn:hover { transform: none; }
}
