/* ============================================================
   Remember Dennis Robinson — shared styles
   A soft, warm memorial theme.
   ============================================================ */

:root {
  --cream: #fbf3e7;
  --cream-2: #f5ead9;
  --paper: #fffaf3;
  --blush: #e8c9b8;
  --amber: #d9a86c;
  --amber-2: #c98f4e;
  --terracotta: #c4816a;
  --brown: #6b4a34;
  --brown-dark: #4a3426;
  --ink: #3a2a1f;
  --ink-soft: #6b584a;
  --shadow: 0 10px 30px rgba(74, 52, 38, 0.12);
  --shadow-soft: 0 4px 14px rgba(74, 52, 38, 0.08);
  --radius: 18px;
  --radius-sm: 10px;
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;
  --font-ui: 'Assistant', 'Segoe UI', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brown);
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--brown-dark);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

p {
  margin: 0 0 1em;
}

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 243, 231, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(107, 74, 52, 0.12);
}

.sticky-site-chrome {
  position: sticky;
  top: 0;
  z-index: 50;
}

.sticky-site-chrome .site-header {
  position: static;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--brown-dark);
  letter-spacing: 0.02em;
}

.brand .brand-mark {
  font-size: 1.1rem;
  color: var(--amber-2);
}

.brand .brand-mark.brand-mark-skier {
  width: 46px;
  height: auto;
  flex: 0 0 auto;
  margin-right: 0;
  display: inline-block;
}

@media (max-width: 640px) {
  .brand-mark-skier {
    width: 38px;
  }
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.98rem;
}

.nav-links a {
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--brown-dark);
  border-color: var(--amber-2);
}

.nav-toggle {
  display: none;
}

.donation-banner {
  background: var(--brown-dark);
  color: var(--paper);
  font-family: var(--font-ui);
  text-align: center;
}

.donation-banner p {
  margin: 0;
  padding: 13px 0;
}

.donation-banner a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .nav-links {
    gap: 18px;
    font-size: 0.9rem;
  }
  .brand {
    font-size: 1.15rem;
  }
  .donation-banner {
    font-size: 0.94rem;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.98rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber-2), var(--terracotta));
  color: var(--paper);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: transparent;
  color: var(--brown-dark);
  border-color: rgba(107, 74, 52, 0.35);
}

.btn-secondary:hover {
  background: rgba(107, 74, 52, 0.06);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: radial-gradient(ellipse at 50% 0%, var(--cream-2) 0%, var(--blush) 55%, var(--amber) 130%);
  overflow: hidden;
  padding: 64px 0 48px;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  text-align: left;
}

/* Four photos laid out in a small 2x2 collage so every one of them is
   fully visible at once (an earlier overlapping "fan" hid too much of
   each photo) — each still gets a slight independent tilt for a relaxed,
   candid feel without anything overlapping or being covered up. */
.hero-photo-grid {
  flex: 0 0 auto;
  width: min(480px, 46vw);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 22px;
}

.grid-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 8px solid var(--paper);
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(74, 52, 38, 0.26);
  background: var(--paper);
}

.grid-photo-1 {
  transform: rotate(-3deg);
  object-position: center 88%;
}

.grid-photo-2 {
  transform: rotate(2.5deg);
  object-position: center 22%;
}

.grid-photo-3 {
  transform: rotate(-2deg);
  object-position: center 18%;
}

.grid-photo-4 {
  transform: rotate(3deg);
  object-position: center 20%;
}

@media (max-width: 860px) {
  .hero-photo-grid {
    width: min(420px, 78vw);
    gap: 16px 18px;
  }
}

@media (max-width: 520px) {
  .hero-photo-grid {
    width: min(320px, 84vw);
    gap: 12px 14px;
  }
}

.hero-text {
  flex: 1 1 420px;
  max-width: 560px;
}

.hero-eyebrow {
  font-family: var(--font-ui);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--amber-2);
  opacity: 1;
  margin-bottom: 14px;
}

.hero h1 {
  color: var(--brown-dark);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  margin-bottom: 14px;
  text-wrap: balance;
}

.hero-dates {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  color: var(--ink-soft);
  opacity: 1;
  margin-bottom: 26px;
  letter-spacing: 0.04em;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 10px;
}

@media (max-width: 860px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .hero-text {
    max-width: 560px;
  }

  .hero-actions {
    justify-content: center;
  }
}

/* ---------- decorative silhouettes (skiing / moose hunting) ---------- */
/* A big moose/deer on the right of the hero, and the skier on the left of
   the "A Life Well Lived" section — one per section, as a quiet visual nod
   to how Dennis spent his time outdoors. */

.hero-icon-deer {
  position: absolute;
  z-index: 1;
  right: 3%;
  bottom: 4%;
  height: 300px;
  width: auto;
  opacity: 0.75;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .hero-icon-deer {
    height: 220px;
  }
}

@media (max-width: 860px) {
  .hero-icon-deer {
    height: 160px;
    opacity: 0.5;
  }
}

@media (max-width: 560px) {
  .hero-icon-deer {
    height: 110px;
    right: 2%;
    bottom: 2%;
  }
}

.about-icon-skier {
  position: absolute;
  z-index: 0;
  left: 3%;
  top: 50%;
  transform: translateY(-50%);
  height: 230px;
  width: auto;
  opacity: 0.7;
  pointer-events: none;
}

@media (max-width: 1100px) {
  .about-icon-skier {
    height: 170px;
  }
}

@media (max-width: 860px) {
  .about-icon-skier {
    height: 120px;
    opacity: 0.45;
  }
}

@media (max-width: 560px) {
  .about-icon-skier {
    display: none;
  }
}

@media (max-width: 520px) {
  .hero-icon {
    display: none;
  }
}

.hero .btn-secondary {
  background: var(--brown-dark);
  color: var(--paper);
  border-color: var(--brown-dark);
  box-shadow: var(--shadow-soft);
}

.hero .btn-secondary:hover {
  background: var(--brown);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.scroll-cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(107, 74, 52, 0.35);
  border-radius: 999px;
}

.scroll-cue::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--brown);
  border-radius: 999px;
  transform: translateX(-50%);
  animation: scrollcue 1.8s ease-in-out infinite;
}

@keyframes scrollcue {
  0% { opacity: 1; transform: translate(-50%, 0); }
  70% { opacity: 0; transform: translate(-50%, 14px); }
  100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* ---------- sections ---------- */

section {
  padding: 84px 0;
}

.section-heading {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.section-heading .kicker {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--amber-2);
  margin-bottom: 10px;
  display: block;
}

.section-heading h2 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
}

.section-heading p {
  color: var(--ink-soft);
}

.about {
  position: relative;
  overflow: hidden;
  background: var(--paper);
}

.about-card {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-style: italic;
}

.about-card .signoff {
  margin-top: 22px;
  font-style: normal;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--brown-dark);
}

.cta-row {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 56px;
  flex-wrap: wrap;
}

.link-card {
  flex: 1 1 260px;
  max-width: 320px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px 26px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(107, 74, 52, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.link-card .icon {
  font-size: 2rem;
  margin-bottom: 14px;
}

.link-card h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.link-card p {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.link-card a.card-link {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--amber-2);
}

/* ---------- footer ---------- */

.site-footer {
  padding: 40px 0 50px;
  text-align: center;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  border-top: 1px solid rgba(107, 74, 52, 0.12);
}

.site-footer .heart {
  color: var(--terracotta);
}

/* ---------- page header (non-home pages) ---------- */

.page-hero {
  padding: 70px 0 40px;
  text-align: center;
  background: linear-gradient(180deg, var(--cream-2), var(--cream));
}

.page-hero-tight {
  padding-bottom: 8px;
}

.page-hero .kicker {
  font-family: var(--font-ui);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--amber-2);
  display: block;
  margin-bottom: 12px;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.page-hero p {
  max-width: 620px;
  margin: 10px auto 0;
  color: var(--ink-soft);
}

/* ---------- gallery / slideshow ---------- */

.gallery {
  padding-top: 12px;
}

.slideshow-wrap {
  width: 100%;
  max-width: 1488px;
  margin: 0 auto;
  padding: 0 24px;
}

.slideshow {
  position: relative;
  max-width: 1440px;
  margin: 0 auto 40px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--brown-dark);
}

.slideshow-track {
  position: relative;
  aspect-ratio: 3 / 2;
  width: 100%;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  overflow: hidden;
  transition: opacity 1.1s ease-in-out;
}

.slide.is-active {
  opacity: 1;
  z-index: 1;
}

/* Blurred, scaled-up copy of the same photo fills the frame behind it */
.slide-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
  filter: blur(30px) brightness(0.7) saturate(1.05);
}

/* The real photo, always shown whole — never cropped */
.slide-fg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slideshow-caption {
  max-width: 760px;
  margin: 0 auto 18px;
  padding: 0 12px;
  text-align: center;
  color: var(--brown-dark);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
  min-height: 1.7em;
}

.slideshow-controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  pointer-events: none;
  z-index: 2;
}

.slide-btn {
  pointer-events: auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--brown-dark);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: background 0.2s ease, transform 0.15s ease;
}

.slide-btn:hover {
  background: #fff;
  transform: scale(1.06);
}

.slideshow-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(107, 74, 52, 0.28);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.dot.is-active {
  background: var(--amber-2);
  transform: scale(1.25);
}

.play-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px auto 0;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--ink-soft);
  background: none;
  border: 1px solid rgba(107, 74, 52, 0.25);
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
  width: fit-content;
}

.play-toggle:hover {
  background: rgba(107, 74, 52, 0.06);
}

.gallery-music {
  max-width: 360px;
  margin: 30px auto 0;
  text-align: center;
}

.gallery-music-label {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.gallery-music-start {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--paper);
  background: linear-gradient(135deg, var(--amber-2), var(--terracotta));
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.gallery-music-start:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.gallery-music-start-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 0.7rem;
}

.gallery-music-player {
  position: relative;
  width: 100%;
  height: 175px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--brown-dark);
}

.gallery-music-player[hidden] {
  display: none;
}

.gallery-music-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  max-width: 960px;
  margin: 0 auto;
}

.gallery-grid figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  aspect-ratio: 1 / 1;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.gallery-grid figure.is-active {
  border-color: var(--amber-2);
}

.gallery-grid figure:hover {
  transform: translateY(-2px);
}

/* Blurred, scaled-up copy of the same photo fills the frame behind it */
.thumb-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
  filter: blur(16px) brightness(0.7) saturate(1.05);
}

/* The real photo, always shown whole — never cropped */
.thumb-fg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---------- guestbook ---------- */

.guestbook-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 44px;
  align-items: start;
  max-width: 1020px;
  margin: 0 auto;
}

@media (max-width: 820px) {
  .guestbook-layout {
    grid-template-columns: 1fr;
  }
}

.note-form {
  background: var(--paper);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(107, 74, 52, 0.08);
  position: sticky;
  top: 100px;
}

.note-form h2 {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.note-form .form-sub {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin-bottom: 22px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brown-dark);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(107, 74, 52, 0.25);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber-2);
  box-shadow: 0 0 0 3px rgba(201, 143, 78, 0.18);
}

.field textarea {
  min-height: 120px;
}

.form-status {
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  min-height: 1.2em;
}

.form-status.success {
  color: #6a7a4a;
}

.form-status.error {
  color: #b1523f;
}

.notes-wall h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.notes-wall .form-sub {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin-bottom: 22px;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.note-card {
  background: var(--paper);
  border-radius: var(--radius-sm);
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(107, 74, 52, 0.08);
  border-left: 4px solid var(--amber);
  animation: fadein 0.5s ease both;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.note-card .note-message {
  color: var(--ink);
  margin-bottom: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-card .note-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.note-card .note-name {
  font-weight: 600;
  color: var(--brown-dark);
}

.notes-empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 20px;
  font-style: italic;
  background: var(--paper);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(107, 74, 52, 0.25);
}

.notes-loading {
  text-align: center;
  color: var(--ink-soft);
  padding: 20px;
  font-family: var(--font-ui);
  font-size: 0.9rem;
}
