/* Erika Singer, 1982–2026
   Paper, ink, and the green of the water behind her. */

:root {
  --paper: #F4EFE6;
  --paper-deep: #ECE5D8;
  --ink: #17150F;
  --ink-70: rgba(23, 21, 15, .7);
  --ink-50: rgba(23, 21, 15, .5);
  --ink-30: rgba(23, 21, 15, .3);
  --ink-15: rgba(23, 21, 15, .15);
  --ink-08: rgba(23, 21, 15, .08);
  --water: #35594F;
  --water-soft: rgba(53, 89, 79, .14);
  --water-mist: rgba(53, 89, 79, .07);
  --gold: #B9985F;

  --display: "Bodoni Moda", "Bodoni 72", Didot, "Times New Roman", serif;
  --text: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(20px, 5vw, 72px);
  --measure: 36rem;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--text);
  font-weight: 400;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-style: italic; }
::selection { background: var(--water); color: var(--paper); }

/* ---- grain ------------------------------------------------------------ */

.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 50;
  opacity: .045;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  animation: grain 1.6s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-2%, 1%); }
  40%  { transform: translate(1%, -2%); }
  60%  { transform: translate(-1%, 2%); }
  80%  { transform: translate(2%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ---- top bar ---------------------------------------------------------- */

.top {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  transition: background-color .5s var(--ease), padding .5s var(--ease), box-shadow .5s var(--ease);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: calc(var(--pad) * .55) var(--pad);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-70);
  opacity: 0;
  animation: fade 2s var(--ease) 2s forwards;
}
.top a { text-decoration: none; }
.top__mark { color: var(--ink); }
.top__nav { display: flex; gap: clamp(16px, 3vw, 40px); }
.top__nav a { position: relative; }
.top__nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.top__nav a:hover::after, .top__nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.top.is-scrolled {
  padding-top: 14px;
  padding-bottom: 14px;
  background: rgba(244, 239, 230, .92);
  box-shadow: 0 1px 0 var(--ink-08);
}
@media (max-width: 640px) { .top__nav { display: none; } }

/* ---- opening: pinned portrait, story scrolls past --------------------- */

.opening {
  position: relative;
  padding: 0 var(--pad);
  overflow: clip;
}

.hero__water {
  position: absolute;
  inset: 0 0 auto 0;
  height: 100svh;
  z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 60%, transparent 100%);
  opacity: 0;
  animation: fade 2.4s var(--ease) .2s forwards;
}
.hero__water i {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--water-soft) 0%, rgba(53,89,79,.05) 35%, transparent 68%);
  will-change: transform;
}
.hero__water i:nth-child(1) { width: 140vmax; height: 140vmax; right: -60vmax; top: -70vmax; animation: drift1 44s ease-in-out infinite alternate; }
.hero__water i:nth-child(2) { width: 110vmax; height: 110vmax; right: -20vmax; bottom: -70vmax; background: radial-gradient(circle at center, var(--water-mist) 0%, rgba(53,89,79,.03) 35%, transparent 68%); animation: drift2 52s ease-in-out infinite alternate; }
.hero__water i:nth-child(3) { width: 100vmax; height: 100vmax; left: -60vmax; bottom: -30vmax; background: radial-gradient(circle at center, var(--water-mist) 0%, rgba(53,89,79,.03) 35%, transparent 68%); animation: drift3 58s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(-8vw, 10vw) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-14vw, -8vw) scale(.92); } }
@keyframes drift3 { to { transform: translate(10vw, -12vw) scale(1.08); } }

.opening__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: clamp(24px, 4vw, 64px);
  max-width: 1280px;
  margin: 0 auto;
}
.opening__text { grid-column: 1; grid-row: 1; min-width: 0; }
.opening__aside { grid-column: 2; grid-row: 1; position: relative; }

.hero {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: calc(var(--pad) * 2.2) 0 calc(var(--pad) * 1.4);
}
.hero__text { position: relative; z-index: 2; }

/* The photograph is Georgi's, frame and dates included.
   It pins to the viewport while the story scrolls past, then lets go. */
.portrait {
  position: sticky;
  top: 50vh;
  margin: 0;
  width: min(100%, 500px);
  margin-left: auto;
  transform: translateY(-50%);
  will-change: transform;
}
.portrait__frame {
  position: relative;
  transform-origin: 50% 40%;
  transform: scale(var(--shrink, 1));
  transition: transform .25s linear;
}
.portrait__frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  opacity: 0;
  animation: fade 3.2s var(--ease) .8s forwards;
}
.portrait__mat {
  position: absolute;
  inset: 0;
  transform: translate(calc(18px + var(--drift, 0px)), calc(18px + var(--drift, 0px)));
  border: 1px solid var(--ink-30);
  pointer-events: none;
  opacity: 0;
  animation: fade 2s var(--ease) 2.6s forwards;
  transition: transform .25s linear;
}
.portrait figcaption {
  margin-top: 14px;
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-50);
  text-align: right;
  opacity: 0;
  animation: fade 2s var(--ease) 3s forwards;
}

.name {
  margin: 0 0 clamp(20px, 3vw, 40px) -0.04em;
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  font-size: clamp(4.25rem, 13.5vw, 12.5rem);
  line-height: .86;
  letter-spacing: -.015em;
  color: var(--ink);
  font-variation-settings: "opsz" 96;
}
.name { opacity: 0; transform: translateY(8px); animation: settle 3s var(--ease) .4s forwards; }
.name__line { display: block; padding-bottom: .1em; }
@keyframes settle { to { opacity: 1; transform: none; } }

.dates {
  display: flex;
  gap: clamp(28px, 4vw, 56px);
  margin: 0 0 clamp(28px, 3.5vw, 44px);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.8;
  color: var(--ink-70);
  opacity: 0;
  animation: fade 2.4s var(--ease) 1.8s forwards;
}
.dates em {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 11;
  text-transform: none;
  letter-spacing: 0;
  font-size: 1.05rem;
  color: var(--water);
}

.hero__line {
  margin: 0;
  max-width: 22ch;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 18;
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  line-height: 1.25;
  color: var(--water);
  opacity: 0;
  animation: fade 2.4s var(--ease) 2.4s forwards;
}

@keyframes fade { to { opacity: 1; } }

/* life, inside the opening so the portrait can stay beside it */
.section--life { padding-left: 0; padding-right: 0; max-width: none; }
.section--life .prose { margin-left: auto; margin-right: 0; }

@media (max-width: 900px) {
  .opening__grid { grid-template-columns: 1fr; row-gap: clamp(28px, 6vw, 48px); }
  .opening__aside { grid-column: 1; grid-row: 1; padding-top: calc(var(--pad) * 4.2); }
  .opening__text { grid-column: 1; grid-row: 2; }
  .portrait { position: static; transform: none; width: min(calc(100% - 14px), 420px); margin-left: auto; margin-right: auto; }
  .portrait__frame { transform: none !important; }
  .portrait__mat { transform: translate(14px, 14px) !important; }
  .hero { min-height: 0; padding-top: 0; }
  .name { font-size: clamp(4.5rem, 21vw, 9rem); }
  .dates { flex-direction: column; gap: 10px; }
  .section--life .prose { margin-right: auto; }
}

/* ---- progress hairline ------------------------------------------------ */

.progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 1px;
  z-index: 60;
  pointer-events: none;
}
.progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--ink);
  transform: scaleX(var(--progress, 0));
  transform-origin: left;
}

/* ---- words arriving --------------------------------------------------- */

.w {
  opacity: 0;
  transition: opacity 1.4s var(--ease);
  transition-delay: calc(var(--i) * 70ms);
}
.is-in .w, .w.is-in { opacity: 1; transform: none; }

/* soft to sharp */
.focus { filter: blur(10px); opacity: 0; transition: filter 1.4s var(--ease), opacity 1.2s var(--ease); }
.is-in .focus, .focus.is-in { filter: blur(0); opacity: 1; }

/* the map fades in once it is in view */
.map iframe { opacity: 0; transition: opacity 2s var(--ease), filter 1.2s var(--ease); }
.map.is-in iframe { opacity: 1; }

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

.section {
  position: relative;
  padding: clamp(72px, 10vw, 140px) var(--pad);
  max-width: 1280px;
  margin: 0 auto;
}
.section__head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.label {
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--water);
  white-space: nowrap;
}
.rule {
  margin: 0;
  border: 0;
  height: 1px;
  background: var(--ink-15);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.4s var(--ease-out) .1s;
}
.reveal.is-in .rule, .is-in .rule { transform: scaleX(1); }

.prose {
  max-width: var(--measure);
  margin-left: auto;
  margin-right: max(0px, calc((100% - var(--measure)) / 2 - 8vw));
}
@media (max-width: 900px) { .prose { margin-right: auto; } }

.prose p { margin: 0 0 1.5em; color: var(--ink-70); }
.lead {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.55rem, 2.3vw, 1.95rem);
  line-height: 1.3;
  letter-spacing: .005em;
  color: var(--ink) !important;
  margin-bottom: 1.4em !important;
  font-variation-settings: "opsz" 14;
}
.pull {
  margin: clamp(48px, 6vw, 80px) 0 clamp(48px, 6vw, 80px) calc(-1 * clamp(0px, 8vw, 120px));
  padding: 0;
  border: 0;
  max-width: calc(var(--measure) + clamp(0px, 8vw, 120px));
}
.pull p {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  line-height: 1.12;
  color: var(--water);
  letter-spacing: -.01em;
}
@media (max-width: 900px) { .pull { margin-left: 0; } }
.close > span { display: block; }
.close {
  margin-top: clamp(48px, 6vw, 80px) !important;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 18;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.25;
  color: var(--ink) !important;
}

/* ---- memorial --------------------------------------------------------- */

.section--memorial {
  max-width: none;
  background: linear-gradient(180deg, transparent, var(--paper-deep) 18%, var(--paper-deep) 82%, transparent);
}
.section--memorial .section__head, .memorial { max-width: 1280px; margin-left: auto; margin-right: auto; }
.memorial {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.memorial__when p, .memorial__when address { margin: 0; font-style: normal; }
.memorial__day {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -.015em;
  margin-bottom: .5em !important;
}
.num { font-family: var(--display); font-style: italic; font-weight: 500; font-variation-settings: "opsz" 14; }
.memorial__time {
  font-size: 1.15rem;
  color: var(--ink-70);
  margin-bottom: 2.2em !important;
}
.memorial__time .num { font-size: 2em; line-height: 1; color: var(--ink); vertical-align: -.08em; }
.memorial__where {
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 2.2em !important;
}
.memorial__where .num { font-size: 1.35em; line-height: 1; vertical-align: -.06em; }
.memorial__venue {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.9em;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease);
}
.memorial__venue:hover { border-color: var(--ink-30); }
.memorial__links { display: flex; gap: 32px; flex-wrap: wrap; }

.link {
  display: inline-flex;
  align-items: baseline;
  gap: .6em;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--ink-30);
  padding-bottom: 6px;
  transition: border-color .4s var(--ease);
}
.link:hover { border-color: var(--ink); }
.link__arrow { display: inline-block; transition: transform .5s var(--ease-out); }
.link:hover .link__arrow { transform: translateX(6px); }
.link--button { background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font-family: inherit; }

.map {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
}
.map__mat {
  position: absolute;
  inset: 0;
  transform: translate(18px, 18px);
  border: 1px solid var(--ink-30);
  pointer-events: none;
}
.map iframe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) sepia(.18) contrast(.86) brightness(1.04);
}
.map:hover iframe { filter: grayscale(.2) sepia(.05) contrast(.95) brightness(1); }
@media (max-width: 900px) {
  .memorial { grid-template-columns: 1fr; }
  .map { aspect-ratio: 1 / 1; }
}

/* ---- share ------------------------------------------------------------ */

.share {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.share__intro p { margin: 0 0 1.4em; color: var(--ink-70); }
.share__intro .lead { color: var(--ink) !important; font-size: clamp(1.45rem, 2vw, 1.75rem); }
@media (max-width: 900px) { .share { grid-template-columns: 1fr; } }

.form { max-width: 640px; }
.field { margin-bottom: clamp(28px, 3vw, 40px); }
.field label, .field__label {
  display: block;
  margin-bottom: 10px;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-70);
}
.field label small {
  display: block;
  margin-top: 4px;
  font-size: .6875rem;
  font-weight: 300;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--ink-50);
}
.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--ink-30);
  background: transparent;
  padding: 10px 0 12px;
  font: inherit;
  font-weight: 400;
  font-size: 1.125rem;
  color: var(--ink);
  border-radius: 0;
  outline: none;
  transition: border-color .4s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.55; }
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--paper) inset; -webkit-text-fill-color: var(--ink); }

.field label.drop {
  position: relative;
  display: block;
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 0;
  padding: clamp(28px, 4vw, 44px) 24px;
  border: 1px solid var(--ink-30);
  text-align: center;
  cursor: pointer;
  transition: border-color .4s var(--ease), background-color .4s var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.drop:hover, .drop:focus-visible, .drop.is-over { border-color: var(--ink); background: rgba(255,255,255,.35); outline: none; }
.drop input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}
.drop__title {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.6rem;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 10px;
}
.drop__hint { display: block; font-size: .8125rem; color: var(--ink-50); line-height: 1.6; }

.previews {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 10px;
}
.previews:empty { display: none; }
.previews li {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--paper-deep);
  animation: pop .5s var(--ease-out);
}
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.previews img { width: 100%; height: 100%; object-fit: cover; }
.previews .ph {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-50);
  padding: 8px;
  text-align: center;
  line-height: 1.4;
}
.previews button {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form__foot { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.button {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  padding: 18px 34px;
  font: inherit;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color .4s var(--ease), color .4s var(--ease), opacity .3s;
  -webkit-tap-highlight-color: transparent;
}
.button:hover { background: var(--water); border-color: var(--water); }
.button[disabled] { cursor: progress; opacity: .85; }
.button__label { position: relative; z-index: 1; }
.button__progress {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--p, 0%);
  background: var(--water);
  transition: width .3s var(--ease);
}
.form__status { margin: 0; font-size: .875rem; color: var(--ink-70); min-height: 1.4em; }
.form__status.is-error { color: #8B3A2F; }

.thanks { max-width: 640px; animation: fadeUp 1.2s var(--ease-out); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }
.thanks__big {
  margin: 0 0 .4em;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1;
  color: var(--ink);
}
.thanks__text { margin: 0 0 2em; color: var(--ink-70); font-size: 1.125rem; }

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

.foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: calc(var(--pad) * .8) var(--pad) calc(var(--pad) * .8 + env(safe-area-inset-bottom));
  border-top: 1px solid var(--ink-15);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-50);
}
.foot__dates { font-family: var(--display); font-style: italic; font-weight: 400; font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--ink); }

/* ---- reveal on scroll ------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.6s var(--ease), transform 1.6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ---- motion preferences ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .hero__water i, .hero__more span { animation: none; }
  .top, .hero__water, .dates, .hero__line, .portrait__frame img, .portrait__mat, .portrait figcaption, .name { animation: none; opacity: 1; transform: none; }
  .portrait__mat { transform: translate(18px, 18px); }
  .w, .focus { opacity: 1; transform: none; filter: none; transition: none; }
  .map iframe { opacity: 1; transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .rule { transform: none; transition: none; }
}
