/* Mac and Cheese — modern editorial (see docs/PRD.md) */
:root {
  --color-bg: #fff9f6;
  --color-bg-soft: #fff3eb;
  --color-surface: #ffffff;
  --color-text: #171412;
  --color-text-muted: #5c534c;
  --color-accent: #c45c3e;
  --color-accent-hover: #a8482f;
  --color-accent-soft: rgba(196, 92, 62, 0.12);
  --color-border: rgba(23, 20, 18, 0.08);
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-sm: 0 1px 2px rgba(23, 20, 18, 0.04);
  --shadow-md: 0 8px 30px rgba(23, 20, 18, 0.07);
  --shadow-lg: 0 20px 50px rgba(23, 20, 18, 0.1);
  --shadow-glow: 0 12px 40px rgba(196, 92, 62, 0.18);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 1.75rem;
  --content-max: 65ch;
  --section-pad: clamp(3rem, 8vw, 5rem);
}

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

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

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

  .hero__visual,
  .gallery-item,
  .button {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse 90% 60% at 100% -10%, rgba(196, 92, 62, 0.09), transparent 55%),
    radial-gradient(ellipse 70% 50% at -10% 30%, rgba(255, 200, 160, 0.35), transparent 50%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(196, 92, 62, 0.06), transparent 45%);
  background-attachment: fixed;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-display);
}

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

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 800;
  margin: 0 0 1rem;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  font-weight: 700;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1rem;
  max-width: var(--content-max);
}

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

a {
  color: var(--color-accent);
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.2em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--color-accent-hover);
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0.65rem max(1rem, env(safe-area-inset-left, 0px)) 0
    max(1rem, env(safe-area-inset-right, 0px));
}

.site-header__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.65rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
}

.site-logo {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  color: var(--color-text);
}

.site-nav {
  width: 100%;
  flex-basis: 100%;
}

@media (min-width: 520px) {
  .site-nav {
    width: auto;
    flex-basis: auto;
  }
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
}

@media (min-width: 520px) {
  .site-nav ul {
    gap: 0.15rem 0.25rem;
    justify-content: flex-end;
  }
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-display);
  text-decoration: none;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  margin: 0;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: rgba(196, 92, 62, 0.12);
}

.site-nav a:hover {
  color: var(--color-text);
  background: rgba(23, 20, 18, 0.05);
}

/* ——— Hero ——— */
.hero {
  display: grid;
  gap: clamp(1.75rem, 4vw, 2.5rem);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2rem) max(1rem, env(safe-area-inset-left, 0px)) 2.5rem
    max(1rem, env(safe-area-inset-right, 0px));
  align-items: center;
}

@media (min-width: 860px) {
  .hero {
    grid-template-columns: 1.05fr 0.95fr;
    padding-bottom: var(--section-pad);
    gap: 3rem;
  }
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--color-accent);
  margin: 0 0 0.85rem;
}

.hero__lede {
  font-size: clamp(1.05rem, 2.5vw, 1.2rem);
  color: var(--color-text-muted);
  max-width: 38ch;
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease,
    border-color 0.2s ease;
  -webkit-tap-highlight-color: rgba(196, 92, 62, 0.15);
}

@media (max-width: 380px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button:hover {
    transform: none;
  }
}

.button--primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, #b54e32 100%);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.button--primary:hover {
  background: linear-gradient(135deg, var(--color-accent-hover) 0%, #943d28 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(196, 92, 62, 0.28);
}

.button--ghost {
  background: var(--color-surface);
  color: var(--color-accent);
  border-color: rgba(196, 92, 62, 0.35);
  box-shadow: var(--shadow-sm);
}

.button--ghost:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent-hover);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.hero__visual {
  border-radius: var(--radius-xl);
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: min(100%, 540px);
  margin-inline: auto;
  background: linear-gradient(145deg, var(--color-bg-soft), #ffe8d9);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  position: relative;
  overflow: hidden;
}

.hero__visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(23, 20, 18, 0.06);
  pointer-events: none;
}

.hero__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Anchor to top so faces/heads aren’t cropped when the frame is shorter than the photo */
  object-position: center top;
  display: block;
}

.hero__placeholder {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  padding: 1rem;
  text-align: center;
}

/* ——— Sections ——— */
.section {
  padding: var(--section-pad) max(1rem, env(safe-area-inset-left, 0px))
    var(--section-pad) max(1rem, env(safe-area-inset-right, 0px));
}

.section--soft {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
}

.section--cta {
  background: linear-gradient(180deg, rgba(255, 243, 235, 0.9) 0%, var(--color-bg) 100%);
  text-align: center;
}

.section--cta .closing-layout {
  text-align: left;
}

.section__inner--closing {
  max-width: min(40rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

.closing-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: stretch;
}

.closing-layout__brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  min-height: 0;
}

.closing-layout__favicon {
  height: 100%;
  width: auto;
  max-width: min(10rem, 32vw);
  object-fit: contain;
  object-position: center left;
}

.closing-layout__text {
  flex: 1 1 auto;
  min-width: 0;
}

.closing-layout__text h2 {
  margin-top: 0;
}

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

@media (max-width: 480px) {
  .closing-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .section--cta .closing-layout {
    text-align: center;
  }

  .closing-layout__brand {
    justify-content: center;
  }

  .closing-layout__favicon {
    max-height: 5rem;
    max-width: 5rem;
    object-position: center;
  }
}

.section__inner {
  max-width: 720px;
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: 52ch;
}

.section__intro {
  font-size: 1.08rem;
  color: var(--color-text-muted);
  margin-bottom: 1.35rem;
  line-height: 1.6;
}

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

@media (min-width: 640px) {
  .timeline {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

.timeline li {
  padding: 1.5rem 1.35rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .timeline li:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }
}

.timeline__title {
  color: var(--color-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
}

.highlights {
  margin: 0;
  padding-left: 1.35rem;
  max-width: var(--content-max);
}

.highlights li {
  margin-bottom: 0.55rem;
}

.life-subheading {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 1.75rem 0 0.65rem;
  letter-spacing: -0.01em;
}

.life-subheading:first-of-type {
  margin-top: 0.25rem;
}

.venue-list {
  margin: 0 0 0.5rem;
  padding-left: 1.35rem;
  max-width: var(--content-max);
  color: var(--color-text);
}

.venue-list li {
  margin-bottom: 0.35rem;
}

.stat {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  max-width: var(--content-max);
}

.stat__value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--color-accent);
  letter-spacing: -0.03em;
}

.stat__label {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* Gallery — Splide carousel (Splide CSS from CDN) */
.section__inner--gallery {
  max-width: min(1100px, 100vw - 2rem);
  margin-left: auto;
  margin-right: auto;
}

#gallery.section {
  padding-bottom: calc(var(--section-pad) + 2.75rem);
}

.gallery-splide {
  margin-top: 0.35rem;
}

.gallery-splide .splide__slide {
  height: auto;
}

.gallery-splide .splide__arrow {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  opacity: 1;
  box-shadow: var(--shadow-md);
  width: 2.65rem;
  height: 2.65rem;
}

.gallery-splide .splide__arrow:hover:not(:disabled) {
  background: var(--color-bg-soft);
}

.gallery-splide .splide__arrow:disabled {
  opacity: 0.35;
}

.gallery-splide .splide__arrow svg {
  fill: var(--color-accent);
}

.gallery-splide .splide__pagination {
  bottom: -2.35rem;
  gap: 0.4rem;
}

.gallery-splide .splide__pagination__page {
  background: var(--color-text-muted);
  opacity: 0.35;
  margin: 0;
}

.gallery-splide .splide__pagination__page.is-active {
  background: var(--color-accent);
  opacity: 1;
}

.gallery-item {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gallery-item img,
.gallery-item__ph {
  aspect-ratio: 1;
  border-radius: 0;
  border: none;
  box-shadow: none;
  flex-shrink: 0;
}

.gallery-item__ph {
  background: linear-gradient(160deg, #ffe8d9, var(--color-bg-soft));
}

.gallery-item img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.gallery-item--video video {
  width: 100%;
  aspect-ratio: 1;
  display: block;
  object-fit: cover;
  background: #1a1816;
}

.gallery-item figcaption {
  margin-top: auto;
  padding: 0.55rem 0.35rem 0.15rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.closing__links {
  margin-top: 1.25rem;
}

/* ——— Footer ——— */
.site-footer {
  padding: 2.5rem max(1rem, env(safe-area-inset-left, 0px)) 2.5rem
    max(1rem, env(safe-area-inset-right, 0px));
  background: linear-gradient(180deg, #1c1917 0%, #141210 100%);
  color: rgba(255, 250, 245, 0.88);
}

.site-footer a {
  color: #ffb89a;
}

.site-footer a:hover {
  color: #ffd4c4;
}

.site-footer__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  font-size: 0.92rem;
}

.site-footer__inner > p:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.site-footer__meta {
  margin-top: 0.65rem;
  font-size: 0.84rem;
  color: rgba(255, 250, 245, 0.65);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* ——— Scroll reveal ——— */
.js-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

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

@media (prefers-reduced-motion: reduce) {
  .js-reveal {
    opacity: 1;
    transform: none;
  }
}
