/* Fort Bragg Grace Community Church — coastal Mendocino palette */

:root {
  --forest: #1a3a2a;
  --forest-deep: #0f2419;
  --sage: #7a9a7e;
  --sage-soft: #c5d4c4;
  --blossom: #d4788c;
  --blossom-soft: #f0c4cd;
  --sand: #f5f2eb;
  --cream: #faf8f4;
  --charcoal: #1c1f1d;
  --muted: #4a554e;
  --white: #ffffff;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Segoe UI", sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.75rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 7.5rem;

  --max: 72rem;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 0.25rem;
}

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

html {
  scroll-behavior: smooth;
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__image {
    transform: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--charcoal);
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(197, 212, 196, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(212, 120, 140, 0.08), transparent 50%),
    linear-gradient(180deg, var(--cream) 0%, var(--sand) 40%, #eef2ec 100%);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--forest-deep);
  margin: 0 0 var(--space-sm);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
  margin: 0 0 var(--space-sm);
}

p:last-child {
  margin-bottom: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--forest);
  color: var(--white);
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* —— Header —— */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(26, 58, 42, 0.08);
}

.site-header__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  font-weight: 600;
  text-decoration: none;
  color: var(--white);
  max-width: 14rem;
  line-height: 1.2;
  transition: color 0.3s var(--ease);
}

.site-header.is-scrolled .site-logo {
  color: var(--forest-deep);
}

.site-nav {
  display: flex;
  gap: 1.75rem;
  align-items: center;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  transition: color 0.25s var(--ease);
}

.site-nav a:hover {
  color: var(--blossom-soft);
}

.site-header.is-scrolled .site-nav a {
  color: var(--forest);
}

.site-header.is-scrolled .site-nav a:hover {
  color: var(--blossom);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--white);
}

.site-header.is-scrolled .nav-toggle {
  color: var(--forest-deep);
}

.nav-toggle__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 1.35rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
  transition: transform 0.3s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle__bars::before {
  top: -6px;
}

.nav-toggle__bars::after {
  top: 6px;
}

/* —— Buttons —— */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  background: var(--blossom);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border-radius: var(--radius);
  border: 2px solid var(--blossom);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
    box-shadow 0.35s var(--ease), color 0.35s var(--ease);
  box-shadow: 0 8px 24px rgba(212, 120, 140, 0.28);
}

.btn:hover {
  transform: translateY(-2px);
  background: #c46579;
  border-color: #c46579;
  box-shadow: 0 12px 28px rgba(212, 120, 140, 0.38);
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--forest);
  border-color: var(--forest);
  box-shadow: none;
}

.btn--ghost:hover {
  background: var(--forest);
  color: var(--white);
  border-color: var(--forest);
  box-shadow: 0 8px 24px rgba(26, 58, 42, 0.2);
}

/* —— Hero —— */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}

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

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.08);
  animation: heroKenBurns 22s var(--ease) forwards;
}

@keyframes heroKenBurns {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

.hero__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      rgba(15, 36, 25, 0.45) 0%,
      rgba(15, 36, 25, 0.25) 35%,
      rgba(15, 36, 25, 0.72) 100%
    ),
    linear-gradient(90deg, rgba(15, 36, 25, 0.35) 0%, transparent 55%);
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: calc(var(--header-h) + 2rem) clamp(1.25rem, 4vw, 2.5rem)
    clamp(3.5rem, 10vh, 6rem);
  animation: heroFadeIn 1.1s var(--ease) 0.15s both;
}

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

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
  color: var(--white);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.hero__headline {
  color: var(--white);
  margin-bottom: 0.85rem;
  max-width: 12ch;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.3);
}

.hero__lede {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 32rem;
  margin-bottom: 1.75rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
}

/* —— Sections —— */

.section {
  padding: var(--space-2xl) 0;
}

.section__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blossom);
  margin: 0 0 0.75rem;
}

/* —— Welcome —— */

.welcome__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.welcome__copy h2 {
  margin-bottom: 1.25rem;
}

.welcome__copy p {
  color: var(--muted);
  font-size: 1.1rem;
}

.welcome__figure {
  margin: 0;
  overflow: hidden;
}

.welcome__figure img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: saturate(1.05);
}

/* —— Gather —— */

.gather {
  background:
    linear-gradient(180deg, transparent, rgba(26, 58, 42, 0.04) 20%, rgba(26, 58, 42, 0.06)),
    var(--cream);
}

.gather__intro {
  max-width: 36rem;
  margin-bottom: var(--space-lg);
}

.gather__intro p:last-child {
  color: var(--muted);
  font-size: 1.1rem;
}

.gather__times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(26, 58, 42, 0.12);
}

.gather__time h3 {
  margin-bottom: 0.35rem;
}

.gather__when {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 600;
  color: var(--forest);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.gather__time p:last-child {
  color: var(--muted);
  margin: 0;
}

.gather__time a {
  color: var(--forest);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(212, 120, 140, 0.45);
  text-underline-offset: 0.15em;
  transition: color 0.25s var(--ease);
}

.gather__time a:hover {
  color: var(--blossom);
}

.gather__connect {
  max-width: 36rem;
  margin-bottom: var(--space-xl);
  padding: var(--space-md) 0 0;
  border-top: 1px solid rgba(26, 58, 42, 0.12);
}

.gather__connect h3 {
  margin-bottom: 0.5rem;
}

.gather__connect p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.connect-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.connect-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--forest);
  text-decoration: none;
  border-bottom: 2px solid var(--blossom-soft);
  padding-bottom: 0.1rem;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.connect-link:hover {
  color: var(--blossom);
  border-color: var(--blossom);
}

.gather__image {
  margin: 0;
  max-width: 42rem;
}

.gather__image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 30%;
}

/* —— Life gallery —— */

.life__intro {
  max-width: 36rem;
  margin-bottom: var(--space-lg);
}

.life__intro p:last-child {
  color: var(--muted);
  font-size: 1.1rem;
}

.life__gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.life__shot {
  margin: 0;
  overflow: hidden;
}

.life__shot img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.life__shot:hover img {
  transform: scale(1.04);
}

.life__shot--wide {
  grid-column: span 2;
}

.life__shot--wide img {
  aspect-ratio: 16 / 10;
}

/* —— Visit —— */

.visit {
  background:
    linear-gradient(160deg, var(--forest-deep) 0%, var(--forest) 55%, #234d38 100%);
  color: var(--sand);
}

.visit h2,
.visit .eyebrow {
  color: var(--sand);
}

.visit .eyebrow {
  color: var(--blossom-soft);
}

.visit__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.visit__copy p {
  color: rgba(245, 242, 235, 0.85);
  font-size: 1.1rem;
}

.visit__address {
  font-style: normal;
  margin: 1.5rem 0 0.75rem;
  line-height: 1.6;
  color: var(--sand);
}

.visit__phone {
  margin-bottom: 1.75rem;
}

.visit__phone a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--blossom-soft);
  transition: color 0.25s var(--ease);
}

.visit__phone a:hover {
  color: var(--white);
}

.visit__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.visit .btn--ghost {
  color: var(--sand);
  border-color: rgba(245, 242, 235, 0.55);
}

.visit .btn--ghost:hover {
  background: var(--sand);
  color: var(--forest-deep);
  border-color: var(--sand);
}

.visit__figure {
  margin: 0;
  overflow: hidden;
}

.visit__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* —— Footer —— */

.site-footer {
  background: var(--forest-deep);
  color: rgba(245, 242, 235, 0.72);
  padding: var(--space-lg) 0;
  font-size: 0.95rem;
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--sand);
  margin-bottom: 0.5rem;
}

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

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

.site-footer__social {
  margin-top: 0.35rem;
}

.site-footer__copy {
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.8;
}

/* —— Reveal motion —— */

.reveal {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

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

/* —— Responsive —— */

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

  .welcome__figure {
    order: -1;
    max-width: 28rem;
  }

  .welcome__figure img {
    aspect-ratio: 4 / 3;
  }

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

  .life__gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .life__shot--wide {
    grid-column: span 2;
  }
}

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

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 0 1rem;
    background: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(15, 36, 25, 0.12);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    color: var(--forest-deep) !important;
    padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem);
  }

  .site-logo {
    color: var(--white);
  }

  .hero__content {
    padding-bottom: 3rem;
  }

  .section {
    padding: var(--space-xl) 0;
  }
}

@media (max-width: 480px) {
  .life__gallery {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .life__shot--wide {
    grid-column: span 1;
  }

  .visit__actions {
    flex-direction: column;
  }

  .visit__actions .btn {
    width: 100%;
  }
}
