/* PAHeurope.org — Performing Arts Health Europe
   Palette anchored on the European blue with a gold signal colour. */

:root {
  --paper: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f5f7fc;
  --ink: #101a2e;
  --muted: #5d6a83;
  --blue: #17369c;
  --blue-soft: #e3e9fb;
  --gold: #f2b705;
  --edge: rgba(16, 26, 46, .08);
  --lift: 0 1px 2px rgba(16, 26, 46, .05), 0 8px 22px -14px rgba(16, 26, 46, .35);
  --radius: 16px;
  --measure: 46rem;
  --prose: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0d1220;
    --surface: #151d30;
    --surface-2: #1a2338;
    --ink: #eef2fa;
    --muted: #9aa7c0;
    --blue: #93aaff;
    --blue-soft: #22304f;
    --gold: #ffcf45;
    --edge: rgba(255, 255, 255, .09);
    --lift: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 26px -16px rgba(0, 0, 0, .8);
  }
}

* { box-sizing: border-box; }

html { background: var(--paper); }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 1080px) {
  :root { --measure: 64rem; }
}

main {
  width: min(100% - 2rem, var(--measure));
  margin-inline: auto;
  padding: clamp(1.5rem, 6vw, 3.5rem) 0 3rem;
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
}

a { color: var(--blue); }

:focus-visible {
  outline: 2.5px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(120% 140% at 8% 0%, rgba(23, 54, 156, .16), transparent 58%),
    radial-gradient(90% 120% at 100% 8%, rgba(242, 183, 5, .22), transparent 55%),
    var(--surface);
  border-radius: 26px;
  padding: clamp(1.5rem, 5vw, 2.4rem);
  box-shadow: var(--lift);
}

.kicker {
  margin: 0 0 .5rem;
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--blue);
}

h1 {
  font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.05rem, 9.6vw, 4.5rem);
  line-height: .94;
  letter-spacing: -.045em;
  overflow-wrap: break-word;
  margin: 0 0 .6rem;
}

h1 .dot { color: var(--muted); font-weight: 500; }

.lede {
  margin: 0;
  max-width: var(--prose);
  font-size: clamp(1rem, 3.4vw, 1.12rem);
  color: var(--muted);
}

.status {
  display: inline-block;
  margin: 1.1rem 0 .2rem;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: var(--gold);
  color: #2c2100;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .002em;
}

@media (prefers-color-scheme: dark) {
  .status { color: #241a00; }
}

/* ---------- intro + channels ---------- */

.intro {
  margin: 1.5rem .25rem .8rem;
  max-width: var(--prose);
  color: var(--ink);
}

.fineprint {
  display: grid;
  gap: .2rem 2rem;
  margin: 0 .25rem 1.3rem;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.5;
}

.fineprint p { margin: .5rem 0 0; }

@media (min-width: 720px) {
  .fineprint { grid-template-columns: 1fr 1fr; }
}

.channels {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 2.4rem;
}

.channel {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 46px;
  padding: .6rem 1rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}

.channel.is-live {
  background: var(--blue);
  color: #fff;
  box-shadow: var(--lift);
}

@media (prefers-color-scheme: dark) {
  .channel.is-live { color: #0d1220; }
}

.channel.is-live:hover { filter: brightness(1.08); }

.channel.is-pending {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--edge);
}

.channel.is-quiet {
  background: var(--surface);
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--edge);
}

.channel.is-quiet:hover {
  color: var(--blue);
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.icon { width: 20px; height: 20px; flex: none; }

/* ---------- sections ---------- */

section + section { margin-top: 2.6rem; }

h2 {
  font-family: "Bricolage Grotesque", Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  letter-spacing: -.025em;
  margin: 0 0 .7rem;
}

.note {
  margin: -.2rem 0 1rem;
  color: var(--muted);
  font-size: .93rem;
  max-width: 36rem;
}

.sources ol,
footer p { max-width: var(--prose); }

/* ---------- society cards ---------- */

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}

@media (min-width: 1080px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .card { align-content: start; }
}

.card {
  display: grid;
  grid-template-columns: 2.9rem 1fr;
  gap: .85rem;
  align-items: start;
  background: var(--surface);
  border-radius: var(--radius);
  padding: .95rem 1rem;
  transition: transform .16s ease, box-shadow .16s ease;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-1px);
    box-shadow: var(--lift);
  }
}

.flag {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 12px;
  background: var(--surface-2);
  font-size: 1.5rem;
  line-height: 1;
}

.card h3 {
  margin: .15rem 0 .1rem;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -.01em;
}

.local,
.meta {
  margin: 0;
  color: var(--muted);
  font-size: .91rem;
  line-height: 1.45;
}

.meta { margin-top: .25rem; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .55rem;
}

.site,
.ig {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 34px;
  padding: .25rem .7rem;
  border-radius: 999px;
  font-size: .87rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--blue-soft);
  color: var(--blue);
}

.ig {
  background: transparent;
  box-shadow: inset 0 0 0 1.5px var(--edge);
  color: var(--muted);
}

.site:hover { filter: brightness(.96); }

.ig:hover {
  color: var(--blue);
  box-shadow: inset 0 0 0 1.5px currentColor;
}

.ig .icon { width: 16px; height: 16px; }

/* ---------- country chips ---------- */

.chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.chips a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 38px;
  padding: .3rem .8rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
}

.chips a:hover {
  color: var(--ink);
  background: var(--blue-soft);
}

.chips span { font-size: 1.05rem; line-height: 1; }


/* ---------- event calendar ---------- */

.calendar {
  position: relative;
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.calendar-load {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  min-height: 15rem;
  padding: 2rem 1.5rem;
  border: 0;
  border-radius: inherit;
  background:
    radial-gradient(90% 130% at 100% 0%, rgba(242, 183, 5, .18), transparent 60%),
    var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--edge);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow .16s ease;
}

.calendar-load:hover { box-shadow: inset 0 0 0 1.5px var(--blue); }

.calendar-load .icon { width: 26px; height: 26px; color: var(--blue); }

.calendar-load span {
  max-width: 24rem;
  color: var(--muted);
  font-size: .85rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}

.calendar.is-loaded {
  box-shadow: inset 0 0 0 1.5px var(--edge);
}

.calendar iframe {
  display: block;
  width: 100%;
  height: clamp(24rem, 62vh, 34rem);
  border: 0;
}

.calendar-links { margin: .55rem 0 0; }

.calendar-hint { margin: 1rem 0 0; }

/* ---------- sources + footer ---------- */

.sources ol {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  font-size: .9rem;
}

.sources li { margin-bottom: .6rem; }

.sources a { overflow-wrap: anywhere; }

footer {
  margin-top: 2.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--edge);
  color: var(--muted);
  font-size: .89rem;
}

footer p { margin: .2rem 0; }

/* ---------- hover preview ---------- */

#preview {
  position: fixed;
  z-index: 50;
  width: 300px;
  padding: 6px 6px 4px;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(16, 26, 46, .55), 0 0 0 1px var(--edge);
  opacity: 0;
  transition: opacity .16s ease;
  pointer-events: none;
}

#preview.is-open { opacity: 1; }

#preview img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top center;
  border-radius: 9px;
  background: var(--surface-2);
}

.preview-url {
  display: block;
  padding: .35rem .3rem .1rem;
  font-size: .76rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
