/* Resonance site styles (redesign). Colours are tokens so light and dark mode
   share one stylesheet. The theme follows the system unless the visitor picks
   one with the toggle, which sets data-theme on <html>. */

@font-face {
  font-family: 'DIN Alt';
  src: url('/fonts/din1451alt.woff2') format('woff2'),
       url('/fonts/din1451alt.woff') format('woff');
  font-display: swap;
}

:root {
  --brand: #ed2a5f;
  --brand-strong: #b1163d;
  --flinta: #ed2cd3;
  --flinta-strong: #a8148f;
  --flinta-soft: #f3dcf0;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --surface-alt: #fdeef2;
  --text: #212529;
  --muted: #5c636a;
  --border: #e3e6ea;
  --header-bg: #ed2a5f;
  --header-text: #ffffff;
  --shadow: 0 6px 24px rgba(33, 37, 41, 0.08);
  --radius: 14px;
  --font-display: 'DIN Alt', 'Arial Narrow', sans-serif;
  --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #ff5c87;
    --brand-strong: #ff86a5;
    --flinta: #f45fe3;
    --flinta-strong: #f78aec;
    --flinta-soft: #3a2338;
    --bg: #141116;
    --surface: #1f1b22;
    --surface-alt: #2a1c22;
    --text: #f2eef4;
    --muted: #b0a8b6;
    --border: #3a333f;
    --header-bg: #b81e4a;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --brand: #ff5c87;
  --brand-strong: #ff86a5;
  --flinta: #f45fe3;
  --flinta-strong: #f78aec;
  --flinta-soft: #3a2338;
  --bg: #141116;
  --surface: #1f1b22;
  --surface-alt: #2a1c22;
  --text: #f2eef4;
  --muted: #b0a8b6;
  --border: #3a333f;
  --header-bg: #b81e4a;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--brand-strong); }
a:hover { color: var(--brand); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: normal;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip-link:focus { left: 1rem; z-index: 100; background: var(--surface); padding: 0.5rem 1rem; }

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
}

.site-header__logo {
  display: block;
  flex: none;
  width: 4.5rem;
  margin-right: auto;
}
.site-header__logo img { display: block; width: 100%; }

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  color: var(--header-text);
  font-family: var(--font-display);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-bottom-color: currentColor; }

.site-header__tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-button,
.lang-select {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  min-width: 2.25rem;
  padding: 0 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: transparent;
  color: var(--header-text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
}
.icon-button:hover,
.lang-select:hover { background: rgba(255, 255, 255, 0.15); color: var(--header-text); }
.icon-button:focus-visible,
.lang-select:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.lang-select {
  appearance: none;
  padding: 0 0.85rem;
  text-transform: uppercase;
}
.lang-select option { color: #212529; }

.site-header__menu { display: none; }

@media (max-width: 860px) {
  .site-header__menu { display: inline-flex; }
  .site-header__social { display: none; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--header-bg);
    padding: 0.5rem 1rem 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 0.75rem 0; font-size: 1.35rem; border-bottom: 1px solid rgba(255, 255, 255, 0.2); }
}

/* Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  color: #fff;
  background: #111;
  overflow: hidden;
}

.hero__slides {
  position: absolute;
  inset: 0;
}

.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.hero__slide.is-active { opacity: 1; }

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.65) 100%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-top: clamp(5rem, 16vw, 11rem);
  padding-bottom: clamp(2rem, 6vw, 3.5rem);
}

.hero__title {
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero__lead {
  max-width: 36rem;
  font-size: 1.15rem;
  margin: 0 0 1.5rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  background: var(--brand);
  color: #fff;
  border: 2px solid transparent;
}
.button:hover { color: #fff; filter: brightness(1.08); }
.button--flinta { background: var(--flinta); }
.button--ghost { background: transparent; border-color: currentColor; color: var(--brand-strong); }
.button--ghost:hover { color: var(--brand); }

/* Sections -------------------------------------------------------------- */

.section { padding: clamp(2.5rem, 7vw, 4.5rem) 0; }
.section--alt { background: var(--surface-alt); }

.section__title {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  text-transform: uppercase;
  color: var(--brand-strong);
}

.intro {
  max-width: 44rem;
}
.intro__welcome { font-style: italic; color: var(--muted); }

/* Jam tabs -------------------------------------------------------------- */

.jam-tabs {
  position: relative;
  margin-top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 5.5rem;
}

.jam-tabs__list {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.jam-tabs__tab {
  flex: 1;
  padding: 1.1rem 1rem 0.9rem;
  border: 0;
  border-bottom: 4px solid transparent;
  background: none;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  letter-spacing: 0.02em;
  cursor: pointer;
}
.jam-tabs__tab:hover { color: var(--text); }
.jam-tabs__tab:focus { outline: none; }
.jam-tabs__tab:focus-visible { outline: 2px solid var(--brand); outline-offset: -4px; }
.jam-tabs__tab[aria-selected="true"] {
  color: var(--brand-strong);
  border-bottom-color: var(--brand);
  background: var(--surface-alt);
}
.jam-tabs__tab--flinta[aria-selected="true"] {
  color: var(--flinta-strong);
  border-bottom-color: var(--flinta);
  background: var(--flinta-soft);
}

/* Inactive panels are hidden without display:none so the calendar widget
   inside can still measure its width. */
.jam-tabs__panel {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  visibility: hidden;
  pointer-events: none;
  padding: 1.5rem;
}
.jam-tabs__panel.is-active {
  position: static;
  visibility: visible;
  pointer-events: auto;
}

.jam-tabs__text { color: var(--muted); margin-top: 0; }

.event-card__flyer {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.25rem;
  padding: 0.75rem;
  border-radius: 10px;
  background: var(--flinta-soft);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.event-card__flyer img { width: 4.5rem; border-radius: 6px; flex: none; }
.event-card__flyer:hover { color: var(--flinta-strong); text-decoration: none; }

/* Rules ----------------------------------------------------------------- */

.rules {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  counter-reset: rule;
}
@media (max-width: 960px) { .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .rules { grid-template-columns: 1fr; } }

.rules li {
  counter-increment: rule;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.rules li::before {
  content: counter(rule);
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1;
  color: var(--brand);
  margin-bottom: 0.5rem;
}
.rules strong { color: var(--text); }

/* Older content pages ----------------------------------------------------
   The archive, membership, awareness and contact pages still use the
   Bootstrap markup from the old site. These rules map it onto the new
   colours and type so it follows light and dark mode. */

:root,
:root:not([data-theme="light"]) {
  --color-bg: var(--bg);
  --color-text: var(--text);
  --color-text-secondary: var(--muted);
}

body { hyphens: manual; overflow-x: clip; }

.main {
  background: transparent;
  padding-top: clamp(2rem, 6vw, 3.5rem);
  padding-bottom: clamp(2rem, 6vw, 3.5rem);
}

.main__title,
.single__title,
.awareness__title,
.summary__title {
  font-family: var(--font-display);
  color: var(--brand-strong);
  text-transform: uppercase;
  transform: none;
  letter-spacing: 0.02em;
}
.main__title,
.awareness__title { font-size: clamp(1.8rem, 4.5vw, 2.6rem); }
.summary__title:hover { color: var(--brand); }

.summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 0.5rem;
}
.summary__image { border-radius: 10px; }

.main a:not(.btn):not(.button):not(.page-link) { color: var(--brand-strong); }

.form-control,
.form-control:focus {
  background-color: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.form-control::placeholder { color: var(--muted); }

.btn-primary {
  border-radius: 999px;
  font-weight: 700;
}

.page-link { background-color: var(--surface); border-color: var(--border); color: var(--brand-strong); }
.page-link:hover { background-color: var(--surface-alt); border-color: var(--border); color: var(--brand); }
.page-item.disabled .page-link { background-color: var(--surface); border-color: var(--border); color: var(--muted); }

/* On older pages the footer sits inside .container; let it span the page. */
.container > .site-footer { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.container > .site-footer .wrap { max-width: 72rem; }

/* Footer ---------------------------------------------------------------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer__links a { color: var(--text); text-decoration: none; }
.site-footer__links a:hover { color: var(--brand); }
.site-footer__social { display: flex; gap: 0.75rem; font-size: 1.4rem; }
.site-footer__social a { color: var(--text); }

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

.main iframe { max-width: 100%; margin-top: 1.5rem; border: 0; border-radius: 10px; }
