/* ABOUTME: Styles for the Táncháztalálkozó event page.
   ABOUTME: Scroll-driven hero with clip-path reveal, line-up grid, program schedule, and ticket cards. */

/* ===========================
   Dark mode: swap background and text colors for the whole page
   =========================== */

body {
  transition: background-color 0.5s ease, color 0.5s ease;
}

body.is-dark {
  background-color: var(--color-black);
  color: var(--color-bg);
}

body.is-dark .bg-lines__line {
  border-right-color: rgba(236, 223, 206, 0.1);
}

body.is-dark .navbar {
  color: var(--color-bg);
}

body.is-dark .navbar__logo-line {
  background: var(--color-bg);
  color: var(--color-black);
}

body.is-dark .navbar__toggle {
  color: var(--color-bg);
}

body.is-dark .footer--dark .footer__inner {
  background: var(--color-bg);
  color: var(--color-black);
}

body.is-dark .footer--dark .footer__col a,
body.is-dark .footer--dark .footer__col p,
body.is-dark .footer--dark .footer__brand,
body.is-dark .footer--dark .footer__bottom {
  color: var(--color-black);
}

/* ===========================
   Hero: scroll-driven reveal
   =========================== */

.tht-hero {
  position: relative;
  z-index: 1;
  height: 260vh;
  margin-bottom: -100vh;
}

.tht-hero__topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0.8em 1em;
  transition: opacity 0.4s ease;
}

.tht-hero__topbar.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.tht-hero__logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}

.tht-hero__menu {
  font-family: var(--font-primary);
  font-size: 2.1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* Sticky inner container: stays in viewport during scroll */
.tht-hero__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  will-change: transform;
}

/* Background image: starts clipped to cross shape (mask-2.svg), expands to full on scroll */
.tht-hero__image {
  position: absolute;
  inset: 0;
  z-index: 1;
  will-change: clip-path;
}

.tht-hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Pixel mask overlay: no longer needed, cross clip-path handles the shape */
.tht-hero__mask {
  display: none;
}

/* Title wrap: positioned at bottom, scrolls up */
.tht-hero__title-wrap {
  position: absolute;
  bottom: 1rem;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 0 1rem;
  will-change: transform, opacity;
}

.tht-hero__title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0;
}

.tht-hero__title-line {
  font-family: var(--font-primary);
  font-size: clamp(5rem, 13vw, 13rem);
  font-weight: 400;
  line-height: 0.85;
}

/* Date overlay: 6-column × 4-row grid, full viewport, no padding/gap */
.tht-hero__date-grid {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, min-content);
  align-content: center;
  will-change: transform;
}

/* Each cell styling */
.tht-hero__date-cell {
  background: var(--color-bg);
  color: var(--color-black);
  padding: 0 1rem;
  font-family: 'Satoshi', var(--font-secondary);
  font-size: clamp(5rem, 11vw, 11rem);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 0.85;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Text inside cells: starts translated down for reveal animation */
.tht-hero__date-cell span {
  display: block;
  transform: translateY(110%);
  transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

/* When revealed, text slides into view */
.tht-hero__date-cell.is-revealed span {
  transform: translateY(0);
}

/* Row 1, column 2: "20" */
.tht-hero__date-cell--year-top {
  grid-row: 1;
  grid-column: 2;
}

/* Row 2, column 3: "26" */
.tht-hero__date-cell--year-bottom {
  grid-row: 2;
  grid-column: 3;
}

/* Row 3, columns 2–4: "október" */
.tht-hero__date-cell--month {
  grid-row: 3;
  grid-column: 2 / 5;
  letter-spacing: -0.02em;
}

/* Row 4, columns 4–5: "17-19." */
.tht-hero__date-cell--days {
  grid-row: 4;
  grid-column: 4 / 6;
}

/* ===========================
   Shared: Tag badge
   =========================== */

.tht-tag {
  display: inline-block;
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  background: var(--color-black);
  color: var(--color-bg);
  padding: 0.25em 0.7em;
}

body.is-dark .tht-tag {
  background: var(--color-bg);
  color: var(--color-black);
}

/* ===========================
   Shared: Section header
   =========================== */

.tht-section-header {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 0 1rem 3rem;
  align-items: end;
  gap: 1rem;
}

.tht-section-header .tht-tag {
  grid-column: 1 / 2;
  justify-self: start;
  align-self: start;
}

.tht-section-header__title {
  grid-column: 2 / 5;
  font-family: var(--font-primary);
  font-size: clamp(2.5rem, 5.5vw, 5rem);
  font-weight: 400;
  line-height: 1;
  margin: 0;
}

.tht-section-header__title--large {
  font-size: clamp(3.5rem, 10.5vw, 12rem);
}

.tht-section-header--right .tht-section-header__title {
  grid-column: 1 / 7;
  text-align: center;
}

.tht-section-header--left .tht-section-header__title {
  grid-column: 1 / 5;
}

/* ===========================
   Line-up
   =========================== */

.tht-lineup {
  position: relative;
  z-index: 1;
}

.tht-lineup__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.tht-lineup__cell {
  padding: 0.5rem;
  aspect-ratio: 4 / 5;
}

.tht-lineup__cell--empty {
  cursor: default;
}

.tht-lineup__grid > :first-child {
  padding-left: 1rem;
}

.tht-lineup__grid > :nth-child(6n) {
  padding-right: 1rem;
}

.tht-lineup__grid > :nth-child(6n+1) {
  padding-left: 1rem;
}

.tht-lineup__cell-inner {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.tht-lineup__cell-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: blur(8px) grayscale(100%);
  transform: scale(1.05);
  transition: filter 0.4s ease, transform 0.4s ease;
}

.tht-lineup__cell:hover .tht-lineup__cell-inner img {
  filter: blur(0) grayscale(100%);
  transform: scale(1);
}

.tht-lineup__cell-label {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.4rem;
  font-family: var(--font-secondary);
  font-size: 0.6rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-white);
  background: #000;
  z-index: 3;
}

/* Pixel overlay canvas for hover animation — inside cell-inner, clipped */
.pixel-pattern {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tht-lineup__cell:hover .pixel-pattern {
  opacity: 1;
}

/* ===========================
   Program Schedule
   =========================== */

.tht-program {
  position: relative;
  z-index: 1;
}

/* Day block */
.tht-program__day {
  margin-bottom: 4rem;
}

.tht-program__day-header {
  padding: 0 1rem;
  margin-bottom: 1rem;
}

.tht-program__day-date {
  display: inline-block;
  font-family: 'Satoshi', var(--font-secondary);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 500;
  background: var(--color-bg);
  color: var(--color-black);
  padding: 0.3em 0.6em;
}

/* Table grid: 6-column, aligned to page grid */
.tht-program__table {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.tht-program__venue-name {
  font-family: var(--font-secondary);
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 1rem;
  background: rgba(236, 223, 206, 0.08);
}

.tht-program__cell {
  padding: 1rem;
  background: rgba(236, 223, 206, 0.04);
}

.tht-program__cell--empty {
  padding: 1rem;
  background: rgba(236, 223, 206, 0.04);
}

.tht-program__time {
  display: block;
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.5;
  margin-bottom: 0.25rem;
}

.tht-program__act {
  display: block;
  font-family: var(--font-primary);
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  font-weight: 400;
  line-height: 1.2;
}

/* ===========================
   Tickets
   =========================== */

.tht-tickets {
  position: relative;
  z-index: 1;
  padding: 0 1rem;
}

.tht-tickets__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
}

.tht-tickets__card {
  border: 1px solid currentColor;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tht-tickets__card-type {
  font-family: var(--font-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tht-tickets__card-price {
  font-family: var(--font-primary);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1;
}

.tht-tickets__card-desc {
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  opacity: 0.6;
  margin: 0;
}

.tht-tickets__card-btn {
  display: inline-block;
  margin-top: auto;
  font-family: var(--font-secondary);
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  font-weight: 500;
  text-transform: uppercase;
  padding: 0.5em 1.5em;
  border: 1px solid currentColor;
  border-radius: 100px;
  text-align: center;
  transition: background 0.3s ease, color 0.3s ease;
}

.tht-tickets__card-btn:hover {
  background: var(--color-black);
  color: var(--color-bg);
}

body.is-dark .tht-tickets__card-btn:hover {
  background: var(--color-bg);
  color: var(--color-black);
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
  /* Hero: make static, no scroll animation */
  .tht-hero {
    height: auto;
    margin-bottom: 0;
  }

  .tht-hero__sticky {
    position: static;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* Show the image without clip-path on mobile */
  .tht-hero__image {
    clip-path: none !important;
  }

  .tht-hero__mask {
    display: none;
  }

  .tht-hero__title-wrap {
    position: relative;
    bottom: auto;
    padding: 1rem;
  }

  .tht-hero__title {
    flex-direction: column;
    align-items: flex-start;
  }

  .tht-hero__title-line {
    font-size: clamp(3.5rem, 14vw, 6rem);
  }

  /* Date grid: stack in a simpler layout */
  .tht-hero__date-grid {
    position: relative;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    padding: 2rem 1rem;
  }

  .tht-hero__date-cell {
    font-size: clamp(3rem, 10vw, 5rem);
  }

  .tht-hero__date-cell--year-top {
    grid-row: 1;
    grid-column: 1;
  }

  .tht-hero__date-cell--year-bottom {
    grid-row: 1;
    grid-column: 2;
  }

  .tht-hero__date-cell--month {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .tht-hero__date-cell--days {
    grid-row: 3;
    grid-column: 1 / -1;
  }

  /* Reveal text immediately on mobile (no JS animation) */
  .tht-hero__date-cell span {
    transform: none;
  }

  .tht-section-header {
    grid-template-columns: 1fr;
  }

  .tht-section-header .tht-tag {
    grid-column: 1;
  }

  .tht-section-header__title {
    grid-column: 1;
  }

  .tht-lineup__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Remove blur on mobile lineup */
  .tht-lineup__cell-inner img {
    filter: none;
    transform: none;
  }

  .tht-program__table {
    grid-template-columns: 1fr;
  }

  .tht-program__venue-name,
  .tht-program__cell,
  .tht-program__cell--empty {
    grid-column: 1 !important;
  }

  .tht-program__cell--empty {
    display: none;
  }

  .tht-tickets__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .tht-hero__title-line {
    font-size: clamp(2.5rem, 16vw, 4rem);
  }

  .tht-lineup__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
