/* ═══════════════════════════════════════════════════════════════
   MEDLUSTRUM 2026 — festival redesign
   Palette: Coastal sunset
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* Coastal sunset palette */
  --cream:   #F5E9D4;
  --cream-2: #FAF1DE;
  --ink:     #1F3556;
  --ink-2:   #2A3F60;
  --coral:   #FF6B35;
  --pink:    #FF3B7C;
  --yellow:  #FFD93D;
  --teal:    #0FA3B1;

  /* Type */
  --f-display: "Anton", "Archivo Black", system-ui, sans-serif;
  --f-body:    "Bricolage Grotesque", system-ui, sans-serif;
  --f-mono:    "DM Mono", ui-monospace, monospace;
  --f-hand:    "Caveat", cursive;

  /* Effects */
  --sh-sticker: 4px 5px 0 var(--ink);
  --sh-tile:    3px 4px 0 var(--ink);
  --sh-float:   0 8px 24px rgba(0,0,0,0.18);
  --border-sticker: 2.5px solid var(--ink);
  --border-divider: 1.5px dashed rgba(31, 53, 86, 0.25);

  /* Layout */
  --tab-h:        78px;
  --safe-top:     env(safe-area-inset-top, 0px);
  --safe-bottom:  env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--cream); }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

#app {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(var(--tab-h) + var(--safe-bottom) + 24px);
  position: relative;
  min-height: 100dvh;
}

/* ─── Typography helpers ───────────────────────────────────── */
.display {
  font-family: var(--f-display);
  letter-spacing: -0.01em;
  line-height: 0.9;
  text-transform: uppercase;
}
.mono {
  font-family: var(--f-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
}
.hand {
  font-family: var(--f-hand);
  font-size: 24px;
  line-height: 1;
  display: inline-block;
  transform: rotate(var(--rotate, 0deg));
}

.title-xxl { font-size: 64px; line-height: 0.85; }
.d-lg      { font-size: 48px; line-height: 0.88; }
.d-md      { font-size: 22px; letter-spacing: 0.04em; }
.d-sm      { font-size: 26px; }
.d-xs      { font-size: 19px; line-height: 1; }
.d-juni    { font-size: 22px; }

.text-cream { color: var(--cream); }
.text-yellow { color: var(--yellow); }

/* ─── Graphic primitives ───────────────────────────────────── */

/* Halftone — dotted texture overlay */
.halftone {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--ink) 1.2px, transparent 1.4px);
  background-size: 8px 8px;
  opacity: 0.07;
}
.halftone-light {
  background-image: radial-gradient(#fff 1.2px, transparent 1.4px);
  opacity: 0.18;
}

/* Stripes — 4-color thin band */
.stripes {
  display: flex;
  height: 6px;
}
.stripes > div { flex: 1; }
.s-coral  { background: var(--coral); }
.s-yellow { background: var(--yellow); }
.s-pink   { background: var(--pink); }
.s-teal   { background: var(--teal); }

/* Marquee — scrolling festival band */
.marquee {
  background: var(--ink);
  color: var(--cream);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
  padding: 10px 0;
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.marquee-track {
  display: inline-flex;
  animation: marquee 24s linear infinite;
  white-space: nowrap;
}
.marquee-track > span {
  display: inline-block;
  padding-right: 18px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-coral      { background: var(--coral); color: var(--cream); }
.marquee-cream      { background: var(--cream); color: var(--ink); }
.marquee-teal       { background: var(--teal); color: var(--cream); }
.marquee-ink        { background: var(--ink); color: var(--cream); }
.marquee-ink-yellow { background: var(--ink); color: var(--yellow); }

/* Sticker — rotated panel with thick border + hard shadow */
.sticker {
  background: var(--cream);
  color: var(--ink);
  border: var(--border-sticker);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: var(--sh-sticker);
  transform: rotate(var(--rotate, 0deg));
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.sticker:active, .sticker:hover {
  transform: rotate(var(--rotate, 0deg)) translate(2px, 2px);
  box-shadow: 2px 3px 0 var(--ink);
}

/* Stamp — postmark style double border */
.stamp {
  display: inline-block;
  padding: 4px 10px;
  font-family: var(--f-display);
  font-size: 14px;
  letter-spacing: 0.18em;
  border-radius: 4px;
  text-transform: uppercase;
  border: 2.5px solid currentColor;
  transform: rotate(var(--rotate, -6deg));
  position: relative;
}
.stamp::before {
  content: '';
  position: absolute;
  inset: 3px;
  border: 1.5px dashed currentColor;
  border-radius: 2px;
  pointer-events: none;
}
.stamp-coral { color: var(--coral); }
.stamp-ink   { color: var(--ink); }
.stamp-cream { color: var(--cream); }

/* ═══════════════════════════════════════════════════════════════
   HOME
   ═══════════════════════════════════════════════════════════════ */
.view {
  position: relative;
  min-height: 100dvh;
  animation: fadeUp 0.3s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.view-home { background: var(--cream); }

.home-hero {
  padding: calc(var(--safe-top) + 50px) 22px 18px;
  text-align: center;
  position: relative;
}
.stamp-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.hand-presents {
  font-size: 28px;
  color: var(--coral);
  transform: rotate(-3deg);
  margin-top: -2px;
}
.title-xxl { margin: -2px 0 4px; }
.date-line {
  margin-top: 14px;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.loc-line {
  margin-top: 6px;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* Countdown */
.countdown-section { padding: 22px 22px 8px; }
.section-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
.hand-coral { color: var(--coral); }
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.count-tile {
  border: var(--border-sticker);
  border-radius: 14px;
  padding: 10px 4px 6px;
  text-align: center;
  box-shadow: var(--sh-tile);
  transform: rotate(var(--rotate, 0deg));
}
.count-tile .num {
  font-size: 40px;
  line-height: 1;
  display: block;
}
.count-label {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
  display: block;
}

/* Line-up tiles */
.lineup-section { padding: 22px 22px 28px; }
.lineup-section .display { margin-bottom: 14px; }
.lineup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.tile {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: var(--border-sticker);
  border-radius: 18px;
  padding: 14px 14px 12px;
  aspect-ratio: 1 / 1.05;
  box-shadow: var(--sh-sticker);
  transform: rotate(var(--rotate, 0deg));
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tile:active, .tile:hover {
  transform: rotate(var(--rotate, 0deg)) translate(2px, 2px);
  box-shadow: 2px 3px 0 var(--ink);
}
.tile-emoji { font-size: 32px; line-height: 1; }
.tile-title { font-size: 26px; line-height: 0.9; display: block; }
.tile-sub {
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 11px;
  margin-top: 4px;
  opacity: 0.85;
  display: block;
}

/* Foot */
.home-foot {
  padding: 0 22px 22px;
  text-align: center;
  font-size: 10px;
  letter-spacing: 0.3em;
  opacity: 0.65;
}

/* ═══════════════════════════════════════════════════════════════
   PROGRAMMA
   ═══════════════════════════════════════════════════════════════ */
.view-programma { background: var(--cream); position: relative; }

.page-head {
  padding: calc(var(--safe-top) + 50px) 22px 12px;
  position: relative;
}
.page-head .stamp { display: inline-block; }
.page-head .d-lg { margin-top: 14px; }
.page-head .hand-coral {
  font-size: 22px;
  transform: rotate(-2deg);
  margin-top: 4px;
  display: inline-block;
}

.day-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 22px 16px;
}
.day-tab {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
  flex: 1;
  text-align: center;
  padding: 10px 6px;
  background: var(--cream);
  color: var(--ink);
  border: var(--border-sticker);
  border-radius: 12px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.day-tab .display { font-size: 18px; line-height: 1; display: block; }
.day-tab .mono { font-size: 10px; letter-spacing: 0.1em; margin-top: 4px; display: block; opacity: 0.7; }
.day-tab.active {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 3px 3px 0 var(--coral);
  transform: translate(-1px, -1px);
}

.schedule { padding: 20px 22px 0; }
.prow {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 0;
  border-bottom: var(--border-divider);
}
.prow:last-child { border-bottom: 0; }
.ptime {
  font-size: 22px;
  color: var(--ink);
  line-height: 1;
}
.prow.headline .ptime { color: var(--coral); font-size: 28px; }
.pbody { min-width: 0; }
.ptitle {
  font-size: 19px;
  line-height: 1.05;
  letter-spacing: -0.005em;
  display: block;
}
.prow.headline .ptitle { font-size: 26px; color: var(--coral); }
.psub {
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
  opacity: 0.75;
  display: block;
}
.ptag {
  display: inline-block;
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  border: 1.5px solid var(--ink);
  padding: 2px 6px;
  border-radius: 3px;
}
.inline-link {
  border-bottom: 2px solid var(--coral);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   HUIS
   ═══════════════════════════════════════════════════════════════ */
.view-huis { background: var(--cream); }
.house-hero {
  position: relative;
  height: 280px;
  padding-top: calc(var(--safe-top) + 48px);
  background: linear-gradient(180deg, var(--teal), #0a6f7a);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}
.house-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.house-stamp {
  position: absolute;
  top: calc(var(--safe-top) + 56px);
  left: 16px;
  z-index: 2;
}
.house-title {
  position: absolute;
  bottom: 14px;
  left: 16px;
  z-index: 2;
}

.page-pad {
  padding: 22px 22px 0;
  position: relative;
}
.sticker-pad { padding: 16px 18px; }
.sticker-pad-sm { padding: 14px; }

.kicker {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.65;
  font-family: var(--f-mono);
}
.body-line {
  font-family: var(--f-body);
  font-weight: 600;
  margin-top: 4px;
  font-size: 14px;
}
.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 8px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: transform 0.12s ease;
}
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn:active { transform: scale(0.96); }

.wifi-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 6px;
}
.wifi-right { text-align: right; }
.mini-label {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.6;
  display: block;
}
.pass {
  font-size: 18px;
  color: var(--yellow);
  letter-spacing: 0.08em;
  margin-top: 2px;
  display: block;
}

.sec-title {
  margin: 24px 0 14px;
}

.fac-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
.fac-emoji { font-size: 26px; line-height: 1; }
.fac-grid .d-xs { margin-top: 6px; line-height: 0.95; display: block; }
.fac-sub {
  font-family: var(--f-body);
  font-size: 11px;
  font-weight: 500;
  margin-top: 2px;
  opacity: 0.8;
}

.rule-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}
.rule-list li {
  background: white;
  border: var(--border-sticker);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--f-body);
  box-shadow: 2px 3px 0 var(--ink);
}

/* Sticker mid-pad spacing on Huis stickers */
.view-huis .sticker { margin: 14px 0; }

/* ═══════════════════════════════════════════════════════════════
   BRUGGE
   ═══════════════════════════════════════════════════════════════ */
.view-brugge { background: var(--cream); }
.brugge-hero {
  position: relative;
  padding: calc(var(--safe-top) + 50px) 22px 16px;
  background: var(--pink);
  color: var(--cream);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}
.brugge-hero-inner {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.hand-yellow { color: var(--yellow); font-size: 22px; transform: rotate(-3deg); display: inline-block; }
.brugge-title { margin-top: -4px; }
.brugge-eyebrow { font-size: 11px; letter-spacing: 0.2em; margin-top: 6px; opacity: 0.9; display: block; }

.tip-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 12px;
  padding-top: 6px;
}
.tip { padding: 14px 16px; display: block; }
.tip .tip-icon {
  font-size: 32px;
  width: 52px;
  height: 52px;
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transform: rotate(var(--rotate, -4deg));
}
.tip {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  align-items: flex-start;
}
.tip-body { min-width: 0; }
.tip-body .d-xs { margin-top: 2px; display: block; }
.tip-sub {
  font-family: var(--f-body);
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
  opacity: 0.9;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   STRAND
   ═══════════════════════════════════════════════════════════════ */
.view-strand { background: var(--cream); }
.strand-hero {
  position: relative;
  padding: calc(var(--safe-top) + 50px) 22px 16px;
  background: linear-gradient(180deg, var(--yellow) 0%, var(--coral) 100%);
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
}
.strand-sun {
  position: absolute;
  top: 20px;
  right: -30px;
  width: 130px;
  height: 130px;
  background: var(--cream);
  border-radius: 50%;
  border: 2.5px solid var(--ink);
  box-shadow: var(--sh-sticker);
  z-index: 1;
}
.strand-hero-inner { position: relative; z-index: 2; }
.strand-title { margin-top: 10px; }

.weather-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.weather-tile {
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.w-emoji { font-size: 22px; }
.w-body { flex: 1; display: flex; flex-direction: column; }
.w-body .mini-label { font-size: 9px; letter-spacing: 0.18em; opacity: 0.7; }
.w-body .d-xs { font-size: 18px; line-height: 1; }
.w-sub { font-family: var(--f-body); font-size: 10px; font-weight: 500; opacity: 0.75; }

.tip-flat {
  display: block;
  padding: 14px 16px;
}
.tip-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.tip-tag {
  font-size: 9px;
  letter-spacing: 0.16em;
  border: 1.5px solid currentColor;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0.85;
}

/* ═══════════════════════════════════════════════════════════════
   TAB BAR
   ═══════════════════════════════════════════════════════════════ */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  pointer-events: none;
  padding: 0 12px calc(12px + var(--safe-bottom));
  display: flex;
  justify-content: center;
}
.tabbar-inner {
  pointer-events: auto;
  background: var(--ink);
  border-radius: 999px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  box-shadow: var(--sh-float), 4px 4px 0 var(--coral);
  max-width: 440px;
  width: 100%;
}
.tab-btn {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: center;
  padding: 8px 4px 6px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--cream);
  transition: background 0.15s ease, color 0.15s ease;
}
.tab-btn.active {
  background: var(--yellow);
  color: var(--ink);
}
.tab-emoji { font-size: 18px; line-height: 1; }
.tab-label { font-size: 9px; letter-spacing: 0.12em; }

/* ═══════════════════════════════════════════════════════════════
   SPLASH (kept from earlier)
   ═══════════════════════════════════════════════════════════════ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: env(safe-area-inset-top, 0) 16px env(safe-area-inset-bottom, 0);
  animation: splashIn 0.4s ease-out;
}
.splash.fade-out {
  animation: splashOut 0.5s ease-in forwards;
}
.splash-img {
  max-width: min(100%, 480px);
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  box-shadow: 8px 8px 0 var(--ink);
  border: var(--border-sticker);
  border-radius: 18px;
  animation: splashImg 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.splash-hint {
  margin-top: 18px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.6;
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes splashIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes splashOut { to   { opacity: 0; visibility: hidden; } }
@keyframes splashImg {
  0%   { opacity: 0; transform: scale(0.92) rotate(-1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 0.8; }
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY COLORS (declared last so they override .sticker etc.)
   ═══════════════════════════════════════════════════════════════ */
.bg-cream  { background: var(--cream); }
.bg-coral  { background: var(--coral); }
.bg-pink   { background: var(--pink); }
.bg-yellow { background: var(--yellow); }
.bg-teal   { background: var(--teal); }
.bg-ink    { background: var(--ink); }
.text-cream  { color: var(--cream); }
.text-yellow { color: var(--yellow); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (min-width: 480px) {
  .home-hero .title-xxl { font-size: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none; }
}
