/* Spontaneous Supper Club: invite #1, the ask.
   Each dinner is a theme class on <body>. Brodo: broth gold, burgundy,
   and the hand-lettered signs in Bologna pasta shops (blue marker, red rules). */

.theme-brodo {
  --bg: #f1cd6d;          /* the broth, matched to the bowl painting */
  --bg-deep: #e8c45a;
  --ink: #5e1a28;         /* burgundy */
  --paper: #fbf7ea;
  --marker: #1f3d96;      /* pasta-shop blue marker */
  --rule: #cf3a2c;        /* the red underline */
  --steam: rgba(255, 252, 240, .75);
}

* { 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;
}
/* a little grain so it reads as paper, not a screen */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .18; 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 .35 0 0 0 0 .2 0 0 0 0 .1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.defs { position: absolute; }

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

.kicker {
  font-family: "DM Mono", monospace; font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  text-align: center; margin: 0;
}

/* ---- the one bold move: BRODO, seen through steam ---- */
.hero { position: relative; margin: 10px 0 8px; text-align: center; }
.bowl { position: relative; margin: 0 -20px -14px; }
.bowl img {
  display: block; width: 100%; height: auto;
  -webkit-mask-image: radial-gradient(62% 66% at 50% 46%, #000 72%, transparent 100%), linear-gradient(to bottom, #000 78%, transparent 99%);
  -webkit-mask-composite: source-in;
          mask-image: radial-gradient(62% 66% at 50% 46%, #000 72%, transparent 100%), linear-gradient(to bottom, #000 78%, transparent 99%);
          mask-composite: intersect;
  animation: rise 1.2s cubic-bezier(.2, .8, .2, 1) both;
}
.title {
  margin: 0; line-height: .82;
  font-family: "Bricolage Grotesque", sans-serif;
  font-variation-settings: "opsz" 96, "wdth" 100;
  font-weight: 800;
  font-size: clamp(100px, 33vw, 210px);
  letter-spacing: -.03em;
  filter: url(#steam);
  transform-origin: 50% 100%;
  animation: rise 1.4s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise { from { opacity: 0; transform: translateY(18px) scaleY(.9); } }

.wisps {
  position: absolute; left: -6%; right: 0; top: calc(44% - 120px); height: 120px;
  display: flex; justify-content: center; gap: 9%; pointer-events: none;
}
.wisps svg { width: 38px; height: 120px; overflow: visible; }
.wisps path {
  fill: none; stroke: var(--steam); stroke-width: 5; stroke-linecap: round;
  filter: blur(2.5px);
  stroke-dasharray: 60 260; stroke-dashoffset: 260;
  animation: wisp 6s ease-in-out infinite;
}
.wisps svg:nth-child(2) path { animation-delay: 2s; animation-duration: 7s; }
.wisps svg:nth-child(3) path { animation-delay: 3.8s; animation-duration: 6.5s; }
@keyframes wisp {
  0% { stroke-dashoffset: 260; opacity: 0; }
  20% { opacity: 1; }
  100% { stroke-dashoffset: -60; opacity: 0; }
}

/* ---- the note ---- */
.note { text-align: center; margin: 22px auto 34px; max-width: 30em; }
.hello {
  font-family: "Caveat", cursive; font-weight: 700; font-size: 44px; line-height: 1;
  color: var(--marker); margin: 0 0 8px; transform: rotate(-3deg);
}
.ask { text-wrap: balance; font-style: italic; font-size: clamp(27px, 7.4vw, 36px); line-height: 1.12; margin: 0 0 14px; }
.sub { font-size: 19px; line-height: 1.4; margin: 0; opacity: .88; }

/* ---- the dates, as pasta-shop tags ---- */
.prompt, .name span {
  font-family: "DM Mono", monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  text-align: center; display: block; margin: 0 0 14px;
}
.tags {
  list-style: none; padding: 0; margin: 0 0 34px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px;
}
.tag {
  position: relative; width: 100%;
  background: var(--paper); color: var(--marker);
  border: 0; border-radius: 3px; cursor: pointer;
  padding: 14px 10px 16px;
  font-family: "Caveat", cursive; font-weight: 700; text-align: center;
  box-shadow: 0 1px 0 rgba(94, 26, 40, .08), 0 8px 18px -10px rgba(94, 26, 40, .45);
  transform: rotate(var(--tilt, 0deg));
  transition: transform .35s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s;
  -webkit-tap-highlight-color: transparent;
}
.tag:hover { transform: rotate(var(--tilt, 0deg)) translateY(-2px); }
.tag:focus-visible { outline: 2px dashed var(--marker); outline-offset: 3px; }
.tag .day { display: block; font-size: 22px; line-height: 1; }
.tag .date { display: block; font-size: 38px; line-height: 1.05; }
.tag .time { display: block; font-family: "DM Mono", monospace; font-weight: 400; font-size: 11px; letter-spacing: .1em; color: var(--ink); opacity: .7; margin-top: 4px; }
.tag svg.under { position: absolute; left: 12%; width: 76%; bottom: 30px; height: 14px; overflow: visible; pointer-events: none; }
.tag svg.under path {
  fill: none; stroke: var(--rule); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 200; stroke-dashoffset: 200; transition: stroke-dashoffset .45s ease-out;
}
.tag[aria-pressed="true"] {
  transform: rotate(calc(var(--tilt, 0deg) * -1.6)) translateY(-4px) scale(1.03);
  box-shadow: 0 1px 0 rgba(94, 26, 40, .08), 0 16px 24px -12px rgba(94, 26, 40, .55);
}
.tag[aria-pressed="true"] svg.under path { stroke-dashoffset: 0; }
.tag .yes {
  position: absolute; top: -10px; right: -8px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--paper);
  font-family: "Caveat", cursive; font-size: 20px; line-height: 30px;
  transform: scale(0) rotate(-30deg); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.tag[aria-pressed="true"] .yes { transform: scale(1) rotate(8deg); }

/* a puff of steam off a tag when you pick it */
.puff {
  position: absolute; left: 50%; top: 0; width: 46px; height: 46px; margin-left: -23px;
  border-radius: 50%; background: var(--steam); filter: blur(8px); pointer-events: none;
  animation: puff .9s ease-out forwards;
}
@keyframes puff { from { opacity: .9; transform: translateY(0) scale(.5); } to { opacity: 0; transform: translateY(-46px) scale(1.4); } }

/* ---- name and send ---- */
.name[hidden] { display: none; }
.name { display: block; margin: 0 auto 26px; max-width: 340px; }
.name input {
  width: 100%; border: 0; border-bottom: 2px solid var(--ink); background: transparent;
  font-family: "Caveat", cursive; font-weight: 700; font-size: 34px; color: var(--marker);
  text-align: center; padding: 2px 4px 4px; outline: none; border-radius: 0;
}
.name input:focus { border-bottom-color: var(--rule); }

.send {
  display: block; margin: 0 auto; cursor: pointer;
  background: var(--ink); color: var(--bg); border: 0; border-radius: 999px;
  font-family: "Bricolage Grotesque", sans-serif; font-weight: 700; font-size: 19px;
  padding: 16px 34px; letter-spacing: .01em;
  transition: transform .2s, opacity .3s;
}
.send:hover:not(:disabled) { transform: translateY(-2px) rotate(-1deg); }
.send:disabled { opacity: .35; cursor: default; }

.foot { text-align: center; font-style: italic; font-size: 17px; margin: 22px 0 0; opacity: .8; }

/* ---- after sending ---- */
.done { text-align: center; margin: 10px auto 0; animation: rise .8s ease both; }
.done-line { font-family: "Caveat", cursive; font-weight: 700; font-size: 42px; line-height: 1.1; color: var(--marker); margin: 0 0 10px; }
.done-picks { font-family: "DM Mono", monospace; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .75; margin: 0; }

@media (min-width: 700px) {
  .invite { padding-top: 56px; }
  .hero { margin-top: 24px; }
  .bowl { margin: 0 -40px -20px; }
}

@media (prefers-reduced-motion: reduce) {
  .title { filter: none; animation: none; }
  .wisps { display: none; }
  .tag, .tag .yes, .tag svg.under path { transition: none; }
}

.missing { text-align: center; padding-top: 120px; }

/* ---- invite #2: it's on ---- */
.on .where { text-align: center; margin: 0 auto 30px; max-width: 30em; }
.on .where .sub { margin-bottom: 14px; }
.on .address {
  display: inline-block; cursor: default; padding: 16px 22px 26px; max-width: 100%;
  font-size: 30px; line-height: 1.15; --tilt: -1.4deg; transform: rotate(var(--tilt));
}
.on .address svg.under { bottom: 12px; }
.on .address svg.under path { stroke-dashoffset: 0; }
.on .not-going { text-align: center; max-width: 26em; margin: 0 auto 30px; }
.on .cal { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 10px 0 0; }
.on .cal .send { text-decoration: none; display: inline-block; }
.on .cal-link { font-family: "DM Mono", monospace; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }

/* ---- invite #3: the reminder ---- */
.remind .where-line { font-style: italic; margin-top: 4px; }
.remind .bring { margin: 6px 0 30px; }
.remind .bring-title { font-family: "Caveat", cursive; font-weight: 700; font-size: 44px; color: var(--marker); text-align: center; margin: 0 0 6px; transform: rotate(-2deg); }
.remind .bring-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.remind .bring-tag { text-align: left; padding: 14px 18px 18px; }
.remind .bring-tag .what { display: block; font-size: 30px; line-height: 1.05; }
.remind .bring-tag .why { display: block; font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; font-size: 17px; color: var(--ink); opacity: .8; margin-top: 2px; }
.remind .bring-tag .why:empty { display: none; }
.remind .bring-tag .state { display: block; font-family: "DM Mono", monospace; font-weight: 400; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-top: 6px; }
.remind .bring-tag .state:empty { display: none; }
.remind .bring-tag svg.under { left: 18px; width: 60%; bottom: auto; top: 44px; }
.remind .bring-tag:disabled { opacity: .5; cursor: default; transform: rotate(var(--tilt, 0deg)); box-shadow: none; }
.remind .bring-tag:disabled .what { text-decoration: line-through; text-decoration-color: var(--rule); text-decoration-thickness: 2px; }

.remind .title { font-size: clamp(56px, 15vw, 150px); }
