/* ==========================================================
   CHRYSALIS / HUMANHTML-INSPIRED EDITORIAL RESKIN
   Keeps the venue functionality, changes the visual system.
   ========================================================== */

:root {
  --bg: #efeee9;
  --ink: #101010;
  --muted: #66645f;
  --line: #b8b6b0;
  --soft: #deddd7;
  --accent: #d8ff00;
  --white: #f8f7f2;
  --max: 1500px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.25;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* ----- Header ----- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid var(--ink);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
}

.site-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}

.top-nav {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2.5rem);
}

.top-nav a {
  font-size: .82rem;
  text-decoration: none;
}

.top-nav a:hover {
  text-decoration: underline;
  text-underline-offset: .3em;
}

/* ----- Hero ----- */

.hero {
  min-height: calc(100vh - 72px);
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.hero h1 {
  margin: 6vh 0;
  max-width: 1350px;
  font-size: clamp(4.2rem, 11.5vw, 11rem);
  line-height: .82;
  letter-spacing: -.075em;
  font-weight: 700;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1.35fr .65fr 1fr;
  gap: 2rem;
  align-items: end;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.intro {
  max-width: 570px;
  margin: 0;
  font-size: clamp(1.05rem, 1.6vw, 1.45rem);
  letter-spacing: -.02em;
}

.hero-status {
  font-family: "Courier New", Courier, monospace;
  font-size: .73rem;
  text-transform: uppercase;
}

.hero-status p {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin: 0;
  padding: .25rem 0;
  border-bottom: 1px solid var(--line);
}

.hero-status strong {
  font-weight: normal;
}

.button-row {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--ink);
}

.text-link {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  font-size: .88rem;
}

.text-link:hover {
  padding-left: .4rem;
}

.text-link,
.text-link span {
  transition: .18s ease;
}

.text-link:hover span {
  transform: translate(3px, 3px);
}

/* ----- Running strip ----- */

.marquee-wrap {
  overflow: hidden;
  border-bottom: 1px solid var(--ink);
  white-space: nowrap;
}

.marquee {
  padding: .65rem 0;
  font-family: "Courier New", Courier, monospace;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.marquee span {
  display: inline-block;
  min-width: 200%;
  animation: scrollText 25s linear infinite;
}

@keyframes scrollText {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ----- Section system ----- */

.section {
  padding: clamp(4rem, 8vw, 8rem) 0;
  border-bottom: 1px solid var(--ink);
  scroll-margin-top: 72px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.section-index,
.subhead,
.dialog-kicker {
  font-family: "Courier New", Courier, monospace;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.section h2 {
  margin: 0;
  font-size: clamp(3.4rem, 7.5vw, 8rem);
  line-height: .86;
  letter-spacing: -.065em;
  font-weight: 700;
}

.section-note {
  max-width: 350px;
  margin: 0 0 0 auto;
  font-size: .88rem;
  color: var(--muted);
}

/* ----- Calendar ----- */

.calendar-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0;
  margin-bottom: 1rem;
}

.mini-button {
  border: 1px solid var(--ink);
  border-right: 0;
  background: transparent;
  color: var(--ink);
  padding: .65rem .8rem;
  cursor: pointer;
  font-size: .72rem;
}

.mini-button:last-child {
  border-right: 1px solid var(--ink);
}

.mini-button:hover {
  background: var(--ink);
  color: var(--bg);
}

.calendar-frame {
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.calendar-topline {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  min-height: 72px;
  padding: 0 1rem;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.calendar-topline h3 {
  margin: 0;
  font-size: clamp(1.5rem, 2.8vw, 2.5rem);
  letter-spacing: -.04em;
  font-weight: 500;
}

.calendar-topline span {
  font-family: "Courier New", Courier, monospace;
  font-size: .67rem;
  text-transform: uppercase;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays span {
  padding: .65rem .6rem;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: "Courier New", Courier, monospace;
  font-size: .65rem;
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  min-height: 135px;
  padding: .65rem;
  border: 0;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.calendar-day:hover {
  background: var(--white);
}

.calendar-day.outside-month {
  color: #aaa8a2;
}

.calendar-day.has-event {
  background: var(--ink);
  color: var(--bg);
}

.calendar-day.has-event:hover {
  background: #292929;
}

.calendar-day.is-today .day-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 27px;
  height: 27px;
  padding: 0 .35rem;
  background: var(--accent);
  color: var(--ink);
  border-radius: 50%;
}

.day-number {
  font-family: "Courier New", Courier, monospace;
  font-size: .72rem;
}

.day-event {
  display: block;
  margin-top: .75rem;
  max-width: 100%;
  font-size: clamp(.72rem, .9vw, .92rem);
  line-height: 1.05;
  font-weight: 700;
  white-space: normal;
}

.open-label {
  position: absolute;
  left: .65rem;
  bottom: .65rem;
  font-family: "Courier New", Courier, monospace;
  font-size: .6rem;
  text-transform: uppercase;
  color: var(--muted);
}

.calendar-legend {
  display: flex;
  gap: 1.2rem;
  margin: .85rem 0 4rem;
  font-family: "Courier New", Courier, monospace;
  font-size: .64rem;
  text-transform: uppercase;
}

.event-square,
.open-square {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: .3rem;
  border: 1px solid var(--ink);
}

.event-square {
  background: var(--ink);
}

.open-square {
  background: transparent;
}

/* ----- Event list ----- */

.monthly-list {
  border-top: 1px solid var(--ink);
}

.monthly-list > .subhead {
  padding: .75rem 0;
  border-bottom: 1px solid var(--line);
}

.event-row,
.event-row.with-flyer {
  display: grid;
  grid-template-columns: 90px 130px minmax(0, 1fr) 130px;
  gap: 1.5rem;
  align-items: center;
  min-height: 118px;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.event-row:not(.with-flyer) {
  grid-template-columns: 130px minmax(0, 1fr) 130px;
}

.event-flyer-button {
  appearance: none;
  display: block;
  width: 72px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.event-list-flyer {
  display: block;
  width: 72px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter .2s ease, transform .2s ease;
}

.event-flyer-button:hover .event-list-flyer,
.event-flyer-button:focus-visible .event-list-flyer {
  filter: grayscale(0);
  transform: scale(1.03);
}

.event-date {
  font-family: "Courier New", Courier, monospace;
  font-size: .68rem;
  text-transform: uppercase;
}

.event-title {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink);
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-size: clamp(1.5rem, 3vw, 3rem);
  line-height: .95;
  letter-spacing: -.04em;
}

.event-title:hover {
  text-decoration: underline;
  text-underline-offset: .12em;
}

.event-time {
  justify-self: end;
  font-family: "Courier New", Courier, monospace;
  font-size: .68rem;
}

/* ----- Photo archive ----- */

.photo-gallery {
  columns: 3 280px;
  column-gap: .7rem;
}

.photo-card {
  appearance: none;
  display: block;
  width: 100%;
  margin: 0 0 .7rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  break-inside: avoid;
  overflow: hidden;
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(100%);
  transition: filter .25s ease, transform .4s ease;
}

.photo-card:hover img,
.photo-card:focus-visible img {
  filter: grayscale(0);
  transform: scale(1.015);
}

.photo-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ----- Booking ----- */

.booking-section {
  background: var(--ink);
  color: var(--bg);
  margin-inline: calc(50% - 50vw);
  padding-inline: max(24px, calc((100vw - var(--max)) / 2));
}

.booking-section .section-note {
  color: #aaa8a2;
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2rem;
}

.booking-form label {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  border-top: 1px solid #5b5b57;
}

.booking-form label.full {
  grid-column: 1 / -1;
}

.booking-form label span {
  font-family: "Courier New", Courier, monospace;
  font-size: .64rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--bg);
  padding: .9rem 0;
  border-radius: 0;
}

.booking-form textarea {
  resize: vertical;
  min-height: 120px;
}

.booking-form select {
  color-scheme: dark;
}

.booking-form input::placeholder {
  color: #77766f;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
  background: #1c1c1c;
}

.form-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #5b5b57;
}

.form-note {
  font-family: "Courier New", Courier, monospace;
  font-size: .64rem;
  text-transform: uppercase;
  color: #aaa8a2;
}

.submit-button {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
  min-width: 290px;
  border: 1px solid var(--bg);
  background: transparent;
  color: var(--bg);
  padding: .9rem 1rem;
  cursor: pointer;
  text-align: left;
}

.submit-button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}

/* ----- Venue info ----- */

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--ink);
}

.info-grid article {
  min-height: 220px;
  padding: 1rem 1rem 2rem 0;
  border-bottom: 1px solid var(--ink);
}

.info-grid article:nth-child(odd) {
  border-right: 1px solid var(--ink);
}

.info-grid article:nth-child(even) {
  padding-left: 1rem;
}

.info-grid p {
  max-width: 540px;
  margin-top: 4rem;
  font-size: clamp(1.15rem, 1.8vw, 1.6rem);
  letter-spacing: -.025em;
}

/* ----- Footer ----- */

.footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  min-height: 180px;
  padding: 2rem 0;
  font-size: .72rem;
}

.footer > div {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer a {
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ----- Dialogs ----- */

.event-dialog,
.photo-dialog {
  width: min(900px, calc(100% - 32px));
  max-height: 92vh;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--bg);
  color: var(--ink);
  padding: clamp(1rem, 3vw, 2rem);
  overflow: auto;
}

.event-dialog::backdrop,
.photo-dialog::backdrop {
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(3px);
}

.dialog-close {
  display: block;
  margin: 0 0 2rem auto;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  padding: .2rem 0;
  cursor: pointer;
  font-family: "Courier New", Courier, monospace;
  font-size: .68rem;
  text-transform: uppercase;
}

.event-dialog h2 {
  margin: .5rem 0 1rem;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: .88;
  letter-spacing: -.06em;
}

.event-flyer-modal {
  display: block;
  width: min(100%, 440px);
  max-height: 58vh;
  object-fit: contain;
  margin: 1rem 0 2rem;
  filter: grayscale(100%);
}

.event-flyer-modal[hidden] {
  display: none;
}

#dialogMeta {
  font-family: "Courier New", Courier, monospace;
  font-size: .72rem;
  text-transform: uppercase;
}

#dialogDescription {
  max-width: 600px;
  font-size: 1rem;
}

/* Photo viewer */
.photo-dialog {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  background: #0c0c0c;
  border-color: #444;
  padding: 3rem 5rem;
  overflow: visible;
}

.photo-dialog .dialog-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 4;
  color: var(--white);
  border-color: var(--white);
  margin: 0;
}

.photo-dialog figure {
  margin: 0;
}

.photo-dialog img {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
}

.photo-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--white);
  padding: 1rem;
  cursor: pointer;
  font-size: 2rem;
}

.photo-nav:hover {
  color: var(--accent);
}

.photo-nav-prev {
  left: .5rem;
}

.photo-nav-next {
  right: .5rem;
}

/* ----- Responsive ----- */

@media (max-width: 900px) {
  .page-shell {
    width: min(100% - 28px, var(--max));
  }

  .hero-bottom,
  .section-heading {
    grid-template-columns: 1fr 1fr;
  }

  .hero-bottom .button-row,
  .section-heading .section-note {
    grid-column: 2;
  }

  .section-heading h2 {
    grid-column: 2;
  }

  .section-index {
    grid-row: 1;
  }

  .booking-form {
    grid-template-columns: 1fr;
  }

  .booking-form label.full,
  .form-bottom {
    grid-column: auto;
  }

  .event-row,
  .event-row.with-flyer {
    grid-template-columns: 70px 95px minmax(0, 1fr);
  }

  .event-time {
    grid-column: 3;
    justify-self: start;
  }

  .event-row:not(.with-flyer) {
    grid-template-columns: 95px minmax(0, 1fr);
  }

  .event-row:not(.with-flyer) .event-time {
    grid-column: 2;
  }
}

@media (max-width: 680px) {
  .topbar {
    min-height: 60px;
  }

  .top-nav {
    gap: .8rem;
  }

  .top-nav a {
    font-size: .7rem;
  }

  .hero {
    min-height: auto;
    padding-bottom: 2rem;
  }

  .hero-meta {
    margin-top: 1rem;
  }

  .hero h1 {
    margin: 14vh 0 12vh;
    font-size: clamp(4rem, 19vw, 7rem);
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-bottom .button-row {
    grid-column: auto;
  }

  .section {
    padding: 4rem 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 1.4rem;
    margin-bottom: 3rem;
  }

  .section-heading .section-note,
  .section-heading h2 {
    grid-column: auto;
  }

  .section-note {
    margin-left: 0;
  }

  .section h2 {
    font-size: clamp(3.3rem, 16vw, 5.5rem);
  }

  .calendar-controls {
    justify-content: stretch;
  }

  .mini-button {
    flex: 1;
    padding: .6rem .3rem;
  }

  .calendar-topline {
    min-height: 60px;
    padding: .6rem;
    align-items: flex-start;
    flex-direction: column;
    gap: .25rem;
  }

  .calendar-topline h3 {
    font-size: 1.35rem;
  }

  .calendar-day {
    min-height: 86px;
    padding: .3rem;
  }

  .calendar-weekdays span {
    padding: .45rem .1rem;
    text-align: center;
    font-size: .54rem;
  }

  .day-number {
    font-size: .62rem;
  }

  .day-event {
    margin-top: .35rem;
    font-size: .58rem;
    line-height: 1;
    max-height: 3em;
    overflow: hidden;
  }

  .open-label {
    display: none;
  }

  .event-row,
  .event-row.with-flyer {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: .75rem;
    min-height: 105px;
  }

  .event-flyer-button {
    width: 52px;
    grid-row: 1 / span 3;
  }

  .event-list-flyer {
    width: 52px;
  }

  .event-date,
  .event-title,
  .event-time {
    grid-column: 2;
  }

  .event-title {
    font-size: 1.5rem;
  }

  .event-time {
    justify-self: start;
  }

  .event-row:not(.with-flyer) {
    grid-template-columns: 85px 1fr;
  }

  .event-row:not(.with-flyer) .event-date {
    grid-column: 1;
  }

  .event-row:not(.with-flyer) .event-title,
  .event-row:not(.with-flyer) .event-time {
    grid-column: 2;
  }

  .photo-gallery {
    columns: 2 140px;
    column-gap: .45rem;
  }

  .photo-card {
    margin-bottom: .45rem;
  }

  .booking-form label {
    grid-template-columns: 1fr;
    gap: .25rem;
    padding: .75rem 0;
  }

  .form-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .submit-button {
    min-width: 0;
    width: 100%;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-grid article,
  .info-grid article:nth-child(odd),
  .info-grid article:nth-child(even) {
    padding: 1rem 0 2rem;
    border-right: 0;
  }

  .info-grid p {
    margin-top: 2.5rem;
  }

  .footer {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .footer > div {
    flex-direction: column;
    gap: .5rem;
  }

  .photo-dialog {
    width: calc(100% - 12px);
    padding: 3rem 2.7rem 1rem;
  }

  .photo-nav {
    padding: .5rem;
    font-size: 1.5rem;
  }

  .photo-nav-prev {
    left: .15rem;
  }

  .photo-nav-next {
    right: .15rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .marquee span {
    animation: none;
  }

  .text-link,
  .text-link span,
  .photo-card img,
  .event-list-flyer {
    transition: none;
  }
}
