/*
Theme Name: Rand0m
Theme URI: https://rand0m.nl/
Author: Rand0m
Description: Clean, mobile-first block theme for Rand0m. White space, strong typography, Rand0m red and diagonal stripe details.
Version: 1.0.10
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: rand0m
*/

:root {
  --rand0m-red: #e31b23;
  --rand0m-ink: #111111;
  --rand0m-muted: #6c6c6c;
  --rand0m-line: #e9e9e9;
  --rand0m-soft: #f6f6f4;
  --rand0m-radius: 0.35rem;
}

html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

.wp-site-blocks { min-height: 100vh; }

/* Header */
.rand0m-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,.06);
  backdrop-filter: blur(14px);
}
.admin-bar .rand0m-header { top: 32px; }
.rand0m-brand { gap: .8rem; }
.rand0m-wordmark a { text-decoration: none; }
.rand0m-mini-stripes,
.rand0m-stripes,
.rand0m-stripe-accent {
  display: inline-block;
  flex: 0 0 auto;
  background: url("assets/rand0m-stripes.svg") center / contain no-repeat;
  background-repeat: no-repeat;
}

/* Allow legacy inner spans in header/footer markup, but hide them now that
   the accent itself comes from the shared SVG instead of CSS rectangles. */
.rand0m-mini-stripes span,
.rand0m-stripes span,
.rand0m-stripe-accent span {
  display: none !important;
}

.rand0m-mini-stripes {
  width: clamp(2rem, 2.2vw, 2.4rem);
  aspect-ratio: 820 / 360;
}

.rand0m-stripes {
  width: clamp(3.5rem, 4vw, 4.8rem);
  aspect-ratio: 820 / 360;
}

.rand0m-header .wp-block-navigation a { text-decoration: none; }
.rand0m-header .wp-block-navigation-item__content { padding-block: .25rem; }
.rand0m-header .wp-block-button__link { white-space: nowrap; }

/* Hero */
.rand0m-hero {
  padding-top: clamp(3.4rem, 8vw, 7rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}
.rand0m-eyebrow {
  letter-spacing: .09em;
  text-transform: uppercase;
  font-size: .82rem;
  font-weight: 700;
}
.rand0m-hero-title {
  max-width: 10ch;
  text-wrap: balance;
  letter-spacing: -.035em;
}
.rand0m-accent { color: var(--rand0m-red); }
.rand0m-hero-copy { max-width: 34rem; }
.rand0m-hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 0;
  overflow: hidden;
  background: radial-gradient(circle at 60% 35%, #f9f9f9 0 18%, #e8e8e8 45%, #bdbdbd 100%);
  isolation: isolate;
}

/* A normal Image block dropped into the hero automatically fills the fixed
   4:3 frame. object-fit: cover keeps the layout stable when photos change. */
.rand0m-hero-visual > .wp-block-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.rand0m-hero-visual > .wp-block-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Also behave predictably if a Cover block is used instead of an Image block. */
.rand0m-hero-visual > .wp-block-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
}

/* Logo-faithful diagonal overlays. The asset contains the unequal stripe lengths
   and dark-to-light red progression; opacity keeps the live photo visible. */
.rand0m-hero-visual::before,
.rand0m-hero-visual::after {
  content: "";
  position: absolute;
  z-index: 3;
  width: clamp(14rem, 28vw, 28rem);
  aspect-ratio: 820 / 360;
  background: url("assets/rand0m-stripes.svg") center / contain no-repeat;
  opacity: .70;
  pointer-events: none;
}

.rand0m-hero-visual::before {
  left: clamp(-8rem, -7vw, -4rem);
  top: clamp(-2rem, -2vw, -.75rem);
}

.rand0m-hero-visual::after {
  right: clamp(-8rem, -7vw, -4rem);
  bottom: clamp(-2.5rem, -2vw, -1rem);
}

/* Keep editable text/content above the image/background but below the SVG stripes. */
.rand0m-hero-visual > :not(.wp-block-image):not(.wp-block-cover) { position: relative; z-index: 1; }
.rand0m-photo-note {
  position: absolute;
  inset: auto 1.25rem 1.25rem 1.25rem;
  margin: 0;
  padding: .8rem 1rem;
  background: rgba(255,255,255,.88);
  font-size: .82rem;
  backdrop-filter: blur(10px);
}

/* Sections */
.rand0m-section { padding-block: clamp(4rem, 8vw, 7rem); }
.rand0m-section + .rand0m-section { border-top: 1px solid var(--rand0m-line); }
.rand0m-section-head { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.rand0m-section-title { margin-bottom: .35rem; }
.rand0m-section-kicker { color: var(--rand0m-red); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; font-size: .78rem; }

/* Events — deliberately simple: date, show, venue/city/time, action/status. */
.rand0m-events { border-top: 1px solid var(--rand0m-line); }
.rand0m-event {
  display: grid;
  grid-template-columns: 6.25rem minmax(0,1fr) auto;
  gap: clamp(1rem, 3vw, 2.5rem);
  align-items: center;
  min-height: 6.25rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--rand0m-line);
}
.rand0m-event-date {
  display: flex;
  align-items: baseline;
  gap: .48rem;
  white-space: nowrap;
}
.rand0m-event-day {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(2.15rem, 5vw, 3.35rem);
  font-weight: 800;
  line-height: .9;
  letter-spacing: -.04em;
}
.rand0m-event-month {
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.rand0m-event-info { min-width: 0; }
.rand0m-event-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  line-height: 1.15;
}
.rand0m-event-title-link {
  color: inherit;
  text-decoration: none;
}
.rand0m-event-title-link:hover {
  color: var(--rand0m-red);
  text-decoration: none;
}
.rand0m-event-meta {
  margin-top: .28rem;
  color: var(--rand0m-muted);
  font-size: .93rem;
}
.rand0m-event-action {
  justify-self: end;
  text-align: right;
}
.rand0m-event-link {
  color: var(--rand0m-red);
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .055em;
  white-space: nowrap;
}
a.rand0m-event-link:hover { text-decoration: underline; }
.rand0m-event-link.is-muted { color: var(--rand0m-muted); }
.rand0m-event-link.is-urgent { color: var(--rand0m-red); }
.rand0m-events-empty {
  padding: 2rem 0;
  color: var(--rand0m-muted);
  border-bottom: 1px solid var(--rand0m-line);
}

/* Full agenda: past shows stay readable but sit visually behind upcoming shows. */
.rand0m-agenda-past {
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--rand0m-line);
}
.rand0m-events--past .rand0m-event { opacity: .74; }
.rand0m-events--past .rand0m-event-day { color: var(--rand0m-muted); }

/* Media */
.rand0m-youtube {
  width: 100%;
  max-width: none;
  margin: 0;
}
.rand0m-youtube .wp-block-embed__wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-radius: var(--rand0m-radius);
}
.rand0m-youtube .wp-block-embed__wrapper::before {
  display: none !important;
}
.rand0m-youtube iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  border: 0;
}

/* CTA */
.rand0m-booking {
  position: relative;
  overflow: hidden;
}
.rand0m-booking::after {
  content:"";
  position:absolute;
  right:clamp(-3.2rem, -2vw, -1rem);
  top:clamp(-4.5rem, -3vw, -1rem);
  width:clamp(7rem, 16vw, 11rem);
  aspect-ratio: 820 / 360;
  background: url("assets/rand0m-stripes.svg") center / contain no-repeat;
  opacity:.82;
  pointer-events:none;
}
.rand0m-booking > * { position:relative; z-index:1; }

/* Footer */
.rand0m-footer { margin-top: 0; }
.rand0m-footer a { color: inherit; }

/* Buttons */
.wp-block-button.is-style-outline > .wp-block-button__link:not(.has-background) { background: white; }
.wp-block-button__link { transition: transform .15s ease, box-shadow .15s ease; }
.wp-block-button__link:hover { transform: translateY(-1px); }

/* Mobile */
@media (max-width: 781px) {
  .admin-bar .rand0m-header { top: 46px; }
  .rand0m-header .wp-block-buttons { display: none; }

  /* WordPress mobile navigation: make the open menu a true viewport overlay.
     This prevents long menu labels or constrained header groups from pushing
     navigation items beyond the right edge of small screens. */
  .rand0m-header .wp-block-navigation {
    min-width: 0;
  }

  .rand0m-header .wp-block-navigation__responsive-container-open {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  .rand0m-header .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    margin: 0 !important;
    padding:
      max(1.25rem, env(safe-area-inset-top))
      max(1.25rem, env(safe-area-inset-right))
      max(1.5rem, env(safe-area-inset-bottom))
      max(1.25rem, env(safe-area-inset-left)) !important;
    box-sizing: border-box;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #fff !important;
    color: var(--rand0m-ink) !important;
    z-index: 100000 !important;
  }

  .rand0m-header .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__responsive-container-close {
    position: fixed;
    top: max(1.25rem, env(safe-area-inset-top));
    right: max(1.25rem, env(safe-area-inset-right));
    z-index: 2;
  }

  .rand0m-header .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__responsive-container-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding-top: 4.5rem;
    align-items: stretch !important;
  }

  .rand0m-header .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
  }

  .rand0m-header .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation-item {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-bottom: 1px solid var(--rand0m-line);
  }

  .rand0m-header .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation-item__content {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: .95rem 0 !important;
    color: var(--rand0m-ink) !important;
    font-family: var(--wp--preset--font-family--display);
    font-size: clamp(1.45rem, 7vw, 2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.025em;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .rand0m-header .wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__submenu-container {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 1rem !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  .rand0m-hero { padding-top: 2.6rem; }
  .rand0m-hero-title { max-width: 9ch; }
  .rand0m-hero-visual { margin-top: 1rem; }
  .rand0m-hero-visual::before,
  .rand0m-hero-visual::after {
    width: 13rem;
    opacity: .64;
  }
  .rand0m-hero-visual::before { left: -5rem; top: -.4rem; }
  .rand0m-hero-visual::after { right: -5rem; bottom: -.8rem; }
  .rand0m-event {
    grid-template-columns: 4.8rem minmax(0,1fr);
    gap: .7rem 1rem;
    align-items: start;
    min-height: 0;
  }
  .rand0m-event-action {
    grid-column: 2;
    justify-self: start;
    text-align: left;
    margin-top: .15rem;
  }
  .rand0m-event-day { font-size: 2.45rem; }
  .rand0m-booking::after { opacity: .58; }
}

@media (max-width: 480px) {
  .rand0m-event { grid-template-columns: 4.4rem minmax(0,1fr); gap: .55rem .9rem; padding: 1.2rem 0; }
  .rand0m-event-date { gap: .35rem; }
  .rand0m-event-day { font-size: 2.2rem; }
  .rand0m-event-meta { font-size: .86rem; line-height: 1.45; }
  .rand0m-event-link { font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wp-block-button__link { transition: none; }
}

.rand0m-footer .wp-block-page-list { list-style: none; padding-left: 0; margin-left: 0; }
.rand0m-footer .wp-block-page-list li { margin-bottom: .35rem; }


/* ---------------------------------------------------------
   Posts: Nieuws / Aankondiging / Terugblik
   --------------------------------------------------------- */
.rand0m-post-page > .wp-block-shortcode {
  width: 100%;
  max-width: var(--wp--style--global--wide-size, 1240px);
}

.rand0m-post-header {
  width: 100%;
  margin: 0 auto clamp(2.75rem, 6vw, 5rem);
}

.rand0m-post-heading-wrap {
  max-width: 58rem;
}

.rand0m-post-kicker,
.rand0m-news-card-label {
  display: inline-block;
  color: var(--rand0m-red);
  text-transform: uppercase;
  letter-spacing: .085em;
  font-size: .76rem;
  line-height: 1;
  font-weight: 850;
}

.rand0m-post-context {
  margin-top: .75rem;
  color: var(--rand0m-muted);
  text-transform: uppercase;
  letter-spacing: .055em;
  font-size: .8rem;
  font-weight: 750;
}

.rand0m-post-title {
  max-width: 14ch;
  margin: .6rem 0 0;
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(3.1rem, 7vw, 6.8rem);
  line-height: .92;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.rand0m-post-lead {
  max-width: 46rem;
  margin: clamp(1.25rem, 2.5vw, 2rem) 0 0;
  color: #343434;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  line-height: 1.5;
}

.rand0m-post-featured {
  position: relative;
  width: min(100%, 68.75rem);
  aspect-ratio: 4 / 3;
  margin: clamp(2.25rem, 5vw, 4.5rem) 0 0;
  overflow: hidden;
  background: var(--rand0m-soft);
  isolation: isolate;
}

.rand0m-post-featured-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* One restrained brand accent on editorial photography. */
.rand0m-post-featured::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: clamp(-5.5rem, -4vw, -2.5rem);
  top: clamp(-1.5rem, -1vw, -.4rem);
  width: clamp(11rem, 20vw, 20rem);
  aspect-ratio: 820 / 360;
  background: url("assets/rand0m-stripes.svg") center / contain no-repeat;
  opacity: .68;
  pointer-events: none;
}

/* Announcement: event information is functional and prominent. */
.rand0m-post-header--announcement .rand0m-post-title {
  max-width: 12ch;
}

.rand0m-post-event-panel {
  display: grid;
  grid-template-columns: minmax(10rem, .8fr) minmax(12rem, 1.4fr) auto;
  gap: clamp(1rem, 3vw, 2.75rem);
  align-items: center;
  width: min(100%, 68.75rem);
  margin-top: clamp(2rem, 4vw, 3.5rem);
  padding: 1.45rem 0;
  border-top: 1px solid var(--rand0m-line);
  border-bottom: 1px solid var(--rand0m-line);
}

.rand0m-post-event-date,
.rand0m-post-event-place {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.rand0m-post-event-date-label {
  color: var(--rand0m-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  font-size: .7rem;
  font-weight: 800;
}

.rand0m-post-event-date strong,
.rand0m-post-event-place strong {
  font-family: var(--wp--preset--font-family--display);
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  line-height: 1;
}

.rand0m-post-event-place span {
  color: var(--rand0m-muted);
  font-size: .92rem;
}

.rand0m-post-event-cta {
  justify-self: end;
}

.rand0m-post-event-button {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .9rem 1.15rem;
  background: var(--rand0m-red);
  color: #fff !important;
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none !important;
}

.rand0m-post-event-button:hover {
  transform: translateY(-1px);
}

.rand0m-post-status {
  color: var(--rand0m-muted);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}

/* Recap: keep the event context but let the imagery/story lead. */
.rand0m-post-header--recap .rand0m-post-featured::after {
  left: auto;
  right: clamp(-5rem, -4vw, -2rem);
  top: auto;
  bottom: clamp(-1.5rem, -1vw, -.4rem);
}

.rand0m-post-recap-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .8rem;
  width: min(100%, 68.75rem);
  margin-top: 1rem;
  color: var(--rand0m-muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.rand0m-post-recap-meta strong {
  color: var(--rand0m-ink);
}

/* Editorial body: comfortable reading width, wide media can still opt out. */
.rand0m-post-content {
  width: 100%;
  max-width: 46rem !important;
  margin-inline: auto;
  font-size: clamp(1.03rem, 1.2vw, 1.12rem);
  line-height: 1.72;
}

.rand0m-post-content > :first-child {
  margin-top: 0;
}

.rand0m-post-content p {
  margin-block: 0 1.35em;
}

.rand0m-post-content h2,
.rand0m-post-content h3 {
  margin-top: 2.7em;
  margin-bottom: .7em;
  letter-spacing: -.025em;
}

.rand0m-post-content h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.rand0m-post-content h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.rand0m-post-content a:not(.wp-element-button) {
  color: var(--rand0m-red);
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .14em;
}

.rand0m-post-content .wp-block-image,
.rand0m-post-content .wp-block-embed,
.rand0m-post-content .wp-block-gallery {
  margin-block: clamp(2rem, 4vw, 3.5rem);
}

.rand0m-post-content .wp-block-embed-youtube .wp-block-embed__wrapper {
  aspect-ratio: 16 / 9;
}

.rand0m-post-back {
  width: 100%;
  max-width: 46rem;
  margin: clamp(3.5rem, 7vw, 6rem) auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rand0m-line);
}

.rand0m-post-back a {
  color: var(--rand0m-red);
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
  text-decoration: none;
}

/* News overview */
.rand0m-news-heading {
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.rand0m-news-heading h1 {
  max-width: 8ch;
  margin-top: .35rem;
  margin-bottom: 0;
}

.rand0m-news-grid {
  gap: clamp(2.5rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2.5rem) !important;
}

.rand0m-news-card {
  align-content: start;
}

.rand0m-news-card-image {
  aspect-ratio: 4 / 3;
  margin: 0 0 1.2rem !important;
  overflow: hidden;
  background: var(--rand0m-soft);
}

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

.rand0m-news-card .wp-block-shortcode {
  margin: 0 0 .55rem;
}

.rand0m-news-card-date {
  margin: 0 0 .5rem;
  color: var(--rand0m-muted);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .045em;
}

.rand0m-news-card-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.6vw, 2.25rem);
  line-height: 1;
  letter-spacing: -.025em;
}

.rand0m-news-card-title a {
  text-decoration: none;
}

.rand0m-news-card-excerpt {
  margin-top: .8rem;
  color: var(--rand0m-muted);
  font-size: .94rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rand0m-news-pagination {
  margin-top: clamp(3rem, 7vw, 6rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rand0m-line);
}

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

@media (max-width: 781px) {
  .rand0m-post-title {
    max-width: 12ch;
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .rand0m-post-event-panel {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .rand0m-post-event-cta {
    justify-self: start;
    margin-top: .25rem;
  }

  .rand0m-post-featured {
    margin-top: 2rem;
  }

  .rand0m-post-featured::after {
    width: 10rem;
    left: -4rem;
    top: -.3rem;
    opacity: .62;
  }

  .rand0m-post-header--recap .rand0m-post-featured::after {
    right: -4rem;
    bottom: -.3rem;
  }
}

@media (max-width: 600px) {
  .rand0m-news-grid {
    grid-template-columns: 1fr !important;
  }
}
