/* Before It Closes v0. The wall label: quiet, black and white, the closing date is loudest. */

@font-face { font-family: 'Inter'; font-weight: 400; font-display: swap; src: url(/fonts/inter-400.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-display: swap; src: url(/fonts/inter-500.woff2) format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-display: swap; src: url(/fonts/inter-600.woff2) format('woff2'); }
@font-face { font-family: 'Familjen Grotesk'; font-weight: 600; font-display: swap; src: url(/fonts/familjen-grotesk-600.woff2) format('woff2'); }

:root {
  --paper: #FFFFFF;
  --card: #F0F0F0;
  --card-2: #E4E4E4;
  --ink: #0A0A0A;
  --on-ink: #FFFFFF;
  --muted: #6B6B6B;
  --tile: #0A0A0A;
  --scrim: rgba(10, 10, 10, 0.5);
  --pad: 20px;
  --gap: 24px;
  --section: 40px;
  --head: 'Familjen Grotesk', 'Inter', system-ui, sans-serif;
  --text: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bar: 64px;
  --col: 1040px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0A0A0A;
    --card: #1A1A1A;
    --card-2: #262626;
    --ink: #FFFFFF;
    --on-ink: #0A0A0A;
    --muted: #9A9A9A;
    --tile: transparent;
    --scrim: rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; }
html { scrollbar-width: none; -webkit-text-size-adjust: 100%; }
html::-webkit-scrollbar, body::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/24px var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h2[id], section[id] { scroll-margin-top: calc(var(--bar) + 16px); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

/* Type */
.t-page, .t-show, .t-title, .t-section, .sheet h2, .brand span { font-family: var(--head); font-weight: 600; margin: 0; }
.t-page { font-size: 38px; line-height: 40px; letter-spacing: -0.8px; }
.t-show { font-size: 38px; line-height: 40px; letter-spacing: -0.8px; }
.t-title { font-size: 28px; line-height: 32px; letter-spacing: -0.5px; }
.t-section { font-size: 26px; line-height: 30px; letter-spacing: -0.4px; }

/* Top bar: fixed, content moves underneath */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  height: calc(var(--bar) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(var(--pad), calc((100vw - var(--col)) / 2 + var(--pad))) 0;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--paper);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand span { font-size: 26px; letter-spacing: -0.6px; }
.mark-tile { fill: var(--tile); }
.mark-door { fill: #0A0A0A; }

main {
  max-width: 640px; margin: 0 auto;
  padding: calc(var(--bar) + env(safe-area-inset-top) + 8px) var(--pad) calc(48px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 28px;
}
.has-actionbar main { padding: 0 0 calc(120px + env(safe-area-inset-bottom)); max-width: 720px; }

.intro { display: flex; flex-direction: column; gap: 8px; }
.intro p { margin: 0; font-size: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-s { display: flex; flex-direction: column; gap: 10px; }

/* My shows: heart with a label (label visible from tablet up) */
.mybtn {
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: 22px; background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; font-size: 15px; font-weight: 500;
}
.mybtn .i-heart { fill: none; stroke: currentColor; }
.mybtn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (min-width: 560px) { .mybtn { padding: 0 16px 0 14px; } .mybtn-label { position: static; width: auto; height: auto; clip: auto; } }
@media (max-width: 559px) { .mybtn { padding: 0; width: 44px; } }

/* Round icon button */
.round {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: 22px;
  background: var(--card); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.round .i-heart { fill: none; stroke: currentColor; }

/* Filter chips: one row, scrolls sideways */
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad);
  scroll-snap-type: x proximity;
}
.chip {
  flex: none; height: 44px; padding: 0 16px; border: 0; border-radius: 22px;
  background: var(--card); color: var(--ink); font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); font-weight: 500; }

/* Cards: one link (image, title, venue, dates); the heart is a separate button on top */
.list { display: flex; flex-direction: column; gap: 36px; }
.section-gap { margin-top: 12px; }
.card { position: relative; scroll-margin-top: calc(var(--bar) + 12px); }
.card-link { display: flex; flex-direction: column; gap: 6px; text-decoration: none; border-radius: 18px; }
.card-link:focus-visible { outline-offset: 6px; }
.card-link .t-title { margin-top: 8px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-link .muted { font-size: 15px; line-height: 22px; }
.card-link .pills { margin-top: 6px; }
.cover {
  display: block; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden;
  background: var(--card); position: relative;
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover:not(.cover-empty)::after {
  content: ''; position: absolute; inset: 0 0 auto auto; width: 150px; height: 120px; pointer-events: none;
  background: radial-gradient(at top right, rgba(10,10,10,.34), rgba(10,10,10,0) 70%);
}
.credit { display: block; margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--muted); }

/* No image yet: card fill, a doorway arch, the title set large */
.cover-empty { display: flex; align-items: flex-end; padding: 22px 22px 26px; container-type: inline-size; }
.arch { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 88%; fill: var(--card-2); }
.cover-title {
  position: relative;
  font-family: var(--head); font-weight: 600; font-size: clamp(30px, 12cqw, 52px); line-height: 1.04; padding-bottom: .06em;
  letter-spacing: -0.02em; color: var(--ink); overflow-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  height: 30px; padding: 0 12px; border-radius: 15px; background: var(--card); color: var(--ink);
  font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; white-space: nowrap;
}
.pill-urgent { background: var(--ink); color: var(--on-ink); }

/* Heart: separate button over the image, with a soft dark gradient behind it */
.heart {
  width: 44px; height: 44px; border: 0; border-radius: 22px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.heart.on-image {
  position: absolute; top: 10px; right: 10px; z-index: 1;
  background: rgba(10,10,10,.38); color: #FFFFFF;
}
.heart.on-image:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; box-shadow: 0 0 0 5px #0A0A0A; }
.card:has(.cover-empty) .heart.on-image { background: var(--paper); color: var(--ink); }
.i-heart { fill: none; stroke: currentColor; transition: fill .2s var(--ease); }
[aria-pressed="true"] .i-heart { fill: currentColor; }
.pop { animation: pop .38s var(--ease); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.22); } 100% { transform: scale(1); } }

/* Calendar entry point between cards */
.cta { background: var(--card); border-radius: 20px; padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
.cta p { margin: 0; }
.cta .btn { margin-top: 4px; }

/* Cards flow in as they enter the viewport */
.js .card.pre { opacity: 0; transform: translateY(16px); }
.js .card.in { opacity: 1; transform: none; transition: opacity .4s ease-out, transform .4s ease-out; transition-delay: var(--d, 0ms); }

.empty { margin: 0; padding: 32px 20px; border-radius: 16px; background: var(--card); color: var(--muted); font-size: 15px; line-height: 22px; }
.foot { padding-top: 24px; color: var(--muted); font-size: 14px; line-height: 20px; }
.foot p { margin: 0 0 6px; }

/* Buttons */
.btn {
  min-height: 56px; padding: 0 20px; border: 0; border-radius: 28px;
  background: var(--card); color: var(--ink); font-size: 16px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; text-align: center; transition: transform .15s var(--ease), opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn-ink { background: var(--ink); color: var(--on-ink); font-weight: 500; }
.btn[disabled] { opacity: .5; }
.linkbtn { align-self: flex-start; min-height: 44px; padding: 0; border: 0; background: none; font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.danger { color: var(--muted); }

/* Show page */
.hero { position: relative; aspect-ratio: 4 / 5; max-height: 72vh; width: 100%; background: var(--card); overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero-empty { aspect-ratio: auto; height: calc(68px + env(safe-area-inset-top)); background: var(--paper); }
.hero-empty .hero-mark { display: none; }
.back { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 12px; }
.share { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; border: 0; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; }
.foot-links .linkbtn { color: var(--ink); font-size: 14px; }
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 12px); opacity: 0; transition: opacity .2s var(--ease), transform .2s var(--ease);
  margin: 0; padding: 12px 18px; border-radius: 22px; background: var(--ink); color: var(--on-ink);
  font-size: 15px; font-weight: 500; white-space: nowrap; max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.round.on-image { background: rgba(20,20,20,.42); color: #FFFFFF; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hero-empty .round.on-image { background: var(--card); color: var(--ink); backdrop-filter: none; }
.detail { padding: 24px var(--pad) 0; display: flex; flex-direction: column; gap: 28px; }
.hero-empty + .detail { padding-top: 4px; }
.lead { margin: 0; font-size: 16px; line-height: 24px; }
.facts { background: var(--card); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 14px; font-size: 15px; line-height: 22px; }
.facts > div { display: flex; gap: 12px; align-items: flex-start; }
.facts svg { flex: none; margin-top: 1px; }
.facts a { text-decoration: none; }
.body { margin: 0; font-size: 16px; line-height: 25px; }
.src { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; font-size: 15px; text-underline-offset: 3px; }
.rem { display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px 14px; }
.rem > div:last-child { display: flex; flex-direction: column; font-size: 15px; line-height: 21px; }
.rem .muted { font-size: 14px; }
.rem-date { width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rem-date span { font-size: 13px; line-height: 14px; color: var(--muted); }
.rem-date b { font-size: 18px; line-height: 20px; }

/* Sticky bottom bar on detail pages */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 12px var(--pad) calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; background: var(--paper);
  box-shadow: 0 -16px 24px var(--paper);
}
.actionbar .btn { flex: 1; padding: 0 14px; gap: 8px; white-space: nowrap; }
.actionbar .grow { flex: 1.4; }
@media (min-width: 760px) { .actionbar { left: 50%; transform: translateX(-50%); width: 720px; } }

/* Bottom sheets */
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); opacity: 0; transition: opacity .25s var(--ease); }
.scrim.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-height: 92vh; overflow-y: auto; scrollbar-width: none;
  background: var(--paper); border-radius: 24px 24px 0 0;
  padding: 10px var(--pad) calc(28px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 18px;
  transform: translateY(100%); transition: transform .32s var(--ease);
}
.sheet.show { transform: none; }
@media (min-width: 760px) { .sheet { left: 50%; right: auto; width: 560px; margin-left: -280px; } }
@media (prefers-color-scheme: dark) { .sheet { background: var(--card); } .sheet .btn:not(.btn-ink), .sheet .field input { background: var(--card-2); } }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--card-2); align-self: center; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sheet h2 { font-size: 30px; line-height: 34px; letter-spacing: -0.6px; }
.sheet > p, .sheet form p { margin: 0; }
.note { margin: 0; background: var(--card); border-radius: 16px; padding: 14px 16px; font-size: 15px; line-height: 22px; font-weight: 500; }
@media (prefers-color-scheme: dark) { .sheet .note { background: var(--card-2); } }
.fine { font-size: 14px; line-height: 20px; color: var(--muted); }
.fine a { color: var(--ink); }
.upsell { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; font-size: 15px; line-height: 22px; }
.city-list { display: flex; flex-direction: column; gap: 8px; }
.city-list .btn { justify-content: flex-start; }
.city-list .btn[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
.field input, .copyrow input {
  height: 56px; border: 0; border-radius: 16px; padding: 0 16px;
  background: var(--card); color: var(--ink); font: 400 17px var(--text);
}
.field input:focus, .copyrow input:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 22px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.form-msg { min-height: 0; font-size: 15px; font-weight: 500; }
.form-msg:empty { display: none; }
.copyrow { display: flex; gap: 8px; }
.qr { width: 220px; max-width: 100%; aspect-ratio: 1; background: #FFFFFF; border-radius: 16px; padding: 10px; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr svg rect[fill="white"], .qr svg path[fill="white"] { fill: #FFFFFF; }
.copyrow input { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); }
.copyrow .btn { flex: none; }

.panel { background: var(--card); border-radius: 20px; padding: 20px; }

/* Signup band at the end of the list: stacked on phones, two columns on desktop */
.signup-band { background: var(--card); border-radius: 24px; padding: 28px 22px; display: grid; gap: 20px; margin-top: 12px; }
.signup-copy { display: flex; flex-direction: column; gap: 8px; }
.signup-copy p { margin: 0; max-width: 46ch; }
.signup-form p { margin: 0; }
.signup-row { display: flex; flex-direction: column; gap: 10px; }
.signup-row input {
  height: 56px; border: 0; border-radius: 28px; padding: 0 22px; min-width: 0;
  background: var(--paper); color: var(--ink); font: 400 17px var(--text);
}
.signup-row input:focus { outline: 2px solid var(--ink); outline-offset: 0; }
.signup-band .btn:not(.btn-ink) { background: var(--paper); }
@media (min-width: 760px) {
  .signup-band { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 56px; padding: 44px 48px; }
  .signup-row { flex-direction: row; }
  .signup-row input { flex: 1; }
  .signup-row .btn { flex: none; padding: 0 30px; }
}
.panel .btn:not(.btn-ink), .panel .field input, .panel .copyrow input { background: var(--paper); }
.panel p { margin: 0; }
.panel .note { background: var(--paper); }

.prose { display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 25px; }
.prose p, .prose ul { margin: 0; }
.prose ul { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.prose h2 { margin-top: 24px; scroll-margin-top: calc(var(--bar) + 16px); }

.stats { width: 100%; border-collapse: collapse; font-size: 15px; }
.stats th { text-align: left; font-weight: 500; color: var(--muted); padding: 0 8px 10px 0; }
.stats td { padding: 8px 8px 8px 0; vertical-align: top; }
.stats tr:nth-child(even) td { background: color-mix(in srgb, var(--paper) 50%, transparent); }

/* Desktop: a centred column with a wider grid, nothing more */
@media (min-width: 760px) {
  main { max-width: var(--col); }
  main > .btn { align-self: flex-start; padding: 0 32px; }
  .card .t-title { font-size: 24px; line-height: 28px; letter-spacing: -0.4px; }
  .list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 28px; }
  .list .cta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding: 24px 28px; }
  .list .cta .t-section { flex: 1 1 100%; }
  .list .cta p { flex: 1 1 360px; }
  .list .cta .btn { margin: 0; padding: 0 28px; }
  .intro, .chips, .foot, .panel, .prose { max-width: 640px; }
  .chips { margin: 0; padding: 0; }
  .hero { max-height: 70vh; aspect-ratio: 3 / 2; }
  .hero-empty { aspect-ratio: auto; }
}
@media (min-width: 1100px) { .list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .card.pre { opacity: 1; transform: none; }
}
