/* Mikko's 50th — a letterpress show poster. Two inks only: black and white. */

@font-face {
  font-family: "Alfa Slab One";
  src: url("/fonts/alfa-slab-one.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #000;
  --paper: #fff;
  --soft: #f0f0f0;   /* quiet panel on white */
  --mute: #595959;   /* secondary text on white */
  --dim: #b8b8b8;    /* secondary text on black */
  --display: "Alfa Slab One", "Rockwell Extra Bold", "Rockwell", Georgia, serif;
  --body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --measure: 38rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.6;
}
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-ink :focus-visible, .site-head :focus-visible, .site-foot :focus-visible { outline-color: var(--paper); }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 8vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.25rem; line-height: 1.2; }
p { margin: 0 0 1em; }
.lede { font-size: 1.3rem; line-height: 1.5; }
.small { font-size: 0.95rem; color: var(--mute); }
.on-ink .small { color: var(--dim); }

/* ---------- header and footer ---------- */

.site-head {
  background: var(--ink);
  color: var(--paper);
  padding: 0.7rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1.4rem;
}
.site-head .brand { font-family: var(--display); font-size: 1.25rem; text-decoration: none; margin-right: auto; }
.site-head nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; align-items: center; }
.site-head nav a { text-decoration: none; padding: 0.35rem 0; border-bottom: 3px solid transparent; }
.site-head nav a:hover, .site-head nav a[aria-current="page"] { border-bottom-color: var(--paper); }
.site-head nav a.nav-rsvp { background: var(--paper); color: var(--ink); padding: 0.35rem 0.9rem; font-weight: 700; border: 0; }
.site-head nav a.nav-rsvp:hover { background: var(--dim); }

.site-foot { background: var(--ink); color: var(--paper); padding: 2.5rem var(--gutter); margin-top: 4rem; }
.site-foot p { margin: 0 0 0.3em; }
.site-foot .foot-title { font-family: var(--display); font-size: 1.4rem; }

/* ---------- page furniture ---------- */

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 var(--gutter); }
.page-title { padding: clamp(2.5rem, 7vw, 4.5rem) 0 1.5rem; border-bottom: 6px solid var(--ink); margin-bottom: 2.5rem; }
.page-title p { max-width: var(--measure); margin: 1rem 0 0; }
.prose { max-width: var(--measure); }
.prose h2 { margin: 2.6rem 0 0.8rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.4em; }

.band { background: var(--ink); color: var(--paper); padding: clamp(2.5rem, 7vw, 4.5rem) 0; margin: 3.5rem 0; }
.band .prose p:last-child { margin-bottom: 0; }

/* Listing: a ruled list, name on the left, notes on the right. */
.listing { list-style: none; margin: 0 0 2.5rem; padding: 0; border-top: 3px solid var(--ink); }
.listing li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 0.2rem 2rem; padding: 1rem 0; border-bottom: 1px solid var(--ink); }
.listing h3 { padding-top: 0.15rem; }
.listing p { margin: 0; }
.listing .where { display: block; font-size: 0.95rem; color: var(--mute); }
@media (max-width: 40rem) { .listing li { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0; border: 3px solid var(--ink); margin: 0 0 2.5rem; }
.facts div { padding: 1.1rem 1.25rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin: 0 -1px -1px 0; }
.facts dt { font-size: 0.95rem; color: var(--mute); }
.facts dd { margin: 0; font-family: var(--display); font-size: 1.3rem; line-height: 1.2; }

/* ---------- buttons and forms ---------- */

.btn {
  display: inline-block;
  font: 700 1.05rem/1.2 var(--body);
  background: var(--ink);
  color: var(--paper);
  border: 3px solid var(--ink);
  padding: 0.8rem 1.4rem;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn.quiet { background: var(--paper); color: var(--ink); }
.btn.quiet:hover { background: var(--ink); color: var(--paper); }
.btn.small-btn { font-size: 0.9rem; padding: 0.3rem 0.6rem; border-width: 2px; }
.on-ink .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.on-ink .btn:hover { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.5; cursor: default; }

form { max-width: var(--measure); }
fieldset { border: 0; padding: 0; margin: 0 0 2.2rem; }
legend { font-family: var(--display); font-size: 1.5rem; padding: 0; margin-bottom: 0.8rem; }
label { display: block; font-weight: 600; margin: 1rem 0 0.3rem; }
.hint { display: block; font-weight: 400; font-size: 0.95rem; color: var(--mute); }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="password"], input[type="number"], textarea, select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 0;
  padding: 0.65rem 0.75rem;
}
textarea { min-height: 6rem; resize: vertical; }
.choice { display: grid; grid-template-columns: repeat(3, 1fr); border: 3px solid var(--ink); }
.choice label { margin: 0; text-align: center; padding: 0.9rem 0.4rem; cursor: pointer; font-weight: 700; border-right: 1px solid var(--ink); }
.choice label:last-of-type { border-right: 0; }
.choice.two-up { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 34rem) {
  .choice, .choice.two-up { grid-template-columns: 1fr; }
  .choice label { border-right: 0; border-bottom: 1px solid var(--ink); text-align: left; padding-left: 1rem; }
  .choice label:last-of-type { border-bottom: 0; }
}
.choice input { position: absolute; opacity: 0; }
.choice input:checked + label { background: var(--ink); color: var(--paper); }
.choice input:focus-visible + label { outline: 3px solid var(--ink); outline-offset: 3px; }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-weight: 400; }
.check input { width: 1.3rem; height: 1.3rem; margin-top: 0.2rem; accent-color: var(--ink); flex: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 30rem) { .two { grid-template-columns: 1fr; } }

.notice { border: 3px solid var(--ink); padding: 1rem 1.2rem; margin: 0 0 1.5rem; max-width: var(--measure); }
.notice.solid { background: var(--ink); color: var(--paper); }
.notice p:last-child { margin-bottom: 0; }
[hidden] { display: none !important; }

/* ---------- the poster (home page) ---------- */

.poster { background: var(--ink); color: var(--paper); padding: clamp(1rem, 3vw, 2rem) var(--gutter) clamp(2rem, 5vw, 3.5rem); }
.poster-inner { max-width: 56rem; margin: 0 auto; }
.poster h1 { font-size: inherit; }
.fit { display: block; white-space: nowrap; font-family: var(--display); text-transform: uppercase; line-height: 0.95; font-size: 8vw; }
.fit > span { display: inline-block; }
.fit.reverse { background: var(--paper); color: var(--ink); margin: 0.5rem 0; padding: 0.12em 0 0.08em; }
.poster-rule { display: block; border-top: 0.5rem solid var(--paper); margin: 0.6rem 0; }
.poster-rule.thin { border-top-width: 2px; }
.poster-foot { display: flex; flex-wrap: wrap; gap: 1.2rem 2.5rem; align-items: center; justify-content: space-between; margin-top: 1.6rem; }
.countdown { display: flex; gap: 1.6rem; margin: 0; }
.countdown div { display: flex; flex-direction: column; }
.countdown dd { margin: 0; font-family: var(--display); font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1; font-variant-numeric: tabular-nums; order: -1; }
.countdown dt { font-size: 0.95rem; color: var(--dim); }

@media (prefers-reduced-motion: no-preference) {
  .poster .fit { animation: press 0.5s both; animation-delay: calc(var(--i, 0) * 90ms); }
  @keyframes press { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
}

/* The three RSVP steps: a real sequence, so it is numbered. */
.steps { list-style: none; counter-reset: step; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); border: 3px solid var(--ink); }
.steps li { counter-increment: step; padding: 1.2rem 1.3rem 1.4rem; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin: 0 -1px -1px 0; }
.steps li::before { content: counter(step); display: block; font-family: var(--display); font-size: 2.6rem; line-height: 1; margin-bottom: 0.5rem; }
.steps h3 { margin-bottom: 0.35rem; }
.steps p { margin: 0; }

.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0; border-top: 6px solid var(--ink); margin-top: 3.5rem; }
.doors a { display: block; text-decoration: none; padding: 1.4rem 1.4rem 1.6rem 0; border-bottom: 1px solid var(--ink); }
.doors a:hover h3 { text-decoration: underline; text-decoration-thickness: 0.12em; text-underline-offset: 0.15em; }
.doors h3 { font-size: 1.5rem; margin-bottom: 0.3rem; }
.doors p { margin: 0; }

/* ---------- guests and updates ---------- */

.people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 2rem; border-top: 3px solid var(--ink); }
.people li { padding: 0.9rem 0; border-bottom: 1px solid var(--ink); }
.people p { margin: 0; }
.update { padding: 1.5rem 0; border-bottom: 1px solid var(--ink); max-width: var(--measure); }
.update:first-child { border-top: 3px solid var(--ink); }
.update time { font-size: 0.95rem; color: var(--mute); }
.update p { white-space: pre-line; margin: 0.5rem 0 0; }

/* ---------- admin ---------- */

.admin-wrap { max-width: 78rem; }
.table-scroll { overflow-x: auto; border-top: 3px solid var(--ink); margin-bottom: 1rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.5rem 0.7rem 0.5rem 0; border-bottom: 1px solid var(--ink); vertical-align: top; }
th { font-weight: 700; white-space: nowrap; }
td.actions { white-space: nowrap; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 2.5rem; }
