/* cominoli.com: one-page memorial. Ink, paper, brass. Mobile first. */
:root {
  --ink: #111214;
  --ink-2: #17191c;
  --ink-3: #1e2125;
  --paper: #ece3d0;
  --paper-dim: #b9af9b;
  --paper-mute: #8d8574;
  --brass: #c2a36b;
  --brass-dim: #8a7550;
  --oxblood: #8e3b2f;
  --rule: rgba(194, 163, 107, .28);
  --display: "Libre Caslon Display", "IM Fell English", Georgia, "Times New Roman", serif;
  --text: "IM Fell English", Georgia, "Times New Roman", serif;
  --gutter: 16px;
  --measure: 34em;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 18.5px/1.65 var(--text);
  font-feature-settings: "liga", "kern", "onum";
  overflow-x: hidden;
}
/* film grain over everything, very faint */
body::after {
  content: ""; position: fixed; inset: -50%; z-index: 50; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: var(--brass); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
em { font-style: italic; }
strong { font-weight: 700; color: #f6eedd; }
.smallcaps { font-variant: small-caps; letter-spacing: .06em; text-transform: lowercase; }
.eyebrow {
  font: 400 12px/1.3 var(--text); letter-spacing: .26em; text-transform: uppercase;
  color: var(--brass); margin: 0 0 14px;
}

/* ---------- top bar ---------- */
.topbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: max(14px, env(safe-area-inset-top)) var(--gutter) 14px;
}
.wordmark {
  font: 400 15px/1 var(--display); letter-spacing: .32em; text-transform: uppercase;
  color: var(--paper); text-decoration: none;
}
.est { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--paper-dim); white-space: nowrap; }
.est .wide { display: none; }
.hero-credit { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper-mute); margin: -8px 0 22px; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; }
.hero-photo { position: absolute; inset: 0; margin: 0; overflow: hidden; }
.hero-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%;
  animation: settle 14s ease-out both;
}
.hero-photo::after { /* fade the photo into the page so the title can sit on it */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(17,18,20,.55) 0%, rgba(17,18,20,0) 22%, rgba(17,18,20,0) 38%, rgba(17,18,20,.82) 66%, var(--ink) 92%),
    radial-gradient(ellipse at 50% 35%, transparent 40%, rgba(0,0,0,.45) 100%);
}
.hero-photo figcaption {
  display: none;
  position: absolute; z-index: 2; right: var(--gutter); top: 54%;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: rgba(236,227,208,.6);
}
.hero-text { position: relative; z-index: 3; padding: 0 var(--gutter) 40px; }
.hero h1 {
  font: 400 clamp(32px, 11vw, 96px)/.92 var(--display); letter-spacing: -.01em; margin: 0 0 22px;
  text-shadow: 0 2px 30px rgba(0,0,0,.5);
}
.lede { font-size: 19px; line-height: 1.55; font-style: italic; color: #e2d8c3; max-width: 26em; margin: 0 0 26px; }
.scroll {
  display: inline-flex; gap: 10px; align-items: center; text-decoration: none;
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--paper-dim);
  border-top: 1px solid var(--rule); padding-top: 12px;
}
.scroll span { animation: nudge 2.4s ease-in-out infinite; color: var(--brass); }
@keyframes settle { from { transform: scale(1.07); filter: brightness(.7); } to { transform: none; filter: none; } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

/* ---------- ornament ---------- */
.ornament { display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--brass); font-size: 9px; margin: 36px var(--gutter); }
.ornament span { height: 1px; width: 64px; background: linear-gradient(90deg, transparent, var(--brass-dim)); }
.ornament span:last-child { transform: scaleX(-1); }

/* ---------- chapters ---------- */
.chapter { padding: 40px var(--gutter) 56px; max-width: 1240px; margin: 0 auto; }
.chapter + .chapter { border-top: 1px solid var(--rule); }
.chapter-head { text-align: center; margin-bottom: 34px; }
.numeral { font: 400 14px/1 var(--display); letter-spacing: .3em; color: var(--brass); margin: 0 0 12px; }
.numeral::before, .numeral::after { content: "\2014\2002"; color: var(--brass-dim); }
.numeral::after { content: "\2002\2014"; }
.chapter h2 { font: 400 clamp(36px, 9vw, 64px)/1.02 var(--display); margin: 0; }
.chapter-body { display: grid; gap: 36px; }
.prose { max-width: var(--measure); margin: 0 auto; }
.prose p { margin: 0 0 1.1em; }
.dropcap::first-letter {
  float: left; font: 400 4.1em/.78 var(--display); color: var(--brass);
  padding: .08em .1em 0 0;
}
.figures { display: grid; gap: 22px; }
.plate { margin: 0; }
.plate img {
  width: 100%;
  border: 1px solid rgba(236,227,208,.08);
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 24px 60px -20px rgba(0,0,0,.8);
}
.plate figcaption {
  margin-top: 10px; font-size: 13px; line-height: 1.45; font-style: italic; color: var(--paper-mute);
  padding-left: 12px; border-left: 1px solid var(--brass-dim);
}

/* the letter: a sheet of paper on the dark page */
.letter {
  --pt: 26px;
  margin: 30px 0; padding: var(--pt) 24px 20px; position: relative;
  background-position: 0 calc(var(--pt) - 3px);
  background-color: #efe5cf; color: #2b241b;
  background-image: repeating-linear-gradient(180deg, transparent 0 31px, rgba(80,110,150,.18) 31px 32px);
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.9);
  transform: rotate(-.6deg);
}
.letter::before { /* a red margin line, like Tina's ruled paper */
  content: ""; position: absolute; top: 0; bottom: 0; left: 14px; width: 1px; background: rgba(170,60,50,.35);
}
.letter p { margin: 0; font: italic 20px/32px var(--text); }
.letter footer { margin-top: 10px; text-align: right; font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: #6d5e47; }
.aside { color: var(--paper-dim); font-style: italic; }
.pull {
  font: 400 clamp(24px, 6vw, 34px)/1.25 var(--display); color: #f6eedd; text-align: center;
  margin: 30px 0 !important; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.pull span { display: block; margin-top: 10px; font: 400 12px/1 var(--text); letter-spacing: .24em; text-transform: uppercase; color: var(--brass); }

/* ---------- chronology ---------- */
.chronology { background: var(--ink-2); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 56px var(--gutter) 48px; }
.chronology h2 { font: 400 clamp(30px, 7vw, 48px)/1.05 var(--display); text-align: center; margin: 0 0 30px; }
.chronology ol { list-style: none; margin: 0 auto; padding: 0; max-width: 40em; position: relative; }
.chronology ol::before { content: ""; position: absolute; left: 68px; top: 8px; bottom: 8px; width: 1px; background: var(--rule); }
.chronology li { display: grid; grid-template-columns: 64px 1fr; gap: 22px; padding: 10px 0; position: relative; }
.chronology li::before { content: ""; position: absolute; left: 65px; top: 22px; width: 7px; height: 7px; background: var(--brass); transform: rotate(45deg); }
.chronology b { font: 400 21px/1.4 var(--display); color: var(--brass); font-feature-settings: "lnum"; }
.chronology span { color: #ddd3bf; padding-left: 4px; }

/* ---------- dedication ---------- */
.dedication { text-align: center; padding: 72px var(--gutter) 64px; max-width: 760px; margin: 0 auto; }
.cameo { margin: 0 auto 26px; width: 168px; height: 210px; border-radius: 50%; overflow: hidden; position: relative;
  border: 1px solid var(--brass-dim); box-shadow: 0 0 0 8px var(--ink), 0 0 0 9px var(--rule), 0 26px 60px -20px rgba(0,0,0,.9); }
.cameo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.dedication h2 { font: 400 clamp(56px, 16vw, 96px)/1 var(--display); margin: 0 0 8px; }
.dates { letter-spacing: .2em; text-transform: uppercase; font-size: 12px; color: var(--paper-dim); margin: 0 0 22px; }
.tribute { font-style: italic; font-size: 18px; line-height: 1.65; color: #e2d8c3; max-width: 30em; margin: 0 auto; }

/* ---------- footer ---------- */
.site-foot { text-align: center; padding: 8px var(--gutter) max(48px, env(safe-area-inset-bottom)); color: var(--paper-dim); font-size: 15px; border-top: 1px solid var(--rule); }
.site-foot p { max-width: 32em; margin: 0 auto 10px; }
.site-foot .small { font-size: 12px; letter-spacing: .08em; color: var(--paper-mute); }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .letter.reveal.in { transform: rotate(-.6deg); }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero-photo img, .scroll span { animation: none; }
}

/* ---------- larger screens ---------- */
@media (min-width: 640px) {
  :root { --gutter: 32px; }
  .est .wide { display: inline; }
  body { font-size: 18px; }
  .figures.two { grid-template-columns: 1fr 1fr; align-items: start; }
  .figures.two .plate:last-child { margin-top: 48px; }
  .figures.overlap { display: block; position: relative; }
  .figures.overlap .plate:first-child { width: 68%; }
  .figures.overlap .plate:first-child figcaption { max-width: 48%; }
  .figures.overlap .plate:last-child { width: 64%; margin: -34% 0 0 auto; position: relative; z-index: 1; }
  .figures.overlap .plate:last-child img { outline: 8px solid var(--ink); }
  .letter { --pt: 30px; padding: var(--pt) 36px 22px 40px; }
}
@media (min-width: 900px) {
  :root { --gutter: 48px; }
  .topbar { padding-top: 24px; }
  .hero { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; }
  .hero-photo { position: relative; inset: auto; grid-column: 2; grid-row: 1; height: 100vh; }
  .hero-photo::after {
    background:
      linear-gradient(90deg, var(--ink) 0%, rgba(17,18,20,.2) 28%, rgba(17,18,20,0) 60%),
      linear-gradient(180deg, rgba(17,18,20,.5) 0%, rgba(17,18,20,0) 20%, rgba(17,18,20,0) 75%, var(--ink) 100%);
  }
  .hero-photo img { object-position: 50% 10%; }
  .hero-photo figcaption { display: block; top: auto; bottom: 48px; }
  .hero-credit { display: none; }
  .hero-text { grid-column: 1; grid-row: 1; padding: 0 0 12vh var(--gutter); align-self: end; }
  .hero h1 { font-size: clamp(56px, 6.4vw, 128px); }
  .lede { font-size: 21px; }
  .chapter { padding: 72px var(--gutter) 88px; }
  .chapter-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
  .chapter-body.flip .prose { order: 2; }
  .chapter-body.flip .figures { order: 1; }
  .prose { margin: 0; justify-self: end; }
  .chapter-body.flip .prose { justify-self: start; }
  .figures .plate.tall { position: sticky; top: 40px; }
}
@media (min-width: 1300px) {
  .hero { grid-template-columns: 1.2fr .8fr; }
}
strong { font-weight: 400; color: #f6eedd; letter-spacing: .01em; }

/* The Work So Far (the-work.html): deliberately plain */
.work { max-width: 40em; margin: 0 auto; padding: 56px var(--gutter) 40px; }
.work h1 { font: 400 clamp(44px, 12vw, 84px)/1 var(--display); margin: 0 0 32px; }
.work > p { margin: 0 0 1.1em; }
.tally { list-style: none; margin: 40px 0; padding: 0; border-top: 1px solid var(--rule); }
.tally li { display: grid; grid-template-columns: 5.2em 1fr; gap: 0 18px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.tally b { font: 400 clamp(26px, 7.5vw, 40px)/1 var(--display); color: var(--brass); font-weight: 400; text-align: right; font-feature-settings: "lnum"; }
.tally span { color: var(--paper-dim); line-height: 1.45; }
.work .back { margin-top: 36px; font-size: 15px; letter-spacing: .08em; }
.work .back a { color: var(--brass); text-decoration: none; }

/* Small type sitting on the hero photo: a soft shadow keeps it readable */
.hero-text .eyebrow,
.hero-text .lede,
.hero-text .hero-credit,
.hero-text .scroll { text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 14px rgba(0,0,0,.65); }

/* Old prints: a slight tilt, softened edges, and album corners (img/corner-*.svg).
   The tilt lives on .print, not the figure, so it doesn't fight the reveal transform,
   and the captions stay straight, as if written on the album page. */
.print { position: relative; display: block; transform: rotate(var(--tilt, -.8deg)); }
.print img { display: block; border-radius: 2px; }
.print::after {
  content: ""; position: absolute; inset: -3px; pointer-events: none;
  --c: clamp(30px, 8vw, 44px);
  background:
    url(img/corner-tl.svg) top left / var(--c) no-repeat,
    url(img/corner-tr.svg) top right / var(--c) no-repeat,
    url(img/corner-br.svg) bottom right / var(--c) no-repeat,
    url(img/corner-bl.svg) bottom left / var(--c) no-repeat;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,.6));
}
.figures.two .plate:nth-child(2) .print { --tilt: 1deg; }
.plate.tall .print { --tilt: .6deg; }
.figures.overlap .plate:first-child .print { --tilt: -1.4deg; }
.figures.overlap .plate:last-child .print { --tilt: 1.2deg; }
@media print { .print { transform: none; } }
