/*
Theme Name: KWW Festival
Template: festival-events
Author: Porta Musicae / Codex
Version: 0.1.3
Text Domain: kww-festival
*/

:root {
  --kww-ink: #111111;
  --kww-muted: #626262;
  --kww-paper: #faf8f4;
  --kww-white: #ffffff;
  --kww-line: #e8e0d7;
  --kww-accent: #8b1731;
  --kww-accent-2: #c19a5b;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--kww-paper);
  color: var(--kww-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--kww-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.site-header,
header.wp-block-template-part,
.wp-site-blocks > header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(250, 248, 244, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.08);
}

.wp-block-navigation a {
  font-weight: 650;
  text-decoration: none;
}

.kww-site-header {
  padding: 16px 0;
}

.kww-site-header__inner {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.kww-site-title a {
  color: var(--kww-ink);
  font-size: 1.04rem;
  font-weight: 850;
  letter-spacing: 0;
  text-decoration: none;
}

.kww-site-footer {
  padding: 32px 0;
  background: var(--kww-ink);
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.kww-site-footer p {
  margin: 0;
}

.kww-hero {
  min-height: clamp(620px, 82vh, 860px);
  display: grid;
  align-items: end;
  position: relative;
  color: var(--kww-white);
  background-position: center;
  background-size: cover;
  isolation: isolate;
}

.kww-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.76) 0%, rgba(0, 0, 0, 0.38) 48%, rgba(0, 0, 0, 0.10) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.02) 52%);
}

.kww-hero__inner,
.kww-section,
.kww-page {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.kww-hero__inner {
  padding: 120px 0 86px;
}

.kww-kicker {
  color: var(--kww-accent-2);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kww-hero h1 {
  max-width: 900px;
  margin: 18px 0 20px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(3.2rem, 8vw, 7.7rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: 0 18px 56px rgba(0, 0, 0, 0.42);
}

.kww-hero p {
  max-width: 690px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.06rem, 1.7vw, 1.35rem);
  line-height: 1.65;
}

.kww-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.kww-button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.12);
  color: var(--kww-white);
  font-weight: 750;
  text-decoration: none;
}

.kww-button--primary {
  border-color: var(--kww-accent);
  background: var(--kww-accent);
}

.kww-section {
  padding: clamp(56px, 7vw, 96px) 0;
}

.kww-section--white {
  width: 100%;
  max-width: none;
  background: var(--kww-white);
}

.kww-section--white > .kww-section__inner {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.kww-section h2,
.kww-page h1,
.kww-page h2 {
  margin: 0 0 22px;
  color: var(--kww-ink);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.kww-lead {
  max-width: 860px;
  color: var(--kww-muted);
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.8;
}

.kww-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 22px;
}

.kww-card {
  background: var(--kww-white);
  border: 1px solid var(--kww-line);
  border-radius: 8px;
  overflow: hidden;
}

.kww-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.kww-card__body {
  padding: 22px;
}

.kww-card h3 {
  margin: 0 0 10px;
  font-size: 1.32rem;
}

.kww-card p {
  color: var(--kww-muted);
  line-height: 1.65;
}

.kww-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 44px;
  background: var(--kww-line);
  border: 1px solid var(--kww-line);
}

.kww-stat {
  background: var(--kww-white);
  padding: 26px;
}

.kww-stat strong {
  display: block;
  color: var(--kww-accent);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.kww-stat span {
  display: block;
  margin-top: 10px;
  color: var(--kww-muted);
  font-weight: 650;
}

.kww-video {
  width: 100%;
  max-height: 720px;
  background: #000;
}

.kww-video-embed {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 960px;
  margin-top: 26px;
  border-radius: 8px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.kww-video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.kww-video-list {
  display: grid;
  gap: 34px;
}

.kww-video-item h3 {
  margin: 28px 0 12px;
  font-size: 1.35rem;
}

.kww-page {
  padding: clamp(54px, 7vw, 92px) 0;
}

.kww-page p {
  color: var(--kww-muted);
  font-size: 1.09rem;
  line-height: 1.86;
}

.kww-archive-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.kww-edition-card {
  position: relative;
  min-height: 250px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border-radius: 8px;
  background: #171717;
  color: var(--kww-white);
  text-decoration: none;
}

.kww-edition-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.kww-edition-card:hover img {
  transform: scale(1.04);
  opacity: 0.55;
}

.kww-edition-card span {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  padding: 20px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0));
  font-size: 1.15rem;
  font-weight: 800;
}

.kww-gallery {
  columns: 3 280px;
  column-gap: 18px;
}

.kww-gallery img {
  width: 100%;
  margin: 0 0 18px;
  break-inside: avoid;
  border-radius: 8px;
}

.kww-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.kww-downloads a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--kww-accent);
  background: var(--kww-accent);
  color: var(--kww-white);
  font-weight: 750;
  text-decoration: none;
}

.entry-header,
.page-header {
  display: none;
}

@media (max-width: 900px) {
  .kww-grid,
  .kww-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .kww-hero__inner,
  .kww-section,
  .kww-page,
  .kww-section--white > .kww-section__inner {
    width: min(100% - 28px, 1180px);
  }

  .kww-grid,
  .kww-stats,
  .kww-archive-list {
    grid-template-columns: 1fr;
  }

  .kww-hero {
    min-height: 680px;
  }
}
