/* ===========================================================
   MARIA KALLIONPÄÄ - work detail pages
   Shared stylesheet for /works/*.html
   Mirrors the editorial / sonic / cream language of index.html
=========================================================== */

:root{
  --bg: #ECE5D3;
  --bg-2: #F2EBD9;
  --bg-3: #E5DDC7;
  --ink: #14110B;
  --ink-2: #2C2820;
  --mute: #6E6757;
  --line: #C9C0AB;
  --line-2: #B6AC93;
  --accent: #1F3A52;
  --accent-2: #C45C2D;

  --f-display: "Instrument Serif", "Fraunces", Georgia, serif;
  --f-serif: "Fraunces", Georgia, serif;
  --f-sans: "DM Sans", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --max: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*,*::before,*::after{ box-sizing: border-box }
html,body{ margin: 0; padding: 0 }
html{ scroll-behavior: smooth }

body{
  font-family: var(--f-sans);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
}

img{ max-width: 100%; display: block }
a{ color: inherit; text-decoration: none }
::selection{ background: var(--accent); color: var(--bg-2) }

a:focus-visible,
button:focus-visible{
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Subtle paper grain - matches index.html */
body::before{
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: .35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.07  0 0 0 0 0.04  0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ============= NAV (slim, persistent) ================================ */
.nav{
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px var(--gutter);
  background: rgba(236, 229, 211, .82);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.nav__brand{
  font-family: var(--f-display);
  font-style: italic;
  font-size: 20px;
  letter-spacing: -.01em;
}
.nav__brand b{ font-style: normal; font-weight: 400 }
.nav__back{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink-2);
  min-height: 44px;
  padding: 6px 0;
  transition: color .25s var(--ease);
}
.nav__back svg{ width: 14px; height: 14px }
.nav__back:hover{ color: var(--accent) }

/* ============= HERO ================================================== */
.work-hero{
  position: relative;
  padding: 140px var(--gutter) 60px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.work-hero__inner{
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.work-hero__meta{
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  display: flex; flex-wrap: wrap; gap: 14px 24px;
}
.work-hero__meta b{
  color: var(--accent);
  font-weight: 400;
}
.work-hero__title{
  font-family: var(--f-display);
  font-size: clamp(48px, 9vw, 140px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.02em;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}
.work-hero__title em{
  font-style: italic;
  color: var(--accent);
}
.work-hero__subtitle{
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 2.2vw, 28px);
  line-height: 1.35;
  color: var(--ink-2);
  margin: 0;
  max-width: 720px;
}
.work-hero__lede{
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 680px;
}
.work-hero__lede em{ font-style: italic; color: var(--accent) }

/* Decorative waveform behind hero - matches the homepage feel */
.work-hero__decor{
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  z-index: 0;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 80% 30%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 70%);
  mask-image: radial-gradient(ellipse 70% 60% at 80% 30%, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 70%);
}
.work-hero__decor svg{ width: 100%; height: 100%; display: block }
.work-hero__inner{ position: relative; z-index: 1 }

/* ============= SECTION primitives ==================================== */
.section{
  padding: 80px var(--gutter);
}
.wrap{
  max-width: var(--max);
  margin: 0 auto;
}
.section__head{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 40px;
  align-items: end;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 40px;
}
.section__num{
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}
.section__title{
  font-family: var(--f-display);
  font-size: clamp(28px, 4.5vw, 56px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.02em;
  margin: 0;
}
.section__title em{ font-style: italic; color: var(--accent) }

/* ============= PROGRAMME NOTE prose =================================== */
.prose{
  font-family: var(--f-serif);
  font-weight: 300;
  font-size: clamp(17px, 1.25vw, 19px);
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 720px;
}
.prose p{ margin: 0 0 22px }
.prose p:first-of-type::first-letter{
  font-family: var(--f-display);
  font-style: italic;
  font-size: 4em;
  float: left;
  line-height: .85;
  margin: 6px 14px 0 0;
  color: var(--accent);
}
.prose p:first-of-type{ min-height: 60px }
.prose em{ font-style: italic }
.prose strong{ font-weight: 500; color: var(--ink) }
.prose blockquote{
  border-left: 2px solid var(--accent);
  padding: 6px 0 6px 24px;
  margin: 32px 0;
  font-style: italic;
  font-size: 1.05em;
  color: var(--ink);
}
.prose blockquote cite{
  display: block;
  font-style: normal;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 10px;
}
.prose a{
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
  transition: text-decoration-color .25s var(--ease);
}
.prose a:hover{ text-decoration-color: var(--accent) }

/* ============= FACTS BLOCK =========================================== */
.facts{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px 32px;
  padding: 28px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 0 0 40px;
}
.facts__item-label{
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 8px;
}
.facts__item-val{
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
}
.facts__item-val em{ font-style: italic }

/* ============= TIMELINE LIST (premiere / performances) =============== */
.timeline{
  list-style: none;
  margin: 0; padding: 0;
}
.timeline li{
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.timeline__date{
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--mute);
}
.timeline__detail{
  font-family: var(--f-serif);
  font-size: 16px;
  color: var(--ink-2);
  line-height: 1.45;
}
.timeline__detail b{
  display: block;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 2px;
}
.timeline li:first-child{ border-top: 1px solid var(--line) }

/* ============= MEDIA EMBED =========================================== */
.media{
  margin: 0 0 40px;
}
.media__caption{
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 12px;
}
.media iframe{
  width: 100%;
  border: 1px solid var(--line);
  display: block;
  background: var(--bg-2);
}

/* ============= PRESS QUOTE BLOCK ===================================== */
.press-list{
  display: grid;
  gap: 20px;
}
.press-card{
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 24px 28px;
}
.press-card__source{
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.press-card__quote{
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  margin: 0 0 12px;
}
.press-card__attr{
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: .04em;
}

/* ============= RELATED PUBLICATIONS =================================== */
.refs{
  list-style: none; margin: 0; padding: 0;
}
.refs li{
  font-family: var(--f-serif);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.refs li:first-child{ border-top: 1px solid var(--line) }
.refs em{ font-style: italic }
.refs a{
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}
.refs a:hover{ text-decoration-color: var(--accent) }

/* ============= LISTEN CTA (SoundCloud / external) ==================== */
.cta-listen{
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 0;
  padding: 14px 22px;
  background: var(--accent-2);
  color: var(--bg);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.cta-listen:hover{
  transform: translateY(-2px);
  background: var(--ink);
}
.cta-listen__icon{
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--accent-2);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: color .25s var(--ease);
}
.cta-listen:hover .cta-listen__icon{ color: var(--ink) }
.cta-listen__icon svg{
  width: 11px; height: 11px;
  fill: currentColor;
  margin-left: 1px;
}

/* ============= NEXT / PREV WORK NAV ================================== */
.workswitch{
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.workswitch a{
  padding: 32px var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background .25s var(--ease);
}
.workswitch a:hover{ background: var(--bg-2) }
.workswitch a + a{ border-left: 1px solid var(--line); text-align: right; align-items: flex-end }
.workswitch__label{
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
}
.workswitch__title{
  font-family: var(--f-display);
  font-style: italic;
  font-size: clamp(22px, 3vw, 36px);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--ink);
}
.workswitch__title em{ font-style: normal }

/* ============= FOOTER ================================================ */
.footer{
  padding: 60px var(--gutter) 80px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  text-align: center;
}
.footer a{
  color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.footer a:hover{ color: var(--accent); border-bottom-color: var(--accent) }

/* ============= RESPONSIVE ============================================ */
@media (max-width: 700px){
  .work-hero{ padding: 110px var(--gutter) 40px }
  .work-hero__title{ font-size: clamp(40px, 14vw, 80px) }
  .section{ padding: 56px var(--gutter) }
  .section__head{
    grid-template-columns: 1fr;
    gap: 8px;
    padding-bottom: 14px;
    margin-bottom: 28px;
  }
  .timeline li{
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .workswitch{ grid-template-columns: 1fr }
  .workswitch a + a{ border-left: 0; border-top: 1px solid var(--line); text-align: left; align-items: flex-start }
  .prose p:first-of-type::first-letter{ font-size: 3.4em }
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  html{ scroll-behavior: auto }
}
