/*
Theme Name: Festival Theme
Author: MAB & CptZ
Author URI: https://wordpress.org
Description: A vibrant WordPress theme designed for festival organizations. Features fullwidth sections for event lineup, cooperations, and galleries. Includes pages for impressum and datenschutz.
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
Version: 2.0.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: festival-theme
Tags: festival, events, fullwidth, custom-colors, custom-menu, custom-logo, featured-images, responsive
*/

/*
 * Global styles: design tokens, reset, shared utilities and site chrome
 * (header, navigation, footer) loaded on every page. Front-page-only section
 * styles live in assets/css/front-page.css (enqueued as a dependent of this file).
 */

@font-face {
  font-family: 'Nimbus Sans L';
  src: url('assets/font/nimbus-sans-l/NimbusSanL-Regu.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nimbus Sans L';
  src: url('assets/font/nimbus-sans-l/NimbusSanL-ReguItal.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Nimbus Sans L';
  src: url('assets/font/nimbus-sans-l/NimbusSanL-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nimbus Sans L';
  src: url('assets/font/nimbus-sans-l/NimbusSanL-BoldItal.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

:root {
  /* ── Brand source channels — the only lines to edit when recoloring ── */
  --rgb-primary:   235 138 255; /* pink */
  --rgb-secondary: 21 110 212; /* blue */
  --rgb-accent:    255 200 100; 
  --rgb-bg:        255 255 255;
  --rgb-surface:   245 250 255;
  --rgb-text:      35 35 45;
  --rgb-muted:     120 100 110;

  /* ── Neutral channels (not brand; shared by tints/shadows) ── */
  --rgb-white:  255 255 255;
  --rgb-shadow: 0 0 0;

  /* ── Solid colors (derived) ── */
  --color-primary:   rgb(var(--rgb-primary));
  --color-secondary: rgb(var(--rgb-secondary));
  --color-accent:    rgb(var(--rgb-accent));
  --color-bg:        rgb(var(--rgb-bg));
  --color-surface:   rgb(var(--rgb-surface));
  --color-text:      rgb(var(--rgb-text));
  --color-muted:     rgb(var(--rgb-muted));
  --color-white:     rgb(var(--rgb-white));

  /* ── Functional tokens (derived with alpha) ── */
  --scrim-header: rgb(var(--rgb-bg) / 0.95);     /* sticky site header   */
  --scrim-menu:   rgb(var(--rgb-bg) / 0.98);     /* mobile menu drawer   */
  --tint-primary:   rgb(var(--rgb-primary)   / 0.12); /* primary hover wash   */
  --tint-secondary: rgb(var(--rgb-secondary) / 0.12); /* secondary hover wash  */
  --surface-1:    rgb(var(--rgb-primary) / 0.08);  /* elevation tints      */
  --surface-2:    rgb(var(--rgb-primary) / 0.12);
  --surface-3:    rgb(var(--rgb-primary) / 0.18);
  --color-border: rgb(var(--rgb-primary) / 0.25);
  --shadow-1:     0 10px 20px rgb(var(--rgb-shadow) / 0.18);
  --shadow-2:     0 12px 24px rgb(var(--rgb-shadow) / 0.20);

  /* Text-tinted overlays from the header/footer feature, re-expressed on the channels. */
  --color-text-overlay: rgb(var(--rgb-text) / 0.08);
  --color-border-light: rgb(var(--rgb-text) / 0.12);

  --spacing: 1.25rem;
  --spacing-snappy: 0.85rem;
  --transition-fast: 180ms;
  --header-height: 72px;
  --radius: 20px;
  --max-width: 1200px;
  --font-family: 'Nimbus Sans L', sans-serif;

  /* ── Typography scale ──────────────────────────────────────────────────── */
  /* Only these variables may appear in font-size / font-weight /
     letter-spacing / line-height declarations outside :root.               */

  /* XL Bold: hero event title, single-event page title */
  --text-xl-bold-size:    clamp(3.0rem, 7vw, 5.25rem);
  --text-xl-bold-weight:  900;
  --text-xl-bold-spacing: -0.04em;
  --text-xl-bold-lh:      1.05;

  /* XL Regular: hero date */
  --text-xl-reg-size:     clamp(3.05rem, 7.6vw, 5.25rem);
  --text-xl-reg-weight:   400;
  --text-xl-reg-spacing:  -0.04em;
  --text-xl-reg-lh:       1.05;

  /* L Bold: section headings ("Line Up Main Stage", "Wer ist Koelnchella") */
  --text-l-bold-size:     clamp(2.4rem, 5.55vw, 3.875rem);
  --text-l-bold-weight:   800;
  --text-l-bold-spacing:  -0.04em;
  --text-l-bold-lh:       1.05;

  /* M Bold: day names (Saturday/Sunday), mid headings ("Proudly collaborated with") */
  --text-m-bold-size:     clamp(1.75rem, 3.5vw, 2.5rem);
  --text-m-bold-weight:   700;
  --text-m-bold-spacing:  -0.04em;
  --text-m-bold-lh:       1.2;

  /* M Regular: lineup artist names, gallery event labels */
  --text-m-reg-size:      clamp(1.25rem, 2.5vw, 2rem);
  --text-m-reg-weight:    400;
  --text-m-reg-spacing:   -0.04em;
  --text-m-reg-lh:        1.4;

  /* S Regular: body / supporting text, captions, footer */
  --text-s-reg-size:      clamp(1rem, 1.5vw, 1.2rem);
  --text-s-reg-weight:    400;
  --text-s-reg-spacing:   0;
  --text-s-reg-lh:        1.7;
}

@media (max-width: 768px) {
  :root {
    --text-xl-bold-size: clamp(2.5rem, 7.5vw, 5rem);
    --text-xl-reg-size:  clamp(2.25rem, 7vw, 4.5rem);
  }
}

@media (max-width: 480px) {
  :root {
    --text-xl-bold-size: clamp(1.75rem, 9vw, 3rem);
    --text-xl-reg-size:  clamp(1.6rem, 8.5vw, 2.75rem);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100%, calc(var(--max-width) - 2 * var(--spacing)));
  margin: 0 auto;
  padding: 0 var(--spacing);
}

.card,
.info-card,
.about-card,
.page-card,
.lineup-ticket-container,
.lineup-card {
  background: var(--surface-2);
  border: 1px solid var(--color-border);
  padding: 1.25rem;
  transition: transform var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
}

.card,
.info-card,
.about-card,
.page-card {
  border-radius: 1.5rem;
}

.lineup-ticket-container,
.lineup-card {
  border-radius: 100%;
}

@media (hover: hover) {
  .card--hoverable:hover,
  .card--hoverable:focus,
  .lineup-card:hover,
  .info-card:hover,
  .about-card:hover,
  .page-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: var(--shadow-1);
  }
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

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

.grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: relative;
  z-index: 1000;
  background-color: var(--scrim-header);
  border-bottom: 1px solid var(--surface-3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.site-branding {
  flex: 0 1 auto;
}

.custom-logo-link {
  display: flex;
  align-items: center;
}

.custom-logo-link img.custom-logo {
  display: block;
  height: calc(var(--header-height) - 1.5rem);
  width: auto;
  object-fit: contain;
}

.site-title {
  font-weight: 700;
  font-size: 1.25rem;
}

.main-navigation {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

.menu-toggle-input {
  position: absolute;
  left: -9999px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.75rem;
  background: var(--color-text-overlay);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--color-text);
  border-radius: 2px;
}

.menu-toggle .menu-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  list-style: none;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  overflow-x: auto;
}

.main-menu li {
  display: inline-flex;
}

.main-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.2rem;
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  background: #fff;
  color: var(--color-primary);
  font-weight: 700;
  transition: background var(--transition-fast) ease, color var(--transition-fast) ease;
  white-space: nowrap;
}

.main-menu li.menu-item-impressum {
  margin-left: auto;
}

@media (hover: hover) {
  .main-menu a:hover,
  .main-menu a:focus {
    background: var(--color-primary);
    color: #fff;
  }
}

.site-main {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Shared heading scale — also used by .page-title (pages) and .section-header h2
   (front page, single-event, archive), so it stays global. */
.hero h1,
.page-title,
.section-header h2 {
  margin-bottom: 1rem;
  line-height: var(--text-l-bold-lh);
}

.section {
  min-height: 100svh;
  min-height: 100dvh;
  padding: calc(var(--spacing-snappy) * 6) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: transform var(--transition-fast) ease, opacity var(--transition-fast) ease;
}

/* Heading + grid fill available height; divider and below always land at the bottom */
.section-lineup > .container {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.section-lineup .lineup-main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.section-lineup .lineup-more-wrap {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.section:nth-of-type(even) {
  background-color: var(--surface-1);
}

.section-header {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
}

.section-header h2 {
  font-size: var(--text-l-bold-size);
  font-weight: var(--text-l-bold-weight);
  letter-spacing: var(--text-l-bold-spacing);
}

.section-header p {
  color: var(--color-muted);
}

/* `.lineup-grid` / `.lineup-day` are shared with single-event, so they stay global. */
.lineup-grid,
.info-grid,
.about-grid,
.gallery-grid {
  display: grid;
  gap: 1.5rem;
}

.lineup-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
}

.lineup-day {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}

.lineup-day .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.event-lineup .card h3 {
  text-align: center;
}

/* New day-column lineup layout (front-page + single-event) */
.lineup-day-col {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: center;
}

.lineup-day-name {
  font-size: var(--text-m-bold-size);
  font-weight: var(--text-m-bold-weight);
  letter-spacing: var(--text-m-bold-spacing);
  line-height: var(--text-m-bold-lh);
  color: var(--color-secondary);
  margin: 0 0 0.5rem;
  text-transform: uppercase;
}

.lineup-artist {
  font-size: var(--text-m-reg-size);
  font-weight: var(--text-m-reg-weight);
  line-height: var(--text-m-reg-lh);
  margin: 0;
  color: var(--color-secondary);
  text-transform: uppercase;
}

.lineup-divider {
  border: none;
  border-top: 6px solid var(--color-primary);
  margin: 2.5rem 0;
}

.lineup-begleit {
  width: 100%;
}

.lineup-begleit-artists {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.lineup-begleit-artist {
  font-size: var(--text-m-reg-size);
  font-weight: var(--text-m-reg-weight);
  color: var(--color-text);
}

.lineup-begleit-artist::after {
  content: '\00B7';
  margin: 0 0.6rem;
  font-weight: 400;
  color: var(--color-muted);
}

.lineup-begleit-artist:last-child::after {
  display: none;
}

.page-content {
  padding: calc(var(--spacing) * 3) 0;
}

.entry-header {
  margin-bottom: 2rem;
}

.entry-header .page-title {
  font-size: var(--text-l-bold-size);
  line-height: var(--text-l-bold-lh);
}

.entry-content {
  color: var(--color-text);
}

.site-footer {
  border-top: 1px solid var(--surface-3);
  padding: calc(var(--spacing) * 1.5) 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-copyright {
  color: var(--color-muted);
  font-size: var(--text-s-reg-size);
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.2rem;
  border: 2px solid var(--color-primary);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-primary);
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--transition-fast) ease, color var(--transition-fast) ease;
}

@media (hover: hover) {
  .footer-nav a:hover,
  .footer-nav a:focus {
    background: var(--color-primary);
    color: var(--color-white);
  }
}

.site-copyright {
  color: var(--color-muted);
  font-size: var(--text-s-reg-size);
}

@media (max-width: 900px) {
  .header-inner {
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
  }

  .main-navigation {
    flex: 1 1 100%;
    min-width: 0;
  }

  .main-menu {
    justify-content: flex-end;
    width: 100%;
  }

  /* Shared grid — single-event also renders .lineup-grid; the front-page-only
     grids collapse in assets/css/front-page.css. */
  .lineup-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 780px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .site-branding {
    margin-left: 0.75rem;
  }

  .menu-toggle {
    display: flex;
  }

  .menu-toggle .menu-label {
    display: none;
  }

  .main-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--scrim-menu);
    border-top: 1px solid var(--color-border-light);
    display: none;
  }

  #menu-toggle:checked ~ .menu-toggle + .main-navigation .main-menu {
    display: flex;
  }

  .main-menu a {
    width: 100%;
  }

  .main-menu li.menu-item-impressum {
    margin-left: 0;
  }

  .gallery-item img,
  .event-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}

/* More Infos toggle styles */
.lineup-bubble-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 5.675rem;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--color-primary);
  color: var(--color-bg);
  font-weight: 700;
  font-size: 2.1rem;
  cursor: pointer;
  white-space: nowrap;
  text-transform: uppercase;
  transition: background var(--transition-fast) ease, color var(--transition-fast) ease, border-color var(--transition-fast) ease, transform var(--transition-fast) ease;
}

@media (hover: hover) {
  .lineup-bubble-btn:hover,
  .lineup-bubble-btn:focus {
    background: var(--color-bg);
    color: var(--color-primary);
    border-color: var(--color-primary);
    transform: translateY(-2px);
  }
}

.more-info-toggle-input {
  position: absolute;
  left: -9999px;
}

/* closed state */
#more-info-section {
  min-height: 0;
  height: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height 360ms ease, height 360ms ease, padding 260ms ease, opacity 260ms ease, transform 260ms ease;
  pointer-events: none;
  background: transparent;
  border: none;
}

/* open when checkbox is checked */
#more-info-toggle:checked ~ #more-info-section {
  min-height: calc(100vh - var(--header-height));
  height: calc(100vh - var(--header-height));
  max-height: 2400px;
  padding: calc(var(--spacing-snappy) * 6) 0;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  background: initial;
  border: initial;
}

/* Single event page heading consistency */
.single-event .entry-header .entry-title {
  margin-bottom: 1rem;
  font-size: var(--text-xl-bold-size);
  font-weight: var(--text-xl-bold-weight);
  letter-spacing: var(--text-xl-bold-spacing);
  line-height: var(--text-xl-bold-lh);
}

.single-event .section-header h2,
.single-event .event-copy h2 {
  margin-bottom: 1rem;
  font-size: var(--text-l-bold-size);
  line-height: var(--text-l-bold-lh);
}

.single-event .event-copy h3 {
  font-size: var(--text-m-bold-size);
  line-height: var(--text-m-bold-lh);
  margin: 1.5rem 0 0.75rem;
  color: var(--color-primary);
}

.single-event .event-description {
  margin-top: 0.5rem;
  color: var(--color-muted);
}
