/* Invite #4: thanks for coming. An album of the night.
   Oct 18 theme: the blue of an after-dinner tablecloth, Lambrusco burgundy, cream prints. */

:root {
  --bg: #a8b7cd;          /* dusty tablecloth blue */
  --ink: #4a1622;         /* Lambrusco */
  --paper: #fbf7ec;
  --tape: rgba(241, 205, 109, .75);  /* butter yellow tape, a nod to Brodo */
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: "Instrument Serif", Georgia, serif; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .2; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .2 0 0 0 0 .3 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.album { max-width: 620px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 20px max(56px, env(safe-area-inset-bottom)); }

.kicker, h2, .table, .foot, .yours-note, .sent {
  font-family: "DM Mono", monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
}
.top { text-align: center; }
.kicker { margin: 0; }
.title {
  margin: 22px 0 6px; line-height: .85;
  font-family: "Bricolage Grotesque", sans-serif; font-variation-settings: "opsz" 96, "wdth" 100; font-weight: 800;
  font-size: clamp(92px, 30vw, 190px); letter-spacing: -.03em;
  animation: rise 1.2s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.hello { font-family: "Caveat", cursive; font-weight: 700; font-size: 44px; line-height: 1; margin: 10px 0 8px; transform: rotate(-3deg); }
.thanks { font-style: italic; font-size: clamp(25px, 6.6vw, 32px); line-height: 1.15; margin: 0 auto 14px; max-width: 24em; }
.table { opacity: .75; margin: 0; }

.hero { margin: 4px -20px 6px; }
.hero img {
  width: 100%; display: block;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent), linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
          mask-composite: intersect;
}
.top.after { margin-top: 0; }

section { margin-top: 64px; }
h2 { text-align: center; margin: 0 0 22px; }

/* photos as taped-in prints */
.print {
  position: relative; margin: 0; background: var(--paper); padding: 10px 10px 34px;
  box-shadow: 0 2px 0 rgba(40, 30, 50, .06), 0 18px 30px -16px rgba(40, 30, 50, .55);
}
.print img { display: block; width: 100%; height: auto; }
.print::before {
  content: ""; position: absolute; top: -12px; left: 50%; width: 92px; height: 26px; margin-left: -46px;
  background: var(--tape); transform: rotate(-4deg); box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.tilt-l { transform: rotate(-2.4deg); }
.tilt-r { transform: rotate(2deg); }

.poured-row { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; }
.poured-row .print { max-width: 330px; margin: 0 auto; }
.drinks { list-style: none; padding: 0; margin: 0; }
.drinks li { padding: 16px 0; border-top: 1.5px solid rgba(74, 22, 34, .25); }
.drinks li:last-child { border-bottom: 1.5px solid rgba(74, 22, 34, .25); }
.drink-name { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 22px; margin: 0 0 4px; }
.drink-note { font-size: 19px; line-height: 1.35; margin: 0; }
.drink-link { display: inline-block; margin-top: 8px; font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.drink-note.empty { font-family: "Caveat", cursive; font-size: 22px; opacity: .55; }

.recipe-list { display: grid; gap: 64px; }
.recipe-prints { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin: 0 4px -18px; position: relative; z-index: 1; }
.recipe-prints .print:nth-child(2) { margin-top: 30px; }
.recipe-prints .print img { aspect-ratio: 4 / 5; object-fit: cover; }
.recipe { background: var(--paper); padding: 30px 22px 24px; box-shadow: 0 18px 30px -18px rgba(40, 30, 50, .5); }
.recipe h3 { font-family: "Bricolage Grotesque", sans-serif; font-weight: 800; font-size: 28px; line-height: 1.05; margin: 0 0 6px; }
.recipe .credit { font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; margin: 0 0 14px; }
.recipe .credit a { color: inherit; }
.recipe-note { font-family: "Caveat", cursive; font-weight: 600; font-size: 24px; line-height: 1.2; margin: 0 0 12px; }
.recipe-note.empty { opacity: .5; }
.recipe .serves { font-style: italic; font-size: 18px; margin: 0 0 6px; }
.recipe h4 { font-family: "DM Mono", monospace; font-weight: 500; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin: 22px 0 8px; }
.ingredients { list-style: none; padding: 0; margin: 0; font-size: 18px; line-height: 1.35; }
.ingredients li { padding: 5px 0; border-bottom: 1px dotted rgba(74, 22, 34, .3); }
.steps { margin: 0; padding-left: 1.3em; font-size: 18px; line-height: 1.4; }
.steps li { margin: 0 0 10px; padding-left: 4px; }
.steps li::marker { font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; }
.tip { font-style: italic; font-size: 17px; margin: 14px 0 0; opacity: .85; }

.nextday .prints { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.nextday .prints .print:nth-child(2) { margin-top: 36px; }
.note-card {
  background: var(--paper); margin: 28px 6px 0; padding: 22px 22px 20px;
  font-family: "Caveat", cursive; font-weight: 600; font-size: 25px; line-height: 1.25;
  transform: rotate(-1deg); box-shadow: 0 18px 30px -18px rgba(40, 30, 50, .5);
  background-image: repeating-linear-gradient(to bottom, transparent 0 30px, rgba(74, 22, 34, .12) 30px 31px);
  background-position: 0 14px;
}

.album-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 26px; }
.album-grid:empty { display: none; }
.album-grid .print:nth-child(odd) { transform: rotate(-1.8deg); }
.album-grid .print:nth-child(even) { transform: rotate(1.6deg); }
.album-grid .print img { aspect-ratio: 1; object-fit: cover; }
.sent {
  position: absolute; left: 10px; right: 10px; bottom: 8px; text-align: center; font-size: 10px; opacity: .8;
}
.waiting img { filter: saturate(.7); opacity: .85; }

.add { display: block; text-align: center; cursor: pointer; }
.add input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.add span {
  display: inline-block; background: var(--ink); color: var(--paper); border-radius: 999px;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 19px; padding: 16px 34px;
  transition: transform .2s;
}
.add:hover span { transform: translateY(-2px) rotate(-1deg); }
.add input:focus-visible + span { outline: 2px dashed var(--ink); outline-offset: 4px; }
.yours-note { text-align: center; margin: 14px 0 0; opacity: .75; }

.foot { text-align: center; margin-top: 70px; opacity: .6; }

@media (min-width: 700px) {
  .album { padding-top: 56px; }
  .hero { margin: 10px -90px 10px; }
  .poured-row { grid-template-columns: 1fr 1.1fr; }
  .album-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .title { animation: none; } }

.missing { max-width: 520px; margin: 0 auto; padding: 80px 20px; text-align: center; }
.print.failed .sent { color: #a3241c; opacity: 1; }

.served-with { font-size: 18px; margin: 0 0 8px; }
.served-with a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

.add[hidden] { display: none; }
