/* keplan review app.
 *
 * Direction: a risograph cartelera. CDMX party flyers are two-ink prints —
 * fluorescent pink and marigold over a violet-black — and the one thing every
 * event in this feed has is a flyer we did not make. Those arrive in wildly
 * different palettes, crops and quality, and shown raw they read as a scrape.
 *
 * So the signature is an overprint: every flyer is remapped to the same two
 * inks, which unifies the feed into one printed object *and* carries meaning —
 * marigold ink means an editor picked it, pink means everything else. One bold
 * move; everything around it stays quiet.
 */

:root {
  /* Riso inks. Two spot colours over a violet-black, not a neutral black —
     night in this city is warm and lit, not a void. */
  --night:      #14101B;
  --night-2:    #1D1727;
  --night-3:    #292036;
  --pink:       #FF48B0;
  --marigold:   #F7A93B;   /* cempasúchil — reserved for editorial picks */
  --paper:      #EFE9F5;
  --paper-dim:  #A79CB8;
  --rule:       #362B47;

  --display: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  --body:    "Archivo", system-ui, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, monospace;

  --gap: clamp(1rem, 3vw, 1.75rem);
  --radius: 3px;   /* print, not app chrome */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  /* Paper tooth. Faint enough to read as texture, not as noise. */
  background-image:
    radial-gradient(circle at 15% 10%, rgba(255, 72, 176, .07), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(247, 169, 59, .05), transparent 40%);
  background-attachment: fixed;
}

[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--marigold);
  outline-offset: 3px;
}

/* ---------- controls ---------- */

.btn {
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--paper);
  padding: .65rem 1.1rem;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { border-color: var(--pink); color: var(--pink); }

.btn--solid {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--night);
  font-weight: 600;
}
.btn--solid:hover { background: var(--marigold); border-color: var(--marigold); color: var(--night); }

.btn--ghost { border-color: transparent; color: var(--paper-dim); padding: .5rem .6rem; }
.btn--sm { padding: .5rem .9rem; }

.btn[aria-pressed="true"] { background: var(--night-3); border-color: var(--pink); color: var(--pink); }

.field { display: block; margin-bottom: 1rem; }
.field__label {
  display: block;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-bottom: .35rem;
}
.field input {
  width: 100%;
  padding: .7rem .8rem;
  background: var(--night-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1rem;
}
.field input:focus { border-color: var(--pink); outline: none; }

/* ---------- sign in ---------- */

.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--gap);
}
.gate__form { width: min(24rem, 100%); }
.gate__mark {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--pink);
  margin: 0 0 1.5rem;
}
.gate__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3rem, 12vw, 4.5rem);
  line-height: .88;
  letter-spacing: -.03em;
  margin: 0 0 .75rem;
}
.gate__sub { color: var(--paper-dim); margin: 0 0 2rem; font-size: .95rem; }
.gate__error {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--marigold);
  margin: .9rem 0 0;
}

/* ---------- chrome ---------- */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem var(--gap);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--night) 88%, transparent);
  backdrop-filter: blur(12px);
}
.bar__mark {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--pink);
  margin: 0;
}
.bar__city { color: var(--paper-dim); margin-left: .5rem; }
.bar__actions { display: flex; gap: .25rem; }

/* ---------- the lede ---------- */

.lede { padding: clamp(2rem, 6vw, 3.5rem) var(--gap) 1.5rem; max-width: 62rem; }
.lede__eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--marigold);
  margin: 0 0 .4rem;
}
.lede__date {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 11vw, 5.5rem);
  line-height: .85;
  letter-spacing: -.035em;
  text-transform: uppercase;
  margin: 0;
}
.lede__count {
  font-family: var(--mono);
  font-size: .82rem;
  color: var(--paper-dim);
  margin: .9rem 0 0;
  padding-top: .9rem;
  border-top: 1px solid var(--rule);
}

.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1.5rem; }
.tab {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .55rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--paper-dim);
  cursor: pointer;
}
.tab:hover { color: var(--paper); border-color: var(--paper-dim); }
.tab.is-on { background: var(--paper); border-color: var(--paper); color: var(--night); font-weight: 600; }

/* ---------- taste chips ---------- */

.taste { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.taste__hint { font-family: var(--mono); font-size: .75rem; color: var(--paper-dim); margin: 0 0 .9rem; }
.taste__chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }

/* ---------- the feed ---------- */

.feed {
  display: grid;
  gap: 1px;                      /* hairline gutters — a printed sheet, not cards floating */
  background: var(--rule);
  border-block: 1px solid var(--rule);
  max-width: 62rem;
}

.card {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: var(--gap);
  padding: var(--gap);
  background: var(--night);
  align-items: start;
}
.card:hover { background: var(--night-2); }

/* --- the signature: two-ink overprint ---
 * Shadows lift to the violet ink, highlights drop to the spot ink. Every
 * flyer, whatever it looked like, prints in the same two colours. Picks get
 * marigold; everything else pink — so the ink itself tells you what it is. */
.flyer {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--night-3);
  isolation: isolate;
}
.flyer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(1) contrast(1.35) brightness(1.18);
}
.flyer::before,
.flyer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.flyer::before { background: #241634; mix-blend-mode: lighten; }   /* sets the shadow ink */
.flyer::after  { background: var(--pink); mix-blend-mode: darken; } /* sets the highlight ink */
.card.is-pick .flyer::after { background: var(--marigold); }

/* No flyer (most Ticketmaster listings): set the venue's initials as the
   artwork rather than showing a broken frame. */
.flyer--type {
  display: grid;
  place-items: center;
  background: var(--night-3);
}
.flyer--type span {
  font-family: var(--display);
  font-weight: 800;
  font-size: 2.4rem;
  letter-spacing: -.05em;
  color: var(--pink);
  mix-blend-mode: normal;
}
.card.is-pick .flyer--type span { color: var(--marigold); }
.flyer--type::before, .flyer--type::after { content: none; }

.card__body { min-width: 0; }

/* The time reads first — the decision is temporal before it is anything else. */
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem .85rem;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin-bottom: .5rem;
}
.meta__time { color: var(--paper); font-size: 1.05rem; font-weight: 600; letter-spacing: 0; }
.meta__pick { color: var(--marigold); }

.card__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 3.2vw, 1.7rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 .45rem;
}
.card__title a { color: inherit; text-decoration: none; }
.card__title a:hover { text-decoration: underline; text-decoration-color: var(--pink); }

.card__venue { font-size: .92rem; color: var(--paper); margin: 0 0 .35rem; }
.card__venue b { font-weight: 600; }
/* The secret-venue note: present, but never competing with the venue itself. */
.card__note {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--paper-dim);
  display: block;
  margin-top: .15rem;
}
.card__lineup {
  font-size: .88rem;
  color: var(--paper-dim);
  margin: 0 0 .7rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .85rem; }
.tag {
  font-family: var(--mono);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .25rem .5rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--paper-dim);
}
.tag--match { border-color: var(--pink); color: var(--pink); }
.tag--free  { border-color: var(--marigold); color: var(--marigold); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.actions__score {
  margin-left: auto;
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--paper-dim);
  background: none;
  border: 0;
  cursor: pointer;
  letter-spacing: .05em;
}
.actions__score:hover { color: var(--marigold); }

.why {
  margin-top: .8rem;
  padding: .8rem;
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--paper-dim);
}
.why__row { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; }
.why__name { width: 8.5rem; flex: none; }
.why__bar { height: 5px; background: var(--pink); border-radius: 999px; min-width: 1px; }

.card.is-dismissed { opacity: .38; }

/* ---------- states ---------- */

.note {
  padding: clamp(2.5rem, 8vw, 4.5rem) var(--gap);
  background: var(--night);
  text-align: center;
}
.note h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -.02em;
  margin: 0 0 .5rem;
}
.note p { color: var(--paper-dim); margin: 0 auto; max-width: 34rem; font-size: .95rem; }

.foot {
  font-family: var(--mono);
  font-size: .7rem;
  color: var(--paper-dim);
  padding: 1.5rem var(--gap) 3rem;
  max-width: 62rem;
}

/* ---------- responsive ---------- */

@media (max-width: 34rem) {
  .card { grid-template-columns: 1fr; gap: 1rem; }
  .flyer { aspect-ratio: 16 / 9; }
  .why__name { width: 6.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
