:root {
  --ink: #171813;
  --cream: #f5eedf;
  --paper: #fffaf0;
  --orange: #ef5b2a;
  --yellow: #ffd447;
  --green: #b6cc75;
  --line: rgba(23, 24, 19, .18);
  --radius: 1.3rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: "DM Sans", sans-serif; }
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.section { padding: clamp(5rem, 10vw, 9rem) max(5vw, calc((100vw - 1280px) / 2)); }
.eyebrow { margin: 0 0 1.2rem; text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; font-weight: 700; }
.eyebrow::before { content: "✦"; margin-right: .6rem; color: var(--orange); }
.eyebrow.light { color: rgba(255,255,255,.75); }
h1, h2, h3, p { margin-top: 0; }
h2 { margin-bottom: 0; font-family: "Shrikhand", serif; font-size: clamp(3rem, 7vw, 7rem); font-weight: 400; line-height: .95; letter-spacing: -.03em; }

.site-header { position: absolute; inset: 0 0 auto; z-index: 10; height: 88px; padding: 0 5vw; display: flex; align-items: center; justify-content: space-between; color: white; border-bottom: 1px solid rgba(255,255,255,.25); }
.brand { font-weight: 700; font-size: 1.35rem; text-decoration: none; letter-spacing: -.04em; }
.brand span { color: var(--yellow); }
.site-header .brand { display: flex; align-items: center; gap: 0; }
.nav-gary { width: auto; height: 60px; margin-right: .7rem; object-fit: contain; filter: drop-shadow(0 5px 5px rgba(0,0,0,.28)); }
.site-header nav { display: flex; gap: clamp(1.25rem, 3vw, 3rem); }
.site-header nav a { position: relative; padding: .5rem 0; text-decoration: none; font-size: .84rem; font-weight: 600; }
.site-header nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px; background: var(--yellow); transition: right .25s ease; }
.site-header nav a:hover::after, .site-header nav a:focus-visible::after { right: 0; }
.menu-toggle { display: none; background: none; border: 0; color: white; }

.hero { position: relative; min-height: 760px; height: min(900px, 100svh); overflow: hidden; display: grid; align-items: center; padding: 110px 9vw 50px; color: white; background: #423f34; }
.hero video, .hero-shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero video { object-fit: cover; }
.hero-shade { background: linear-gradient(90deg, rgba(8,10,7,.86) 0%, rgba(8,10,7,.51) 51%, rgba(8,10,7,.14) 100%), linear-gradient(0deg, rgba(8,10,7,.35), transparent 45%); }
.hero-copy { position: relative; z-index: 2; max-width: 820px; }
.hero h1 { margin: 0; font-family: "Shrikhand", serif; font-weight: 400; font-size: clamp(5.5rem, 12vw, 11.5rem); line-height: .83; letter-spacing: -.045em; }
.hero h1 em { color: var(--yellow); font-style: normal; }
.hero-line { display: flex; align-items: center; gap: 1rem; margin: 2rem 0 2.4rem; font-size: clamp(1rem, 2vw, 1.4rem); }
.hero-line span { color: var(--yellow); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; gap: 1.2rem; min-height: 54px; padding: 0 1.35rem; border: 1px solid white; text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; transition: transform .2s, background .2s; }
.button:hover { transform: translateY(-3px); }
.button-primary { border-color: var(--yellow); color: var(--ink); background: var(--yellow); }
.button-ghost { backdrop-filter: blur(8px); }
.hero-stamp { position: absolute; z-index: 3; right: 5vw; top: 22%; width: 112px; aspect-ratio: 1; display: grid; place-items: center; border: 2px solid var(--yellow); border-radius: 50%; color: var(--yellow); font-weight: 700; font-size: .72rem; text-align: center; transform: rotate(9deg); }
.scroll-cue { position: absolute; z-index: 3; left: 5vw; bottom: 2rem; display: flex; gap: 1rem; align-items: center; color: white; text-decoration: none; text-transform: uppercase; letter-spacing: .12em; font-size: .66rem; }
.scroll-cue span { font-size: 1.3rem; }

.intro { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(3rem, 9vw, 9rem); align-items: start; }
.intro h2 span { color: var(--orange); }
.intro-copy { padding-top: 2.2rem; }
.intro-copy > p { max-width: 620px; color: #555548; line-height: 1.75; }
.intro-copy .lead { color: var(--ink); font-size: clamp(1.25rem, 2vw, 1.65rem); line-height: 1.45; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 3rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.stats div { display: grid; gap: .25rem; }
.stats strong { font-family: "Shrikhand", serif; font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 400; }
.stats span { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }

.photos { color: white; background: var(--ink); overflow: hidden; }
.photos.section { padding-block: clamp(4rem, 7vw, 6rem); }
.section-heading { display: flex; justify-content: space-between; gap: 3rem; align-items: end; margin-bottom: 3rem; }
.section-heading > p { max-width: 400px; margin-bottom: .5rem; color: #66665b; line-height: 1.7; }
.photos .section-heading > p { color: rgba(255,255,255,.58); }
.carousel { position: relative; }
.carousel-viewport { overflow: visible; }
.carousel-track { display: flex; gap: 1.3rem; transition: transform .65s cubic-bezier(.22,.61,.36,1); }
.slide { flex: 0 0 min(42vw, 420px); margin: 0; opacity: .34; transition: opacity .5s; }
.slide[aria-hidden="false"], .slide:not([aria-hidden]) { opacity: 1; }
.slide img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); }
.slide figcaption { display: flex; gap: 1rem; align-items: center; padding-top: 1rem; text-transform: uppercase; letter-spacing: .09em; font-size: .72rem; font-weight: 700; }
.slide figcaption span { color: var(--yellow); }
.carousel-controls { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1.3rem; width: min(42vw, 420px); margin-top: 1.25rem; }
.round-button { width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); color: white; background: transparent; cursor: pointer; font-size: 1.25rem; transition: background .2s, color .2s; }
.round-button:hover, .round-button:focus-visible { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.carousel-progress { height: 2px; background: rgba(255,255,255,.18); }
.carousel-progress span { display: block; height: 100%; width: 25%; background: var(--yellow); transition: width .45s; }
.carousel-controls p { margin: 0; font-variant-numeric: tabular-nums; font-size: .78rem; }

.favorites { background: var(--paper); }
.favorite-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.favorite-card { border: 1px solid var(--line); background: var(--cream); }
.favorite-card:nth-child(2) { transform: translateY(2.5rem); }
.favorite-card img { width: 100%; aspect-ratio: 1.25; object-fit: cover; filter: saturate(.85); transition: filter .3s, transform .3s; }
.favorite-card:hover img { filter: saturate(1.1); transform: scale(1.015); }
.favorite-card > div { padding: 1.7rem; }
.card-number { color: var(--orange); text-transform: uppercase; letter-spacing: .12em; font-size: .68rem; font-weight: 700; }
.favorite-card h3 { margin: .75rem 0; font-family: "Shrikhand", serif; font-size: 2rem; font-weight: 400; }
.favorite-card p { min-height: 4.8rem; color: #606054; line-height: 1.55; }
.favorite-card a, .text-link { display: inline-block; margin-top: 1rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; text-underline-offset: .35rem; }

.family { color: white; background: #314535; }
.family-heading { display: grid; justify-items: center; max-width: 900px; margin: 0 auto 4rem; text-align: center; }
.family-heading h2 { color: var(--yellow); }
.family-heading > p:last-child { max-width: 520px; margin: 1.5rem auto 0; color: rgba(255,255,255,.68); line-height: 1.7; }
.tree { width: min(100%, 1050px); margin: auto; }
.family-card { display: grid; grid-template-columns: minmax(120px, .8fr) 1.2fr; min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); background: rgba(255,255,255,.07); }
.family-card img { width: 100%; height: 100%; min-height: 220px; object-fit: contain; background: rgba(255,255,255,.08); }
.family-card > div { align-self: center; padding: clamp(1.2rem, 3vw, 2.2rem); }
.family-card span { color: var(--yellow); text-transform: uppercase; font-size: .65rem; font-weight: 700; letter-spacing: .12em; }
.family-card h3 { margin: .6rem 0; font-family: "Shrikhand", serif; font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; }
.family-card p { margin: 0; color: rgba(255,255,255,.65); line-height: 1.5; }
.gary-card { max-width: 580px; margin: auto; background: var(--paper); color: var(--ink); }
.gary-card img { object-fit: contain; background: var(--yellow); }
.gary-card p { color: #5b5b50; }
.gary-card span { color: var(--orange); }
.tree-branch { width: 50%; height: 72px; margin: auto; border-left: 1px solid rgba(255,255,255,.38); border-right: 1px solid rgba(255,255,255,.38); border-top: 0; }
.tree-branch::before { content: ""; display: block; position: relative; top: 50%; width: 100%; border-top: 1px solid rgba(255,255,255,.38); }
.tree-branch span { display: block; height: 50%; width: 50%; border-right: 1px solid rgba(255,255,255,.38); }
.parent-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
.generation { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.18); }
.generation-label { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; }
.generation-label span { color: var(--yellow); font-size: .65rem; }
.root-label { margin-bottom: 1.25rem; }
.ancestor-grid { display: grid; gap: .85rem; }
.grandparents-grid, .great-grandparents-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ancestor-card { min-width: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: .85rem; background: rgba(255,255,255,.05); }
.ancestor-card img { width: 100%; height: 145px; object-fit: contain; background: rgba(255,255,255,.07); }
.ancestor-card div { padding: 1rem; }
.ancestor-card span { display: block; margin-bottom: .4rem; color: var(--yellow); font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.ancestor-card h4 { margin: 0; font-size: .95rem; line-height: 1.25; }

footer { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2rem 5vw; background: var(--ink); color: white; font-size: .8rem; }
footer p { margin: 0; color: rgba(255,255,255,.55); }
footer > a:last-child { text-underline-offset: .3rem; }

@media (max-width: 800px) {
  .site-header { height: 72px; }
  .nav-gary { height: 48px; }
  .menu-toggle { display: grid; gap: 4px; padding: .7rem; z-index: 2; }
  .menu-toggle span:not(.sr-only) { width: 24px; height: 2px; background: currentColor; }
  .site-header nav { position: fixed; inset: 0; display: grid; align-content: center; justify-items: center; gap: 1.8rem; background: var(--ink); transform: translateY(-100%); transition: transform .35s ease; }
  .site-header nav.open { transform: none; }
  .site-header nav a { font-family: "Shrikhand", serif; font-size: 2.2rem; font-weight: 400; }
  .hero { min-height: 680px; height: 100svh; padding: 100px 6vw 130px; align-items: center; }
  .hero-shade { background: linear-gradient(0deg, rgba(8,10,7,.88), rgba(8,10,7,.22)); }
  .hero-copy { align-self: start; margin-top: 8vh; }
  .hero h1 { font-size: clamp(4.7rem, 23vw, 7.2rem); }
  .hero-line { align-items: flex-start; flex-direction: column; gap: .25rem; margin: 1.4rem 0; }
  .hero-line span { display: none; }
  .button-ghost { display: none; }
  .hero-stamp { top: auto; right: 4vw; bottom: 240px; width: 82px; font-size: .56rem; }
  .scroll-cue { display: none; }
  .intro { grid-template-columns: 1fr; }
  .intro-copy { padding-top: 0; }
  .section-heading { align-items: start; flex-direction: column; gap: 1.4rem; }
  .slide { flex-basis: 72vw; }
  .carousel-controls { width: 72vw; grid-template-columns: auto 1fr auto; }
  .carousel-controls .previous { grid-row: 1; }
  .carousel-controls .next { grid-column: 3; grid-row: 1; }
  .carousel-progress { grid-column: 2; }
  .carousel-controls p { display: none; }
  .favorite-grid { grid-template-columns: 1fr; }
  .favorite-card:nth-child(2) { transform: none; }
  .favorite-card { display: grid; grid-template-columns: minmax(110px, .7fr) 1.3fr; }
  .favorite-card img { height: 100%; aspect-ratio: auto; }
  .favorite-card p { min-height: auto; }
  .parent-grid { gap: 1rem; }
  .family-card { grid-template-columns: 1fr; }
  .family-card img { min-height: 170px; max-height: 210px; }
  .grandparents-grid, .great-grandparents-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ancestor-card img { height: 130px; }
}

@media (max-width: 520px) {
  .section { padding-left: 1.15rem; padding-right: 1.15rem; }
  .hero { padding-left: 1.15rem; padding-right: 1.15rem; }
  .hero-actions { max-width: 210px; }
  .stats { gap: .5rem; }
  .favorite-card { display: block; }
  .favorite-card img { aspect-ratio: 1.4; }
  .parent-grid { grid-template-columns: 1fr; }
  .tree-branch { width: 1px; height: 40px; border-right: 0; }
  .tree-branch::before, .tree-branch span { display: none; }
  .family-card { grid-template-columns: minmax(105px, .65fr) 1.35fr; }
  .family-card img { min-height: 160px; max-height: none; }
  .family-card h3 { font-size: 1.7rem; }
  .family-card p { font-size: .82rem; }
  .generation { margin-top: 2.5rem; }
  .generation-label { align-items: flex-start; flex-direction: column; }
  .ancestor-card img { height: 110px; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .hero { background: linear-gradient(135deg, #425447, #171813); }
}
