:root {
  --ink: #0e0d0c;
  --ink-2: #1a1816;
  --line: #2e2a26;
  --bone: #efe8dc;
  --muted: #a69d90;
  --red: #c8352b;
  --radius: 4px;
  --gutter: 16px;
  --display: "Jacquard 24", "Old English Text MT", serif;
  --body: "Nova Cut", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  line-height: 1;
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px max(var(--gutter), calc((100% - 960px) / 2 + var(--gutter)));
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(8px);
}

.brand {
  font-family: var(--display);
  font-size: 24px;
  text-transform: none;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.site-header nav { display: flex; gap: 20px; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.site-header nav a:hover { color: var(--bone); }

main, .site-footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--radius);
  font: 600 15px/1 var(--body);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid var(--line);
  transition: background-color 120ms, border-color 120ms;
}

.section { padding: 56px 0; }

/* Ornament between sections (white ink on transparent, from comic lab comic_19). */
.section + .section { padding-top: 0; }
.section + .section::before {
  content: "";
  display: block;
  width: min(100%, 600px);
  aspect-ratio: 15 / 1;
  margin: 0 auto 56px;
  background: url("divider.webp") center / contain no-repeat;
}

.section-head { margin-bottom: 28px; text-align: center; }
.section-head h2 { font-size: 72px; margin-bottom: 12px; }
.section-head p { color: var(--muted); margin: 0 auto; max-width: 40em; }
.section-head strong, .section-head a { color: var(--bone); }

/* Open days */
.month-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.month-tab {
  min-height: 44px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font: 400 24px/1 var(--display);
  text-transform: none;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.month-tab:hover { color: var(--bone); }
.month-tab[aria-selected="true"] { background: var(--red); color: #fff; }
.month-tab:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.slots-status { color: var(--muted); margin: 0; grid-column: 1 / -1; }

.day {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.day-name {
  font-family: var(--display);
  text-transform: none;
  font-size: 24px;
  line-height: 1.1;
}

.day-date { color: var(--muted); font-size: 14px; margin-bottom: 12px; }

.day-times { display: flex; gap: 8px; flex-wrap: wrap; }

.time {
  flex: 1 1 0;
  min-width: 72px;
  min-height: 44px;
  padding: 0 12px;
  font-size: 15px;
  color: var(--bone);
  background: transparent;
}
.time:hover { border-color: var(--red); background: color-mix(in srgb, var(--red) 14%, transparent); }

.time:disabled { opacity: 0.4; cursor: wait; }
.time.is-loading { opacity: 1; border-color: var(--red); }

.notice {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--red) 12%, transparent);
  text-align: center;
}

/* Confirmation page */
.confirm { border-top: 0; }
.next-steps {
  max-width: 32em;
  margin: 0 auto;
  padding-left: 20px;
  color: var(--muted);
}
.next-steps li { margin: 6px 0; }
.confirm-back { text-align: center; margin: 32px 0 0; }
.booked-design { margin: 0 auto 28px; width: min(280px, 70vw); text-align: center; }
.booked-design img { display: block; width: 100%; height: auto; border-radius: var(--radius); background: #fff; }
.booked-design figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; }

/* Flash gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.flash-tile {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: #fff;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 120ms;
}
.flash-tile:hover, .flash-tile:focus-visible { outline-color: var(--red); }
.flash-tile img {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 200ms;
}
.flash-tile:hover img { transform: scale(1.03); }

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(14, 13, 12, 0.94); }
.lightbox-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.lightbox img {
  width: min(92vw, calc(100dvh - 150px), 1600px);
  height: auto;
  aspect-ratio: 1;
  border-radius: var(--radius);
  background: #fff;
  touch-action: pan-y pinch-zoom;
}

.lightbox-book {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 520px);
}
.design-pick { display: flex; gap: 8px; width: 100%; }
.design-pick select {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink-2);
  color: var(--bone);
  font: 500 15px/1 var(--body);
}
.lightbox-msg { margin: 0; color: var(--bone); text-align: center; font-size: 14px; }

/* Plaque frame (comic lab comic_20, inverted, transparent outside). Nine-slice so the frame keeps
   its thickness at any size; --pb is how thick the frame is drawn. */
.plaque { position: relative; isolation: isolate; --pb: 14px 18px; }
.plaque::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: solid transparent;
  border-width: var(--pb);
  border-image: url("plaque.webp") 110 fill / var(--pb) stretch;
  transition: filter 120ms;
}

.plaque-button {
  min-height: 60px;
  padding: 0 36px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 16px;
}
/* Red outline that follows the plaque's edge, not a box. */
.plaque-button:hover::before,
.plaque-button:focus-visible::before {
  filter: drop-shadow(2px 0 0 var(--red)) drop-shadow(-2px 0 0 var(--red))
          drop-shadow(0 2px 0 var(--red)) drop-shadow(0 -2px 0 var(--red));
}
.plaque-button:focus-visible { outline: none; }

.plaque-panel {
  --pb: 40px 56px;
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 104px;
}
.plaque-panel p { color: var(--bone); max-width: 18em; }

.button-primary { background: var(--red); border-color: var(--red); color: #fff; }
.button-primary:hover { background: color-mix(in srgb, var(--red) 85%, #fff); }
.button-primary:disabled { opacity: 0.45; cursor: not-allowed; }

.lightbox-btn {
  position: fixed;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  color: var(--bone);
  font: 400 28px/1 var(--body);
  cursor: pointer;
}
.lightbox-btn:hover { border-color: var(--red); }
.lightbox-prev { left: 12px; top: 50%; translate: 0 -50%; }
.lightbox-next { right: 12px; top: 50%; translate: 0 -50%; }
.lightbox-close { right: 12px; top: 12px; }

/* Info */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0 32px;
  margin: 0;
}
.facts div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { font-weight: 600; }
.facts dd { margin: 0; color: var(--muted); }

.fine { color: var(--muted); font-size: 14px; margin: 24px 0 0; text-align: center; }

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}
.site-footer p { margin: 0; }
.site-footer { align-items: center; }

.social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--bone);
  text-decoration: none;
  font-weight: 500;
}
.social:hover { color: var(--red); }

@media (max-width: 480px) {
  .plaque-panel { --pb: 24px 32px; padding: 44px 52px; }
  .section-head h2 { font-size: 48px; }
  .site-header nav { gap: 14px; }
  .facts { grid-template-columns: 1fr; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
