:root {
  --font-body: "Roboto", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-heading: "Roboto Condensed", "Roboto", system-ui, sans-serif;
  --ink: #242424;
  --ink-soft: #4f504c;
  --muted: #6d6d68;
  --paper: #f7f5f1;
  --surface: #ffffff;
  --surface-muted: #eeebe5;
  --line: #d8d3c9;
  --brand: #2f342f;
  --brand-soft: #596154;
  --accent: #8a7b62;
  --accent-soft: #dfd7c9;
  --shadow: 0 18px 45px rgba(36, 36, 36, 0.08);
  --radius-sm: 0.4rem;
  --radius: 0.85rem;
  --radius-lg: 1.35rem;
  --content: 70rem;
  --content-narrow: 56rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(223, 215, 201, 0.55), transparent 22rem), var(--paper);
  font-family: var(--font-body);
  line-height: 1.55;
}

a {
  color: var(--brand);
  text-underline-offset: 0.18em;
}

img {
  max-width: 100%;
}

.main-content {
  margin-top: 0;
}

h1,
h2,
h3,
h4,
h5 {
  color: var(--ink);
  font-family: var(--font-heading);
  line-height: 1.12;
  letter-spacing: 0.01em;
}

h1 {
  max-width: var(--content-narrow);
  margin: 0 auto 1rem;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

h3 {
  max-width: var(--content-narrow);
  margin: 0.75rem auto 0;
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 500;
  text-align: center;
  text-transform: none;
}

h5 {
  margin: 2rem 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  text-transform: uppercase;
}

p {
  margin: 1rem 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

button,
.button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  border: 1px solid var(--brand);
  border-radius: 999px;
  padding: 0.7rem 1.45rem;
  background: var(--brand);
  color: var(--surface);
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

button:not(.podcast-link):hover,
.button:hover,
input[type="submit"]:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
  transform: translateY(-1px);
}

button a,
.button a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Navbar ---------- */

header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(36, 36, 36, 0.97);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 22px rgba(36, 36, 36, 0.12);
}

.site-logo {
  display: flex;
  align-items: center;
  width: min(15rem, 68vw);
}

.site-logo img {
  display: block;
  width: 100%;
}

header ul {
  z-index: 20;
  position: fixed;
  top: 0;
  right: -35rem;
  width: 100%;
  max-width: 21rem;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  padding: 7rem 1.5rem 2rem;
  gap: 0.4rem;
  list-style: none;
  background: var(--brand);
  box-shadow: -18px 0 40px rgba(0, 0, 0, 0.2);
  transition: right 0.3s ease-in-out;
}

header ul a {
  display: block;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  color: var(--surface);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

header ul a:hover {
  background: rgba(255, 255, 255, 0.09);
}

.menu-icon {
  z-index: 21;
  display: block;
  padding: 15px;
  cursor: pointer;
}

.menu-icon .navicon,
.menu-icon .navicon::before,
.menu-icon .navicon::after {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--surface);
  transition: all 0.2s ease-out;
}

.menu-icon .navicon {
  position: relative;
}

.menu-icon .navicon::before,
.menu-icon .navicon::after {
  content: "";
  position: absolute;
}

.menu-icon .navicon::before {
  top: 7px;
}

.menu-icon .navicon::after {
  top: -7px;
}

.menu-btn {
  display: none;
}

.menu-btn:checked ~ .menu-icon .navicon {
  background: transparent;
}

.menu-btn:checked ~ .menu-icon .navicon::before {
  top: 0;
  transform: rotate(-45deg);
}

.menu-btn:checked ~ .menu-icon .navicon::after {
  top: 0;
  transform: rotate(45deg);
}

.menu-btn:checked ~ ul {
  right: 0;
}

.menu-btn:checked ~ .content-overlay {
  display: block;
}

.content-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 19;
  background: rgba(36, 36, 36, 0.45);
  pointer-events: none;
}

@media only screen and (min-width: 900px) {
  .site-logo {
    width: 17rem;
  }

  header ul {
    position: static;
    width: auto;
    max-width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 0.2rem;
    background: transparent;
    box-shadow: none;
  }

  header ul a {
    font-size: 0.98rem;
    padding: 0.55rem 0.8rem;
  }

  .menu-icon {
    display: none;
  }
}

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

footer {
  margin-top: auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem);
  background: var(--brand);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  text-align: center;
}

footer a {
  color: var(--surface);
}

/* ---------- Shared Sections ---------- */

section,
main {
  padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem);
}

section.accent {
  background: var(--surface-muted);
}

section.dark {
  background: var(--brand);
  color: var(--surface);
}

section.dark h1,
section.dark h2,
section.dark h3,
section.dark p {
  color: var(--surface);
}

.section-border-top {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.center-button {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 2.5rem 0 0;
}

.center-content {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
}

/* ---------- Sermon Cards ---------- */

#sermon-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding-top: 1rem;
}

#sermon-list .sermon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition:
    border-color 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

#sermon-list .sermon:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(36, 36, 36, 0.12);
}

#sermon-list .sermon .info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  color: var(--ink);
}

#sermon-list .sermon .title {
  color: var(--ink);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
}

#sermon-list .sermon .date-speaker {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.98rem;
}

#sermon-list .sermon .categories {
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

#sermon-list .sermon .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

#sermon-list .sermon .actions img {
  width: 1rem;
  height: auto;
  filter: brightness(0) saturate(100%) invert(40%) sepia(10%) saturate(619%) hue-rotate(5deg)
    brightness(91%) contrast(83%);
}

section.dark #sermon-list .sermon {
  background: rgba(255, 255, 255, 0.96);
}

@media (max-width: 690px) {
  #sermon-list .sermon {
    align-items: flex-start;
    padding: 0.9rem;
  }

  #sermon-list .sermon .title {
    font-size: 1.15rem;
  }

  #sermon-list .sermon .actions img {
    width: 0.75rem;
    margin-top: 0.3rem;
  }
}

/* ---------- Forms ---------- */

input,
select,
textarea {
  display: block;
  width: 20rem;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.72rem 0.85rem;
  outline: none;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(138, 123, 98, 0.16);
}

input::placeholder,
select::placeholder,
textarea::placeholder {
  color: var(--muted);
}
