/* Sloane & Mateo — the album desk. Same stationery as the invitation: ivory, ink, hairlines. */

@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-var.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Bodoni Moda"; src: url("../fonts/bodoni-moda-italic-var.woff2") format("woff2"); font-weight: 400 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-var.woff2") format("woff2"); font-weight: 300 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-italic-var.woff2") format("woff2"); font-weight: 300 600; font-style: italic; font-display: swap; }

:root {
  --ivory: #FBF9F4;
  --white: #FFFFFF;
  --ink: #1C1A17;
  --ink-2: #6F675A;
  --ink-3: #766E62;
  --rule: #D9D3C6;
  --rule-soft: #EAE5DB;
  --error: #9B3B3B;
  --serif: "Bodoni Moda", "Didot", "Bodoni 72", "Georgia", serif;
  --sans: "Jost", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --frame: 14px;
  --gutter: clamp(22px, 6vw, 96px);
  --nav-h: 64px;
  color-scheme: light;
}
@media (max-width: 599px) { :root { --frame: 10px; --nav-h: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--rule) var(--ivory); scrollbar-width: thin; }
body {
  margin: 0; min-height: 100vh;
  background: var(--ivory); color: var(--ink);
  font-family: var(--sans); font-weight: 350; font-size: 17px; line-height: 1.6;
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
::selection { background: var(--ink); color: var(--ivory); }
:focus-visible { outline: 1.5px solid var(--ink); outline-offset: 4px; }
input, button { caret-color: var(--ink); accent-color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 1em; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
a { color: inherit; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- stationery ---------- */
.caps { font-family: var(--sans); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; }
.frame { position: fixed; inset: var(--frame); border: 1px solid var(--ink); z-index: 40; pointer-events: none; }
.link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-decoration-thickness: 1px; text-underline-offset: 0.22em; transition: text-decoration-color 240ms var(--ease); }
.link:hover { text-decoration-color: var(--ink); }
.link--btn { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.link--btn.caps, a.link.caps { font-family: var(--sans); font-weight: 500; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 168px; min-height: 52px; padding: 14px 34px;
  border: 1px solid var(--ink); background: transparent; color: var(--ink); text-decoration: none;
  font-family: var(--sans); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer; transition: background 300ms var(--ease), color 300ms var(--ease);
}
.btn:hover, .btn:focus-visible { background: var(--ink); color: var(--ivory); }
.btn[disabled] { opacity: 0.5; cursor: progress; }
.orn { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 30px auto 0; width: 200px; }
.orn::before, .orn::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.orn i { width: 6px; height: 6px; background: var(--ink); transform: rotate(45deg); flex: none; }
.eyebrow { color: var(--ink-2); margin-bottom: 18px; }
.h1 { font-family: var(--serif); font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.08; font-variation-settings: "opsz" 72; }
.lede { font-size: clamp(1.05rem, 1.7vw, 1.2rem); font-weight: 300; color: var(--ink-2); margin: 16px auto 0; max-width: 56ch; }

/* ---------- bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  height: var(--nav-h); padding: 0 calc(var(--frame) + 24px);
  background: color-mix(in srgb, var(--ivory) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-soft);
}
.mono { font-family: var(--serif); font-size: 1.2rem; letter-spacing: 0.02em; font-variation-settings: "opsz" 24; text-decoration: none; white-space: nowrap; }
.mono i { font-style: italic; }
.bar__title { color: var(--ink-2); text-align: center; }
.bar__right { display: flex; justify-content: flex-end; align-items: center; gap: 22px; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2); white-space: nowrap; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule); flex: none; transition: background 300ms; }
.live[data-state="on"] i { background: var(--ink); animation: pulse 2200ms ease-in-out infinite; }
.live[data-state="wait"] i { background: var(--ink-3); animation: pulse 900ms ease-in-out infinite; }
.live[data-state="err"] i { background: var(--error); }
@keyframes pulse { 50% { opacity: 0.25; } }
@media (max-width: 599px) { .bar { grid-template-columns: 1fr auto; } .bar__title { display: none; } }

/* ---------- page ---------- */
.page { flex: 1; padding: 0 var(--gutter); }

/* sign in */
.gate { min-height: calc(100vh - var(--nav-h) - 120px); display: grid; place-items: center; padding: 48px 0; }
.gate__card { width: min(100%, 26rem); text-align: center; }
.gate .lede { margin-bottom: 40px; }
.form { display: grid; gap: 26px; text-align: left; }
.field { display: grid; gap: 8px; }
.field label { color: var(--ink-2); }
.field input {
  width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: transparent;
  border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 10px 0 12px;
}
.field input:focus { outline: 0; border-bottom-width: 1.5px; }
.form__status { font-size: 0.95rem; color: var(--ink-2); min-height: 1.4em; margin: -8px 0 0; }
.form__status.is-err { color: var(--error); }
.form .btn { justify-self: center; }

/* the desk */
.desk { padding: clamp(48px, 8vh, 88px) 0 clamp(64px, 10vh, 120px); }
.desk__head { text-align: center; max-width: 60ch; margin: 0 auto; }
.desk__head .lede { text-align: center; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin: clamp(36px, 5vh, 56px) auto 0; max-width: 56rem;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.stats div { padding: 22px 8px; text-align: center; border-left: 1px solid var(--rule-soft); }
.stats div:first-child { border-left: 0; }
.stats dt { color: var(--ink-2); }
.stats dd { margin: 6px 0 0; font-family: var(--serif); font-size: 2.1rem; line-height: 1.1; font-variation-settings: "opsz" 72; }
@media (max-width: 599px) { .stats { grid-template-columns: repeat(2, 1fr); } .stats div:nth-child(3) { border-left: 0; } .stats div:nth-child(n+3) { border-top: 1px solid var(--rule-soft); } }

.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin: 36px 0 28px; }
.choice { display: flex; flex-wrap: wrap; gap: 10px; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice label { cursor: pointer; padding: 9px 18px; border: 1px solid var(--rule); color: var(--ink); font-size: 0.92rem; transition: border-color 200ms var(--ease), color 200ms, background 200ms; }
.choice label:hover { border-color: var(--ink); }
.choice input:checked + label { border-color: var(--ink); background: var(--ink); color: var(--ivory); }
.choice input:focus-visible + label { outline: 1.5px solid var(--ink); outline-offset: 3px; }
.tools__note { font-size: 0.92rem; color: var(--ink-3); margin: 0; max-width: 44ch; }

.empty { text-align: center; color: var(--ink-3); padding: 72px 0; border: 1px solid var(--rule-soft); font-style: italic; font-family: var(--serif); font-size: 1.3rem; }

/* prints */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 22px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
@media (max-width: 599px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; } .print { padding: 7px 7px 10px; } .print__cap { font-size: 0.95rem; } .print__by { font-size: 0.8rem; flex-wrap: wrap; } .print__acts { gap: 14px; } }
.print { display: grid; gap: 0; background: var(--white); border: 1px solid var(--rule); padding: 10px 10px 12px; transition: opacity 300ms var(--ease), border-color 300ms; }
.js .print.is-new { animation: arrive 700ms var(--ease) both; }
@keyframes arrive { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.print.is-hidden { opacity: 0.45; border-style: dashed; }
.print.is-hidden:hover, .print.is-hidden:focus-within { opacity: 0.9; }
.print__pic { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--rule-soft); border: 0; padding: 0; cursor: zoom-in; width: 100%; display: block; }
.print__pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }
.print__pic:hover img { transform: scale(1.03); }
.print__pic:focus-visible { outline-offset: 2px; }
.badge { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; background: var(--ink); color: var(--ivory); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500; }
.badge svg { width: 9px; height: 9px; fill: currentColor; }
.badge--soft { left: auto; right: 8px; background: var(--ivory); color: var(--ink-2); border: 1px solid var(--rule); }
.print__wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-style: italic; font-family: var(--serif); font-size: 1.1rem; }
.print__band { display: grid; gap: 2px; padding: 12px 2px 0; }
.print__cap { font-family: var(--serif); font-style: italic; font-size: 1.05rem; line-height: 1.3; color: var(--ink); min-height: 1.3em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.print__by { display: flex; justify-content: space-between; gap: 8px; color: var(--ink-2); font-size: 0.88rem; }
.print__by time { color: var(--ink-3); white-space: nowrap; }
.print__acts { display: flex; gap: 18px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rule-soft); }
.print__acts .caps { font-size: 0.68rem; }

/* lightbox */
.light { position: fixed; inset: 0; z-index: 50; background: color-mix(in srgb, var(--ivory) 96%, transparent); display: grid; grid-template-rows: auto 1fr auto; padding: calc(var(--frame) + 12px); }
.light__close { justify-self: end; }
.light__media { display: grid; place-items: center; min-height: 0; padding: 16px 0; }
.light__media img, .light__media iframe { max-width: min(100%, 80vh); max-height: 70vh; width: auto; height: auto; border: 1px solid var(--rule); background: var(--white); padding: 10px; }
.light__media iframe { width: min(100%, 80vh); aspect-ratio: 1; height: auto; max-height: 70vh; }
.light__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 24px; border-top: 1px solid var(--rule); padding-top: 14px; }
.light__meta { margin: 0; font-family: var(--serif); font-style: italic; font-size: 1.15rem; }
.light__actions { display: flex; gap: 24px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--frame) + 22px); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--ivory); padding: 12px 20px; white-space: nowrap; }

.foot { padding: 28px var(--gutter) calc(var(--frame) + 22px); text-align: center; font-size: 0.85rem; color: var(--ink-2); border-top: 1px solid var(--rule-soft); }
.foot__credit { margin: 0; }

@media (prefers-reduced-motion: reduce) { .js .print.is-new, .live i { animation: none; } .print__pic img { transition: none; } }

/* ---------- desk tabs ---------- */
.tabs { justify-content: center; margin-bottom: 8px; }
.tabs label { padding: 10px 26px; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 500; }
.tabs__n { font-weight: 400; opacity: 0.7; margin-left: 4px; }
.tabs__n:empty { display: none; }

/* ---------- RSVP desk ---------- */
.stats--sub { grid-template-columns: repeat(8, 1fr); border-top: 0; margin-top: 0; }
.stats--sub dd { font-size: 1.5rem; }
.stats--sub div { padding: 16px 6px; }
@media (max-width: 899px) { .stats--sub { grid-template-columns: repeat(4, 1fr); } .stats--sub div:nth-child(5) { border-left: 0; } .stats--sub div:nth-child(n+5) { border-top: 1px solid var(--rule-soft); } }
@media (max-width: 599px) { .stats--sub { grid-template-columns: repeat(2, 1fr); } .stats--sub div:nth-child(odd) { border-left: 0; } .stats--sub div:nth-child(n+3) { border-top: 1px solid var(--rule-soft); } }
.tools--rsvp { align-items: end; }
.search { flex: 1 1 220px; max-width: 26rem; }
.search input { width: 100%; font: inherit; font-weight: 400; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 9px 0 10px; }
.search input::placeholder { color: var(--ink-3); font-weight: 300; }
.search input:focus { outline: 0; border-bottom-width: 1.5px; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.tools__export { display: flex; flex-wrap: wrap; gap: 10px; }
.btn--sm { min-width: 0; min-height: 44px; padding: 11px 22px; font-size: 0.72rem; }
.tablewrap { overflow-x: auto; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); -webkit-overflow-scrolling: touch; }
.rtable { width: 100%; border-collapse: collapse; font-size: 0.9rem; line-height: 1.45; min-width: 1240px; }
.rtable th { text-align: left; font-family: var(--sans); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); padding: 12px 12px 10px 0; border-bottom: 1px solid var(--rule); white-space: nowrap; vertical-align: bottom; }
.rtable td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.rtable tr:last-child td { border-bottom: 0; }
.rtable .num, .rtable td.num { text-align: right; padding-right: 18px; font-feature-settings: "tnum" 1; }
.rtable .name { font-family: var(--serif); font-size: 1.1rem; font-variation-settings: "opsz" 24; white-space: nowrap; }
.rtable .yes { color: var(--ink); } .rtable .no { color: var(--ink-3); font-style: italic; }
.rtable .plates { display: grid; gap: 2px; min-width: 180px; }
.rtable .plates span { white-space: nowrap; }
.rtable .plates i { font-style: normal; color: var(--ink-2); }
.rtable .muted { color: var(--ink-3); }
.rtable .wrap { min-width: 180px; max-width: 26ch; }
.rtable .contact { display: grid; gap: 2px; font-size: 0.85rem; }
.rtable .contact a { color: var(--ink-2); text-decoration: none; }
.rtable .contact a:hover { text-decoration: underline; }
.rtable time { white-space: nowrap; color: var(--ink-3); font-size: 0.85rem; }
.rtable tr.is-new td { animation: arrive 700ms var(--ease) both; }
.printhead { display: none; }

/* ---------- the drawing ---------- */
.stats dd.stats__text { font-size: 1.2rem; line-height: 1.3; padding-top: 8px; overflow-wrap: anywhere; }
.etable { min-width: 0; }
.etable td.acts { text-align: right; white-space: nowrap; }
.etable .acts .caps { font-size: 0.68rem; }
.etable a.contact { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
.etable a.contact:hover { text-decoration: underline; }
.etable tr.is-winner td { background: var(--white); }
.badge--inline { position: static; margin-left: 8px; vertical-align: middle; }
.winner { margin: 0 auto 28px; max-width: 46rem; display: grid; grid-template-columns: 28px 1fr; gap: 20px; align-items: start; padding: 28px 30px; border: 1px solid var(--ink); }
.winner .ico { color: var(--ink); margin-top: 4px; }
.winner .eyebrow { margin-bottom: 8px; }
.winner__name { font-family: var(--serif); font-size: 1.8rem; line-height: 1.15; margin: 0 0 4px; font-variation-settings: "opsz" 48; }
.winner__mail { color: var(--ink-2); margin: 0 0 14px; overflow-wrap: anywhere; }
.winner__acts { display: flex; flex-wrap: wrap; gap: 22px; }
@media (max-width: 480px) { .winner { grid-template-columns: 1fr; padding: 24px 22px; } .winner .ico { display: none; } }

/* ---------- print: the RSVP sheet ---------- */
@media print {
  @page { size: letter landscape; margin: 0.5in; }
  body { background: #fff; color: #000; font-size: 9pt; display: block; }
  .frame, .bar, .foot, .toast, .light, .tabs, .tools, .desk__head, .empty, #viewAlbum, #viewDraw, .gate { display: none !important; }
  .page { padding: 0; }
  .desk { padding: 0; }
  .printhead { display: block; margin-bottom: 10pt; }
  .printhead__names { font-family: var(--serif); font-size: 18pt; margin: 0; }
  .printhead__meta { margin: 2pt 0 0; color: #444; font-size: 9pt; }
  .stats { grid-template-columns: repeat(4, 1fr); margin: 0 0 4pt; max-width: none; border-color: #000; break-inside: avoid; }
  .stats--sub { grid-template-columns: repeat(8, 1fr); border-bottom: 1px solid #000; margin-bottom: 12pt; }
  .stats div { padding: 6pt 4pt; border-left-color: #ccc; }
  .stats dt { font-size: 7pt; }
  .stats dd { font-size: 14pt; }
  .stats--sub dd { font-size: 11pt; }
  .tablewrap { overflow: visible; border-color: #000; }
  .rtable { min-width: 0; width: 100%; table-layout: fixed; font-size: 7.5pt; }
  .rtable td, .rtable th { overflow-wrap: anywhere; white-space: normal; }
  .rtable .name, .rtable time, .rtable .plates span { white-space: normal; }
  .rtable .contact { font-size: 7pt; }
  .rtable time { font-size: 0; color: #000; }
  .rtable time::after { content: attr(data-abs); font-size: 7pt; }
  .c-name { width: 9%; } .c-reply { width: 6%; } .c-seats { width: 4%; } .c-party { width: 14%; } .c-days { width: 6%; } .c-diet { width: 9%; } .c-yn { width: 5%; } .c-contact { width: 11%; } .c-addr { width: 10%; } .c-song { width: 7%; } .c-note { width: 10%; } .c-sent { width: 6%; }
  .rtable th { font-size: 6.5pt; color: #000; border-bottom-color: #000; padding: 4pt 6pt 4pt 0; }
  .rtable td { padding: 5pt 6pt 5pt 0; border-bottom-color: #ddd; }
  .rtable .name { font-size: 9.5pt; }
  .rtable .wrap { max-width: none; }
  .rtable tr { break-inside: avoid; }
  .rtable thead { display: table-header-group; }
  .rtable tr[hidden] { display: none; }
  .rtable .contact a { color: #000; }
  .rtable tr.is-new td { animation: none; }
}
