/* Ridgehaven Church — concept (Navy, Cream, Gold) */

:root {
  --bg: #f7f3eb;
  --navy: #1b2a4a;
  --navy-soft: #24365c;
  --text: #1b2a4a;
  --muted: #5c6473;
  --accent: #c4a35a;
  --accent-soft: rgba(196, 163, 90, 0.16);
  --line: rgba(27, 42, 74, 0.12);
  --cream: #f7f3eb;
  --max: 1120px;
  --pad-x: clamp(1.25rem, 4vw, 2.75rem);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", "Source Sans Pro", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #8a7038;
}

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.concept-bar {
  position: relative;
  z-index: 30;
  background: var(--navy);
  color: rgba(247, 243, 235, 0.65);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.55rem var(--pad-x);
}

.concept-bar strong {
  color: var(--accent);
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(247, 243, 235, 0.9);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--navy);
  text-decoration: none;
}

.logo img {
  width: 36px;
  height: 36px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.logo-text span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.15rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  color: var(--navy);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav a:hover {
  color: #8a7038;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--navy);
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 1rem;
  height: 1px;
  background: var(--navy);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.btn-primary {
  background: var(--accent);
  color: var(--navy);
}

.btn-primary:hover {
  background: #d4b56e;
  color: var(--navy);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border-color: rgba(247, 243, 235, 0.35);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero {
  position: relative;
  min-height: calc(100svh - 6.5rem);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--cream);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: heroDrift 28s ease-in-out infinite alternate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(27, 42, 74, 0.25) 0%, rgba(27, 42, 74, 0.55) 45%, rgba(27, 42, 74, 0.92) 100%),
    linear-gradient(90deg, rgba(27, 42, 74, 0.55) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: clamp(4rem, 12vh, 7rem) var(--pad-x) clamp(3rem, 8vh, 5rem);
}

.hero-kicker {
  margin: 0 0 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0;
  animation: riseIn 0.9s ease 0.15s forwards;
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--cream);
  opacity: 0;
  animation: riseIn 0.9s ease 0.3s forwards;
}

.hero-lede {
  margin: 0 0 2rem;
  max-width: 38ch;
  font-size: 1.1rem;
  color: rgba(247, 243, 235, 0.78);
  opacity: 0;
  animation: riseIn 0.9s ease 0.45s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  opacity: 0;
  animation: riseIn 0.9s ease 0.6s forwards;
}

.hero-times {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(247, 243, 235, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  color: rgba(247, 243, 235, 0.85);
  font-size: 0.95rem;
  opacity: 0;
  animation: riseIn 0.9s ease 0.75s forwards;
}

.hero-times strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--cream);
}

section {
  padding: clamp(4rem, 9vw, 6.5rem) var(--pad-x);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-label {
  display: block;
  margin-bottom: 0.85rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #8a7038;
}

.section-title {
  margin: 0 0 1.25rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.1;
}

.section-copy {
  margin: 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 1.08rem;
}

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.new-here {
  border-top: 1px solid var(--line);
}

.new-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.new-steps {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.new-steps li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.new-steps li:last-child {
  border-bottom: none;
}

.new-steps span {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent);
  line-height: 1.2;
}

.pastor {
  margin: 0;
  max-width: 22rem;
}

.pastor img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.pastor figcaption {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.times {
  background: var(--navy);
  color: var(--cream);
}

.times .section-label {
  color: var(--accent);
}

.times .section-copy {
  color: rgba(247, 243, 235, 0.7);
}

.times-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.foyer-note {
  margin: 1.5rem 0 0;
  max-width: 46ch;
  color: var(--accent);
  font-size: 1.05rem;
}

.time-card {
  padding: 1.5rem;
  border: 1px solid rgba(247, 243, 235, 0.14);
  background: var(--navy-soft);
}

.time-card h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
}

.time-card p {
  margin: 0;
  color: rgba(247, 243, 235, 0.7);
}

.sermons {
  background: #efe9de;
  border-top: 1px solid var(--line);
}

.sermons-intro {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.sermon-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.sermon-player {
  margin: 0;
}

.sermon-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--navy);
  aspect-ratio: 16 / 9;
  text-decoration: none;
  color: var(--cream);
}

.sermon-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.sermon-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: grid;
  place-items: center;
}

.sermon-poster-label {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sermon-player-note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.sermon-channels {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: #fff;
  border: 1px solid var(--line);
}

.sermon-channels h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
}

.sermon-channels p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.sermon-channels .btn {
  width: 100%;
  margin-bottom: 0.65rem;
}

.btn-sermon-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}

.btn-sermon-ghost:hover {
  border-color: var(--accent);
  color: #8a7038;
}

.sermon-recent {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
}

.sermon-recent li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.sermon-recent span {
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sermon-recent a {
  text-decoration: none;
  color: var(--navy);
}

.sermon-recent a:hover {
  color: #8a7038;
}

.sermon-recent em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.8rem;
}

.ministries {
  border-bottom: 1px solid var(--line);
}

.ministry-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.ministry-list li {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--line);
}

.ministry-list h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
}

.ministry-list p {
  margin: 0;
  color: var(--muted);
}

.gallery-intro {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  background: #e8e2d6;
  aspect-ratio: 4 / 5;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.gallery-grid figure:hover img {
  transform: scale(1.04);
}

.contact {
  border-top: 1px solid var(--line);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 6vw, 5rem);
}

.contact-block + .contact-block {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.contact-block h3 {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8a7038;
}

.contact-block p,
.contact-block address {
  margin: 0;
  font-style: normal;
  color: var(--muted);
}

.contact-block a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.contact-block a:hover {
  color: #8a7038;
  border-bottom-color: var(--accent);
}

.hours-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.hours-list span:first-child {
  color: var(--text);
}

.visit-panel {
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background:
    linear-gradient(145deg, var(--accent-soft), transparent 55%),
    #fff;
  border: 1px solid var(--line);
}

.visit-panel h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 500;
}

.visit-panel p {
  margin: 0 0 1.75rem;
  color: var(--muted);
}

.map-static {
  margin: 1.5rem 0 0;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

.map-static img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.map-static figcaption {
  padding: 0.7rem 0.9rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.site-footer {
  padding: 1.75rem var(--pad-x) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  background: #efe9de;
}

.site-footer .inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--navy);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(1.1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroDrift {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08) translate3d(-1.5%, -1%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-media img,
  .hero-kicker,
  .hero h1,
  .hero-lede,
  .hero-actions,
  .hero-times,
  .reveal,
  .gallery-grid img {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 900px) {
  .new-grid,
  .contact-grid,
  .times-grid,
  .ministry-list,
  .sermon-layout {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid figure:last-child {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--pad-x) 1rem;
    background: rgba(247, 243, 235, 0.98);
    border-bottom: 1px solid var(--line);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
  }

  .site-header .inner {
    position: relative;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid figure:last-child {
    aspect-ratio: 4 / 5;
  }
}
