/* Carole Osgood memorial site. Palette: forest greens and ocean blues from the 2015 site, warm cream paper,
   monarch orange used sparingly for butterflies. Headings Playfair Display, body Inter. */
:root {
  --forest-950: #06130f; --forest-900: #0b1f1a; --forest-800: #11302a; --forest-700: #1a4337; --moss: #3f6b4a;
  --leaf: #9cc98a; --sky: #7cc0e6; --ocean: #1f63b3; --ocean-deep: #0f3d73;
  --cream: #f6f2e8; --paper: #fbf9f3; --ink: #1c2925; --ink-soft: #4a5a54; --line: #e3ddcd;
  --monarch: #e9963a;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 18px;
  --shadow: 0 18px 50px -20px rgba(6, 19, 15, .45);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { max-width: 100%; display: block; }
a { color: var(--ocean); text-underline-offset: 3px; }
a:hover { color: var(--ocean-deep); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); }
h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.45rem; }
em.accent, .accent { font-style: italic; color: var(--leaf); }
.on-light .accent { color: var(--moss); }
p { margin: 0 0 1.1em; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.eyebrow { font-family: var(--sans); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; color: var(--moss); margin: 0 0 1rem; }
.dark .eyebrow, .footer .eyebrow { color: var(--leaf); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- navigation: floating glass pill ---------- */
.nav { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50; width: min(1100px, 100% - 24px);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 18px;
  background: rgba(8, 26, 21, .42); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; color: #fff; transition: background .4s; }
.nav.solid { background: rgba(8, 26, 21, .82); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-family: var(--serif); font-size: 1.12rem; white-space: nowrap; }
.brand svg { width: 30px; height: 30px; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a.link { color: rgba(255, 255, 255, .86); text-decoration: none; font-size: .92rem; padding: 8px 13px; border-radius: 999px; display: block; transition: background .2s, color .2s; }
.nav a.link:hover, .nav a.link[aria-current="page"] { background: rgba(255, 255, 255, .14); color: #fff; }
.nav a.cta { background: var(--cream); color: var(--forest-900); font-weight: 600; }
.nav a.cta:hover { background: #fff; color: var(--forest-900); }
.menu-btn { display: none; background: none; border: 0; color: #fff; padding: 8px 10px; cursor: pointer; border-radius: 999px; }
.menu-btn svg { width: 26px; height: 26px; }
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .nav { border-radius: 26px; flex-wrap: wrap; }
  .nav ul { display: none; flex-direction: column; width: 100%; padding: 6px 0 8px; }
  .nav.open ul { display: flex; }
  .nav.open { background: rgba(8, 26, 21, .94); }
  .nav a.link { padding: 11px 14px; font-size: 1rem; }
}

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: end; color: #fff; overflow: hidden; background: var(--forest-900); isolation: isolate; }
.hero video, .hero .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(6, 19, 15, .55) 0%, rgba(6, 19, 15, .05) 30%, rgba(6, 19, 15, .15) 55%, rgba(6, 19, 15, .86) 100%),
              radial-gradient(120% 80% at 10% 100%, rgba(15, 61, 115, .45), transparent 60%); }
.hero-inner { padding: 0 0 clamp(48px, 10vh, 110px); }
.hero h1 { margin: 0; text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.hero .dates { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3vw, 2.2rem); color: var(--leaf); margin: .2em 0 .6em; }
.hero .lede { max-width: 620px; font-size: clamp(1rem, 1.6vw, 1.18rem); color: rgba(255, 255, 255, .9); }
.hero.page { min-height: 72svh; }
.hero.page h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.scroll-cue { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: 26px; height: 42px; border: 2px solid rgba(255, 255, 255, .6); border-radius: 14px; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 2s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
.video-toggle { position: absolute; right: 18px; bottom: 18px; background: rgba(0, 0, 0, .35); color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: .8rem; cursor: pointer; }

/* ---------- buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; transition: transform .2s, background .2s, color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn.light { background: var(--cream); color: var(--forest-900); }
.btn.light:hover { background: #fff; color: var(--forest-900); }
.btn.ghost { border: 1px solid rgba(255, 255, 255, .5); color: #fff; }
.btn.ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn.dark { background: var(--forest-800); color: #fff; }
.btn.dark:hover { background: var(--forest-700); color: #fff; }

/* ---------- sections ---------- */
section { position: relative; }
.pad { padding-block: clamp(72px, 11vw, 140px); }
.dark { background: var(--forest-900); color: rgba(255, 255, 255, .88); }
.dark h2, .dark h3 { color: #fff; }
.cream { background: var(--cream); }
.two { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.portrait { position: relative; }
.portrait img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.portrait .tag { position: absolute; left: -14px; bottom: 26px; background: var(--paper); border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow); font-family: var(--serif); font-style: italic; color: var(--moss); max-width: 230px; line-height: 1.35; }
blockquote.big { margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.35; color: var(--forest-900); }
blockquote.big::before { content: "\201C"; display: block; font-size: 4.5rem; line-height: .6; color: var(--leaf); margin-bottom: .2em; }
.cite { font-size: .95rem; color: var(--ink-soft); margin-top: 1.2rem; }
.cite strong { color: var(--ink); font-weight: 600; }

/* full-bleed photo band */
.band { position: relative; min-height: 88svh; display: grid; place-items: center; text-align: center; color: #fff; overflow: hidden; isolation: isolate; }
.band > img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; z-index: -2; will-change: transform; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 70% at 50% 50%, rgba(6, 19, 15, .25), rgba(6, 19, 15, .7)); }
.band blockquote { margin: 0 auto; max-width: 900px; font-family: var(--serif); font-size: clamp(1.7rem, 4.2vw, 3.3rem); line-height: 1.25; text-shadow: 0 2px 24px rgba(0, 0, 0, .4); }
.band .cite { color: rgba(255, 255, 255, .85); }
.band .cite strong { color: #fff; }

/* life in brief */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 2.4rem; }
.fact { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius); padding: 22px; }
.fact .k { font-family: var(--serif); font-size: 1.9rem; color: var(--leaf); line-height: 1.1; }
.fact .v { font-size: .95rem; color: rgba(255, 255, 255, .78); margin-top: 6px; }

/* photo mosaic */
.mosaic { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 170px; grid-auto-flow: dense; gap: 10px; margin-top: 2.4rem; }
.mosaic a { overflow: hidden; border-radius: 14px; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.mosaic a:hover img { transform: scale(1.06); }
.mosaic .w2 { grid-column: span 2; } .mosaic .h2 { grid-row: span 2; }
@media (max-width: 760px) { .mosaic { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 110px; } .mosaic .w2 { grid-column: span 1; } }

/* story cards on home */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 2.4rem; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: var(--ink); }
.card h3 { font-size: 1.3rem; }
.card p { color: var(--ink-soft); flex: 1; }
.card .by { font-size: .88rem; color: var(--moss); font-weight: 600; }

/* places teaser + timeline */
.places-teaser { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 2.4rem; }
.places-teaser a { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; color: #fff; text-decoration: none; }
.places-teaser img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.places-teaser a:hover img { transform: scale(1.05); }
.places-teaser span { position: absolute; inset: auto 0 0 0; padding: 40px 16px 16px; background: linear-gradient(transparent, rgba(6, 19, 15, .85)); font-family: var(--serif); font-size: 1.15rem; line-height: 1.25; }
.places-teaser small { display: block; font-family: var(--sans); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--leaf); }
@media (max-width: 760px) { .places-teaser { grid-template-columns: repeat(2, 1fr); } }
.timeline { position: relative; margin-top: 3rem; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--leaf), var(--sky)); opacity: .5; }
.stop { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; margin-bottom: clamp(60px, 9vw, 120px); position: relative; }
.stop::before { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--leaf); box-shadow: 0 0 0 6px rgba(156, 201, 138, .2); }
.stop:nth-child(even) .stop-img { order: 2; }
.stop-img img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.stop .years { font-family: var(--serif); font-style: italic; color: var(--leaf); font-size: 1.3rem; }
.stop h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: .3em; color: #fff; }
.stop p { color: rgba(255, 255, 255, .8); }
.stop .memory { border-left: 2px solid var(--leaf); padding-left: 16px; font-style: italic; color: rgba(255, 255, 255, .72); font-size: .97rem; }
@media (max-width: 820px) {
  .timeline::before, .stop::before { left: 8px; }
  .stop { grid-template-columns: 1fr; padding-left: 34px; }
  .stop::before { top: 14px; }
  .stop:nth-child(even) .stop-img { order: 0; }
}
.map-frame { width: 100%; height: 520px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--forest-800); }

/* ---------- stories ---------- */
.story-index { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 1.6rem; }
.story-index a { font-size: .85rem; padding: 6px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-soft); text-decoration: none; }
.story-index a:hover { border-color: var(--moss); color: var(--forest-900); }
.story { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(28px, 5vw, 60px); margin: 0 0 28px; box-shadow: 0 10px 40px -30px rgba(6, 19, 15, .5); position: relative; scroll-margin-top: 100px; }
.story h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); color: var(--forest-900); margin-bottom: .2em; }
.story .meta { font-size: .85rem; color: var(--ink-soft); margin-bottom: 1.6rem; letter-spacing: .02em; }
.story .body > p:first-child::first-letter { font-family: var(--serif); float: left; font-size: 3.6rem; line-height: .85; padding: 6px 10px 0 0; color: var(--moss); }
.story .body p { color: #2c3a35; }
.story .poem { font-family: var(--serif); font-style: italic; font-size: 1.12rem; color: var(--forest-800); border-left: 3px solid var(--leaf); padding-left: 20px; margin: 1.4em 0; }
.story .poem p { margin: 0 0 .5em; }
.story hr.sep { border: 0; text-align: center; margin: 1.2em 0; height: 1em; }
.story hr.sep::after { content: "\2022  \2022  \2022"; color: var(--leaf); letter-spacing: .4em; }
.story .sig { margin-top: 1.8rem; padding-top: 1.2rem; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 1.2rem; color: var(--forest-900); }
.story .sig span { display: block; font-family: var(--sans); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; color: var(--moss); margin-top: 2px; }

/* ---------- gallery ---------- */
.gallery { columns: 4 240px; column-gap: 12px; margin-top: 2.4rem; }
.gallery a { display: block; margin: 0 0 12px; break-inside: avoid; border-radius: 12px; overflow: hidden; position: relative; }
.gallery img { width: 100%; height: auto; transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .4s; }
.gallery a:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(4, 12, 10, .94); display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(92vw, 1600px); max-height: 86vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 1px solid rgba(255, 255, 255, .2); width: 50px; height: 50px; border-radius: 50%; font-size: 1.4rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .2); }
.lightbox .close { top: 18px; right: 18px; } .lightbox .prev { left: 18px; top: 50%; } .lightbox .next { right: 18px; top: 50%; }
.lightbox .count { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, .7); font-size: .85rem; }

/* embeds */
.embed { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--forest-800); }
.embed.video { aspect-ratio: 16 / 9; }
.embed iframe { width: 100%; height: 100%; border: 0; display: block; }
.embed.form iframe { height: 1900px; background: #fff; }

/* ---------- footer with shader ---------- */
.footer { position: relative; overflow: hidden; color: rgba(255, 255, 255, .85); background: var(--forest-950); isolation: isolate; }
.footer canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; display: block; }
.footer .top { padding-block: clamp(80px, 12vw, 150px) 60px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; }
.footer h2 { color: #fff; font-size: clamp(2.2rem, 5.5vw, 4.4rem); margin: 0 0 .4em; }
.footer .verse { border-left: 1px solid rgba(255, 255, 255, .3); padding-left: 22px; font-family: var(--serif); font-style: italic; color: rgba(255, 255, 255, .82); font-size: 1.05rem; line-height: 1.6; }
.footer .verse small { display: block; font-family: var(--sans); font-style: normal; font-size: .8rem; color: var(--leaf); margin-top: 10px; letter-spacing: .05em; }
.footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding-block: 28px 34px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .88rem; }
.footer .bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0; padding: 0; }
.footer .bottom a { color: rgba(255, 255, 255, .8); text-decoration: none; }
.footer .bottom a:hover { color: #fff; }
@media (max-width: 820px) { .footer .top { grid-template-columns: 1fr; } }

/* hero text readability over the video */
.hero .eyebrow { color: #fff; text-shadow: 0 1px 12px rgba(0, 0, 0, .6); }
.hero .lede, .hero .dates { text-shadow: 0 1px 14px rgba(0, 0, 0, .55); }

/* scroll reveals */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s cubic-bezier(.2, .7, .2, 1), transform 1s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .12s; } .reveal.d2 { transition-delay: .24s; } .reveal.d3 { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue::after { animation: none; }
}
.center { text-align: center; }
.mt { margin-top: 2.4rem; }
.muted { color: var(--ink-soft); }
.dark .muted { color: rgba(255, 255, 255, .65); }
/* page headers: darker on the text side so titles stay readable over bright photos */
.hero.page::after { background: linear-gradient(90deg, rgba(6, 19, 15, .78) 0%, rgba(6, 19, 15, .45) 45%, rgba(6, 19, 15, .1) 80%),
  linear-gradient(180deg, rgba(6, 19, 15, .5) 0%, transparent 30%, transparent 60%, rgba(6, 19, 15, .7) 100%); }
/* keep the butterfly in frame on narrow screens (it sits right of centre in the video) */
.hero video { object-position: 66% 50%; }
@media (max-width: 600px) { .lightbox .prev, .lightbox .next { top: auto; bottom: 14px; } .lightbox .prev { left: 24px; } .lightbox .next { right: 24px; } .lightbox .count { bottom: 30px; } }
/* menu-bar butterfly: a real blue morpho that spills over the edges of the bar */
.brand { position: relative; padding-left: 56px; }
.brand-bfly { position: absolute; left: -14px; top: 50%; width: 70px; height: auto; transform: translateY(-66%) rotate(-10deg);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); pointer-events: none; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.brand:hover .brand-bfly { transform: translateY(-70%) rotate(-4deg) scale(1.05); }
@media (max-width: 900px) { .brand { padding-left: 48px; } .brand-bfly { width: 60px; left: -11px; } }
/* menu-bar name: very light blue, white on hover */
.nav .brand { color: #cfe8fb; transition: color .3s ease; }
.nav .brand:hover, .nav .brand:focus-visible { color: #fff; }
/* still butterfly photos on the story cards (real museum specimens, cut out) */
.card-bfly img { height: 58px; width: auto; margin: -4px 0 16px -4px; filter: drop-shadow(0 6px 8px rgba(6, 19, 15, .22)); transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-bfly img { transform: rotate(-4deg) scale(1.06); }
.footer .credits { display: block; margin-top: 6px; font-size: .75rem; color: rgba(255, 255, 255, .5); max-width: 620px; line-height: 1.5; }
.footer .credits a { color: rgba(255, 255, 255, .65); text-decoration: underline; }
