/*
Theme Name: Peloki Teatro
Theme URI: https://peloki.es
Author: Peloki Teatro
Description: Tema propio para Peloki Teatro, asociación artístico-cultural.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: peloki-teatro
*/

:root {
  --ink: #100d12;
  --night: #171217;
  --paper: #fbf7ef;
  --muted: #746b68;
  --line: rgba(16, 13, 18, .14);
  --red: #d6372f;
  --teal: #1fb6aa;
  --gold: #f5b84b;
  --white: #fff;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 28px;
  align-items: center;
  min-height: 78px;
  padding: 0 clamp(20px, 5vw, 72px);
  color: var(--white);
  background: rgba(12, 10, 12, .86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.brand {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 900;
  text-transform: uppercase;
}

.main-nav .menu {
  display: flex;
  gap: 24px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 750;
  font-size: .95rem;
}

.main-nav a {
  opacity: .88;
}

.main-nav a:hover {
  opacity: 1;
}

.header-cta,
.button,
.wp-block-button__link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 4px;
  font-weight: 850;
}

.header-cta {
  color: var(--ink);
  background: var(--gold);
}

.hero {
  position: relative;
  min-height: calc(100svh - 78px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: var(--white);
  padding: 118px clamp(20px, 6vw, 88px) 56px;
}

.hero-collage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.4fr .9fr .9fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  background: #080608;
}

.hero-collage img {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
  object-fit: cover;
  filter: saturate(.95) contrast(1.04);
}

.hero-collage .collage-main {
  grid-row: span 2;
}

.hero-collage img:nth-child(3) {
  object-position: left center;
}

.hero-collage img:nth-child(4) {
  grid-column: span 2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 8, 12, .92), rgba(11, 8, 12, .5) 52%, rgba(11, 8, 12, .76)),
    linear-gradient(0deg, rgba(11, 8, 12, .88), transparent 46%);
}

.hero-content,
.next-show {
  position: relative;
  z-index: 2;
}

.hero-content {
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--red);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(4rem, 11vw, 9.6rem);
  line-height: .82;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(2rem, 5vw, 4.7rem);
  line-height: .94;
}

h3 {
  font-size: 1.35rem;
  line-height: 1.1;
}

.hero-copy {
  max-width: 640px;
  color: rgba(255, 255, 255, .84);
  font-size: clamp(1.1rem, 2.1vw, 1.45rem);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button.primary {
  color: var(--white);
  background: var(--red);
}

.button.secondary,
.button.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .5);
}

.button.ghost {
  background: rgba(255, 255, 255, .14);
  border-color: rgba(255, 255, 255, .22);
}

.next-show {
  position: absolute;
  right: clamp(20px, 6vw, 88px);
  bottom: 56px;
  width: min(340px, calc(100% - 40px));
  padding: 20px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(18px);
}

.next-show span,
.next-show small {
  display: block;
  color: rgba(255, 255, 255, .76);
}

.next-show strong {
  display: block;
  margin: 6px 0;
  font-size: 1.45rem;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0;
}

.intro {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 64px;
  align-items: end;
}

.intro p:last-child,
.entry-content p {
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.7;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding-top: 0;
}

.stats article {
  min-height: 160px;
  padding: 26px;
  color: var(--white);
  background: var(--night);
}

.stats strong {
  display: block;
  margin-bottom: 20px;
  color: var(--gold);
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: .9;
}

.stats span {
  color: rgba(255, 255, 255, .76);
  font-weight: 700;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading a {
  color: var(--red);
  font-weight: 900;
}

.news-grid,
.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

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

.card-image {
  display: block;
  height: 260px;
  background: var(--night);
}

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

.upcoming-card .poster-image {
  height: 360px;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 20%, rgba(245, 184, 75, .16), transparent 34%),
    var(--night);
}

.upcoming-card .poster-image img,
.upcoming-card .poster-image .poster-img {
  object-fit: contain;
}

.card-body {
  padding: 24px;
}

.card-body span {
  color: var(--teal);
  font-weight: 900;
  font-size: .82rem;
  text-transform: uppercase;
}

.card-body h3 {
  margin: 12px 0;
}

.card-body p {
  color: var(--muted);
  line-height: 1.55;
}

.proposal-list,
.proposal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.proposal-list a {
  display: flex;
  min-height: 96px;
  align-items: center;
  padding: 22px;
  color: var(--white);
  background: var(--night);
  border-left: 6px solid var(--teal);
  font-size: 1.25rem;
  font-weight: 900;
}

.proposal-list a:nth-child(2n) {
  border-left-color: var(--gold);
}

.proposal-list a:nth-child(3n) {
  border-left-color: var(--red);
}

.proposal-grid {
  gap: 18px;
}

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

.proposal-card img {
  width: 100%;
  aspect-ratio: 16 / 11;
  display: block;
  object-fit: cover;
  background: var(--night);
}

.proposal-card div {
  padding: 22px;
}

.proposal-card span {
  color: var(--red);
  font-size: .78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.proposal-card h3 {
  margin: 10px 0 12px;
}

.proposal-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.section .peloki-proposals {
  width: 100%;
  margin: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.gallery-item {
  position: relative;
  min-height: 330px;
  margin: 0;
  overflow: hidden;
  background: var(--night);
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  min-height: 330px;
  display: block;
  object-fit: cover;
  object-position: center;
  transition: transform .45s ease;
}

.gallery-item img.contain-image {
  object-fit: contain;
  padding: 16px;
  background: #161116;
}

.gallery-item img.position-left {
  object-position: left center;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(9, 7, 10, .78), transparent 55%);
}

.gallery-item figcaption {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: var(--white);
  font-size: 1.15rem;
  font-weight: 900;
}

.contact-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  margin-top: 40px;
  padding: clamp(48px, 7vw, 82px) clamp(20px, 6vw, 88px);
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(14, 11, 15, .92), rgba(14, 11, 15, .66)),
    url("assets/danzas.png") center/cover;
}

.contact-band h2 {
  max-width: 880px;
  margin-bottom: 0;
}

.page-header {
  padding: 80px clamp(20px, 6vw, 88px);
  color: var(--white);
  background: var(--night);
}

.page-header h1 {
  max-width: var(--max);
  margin: 0 auto;
  font-size: clamp(3rem, 8vw, 7rem);
}

.content-wrap {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 34px clamp(20px, 6vw, 88px);
  color: rgba(255, 255, 255, .68);
  background: #0d0b0e;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    display: none;
  }

  .next-show {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 42px;
  }

  .hero-collage {
    grid-template-columns: 1fr 1fr;
  }

  .hero-collage .collage-main {
    grid-column: span 2;
    grid-row: auto;
  }

  .hero-collage img:nth-child(4) {
    grid-column: span 1;
  }

  .intro,
  .contact-band {
    grid-template-columns: 1fr;
  }

  .stats,
  .news-grid,
  .archive-grid,
  .proposal-list,
  .proposal-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item.wide {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 66px;
  }

  .header-cta {
    min-height: 38px;
    padding: 0 12px;
  }

  .hero {
    min-height: 92svh;
    padding-top: 90px;
  }

  h1 {
    font-size: clamp(3.1rem, 17vw, 5.2rem);
  }

  .section {
    width: min(100% - 28px, var(--max));
    padding: 58px 0;
  }

  .stats,
  .news-grid,
  .archive-grid,
  .proposal-list,
  .proposal-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .card-image,
  .gallery-item,
  .gallery-item img {
    min-height: 300px;
  }

  .site-footer {
    flex-direction: column;
  }
}

/* Cursos de formacion */
.training-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: clamp(28px, 5vw, 70px);
  align-items: center;
  padding: clamp(26px, 4vw, 46px);
  color: var(--white);
  background: var(--night);
}

.training-copy h2 {
  max-width: 620px;
}

.training-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, .76);
  font-size: 1.12rem;
  line-height: 1.7;
}

.training-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0;
}

.training-list span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 13px;
  color: var(--ink);
  background: var(--gold);
  border-radius: 4px;
  font-weight: 900;
}

.training-media {
  display: grid;
  grid-template-columns: .86fr 1fr;
  gap: 12px;
  align-items: end;
}

.training-media img {
  width: 100%;
  height: 520px;
  display: block;
  object-fit: cover;
}

.training-media img:first-child {
  height: 390px;
}

@media (max-width: 980px) {
  .training-layout {
    grid-template-columns: 1fr;
  }

  .training-media {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .training-layout {
    padding: 22px;
  }

  .training-media {
    grid-template-columns: 1fr;
  }

  .training-media img,
  .training-media img:first-child {
    height: 320px;
  }
}

/* Logo y loader de home */
.brand {
  display: inline-flex;
  align-items: center;
  min-width: 150px;
}

.brand img {
  width: clamp(136px, 12vw, 190px);
  height: auto;
  display: block;
}

.home-loader {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  color: var(--white);
  background:
    radial-gradient(circle at 50% 35%, rgba(214, 55, 47, .16), transparent 34%),
    #0d0b0e;
  transition: opacity .55s ease, visibility .55s ease;
}

.home-loader__mark {
  width: clamp(110px, 16vw, 190px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.home-loader__mark img {
  width: 100%;
  height: auto;
  display: block;
  animation: peloki-loader-spin 1.15s linear infinite;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, .38));
}

.home-loader p {
  margin: 0;
  color: rgba(255, 255, 255, .82);
  font-size: .86rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-loader-done .home-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@keyframes peloki-loader-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .home-loader__mark img {
    animation: none;
  }
}

@media (max-width: 640px) {
  .brand img {
    width: 128px;
  }

  .header-cta {
    font-size: .86rem;
  }
}
