/* ===== EL MOUTANAKIL — B/W ===== */

/* Fonts: Headers = Arial, Content = Helvetica */
:root{
  --bg: #0a0a0b;
  --fg: #f5f5f6;
  --muted: #a0a3a8;
  --line: #1b1b1d;
  --line1: #a0a3a8;
  --card: #111113;
  --inset: #0e0e10;
  --white: #ffffff;
  --black: #000000;
  --r: 18px;
  --shadow: 0 14px 34px rgba(0,0,0,.35);
}
/* Arabic Display — Joumhouria (local TTF in assets) */
@font-face {
  font-family: 'Joumhouria';
  src: url('assets/fonts/alfont_com_AlFont_com_joumhouria-1.ttf') format('truetype');
  font-display: swap;
  font-style: normal;
  font-weight: 900;
}

/* Apply to Arabic content only */
:lang(ar) {
  font-family: 'Joumhouria', 'Amiri', 'Scheherazade New', system-ui, sans-serif;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html, body{ height:100%; }

body{
  margin:0;
  background: var(--bg);
  color: var(--fg);
  line-height:1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-family: Helvetica, Arial, sans-serif;
}
/* Global overflow guard */
html, body {
  max-width: 100%;
  overflow-x: hidden; /* force no sideways scroll on all sizes */
}

/* Media should never exceed container width */
img, video, iframe {
  max-width: 100%;
}

/* Lazy loading optimization */
img[loading="lazy"] {
  background-color: #f0f0f0;
}

img[loading="lazy"]:not([src]) {
  opacity: 0;
}

/* Image optimization classes */
.img-lazy {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.img-lazy.loaded {
  opacity: 1;
}

/* Contain images to improve rendering performance */
img {
  contain: layout style paint;
}


h1,h2,h3,h4,h5,h6{
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: .02em;
  margin:0 0 .5rem;
}
h1{ font-size: clamp(2.6rem, 4.4vw, 4.1rem); line-height:1.08; }

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

/* Text button style (Load more, Close) */
.link{
  background:none;
  border:none;
  padding:0;
  margin:0;
  font: inherit;
  color:var(--fg);
  text-decoration:underline;
  cursor:pointer;
}
.link:hover,
.link:focus-visible{
  text-decoration:none;
  opacity:.85;
  outline:none;
}

.wrap{ width:min(1200px, 92%); margin-inline:auto; }

/* Header */
.site-header{
  position: sticky; top:0; left:0; right:0; z-index:60; border-bottom:1px solid var(--line);
  background: rgba(10,10,12,.75); backdrop-filter: blur(8px) saturate(1.2);
}
.site-header .wrap{
  display:flex; align-items:center; gap:18px; padding:14px 0;
  flex-wrap:wrap; row-gap:10px;
}
.brand{
  display:flex; align-items:center; gap:12px;
  font-weight:800; text-decoration:none; color:var(--fg);
}
.brand-mark{
  width:58px; height:58px; object-fit:contain;
  filter: brightness(0) invert(1);
}
.brand-text{ letter-spacing:.12em; }

.nav{
  margin-left:auto; display:flex; align-items:center;
  flex-wrap:wrap; gap:12px 10px; justify-content:flex-end;
  max-width:100%; flex:1 1 420px;
}
.nav a{
  display:inline-flex; align-items:center; justify-content:center;
  padding:6px 11px; border-radius:999px; text-decoration:none; color:var(--fg);
  opacity:.85; border:1px solid transparent;
  transition: opacity .2s ease, border-color .2s ease, background-color .2s ease;
  font-size: clamp(.78rem, .9vw, .95rem);
}
.nav a:hover,
.nav a:focus-visible{
  opacity:1; border-color: rgba(255,255,255,.12); background: rgba(20,20,22,.45);
  outline:none;
}
.nav-toggle{
  display:none; margin-left:auto;
  border:1px solid var(--line); background:transparent; color:var(--fg);
  padding:8px 12px; border-radius:12px;
}

@media (max-width: 980px){
  .nav-toggle{ display:block; }
  .nav{
    position:absolute; right:4%; top:60px; background: var(--inset); padding:10px 12px;
    border:1px solid var(--line); border-radius:12px; display:none; flex-direction:column;
    align-items:stretch; gap:10px; flex-wrap:nowrap; width:min(220px, 82vw);
  }
  .nav[data-open="true"]{ display:flex; }
}

/* Hero — full viewport */
.hero{
  position:relative;
  min-height: 100vh;
  
  place-items:center;
  border-bottom:1px solid var(--line);
}
.hero-video{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  filter: grayscale(1) contrast(1.05) brightness(.9);
}
.hero-video.is-color{
  filter: grayscale(0) contrast(1.05) brightness(1);
}
.hero-overlay{
  position:absolute; inset:0;
  background:
    radial-gradient(1000px 500px at 50% -10%, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.2), rgba(0,0,0,.9));
}
.hero-content{
  position:relative;
  text-align:center;
  padding:16vh 0 12vh;
}
.eyebrow{
  text-transform: uppercase;
  letter-spacing: .25em;
  font-size: .78rem;
  color: var(--muted);
  margin-bottom:10px;
}
.lede{
  color:#e9e9eb;
  
  margin: 0;
  font-size: clamp(1rem, 1.1vw + .8rem, 1.25rem);
}

.hero-controls{
  position:absolute;
  top:20px;
  right:20px;
  display:flex;
  gap:5px;
  padding:3px;
  border-radius:999px;
  background:rgba(27, 27, 29, 0.55);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(1px);
  z-index:2;
}
.hero-btn{
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  border:1px solid transparent;
  background:rgba(20,20,24,.6);
  color:var(--fg);
  cursor:pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease, color .2s ease;
}
.hero-btn:hover,
.hero-btn:focus-visible{
  background:rgba(60,60,66,.75);
  border-color:rgba(255,255,255,.3);
  outline:none;
  transform:translateY(-1px);
}
.hero-btn.is-active,
.hero-btn[aria-pressed="true"]{
  background:rgba(110,110,120,.85);
  border-color:rgba(255,255,255,.45);
}
.hero-btn-icon{
  width:15px;
  height:15px;
  display:block;
}

@media (max-width: 640px){
  .hero-controls{
    top:16px;
    right:16px;
    padding:5px;
    gap:8px;
  }
  .hero-btn{
    width:40px;
    height:40px;
  }
  .hero-btn-icon{
    width:18px;
    height:18px;
  }
}

.scroll-cue{
  display:inline-block; margin-top:28px; font-size:1rem; text-decoration:none; color:#ddd; opacity:.7;
  border:1px solid var(--line); padding:6px 12px; border-radius:999px; background:rgba(0,0,0,.25);
}
.scroll-cue:hover{ opacity:1; }

/* Marquee */
.marquee{
   max-width:100%;
  overflow:hidden;
  border-top:1px solid var(--line1);
  border-bottom:1px solid var(--line1);
  margin-top:18px;
}
.marquee-track{
  display:flex; gap:40px; padding:8px 0; white-space: nowrap;
  animation: slide 18s linear infinite; opacity:.8;
}
@keyframes slide{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

/* Sections */
.collapsible-section{ position:relative; }
.section-body{ display:block; }

.section-toggle{
  display:none;
  appearance:none;
  border:none;
  background:none;
  color:inherit;
  font: inherit;
  padding:0;
  cursor:pointer;
}
.section-toggle-label{ display:inline-flex; align-items:center; gap:12px; }
.section-toggle-icon{ display:none; }

.section{
  padding: clamp(56px, 8vh, 88px) 0;
}
.section-alt{
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0));
}
.section-head p{
  color: var(--muted);
  margin-top:6px;
}

/* Media grid */
.media-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:20px;
  align-items:stretch;
}

/* Performance section — card layout with text always visible */
#performances .media-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap:24px;
  align-items:stretch;
}

#performances .section-head{
  margin-bottom:32px;
}

#performances .section-head h2{
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom:12px;
}

#performances .section-head p{
  font-size: 1rem;
  max-width: 620px;
  color: var(--muted);
}

/* Performance tile structure */
#performances .tile{
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transition: all .4s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: translateY(0);
  opacity: 1;
}

#performances .tile:hover{
  transform: translateY(-12px);
  box-shadow: 0 20px 48px rgba(0,0,0,0.4);
  border-color: rgba(255,255,255,0.15);
  background: linear-gradient(135deg, rgba(20,20,25,0.8), rgba(15,15,22,0.8));
}

#performances .tile-media{
  position: relative;
  overflow: hidden;
  flex: 0 0 240px;
  height: 240px;
  border-bottom: 1px solid var(--line);
}

#performances .tile-media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) contrast(1.1);
  transition: transform .5s cubic-bezier(0.34, 1.56, 0.64, 1), filter .5s ease;
}

#performances .tile:hover .tile-media img{
  transform: scale(1.1) rotate(1.5deg);
  filter: brightness(1) contrast(1.15);
}

#performances .tile-media::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.25) 100%);
  opacity: 1;
  transition: opacity .4s ease;
  pointer-events: none;
}

#performances .tile:hover .tile-media::after{
  opacity: 0;
}

#performances .play{
  position: absolute;
  bottom: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  border: 1px solid var(--white);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  transition: all .35s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform: scale(1) translateY(0);
}

#performances .tile:hover .play{
  background: rgba(255,255,255,0.95);
  color: var(--bg);
  transform: scale(1.2) translateY(-4px);
  border-color: rgba(255,255,255,0.95);
  box-shadow: 0 8px 16px rgba(255,255,255,0.3);
}

#performances .tile-info{
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: linear-gradient(135deg, rgba(20,20,25,0.3), transparent);
  border-top: 1px solid rgba(255,255,255,0.05);
}

#performances .tile-info h3{
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  transition: color .3s ease;
}

#performances .tile:hover .tile-info h3{
  color: #ffffff;
}

#performances .tile-info p{
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
  transition: color .3s ease;
}

#performances .tile:hover .tile-info p{
  color: rgba(255,255,255,0.8);
}

/* Modal for player */
#playerModal {
  border:1px solid var(--line);
  border-radius:16px;
  background:var(--card);
  color:var(--fg);
  max-width:960px;
  width:92%;
}
#playerModal::backdrop { background:rgba(0,0,0,.6); }

/* Open Call modal */
.open-call-modal::backdrop { background: rgba(0,0,0,0.6); pointer-events: none; }
.open-call-modal{ border: none; padding: 0; max-width: 820px; width: 92%; border-radius: 14px; }
.open-call-modal[open]{ display:block; }
.open-call-modal{ z-index:1400; }
.open-call-content{ position:relative; background: var(--card); color:var(--fg); padding: 22px; border-radius: 12px; border: 1px solid var(--line); }
.open-call-content header h2{ margin:0 0 8px; }
.open-call-content .lede{ color:var(--muted); margin:0 0 10px; }
.open-call-body{ color:var(--muted); margin: 8px 0 18px; }
.open-call-actions{ display:flex; gap:14px; align-items:center; justify-content:flex-end; }
.open-call-actions .btn{ padding:8px 14px; border-radius:10px; background:var(--fg); color:var(--bg); text-decoration:none; }
.open-call-actions .link{ background:transparent; color:var(--fg); text-decoration:underline; }
.open-call-close{ position:absolute; right:14px; top:14px; z-index:1401; width:40px; height:40px; display:flex; align-items:center; justify-content:center; border:1px solid var(--line); background:rgba(10,10,12,0.8); color:var(--fg); cursor:pointer; border-radius:999px; font-size:24px; transition: background .2s ease, border-color .2s ease; }
.open-call-close:hover{ background:rgba(50,50,60,0.95); border-color:rgba(255,255,255,0.25); }
.open-call-close:focus-visible{ outline:2px solid var(--fg); outline-offset:2px; }
.dont-show{ font-size:0.9rem; color:var(--muted); display:flex; align-items:center; gap:8px; }
.dont-show input{ width:16px; height:16px; }

/* Open call visual */
.open-call-visual{
  width:100%;
  height:auto;
  display:block;
  border-radius:8px;
  margin-bottom:14px;
}

.open-call-visual-page{
  width:100%;
  height:auto;
  display:block;
  border-radius:14px;
  margin-bottom:20px;
}

@media (max-width: 640px){
  .open-call-content{ padding:16px; }
  .open-call-actions{ flex-direction:column; align-items:stretch; }
  .open-call-actions .btn{ width:100%; display:inline-block; text-align:center; }
  .open-call-close{ width:44px; height:44px; right:12px; top:12px; font-size:28px; }
  .open-call-visual{
    margin-bottom:12px;
  }
}

/* Media grid: stack on small screens */
@media (max-width: 640px){
  .media-grid{ grid-template-columns: 1fr; }
  
  #performances .media-grid{
    grid-auto-rows: auto;
  }
}

/* Tiles / media cards */
.tile{
  background: var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  box-shadow:none;
  transform: translateY(8px);
  opacity:0;
  transition: transform .25s ease, opacity .25s ease;
  display:flex;
  flex-direction:column;
  position:relative;
}
.tile.in{
  transform: translateY(0);
  opacity:1;
}

/* Performance tiles: enhanced with gradient & scale effects */
#performances .tile{
  border-radius:14px;
  overflow:hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow .35s ease,
              border-color .35s ease;
}

#performances .tile:hover{
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 42px rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.2);
}

.tile-media{
  position:relative;
  display:block;
  flex-shrink:0;
  height:100%;
  overflow:hidden;
}
.tile-media img{
  width:100%;
  height: 220px;
  object-fit:cover;
  transition: transform .4s ease, filter .4s ease;
}

#performances .tile-media img{
  height: 100%;
  filter: brightness(0.85) contrast(1.1);
}

#performances .tile:hover .tile-media img{
  transform: scale(1.08) rotate(1deg);
  filter: brightness(1) contrast(1.15);
}

.tile-media::after{
  content:'';
  position:absolute;
  inset:0;
  background: linear-gradient(135deg, transparent 0%, rgba(0,0,0,0.3) 100%);
  pointer-events:none;
  transition: opacity .3s ease;
}

#performances .tile:hover .tile-media::after{
  opacity:0;
}

.play{
  position:absolute;
  bottom:10px;
  right:12px;
  font-size: 11px;
  border:1px solid var(--white);
  padding:6px 10px;
  border-radius:999px;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  transition: all .3s ease;
  transform: scale(1);
}

#performances .tile:hover .play{
  background: rgba(255,255,255,0.9);
  color: var(--bg);
  transform: scale(1.15);
  font-weight:600;
  border-color: rgba(255,255,255,0.9);
}

.tile-info{
  padding:20px 18px;
  border-top:1px solid var(--line);
  flex-grow:1;
  display:flex;
  flex-direction:column;
  position:relative;
  background: linear-gradient(135deg, rgba(20,20,24,0.4), rgba(15,15,20,0.2));
}

#performances .tile-info{
  padding:16px 14px;
  gap:6px;
}

.tile-info h3{
  margin:0 0 10px;
  font-size:1.1rem;
  line-height:1.3;
}

#performances .tile-info h3{
  margin:0 0 6px;
  font-size:1rem;
  line-height:1.25;
}

.tile-body{
  padding:24px 20px;
  flex-grow:1;
  display:flex;
  flex-direction:column;
  gap:16px;
}
.tile-body h2{
  margin:0 0 8px;
  font-size:1.25rem;
  line-height:1.3;
}
.tile-body .lede{
  margin:0 0 12px;
  line-height:1.7;
}
.tile-body ul{
  margin:8px 0;
  padding-left:20px;
  line-height:1.8;
}
.tile-body li{
  margin:8px 0;
}
.tile-body p{
  margin:0 0 12px;
  line-height:1.7;
  color:var(--muted);
}
.tile-body p:last-child{
  margin-bottom:0;
}
.tile-info p{
  margin:0;
  color: var(--muted);
  line-height:1.6;
  font-size:0.9rem;
}

#performances .tile-info p{
  font-size:0.85rem;
}

/* Split layout (Transmitting Stones, Contact) */
.split{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap:20px;
  align-items:center;
}
@media (max-width: 980px){
  .split{ grid-template-columns: 1fr; }
}
.split .frame{
  position:absolute;
  inset:16px;
  pointer-events:none;
}
.split-media{
  position:relative;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:var(--card);
  transform: translateY(8px);
  opacity:0;
  transition: transform .25s ease, opacity .25s ease;
}
.split-media.in{
  transform: translateY(0);
  opacity:1;
}
.split-media img{
  width:100%;
  height: 100%;
  object-fit:cover;
}
.split-body .dash{
  list-style:none;
  padding:0;
  margin:12px 0 0;
}
.split-body .dash li{
  position:relative;
  padding-left:18px;
  margin:4px 0;
}
.split-body .dash li::before{
  content:"—";
  position:absolute;
  left:0;
  color:var(--muted);
}

/* Masonry (gallery) */
.masonry{
  columns: 4 240px;
  column-gap: 16px;
  padding: 0 4%;
}
.masonry img{
  width:100%;
  margin: 0 0 16px;
  filter: grayscale(1);
  transition: filter .2s ease;
  border:1px solid var(--line);
  border-radius:12px;
}
.masonry img:hover{
  filter: invert(0) grayscale(0);
}
@media (max-width: 880px){
  .masonry{ columns: 1; }
}

/* Social icons */
.social{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  gap:14px;
  align-items:center;
}
.social a{
  display:inline-flex; align-items:center; justify-content:center;
  width:36px; height:36px;
  color:var(--fg); text-decoration:none; border:none; background:transparent; padding:0;
  transition: color .2s ease, transform .2s ease;
}
.social a svg{
  width:22px; height:22px; display:block;
}
.social a:hover,
.social a:focus-visible{
  color:#ffffff;
  transform: translateY(-2px);
  outline:none;
}

/* Partners marquee (footer) */
.partners{
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:flex-start;
  margin-bottom:28px;
}
.partners-title{
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.24em;
  color:var(--muted);
}
.partners-marquee{
  width:100%;
  overflow:hidden;
  position:relative;
}
.partners-track{
  display:flex;
  align-items:center;
  gap:36px;
  animation: partners-scroll 24s linear infinite;
}
.partners-track img{
  height:36px;
  width:auto;
  object-fit:contain;
  filter: grayscale(0) brightness(.85);
}

@media (max-width: 640px){
  .partners{
    align-items:center;
    text-align:center;
  }
  .partners-title{ letter-spacing:.2em; }
}

@keyframes partners-scroll{
  from{ transform: translateX(0); }
  to{ transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce){
  .partners-track{
    animation: none;
    justify-content:center;
  }
}

/* Collapsible sections (mobile) */
@media (min-width: 641px){
  .collapsible-section .section-body{
    display:block !important;
  }
}

@media (max-width: 640px){
  .collapsible-section{
    padding:0;
    border-bottom:1px solid var(--line);
  }
  .section-toggle{
    display:flex;
    align-items:center;
    justify-content:space-between;
    width:min(1200px, 92%);
    margin-inline:auto;
    padding:18px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(1rem, 3.2vw, 1.3rem);
    letter-spacing:.12em;
    text-transform:uppercase;
  }
  .section-toggle-label{
    display:flex;
    align-items:center;
    gap:12px;
  }
  .section-toggle-icon{
    display:inline-flex;
    width:18px;
    height:18px;
    position:relative;
  }
  .section-toggle-icon::before,
  .section-toggle-icon::after{
    content:"";
    position:absolute;
    left:50%;
    top:50%;
    background:currentColor;
    transform:translate(-50%, -50%);
    border-radius:1px;
  }
  .section-toggle-icon::before{
    width:16px;
    height:2px;
  }
  .section-toggle-icon::after{
    width:2px;
    height:16px;
    transition: transform .2s ease, opacity .2s ease;
  }
  .collapsible-section[data-collapsed="false"] .section-toggle-icon::after{
    opacity:0;
    transform:translate(-50%, -50%) scaleY(0);
  }
  .collapsible-section .section-body{
    display:none;
    padding-bottom:32px;
  }
  .collapsible-section[data-collapsed="false"] .section-body{
    display:block;
    padding-top:12px;
  }
}


/* Contact grid & cards */
.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:20px;
}

.contact-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 16px;
  backdrop-filter: blur(8px) saturate(1.1);
}

.contact-head h2,
.contact-head h3{
  margin:0 0 6px;
}

.contact-mail{
  display:inline-block;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,.25);
  text-decoration:none;
}

.contact-mail:hover,
.contact-mail:focus-visible{
  border-color: rgba(255,255,255,.25);
  outline:none;
}

.contact-note{
  color: var(--muted);
  margin-top:8px;
  font-size: .95rem;
}

/* Larger social icons for the card */
.social-lg a{
  width:44px;
  height:44px;
}
.social-lg a svg{
  width:24px;
  height:24px;
}

/* Stack on mobile */
@media (max-width: 900px){
  .contact-grid{
    grid-template-columns: 1fr;
  }
}

/* Footer */
.site-footer{
  border-top:1px solid var(--line);
  padding:28px 0;
  text-align:center;
  color:var(--muted);
}

/* Noise overlay (subtle) */

[data-noise]::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.03"/></svg>');
}

/* Reveal-on-scroll basics */
.section,
.tile,
.split-media,
.masonry img{
  transform: translateY(8px);
  opacity:0;
}
.section.in,
.tile.in,
.split-media.in,
.masonry img.in{
  transform: translateY(0);
  opacity:1;
}

/* Staggered fade-in animation for performance tiles */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Accessibility helper */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* Back to top button */
.back-to-top{
  position:fixed; bottom:24px; right:24px; z-index:10002; /* ensure it sits above other bottom UI such as radio player */
  border:1px solid var(--line); background:rgba(10,10,12,.95); color:var(--fg);
  border-radius:999px; padding:12px 16px; font-size:1.4rem; line-height:1;
  cursor:pointer; transition: all .3s ease;
  opacity:0; visibility:hidden; pointer-events:none;
}
.back-to-top[data-visible="true"]{
  opacity:1; visibility:visible; pointer-events:auto;
}
.back-to-top:hover,
.back-to-top:focus-visible{
  background:rgba(50,50,60,.95); outline:2px solid var(--fg); outline-offset:2px;
}

/* === Residencies Slider === */
.res-slider{
  margin-top:24px;
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap:16px;
  align-items:center;
  width:100%;
  overflow:hidden;
}
.res-window{
  overflow:hidden;
  width:100%;
}
.res-track{
  display:flex;
  transition: transform .45s ease;
  will-change: transform;
  width:100%;
}
.res-item{
  flex:0 0 100%;
  padding:6px 0;
  display:grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap:18px;
  align-items:center;
  min-width:100%;
  box-sizing:border-box;
}
.res-media{
  border-radius:16px;
  overflow:hidden;
  background:var(--card);
}
.res-media img{
  width:100%;
  height: 50%;
  object-fit:cover;
  filter: grayscale(0.1);
}
.res-copy h3{
  font-size:1.3rem;
  margin-bottom:8px;
}
.res-copy p{
  color:var(--muted);
  margin:0;
}

/* Slider arrows */
.res-nav{
  width:40px;
  height:40px;
  border-radius:50%;
  border:1px solid var(--line);
  background:rgba(10,10,12,.65);
  color:var(--fg);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  font-size:1.1rem;
  transition: background .2s ease, border-color .2s ease, transform .2s ease, opacity .2s ease;
}
.res-nav:hover,
.res-nav:focus-visible{
  background:rgba(35,35,40,.9);
  border-color:rgba(255,255,255,.35);
  transform:translateY(-1px);
  outline:none;
}

/* Dots */
.res-dots{
  margin-top:16px;
  display:flex;
  gap:6px;
  justify-content:center;
}
.res-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  border:1px solid var(--muted);
  background:transparent;
  padding:0;
  cursor:pointer;
  transition: background .2s ease, transform .2s ease, border-color .2s ease, opacity .2s ease;
  opacity:.7;
}
.res-dot.is-active{
  background:var(--fg);
  border-color:var(--fg);
  transform:scale(1.1);
  opacity:1;
}

/* Responsive layout for slider */
@media (max-width: 900px){
  .res-item{
    grid-template-columns: 1fr;
  }
  .res-media img{
    height:260px;
  }
}
@media (max-width: 640px){
  .res-slider{
    grid-template-columns: auto 1fr auto;
    gap:8px;
    width:100%;
    align-items:center;
  }
  .res-window{
    width:100%;
    overflow:hidden;
    flex:1;
  }
  .res-track{
    display:flex;
    width:100%;
    overflow:visible;
  }
  .res-item{
    flex:0 0 100%;
    width:100%;
    min-width:100%;
    padding:0;
    grid-template-columns: 1fr;
    gap:12px;
    box-sizing:border-box;
  }
  .res-media{
    width:100%;
  }
  .res-media img{
    width:100%;
    height:180px;
    object-fit:cover;
  }
  .res-copy{
    padding:0 2px;
    overflow-y:auto;
    max-height:280px;
  }
  .res-copy h3{
    font-size:1rem;
    margin-bottom:6px;
  }
  .res-copy p{
    font-size:0.85rem;
    line-height:1.5;
  }
  .res-nav{
    width:36px;
    height:36px;
    flex-shrink:0;
  }
}

/* === Radio Slider — "CD binder" === */

.radio-slider{
  margin-top:24px;
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap:16px;
  align-items:stretch;
}

.radio-window{
  overflow:hidden;
}

.radio-track{
  display:flex;
  transition: transform .45s ease;
  will-change: transform;
}

.radio-item{
  flex:0 0 80%;
  padding:8px 0;
  display:grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap:18px;
  align-items:center;
}

.radio-cover{
  position:relative;
  border-radius:16px;
  overflow:hidden;
  background:var(--card);
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}

.radio-cover-btn{
  display:block;
  padding:0;
  border:none;
  color: var(--fg);
  background:none;
  cursor:pointer;
  width:100%;
}

.radio-cover img{
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  filter: grayscale(1);
  transition: transform .25s ease, filter .25s ease;
}

.radio-cover:hover img,
.radio-cover-btn:focus-visible img{
  transform: scale(1.04);
  filter: grayscale(0);
}

.radio-meta h3{
  margin:0 0 4px;
  font-size:1.05rem;
}

.radio-meta p{
  margin:0 0 10px;
  color:var(--muted);
  font-size:0.85rem;
  letter-spacing:.04em;
  text-transform:uppercase;
}

/* reusing .res-nav styles for arrows, so no extra button CSS needed */

/* Dots re-use .res-dot styles; only layout differs */
.radio-dots{
  margin-top:16px;
  display:flex;
  gap:6px;
  justify-content:center;
}

/* Responsive layout for slider */
@media (max-width: 900px){
  .radio-item{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px){
  .radio-slider{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    justify-items:center;
  }
}

/* === Radio Slider — CD binder layout === */

.radio-slider{
  margin-top:24px;
  display:grid;
  grid-template-columns: auto 1fr auto;
  gap:16px;
  align-items:center;
}

.radio-window{
  overflow:hidden;
}

.radio-track{
  display:flex;
  transition: transform .45s ease;
  will-change: transform;
}

/* Each slide = 80% width so next one peeks on the right */
.radio-item{
  flex:0 0 30%;
  padding-right:20px;
  box-sizing:border-box;
  display:flex;
  align-items:flex-end;
  transform: translateX(-4%) scale(0.96);
  opacity: 0.75;
  transition: transform .3s ease, opacity .3s ease;
}

.radio-item.is-active{
  transform: translateX(0) scale(1);
  opacity: 1;
}

.radio-cover{
  position:relative;
  width:100%;
  border-radius:16px;
  overflow:hidden;
  background:var(--card);
  border:1px solid var(--line);
  box-shadow: var(--shadow);
}

.radio-cover-btn{
  display:block;
  width:100%;
  
  padding:0;
  border:none;
  background:none;
  cursor:pointer;
  position:relative;
  text-align:left;
}

.radio-cover img{
  width:100%;
  aspect-ratio:1 / 1;
  object-fit:cover;
  filter:blur(10);
  filter: grayscale(0);
  transition: transform .25s ease, filter .25s ease;
}

/* overlay meta on the bottom-left of the cover */
.radio-meta{
  position:absolute;
  left:24px;
  bottom:34px;
  max-width:72%;
  padding:8px 10px;
  
  border-radius:12px;
  
}

.radio-meta p{
  margin:0 0 4px;
  color:var(--muted);
  font-size:0.75rem;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.radio-meta h3{
  margin:0;
  font-size:1rem;
}

/* hover: reveal color & slight zoom */
.radio-cover:hover img,
.radio-cover-btn:focus-visible img{
  transform: scale(1.03);
  filter: grayscale(0);
}

/* dots reused from residencies; just layout container */
.radio-dots{
  margin-top:16px;
  display:flex;
  gap:6px;
  justify-content:center;
}

@media (max-width: 900px){
  .radio-slider{
    grid-template-columns: 1fr;
  }
  .radio-item{
    flex:0 0 90%;
  }
}

@media (max-width: 640px){
  .radio-item{
    flex:0 0 85%;
    padding-right:12px;
    box-sizing:border-box;
  }
  .radio-meta{
    max-width:80%;
  }
}
/* === MOBILE LAYOUT PATCH (≤ 640px) ======================== */

@media (max-width: 640px){

  /* Global: kill sideways scrolling and keep content centered */
  html,
  body{
    max-width:100%;
    overflow-x:hidden;
  }

  .wrap{
    width:92%;
    margin-inline:auto;
  }

  /* Header */
  .site-header .wrap{
    padding:10px 0;
    gap:10px;
  }

  .brand-mark{
    width:44px;
    height:44px;
  }

  /* HERO */
  .hero{
    min-height:100vh;
    place-items:center;
  }

  .hero-content{
    padding:28vh 0 10vh;
    text-align:center;
  }

  .hero .eyebrow,
  .hero .lede{
    max-width:32rem;
    margin-inline:auto;
  }

  .hero h1{
    font-size:clamp(2.4rem, 9vw, 3.1rem);
    line-height:1.05;
  }

  .marquee-track{
    gap:24px;
  }

  /* Sections */
  .section{
    padding:10px 0;
  }

  .wrap.section-head{
    text-align:left;
  }

  .section-head p{
    margin-top:4px;
  }

  /* ABOUT + other split layouts */
  .split{
    grid-template-columns:1fr;
    gap:18px;
  }

  .split-media{
    max-width:100%;
  }

  .split-body{
    order:2;
  }

  /* Generic media grids (Radio / Releases / Workshops etc.) */
  .media-grid{
    grid-template-columns:1fr;
  }

  .tile{
    transform:translateY(0);
  }

  /* Gallery masonry */
  .masonry{
    columns:1;
    padding:0;
  }

  /* Residencies slider */
  .res-slider{
    grid-template-columns:1fr;
    grid-template-rows:auto auto auto;
    justify-items:center;
  }

  .res-nav{
    width:36px;
    height:36px;
  }

  /* Footer */
  .site-footer .wrap{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }

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

/* === Workshops & Talks === */
.workshops-grid{
  margin-top:24px;
  display:flex;
  flex-direction:column;
  gap:24px;
}

.workshop-card{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);
  gap:20px;
  padding:18px 18px 20px;
  border-radius:24px;
  border:1px solid var(--line);
  background:rgba(10,10,12,0.75);
  box-shadow:0 18px 40px rgba(0,0,0,0.3);
  overflow:hidden;
}

.workshop-media{
  position:relative;
  border-radius:18px;
  overflow:hidden;
  background:#050506;
}

.workshop-media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  filter:grayscale(0.1);
  transform:scale(1.02);
  transition:transform .5s ease, filter .5s ease, opacity .5s ease;
}

.workshop-card:hover .workshop-media img,
.workshop-card:focus-within .workshop-media img{
  transform:scale(1.06);
  filter:grayscale(0);
}

.workshop-body{
  display:flex;
  flex-direction:column;
  gap:8px;
  justify-content:center;
}

.workshop-body .eyebrow{
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--muted);
}

.workshop-body h3{
  font-size:1.3rem;
  margin:0 0 4px;
}

.workshop-body p{
  margin:0;
  color:var(--muted);
}

/* Alternate layout on desktop: image left / image right */
@media (min-width: 880px){
  .workshop-card:nth-child(even){
    grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);
  }
  .workshop-card:nth-child(even) .workshop-media{
    order:2;
  }
  .workshop-card:nth-child(even) .workshop-body{
    order:1;
  }
}

/* Mobile: stack image above text */
@media (max-width: 879px){
  .workshop-card{
    grid-template-columns:1fr;
    padding:14px 14px 16px;
  }
  .workshop-media img{
    max-height:220px;
  }
}


/* === OPEN CALLS PAGE === */
main.wrap{
  padding:40px 0;
}

main.wrap > section > h1{
  margin-bottom:14px;
  font-size:clamp(2rem, 5vw, 2.8rem);
}

main.wrap > section > .lede{
  font-size:1.1rem;
  color:var(--muted);
  margin-bottom:40px;
  line-height:1.8;
  max-width:720px;
}

main.wrap > section > .tile{
  margin-bottom:32px;
}

main.wrap hr{
  border:none;
  border-top:1px solid var(--line);
  margin:48px 0 42px;
  opacity:0.5;
}

main.wrap > section > section{
  margin-top:32px;
}

main.wrap > section > section > h3{
  margin:0 0 28px;
  font-size:1.5rem;
  padding-bottom:16px;
  border-bottom:1px solid var(--line);
}

main.wrap > section > section .tile{
  margin-bottom:24px;
}

main.wrap .tile-body h4{
  margin:0 0 12px;
  font-size:1.15rem;
}

main.wrap .tile-body .link{
  display:inline-block;
  margin-top:12px;
  padding:10px 0;
}

@media (max-width:640px){
  main.wrap{
    padding:24px 0;
  }

  main.wrap > section > h1{
    font-size:1.8rem;
    margin-bottom:12px;
  }

  main.wrap > section > .lede{
    margin-bottom:32px;
    font-size:1rem;
  }

  main.wrap hr{
    margin:32px 0 28px;
  }

  main.wrap > section > section{
    margin-top:24px;
  }

  main.wrap > section > section > h3{
    margin:0 0 20px;
    font-size:1.25rem;
    padding-bottom:12px;
  }

  main.wrap > section > .tile,
  main.wrap > section > section .tile{
    margin-bottom:20px;
  }

  .tile-body{
    padding:18px 16px;
    gap:12px;
  }

  .tile-info{
    padding:16px 14px;
  }
}

/* Optional (safe site-wide): avoid iOS 100vw quirk */
html, body { max-width: 100%; overflow-x: hidden; }
img, video, iframe { max-width: 100%; height: auto; }
/* --- Fix hero overflow on mobile --- */
@media (max-width: 640px) {
  /* Prevent .wrap inside hero from using fixed desktop width */
  .hero .wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding-inline: 16px;
    
    box-sizing: border-box;
  }

  /* Clip any leftover pixels from transforms/margins */
  .hero { overflow: hidden; }

  /* Marquee safeguard */
  .hero .marquee {
    width: 100%;
    overflow: hidden;
  }
}
/* --- Partners marquee: prevent page-wide overflow --- */
.partners { width: 100%; }
.partners-marquee{
  position: relative;
  width: 100%;
  overflow: hidden;      /* clip anything wider than the viewport */
  contain: layout paint; /* isolate layout so it can't widen <body> */
}

.partners-track{
  display: inline-flex;
  gap: 40px;
  width: max-content;    /* size to contents without affecting page width */
  will-change: transform;
  animation: partners-slide 22s linear infinite;
}

.partners-track img{
  flex: 0 0 auto;
  height: 38px;          /* pick a fixed height you like */
  width: auto;
}

/* simple loop */
@keyframes partners-slide{
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}


/* === Radio now-playing bar === */
.radio-nowplaying{
  position:fixed;
  left:50%;
  transform:translateX(-50%);
  /* Stay just above the OS home bar / notch if present */
  bottom:calc(env(safe-area-inset-bottom, 0px) + 8px);

  z-index:999; /* Above back-to-top and most content */
  padding:8px 24px;
  
  background:rgba(10,10,11,0.9);
  border:1px solid var(--line);
  box-shadow:0 10px 30px rgba(0,0,0,0.45);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);

  display:none;
  align-items:center;
  gap:40px;

  /* Slight max width so it doesn’t touch edges */
  max-width:calc(100% - 24px);
}


/* visible state */
.radio-nowplaying.is-visible{
  display:flex;
}

/* Artwork */
.radio-nowplaying-art{
  width:52px;
  height:52px;
  border-radius:10px;
  overflow:hidden;
  flex-shrink:0;
  background:#111;
}

.radio-nowplaying-art img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* Text */
.radio-nowplaying-meta{
  
  flex-direction:column;
  gap:0px;
  min-width:0;
}

.radio-nowplaying-meta .eyebrow{
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.12em;
  color:var(--muted);
  margin:0;
}

.radio-nowplaying-author{
  font-size:12px;
  color:var(--muted);
  margin:2px 0 0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.radio-nowplaying-title{
  font-size:13px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin:2px 0 0;
}

/* Controls */
.radio-nowplaying-controls{
  display:flex;
  gap:10px;
  margin-left:6px;
  flex-shrink:0;
}

.radio-nowplaying-btn{
  width:32px;
  height:32px;
  border-radius:50%;
  border:1px solid var(--line1);
  background:var(--fg);
  color:var(--bg);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
}

.radio-nowplaying-btn:focus-visible{
  outline:2px solid var(--fg);
  outline-offset:2px;
}

.radio-nowplaying-icon{
  font-size:12px;
  line-height:1;
}

/* Slightly tighter on small screens */
@media (max-width: 640px){
  .radio-nowplaying{
    bottom:12px;
    padding:8px 10px;
  }
}
