/* Karwaan — a mehfil after the lights drop. */

:root {
  --ink:       #1A1526;
  --ink-deep:  #100C1A;
  --ink-soft:  #241D33;
  --lamp:      #E8B75C;
  --lamp-dim:  #8A6B2E;
  --paper:     #EDE6D8;
  --dusk:      #8A7FA6;
  --ember:     #D4634E;

  --display: "Fraunces", Georgia, serif;
  --body:    "Instrument Sans", system-ui, sans-serif;
  --mono:    "DM Mono", ui-monospace, monospace;

  --gap:    1.5rem;
  --radius: 4px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  /* the lamp: a single pool of warm light behind the top of the page */
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgba(232,183,92,.13), transparent 60%);
  background-repeat: no-repeat;
  min-height: 100vh;
}

.wrap {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 5rem;
}

/* ---------- type ---------- */

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--lamp);
  margin: 0 0 .6rem;
}

h1 {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-weight: 500;
  font-size: clamp(2.1rem, 9vw, 3rem);
  line-height: 1.04;
  letter-spacing: -.015em;
  margin: 0 0 1rem;
}

.meta {
  font-family: var(--mono);
  font-size: .92rem;
  color: var(--paper);
  margin: 0 0 .3rem;
  font-variant-numeric: tabular-nums;
}

.venue { color: var(--dusk); margin: 0; font-size: .95rem; }
.venue a { color: var(--dusk); text-underline-offset: 3px; }
.venue a:hover { color: var(--lamp); }

.loading, .empty {
  color: var(--dusk);
  font-style: italic;
  padding: 4rem 0;
  text-align: center;
}

.poster {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
  background: var(--ink-deep);
}

.rule {
  border: 0;
  border-top: 1px solid rgba(237,230,216,.12);
  margin: 2rem 0;
}

/* ---------- the two doors ---------- */

.doors { display: grid; gap: .75rem; }

.door {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: .5rem 1rem;
  width: 100%;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
  border: 1px solid var(--lamp-dim);
  background: transparent;
  color: var(--paper);
}

/* filled means you're in the light */
.door--perform { background: var(--lamp); color: var(--ink-deep); border-color: var(--lamp); }

.door:hover:not(:disabled) { transform: translateY(-1px); }
.door:focus-visible { outline: 2px solid var(--lamp); outline-offset: 3px; }
.door:disabled { opacity: .4; cursor: not-allowed; }
.door[aria-pressed="true"] { border-color: var(--paper); }

.door__name {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .01em;
}

.door__price {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

.door__left {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .04em;
  opacity: .72;
}

/* ---------- form ---------- */

.form { margin-top: 1.75rem; }
.form[hidden] { display: none; }

.field { margin-bottom: 1.1rem; }

.field label {
  display: block;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--dusk);
  margin-bottom: .4rem;
  font-family: var(--mono);
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: .8rem .9rem;
  font: inherit;
  color: var(--paper);
  background: var(--ink-deep);
  border: 1px solid rgba(237,230,216,.16);
  border-radius: var(--radius);
}

.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--lamp);
}

.field .hint { font-size: .8rem; color: var(--dusk); margin-top: .35rem; }
.field .err  { font-size: .82rem; color: var(--ember); margin-top: .35rem; }
.field.is-bad input { border-color: var(--ember); }

.submit {
  width: 100%;
  padding: 1rem;
  margin-top: .5rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink-deep);
  background: var(--lamp);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

.submit:disabled { opacity: .5; cursor: progress; }
.submit:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }

.notice {
  padding: .9rem 1rem;
  border-left: 2px solid var(--ember);
  background: var(--ink-deep);
  color: var(--paper);
  font-size: .92rem;
  margin: 1.25rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ---------- the chit (signature) ---------- */

.chit {
  position: relative;
  margin-top: 2.5rem;
  padding: 2rem 1.5rem 1.75rem;
  background: var(--paper);
  color: var(--ink-deep);
  border-radius: 2px;
  animation: settle .45s cubic-bezier(.2,.9,.3,1) both;
}

.chit[hidden] { display: none; }

/* punched perforations, top and bottom */
.chit__perf {
  position: absolute;
  left: 0; right: 0;
  height: 12px;
  background:
    radial-gradient(circle at 8px 6px, var(--ink) 5px, transparent 5.5px)
    repeat-x;
  background-size: 16px 12px;
}
.chit__perf--top    { top: -6px; }
.chit__perf--bottom { bottom: -6px; }

.chit__label {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #6B5F52;
  margin: 0 0 .35rem;
}

.chit__seat {
  font-family: var(--mono);
  font-size: 3.4rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.03em;
  margin: 0 0 1.1rem;
  font-variant-numeric: tabular-nums;
}

.chit__who {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 500;
  margin: 0 0 .15rem;
}

.chit__event { font-size: .9rem; color: #6B5F52; margin: 0 0 1.4rem; }

.chit__timer {
  font-family: var(--mono);
  font-size: .85rem;
  color: #6B5F52;
  border-top: 1px dashed rgba(26,21,38,.22);
  padding-top: .9rem;
  font-variant-numeric: tabular-nums;
}

.chit__timer strong { color: var(--ink-deep); font-weight: 500; }

.chit .submit { background: var(--ink); color: var(--paper); }

@keyframes settle {
  from { opacity: 0; transform: translateY(14px) rotate(-.4deg); }
  to   { opacity: 1; transform: none; }
}

/* ---------- index list ---------- */

.night {
  display: block;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(237,230,216,.12);
  color: inherit;
  text-decoration: none;
}
.night:hover .night__title { color: var(--lamp); }
.night__when {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .08em;
  color: var(--lamp);
  text-transform: uppercase;
}
.night__title {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  margin: .2rem 0 .1rem;
}
.night__where { font-size: .88rem; color: var(--dusk); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
