/* ---------- Theme (lilac and evergreen palette) ---------- */
:root {
  --bg: #233632;          /* darkest evergreen */
  --surface: #2f4540;     /* card green */
  --border: #4b605a;      /* between evergreen and sage */
  --sage: #5a6b66;
  --text: #eef0ec;
  --muted: #c3cdc8;
  --purple: #6e5a8a;      /* button purple */
  --plum: #462c5c;        /* deepest purple */
  --lilac: #8a76a3;       /* outlines and accents */
  --lavender: #c4b5d9;    /* links (lightened for readability) */
  --lavender-light: #ddd3ec;
  --focus: #ddd3ec;
  --radius: 14px;
  --max-width: 52rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

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

figure {
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 1rem;
  background: var(--purple);
  color: #fff;
  border-radius: 6px;
  z-index: 10;
}

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

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

/* ---------- Header: photo left, text right ---------- */
.hero {
  padding: 2.5rem 0 1rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr;
  grid-template-areas: "photos text";
  gap: 2.5rem;
  align-items: center;
}

.hero-text {
  grid-area: text;
}

.gallery {
  grid-area: photos;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--lavender);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: normal;
  line-height: 1.2;
}

.intro {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.text-link {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

/* ---------- Portrait photo slider (no JavaScript) ---------- */
.gallery input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.stage {
  display: grid;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.thumbs label {
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  opacity: 0.55;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: opacity 0.2s ease;
}

.thumbs label:hover {
  opacity: 0.9;
}

.thumbs img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 30%;
}

#photo-1:checked ~ .stage .slide:nth-child(1),
#photo-2:checked ~ .stage .slide:nth-child(2),
#photo-3:checked ~ .stage .slide:nth-child(3),
#photo-4:checked ~ .stage .slide:nth-child(4),
#photo-5:checked ~ .stage .slide:nth-child(5) {
  opacity: 1;
  visibility: visible;
}

#photo-1:checked ~ .thumbs label:nth-child(1),
#photo-2:checked ~ .thumbs label:nth-child(2),
#photo-3:checked ~ .thumbs label:nth-child(3),
#photo-4:checked ~ .thumbs label:nth-child(4),
#photo-5:checked ~ .thumbs label:nth-child(5) {
  opacity: 1;
  outline-color: var(--lilac);
}

#photo-1:focus-visible ~ .thumbs label:nth-child(1),
#photo-2:focus-visible ~ .thumbs label:nth-child(2),
#photo-3:focus-visible ~ .thumbs label:nth-child(3),
#photo-4:focus-visible ~ .thumbs label:nth-child(4),
#photo-5:focus-visible ~ .thumbs label:nth-child(5) {
  outline: 3px solid var(--focus);
}

/* ---------- Sections ---------- */
main {
  padding: 1rem 1.25rem 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.25rem;
  scroll-margin-top: 1rem;
}

.card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.45rem;
  font-weight: normal;
  color: var(--lavender-light);
}

.card p {
  margin: 0 0 1.25rem;
}

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

.card--photo {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 1.5rem;
  align-items: stretch;
}

.card-photo {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  border-radius: 10px;
}

.card-photo--family {
  object-position: 45% center;
}

.card-photo--dog {
  object-position: 60% center;
}

/* ---------- Links & buttons ---------- */
a {
  color: var(--lavender);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--lavender-light);
}

.button {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background: var(--purple);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  font-weight: 600;
}

.button:hover {
  background: var(--plum);
  color: #fff;
}

.charity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.charity-list a {
  display: block;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
}

.charity-list a::after {
  content: " \2197";
}

.charity-note {
  margin-left: 0.4rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--plum);
  color: var(--lavender-light);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.charity-list a:hover {
  background: rgba(70, 44, 92, 0.45);
  border-color: var(--lilac);
}

/* ---------- Footer ---------- */
.site-footer {
  padding: 2rem 0 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--border);
}

/* ---------- Tablets and phones: stack the header ---------- */
@media (max-width: 720px) {
  .hero {
    padding-top: 1.75rem;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "text"
      "photos";
    gap: 1.75rem;
  }

  .hero-text {
    text-align: center;
  }

  .hero-actions {
    flex-direction: column;
  }

  .gallery {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 1rem;
  }

  .thumbs {
    gap: 4px;
  }

  main {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .card {
    padding: 1.25rem;
  }

  .card--photo {
    display: block;
  }

  .card-photo {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 10;
    margin-top: 1.25rem;
  }

  .card-photo--dog {
    aspect-ratio: 4 / 3;
    object-position: center 35%;
  }

  .button {
    display: block;
    width: 100%;
    text-align: center;
  }
}

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

  * {
    transition: none !important;
    animation: none !important;
  }
}