/* ============================================
   Uplands Spelmansförbund — Style System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,500;0,8..60,600;1,8..60,400;1,8..60,500&display=swap');

/* --- CSS Variables --- */
:root {
  --color-primary: #2d4a2d;
  --color-primary-light: #3d6a3d;
  --color-primary-dark: #1e331e;
  --color-accent: #8b1a1a;
  --color-accent-light: #a82828;
  --color-gold: #c8a84b;
  --color-gold-light: #dbc06a;
  --color-cream: #f5f0e8;
  --color-cream-dark: #ebe4d6;
  --color-dark: #1a1a18;
  --color-light: #e8e0d0;
  --color-white: #faf8f4;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Source Serif 4', serif;
  --border-radius: 4px;
  --border-radius-lg: 8px;
  --shadow: 0 2px 16px rgba(45, 74, 45, 0.08);
  --shadow-hover: 0 8px 32px rgba(45, 74, 45, 0.14);
  --shadow-elevated: 0 12px 40px rgba(45, 74, 45, 0.12);
  --transition-smooth: 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --max-width: 1200px;
  --header-height: 80px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* The off-canvas mobile menu sits just outside the right edge; without this
     phones treat the page as twice as wide and zoom out / scroll sideways. */
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--color-dark);
  background-color: var(--color-cream);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-smooth);
}

a:hover {
  color: var(--color-accent-light);
}

a:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: 2px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--color-primary-dark);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1em;
  font-size: 1.05rem;
}

p:last-child {
  margin-bottom: 0;
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background-color: var(--color-white);
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45, 74, 45, 0.08);
  height: var(--header-height);
  transition: box-shadow var(--transition-smooth);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(45, 74, 45, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 50px;
  width: auto;
}

.site-logo-text {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.site-logo-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--color-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* --- Navigation --- */
.main-nav {
  display: flex;
  align-items: center;
  align-self: flex-end;
  padding-bottom: 14px;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.nav-list a,
.submenu-toggle {
  display: block;
  padding: 0.5rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-dark);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: color var(--transition-smooth), background-color var(--transition-smooth);
  white-space: nowrap;
}

.nav-list a:hover,
.submenu-toggle:hover {
  color: var(--color-primary);
  background-color: rgba(45, 74, 45, 0.06);
}

.nav-list a:focus-visible,
.submenu-toggle:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.nav-list a:active,
.submenu-toggle:active {
  background-color: rgba(45, 74, 45, 0.12);
}

.nav-list a.active,
.submenu-toggle.active {
  color: var(--color-primary);
  background-color: rgba(45, 74, 45, 0.08);
  font-weight: 600;
}

/* Submenu (dropdown) */
.has-submenu {
  position: relative;
}

.submenu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  line-height: inherit;
}

.submenu-toggle::after {
  content: '';
  width: 0.38em;
  height: 0.38em;
  margin-top: -0.2em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform var(--transition-spring);
}

.has-submenu.open .submenu-toggle::after {
  transform: translateY(0.15em) rotate(-135deg);
}

.submenu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 220px;
  list-style: none;
  padding: 0.4rem;
  background: var(--color-white);
  border: 1px solid rgba(45, 74, 45, 0.08);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 2px 6px rgba(45, 74, 45, 0.06), var(--shadow-elevated);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  /* Note: do not transition `visibility` here – a delayed visibility transition
     leaves a ghost of the hidden menu painted over the hero in Chrome. */
  transition: opacity var(--transition-smooth), transform var(--transition-spring);
  z-index: 1002;
}

/* Invisible bridge so the menu stays open while the pointer moves down to it */
.submenu::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -0.6rem;
  height: 0.6rem;
}

.has-submenu.open .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (hover: hover) and (min-width: 1025px) {
  .has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .has-submenu:hover .submenu-toggle::after {
    transform: translateY(0.15em) rotate(-135deg);
  }
}

.submenu a {
  padding: 0.6rem 0.9rem;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--border-radius);
  transition: background-color var(--transition-smooth);
}

.hamburger:hover {
  background-color: rgba(45, 74, 45, 0.06);
}

.hamburger:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-dark);
  border-radius: 2px;
  transition: transform var(--transition-smooth), opacity var(--transition-smooth);
  transform-origin: center;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav */
@media (max-width: 1024px) {
  .hamburger {
    display: flex;
  }

  .nav-list {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100vw;
    height: calc(100dvh - var(--header-height));
    z-index: 1001;
    flex-direction: column;
    /* Solid background: a nested backdrop-filter inside the (already blurred)
       header renders see-through, letting page content show behind the menu. */
    background: var(--color-cream);
    padding: 2rem 1.5rem;
    gap: 0.25rem;
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    overflow-y: auto;
  }

  .nav-list.open {
    transform: translateX(0);
  }

  .nav-list a {
    font-size: 1.15rem;
    padding: 0.85rem 1rem;
  }

  /* Submenu is always shown expanded inside the mobile menu */
  .submenu-toggle {
    display: block;
    width: 100%;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
    padding: 1.1rem 1rem 0.35rem;
    cursor: default;
    pointer-events: none;
  }

  .submenu-toggle::after {
    display: none;
  }

  .submenu-toggle.active {
    background: none;
  }

  .submenu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    padding: 0 0 0.5rem 0.75rem;
    margin-left: 1rem;
    background: none;
    border: none;
    border-left: 2px solid rgba(200, 168, 75, 0.5);
    border-radius: 0;
    box-shadow: none;
    transition: none;
  }

  .submenu::before {
    display: none;
  }

  .submenu a {
    padding: 0.7rem 1rem;
  }
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: 7rem 0 6rem;
  overflow: hidden;
  background: linear-gradient(160deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, #3d6040 100%);
  color: var(--color-cream);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 70% at 12% 45%, rgba(200, 168, 75, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 55% 75% at 88% 10%, rgba(139, 26, 26, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse 100% 55% at 50% 115%, rgba(0, 0, 0, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 35% 45% at 92% 85%, rgba(200, 168, 75, 0.10) 0%, transparent 50%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--color-cream);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35), 0 8px 48px rgba(0, 0, 0, 0.2);
}

.hero-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  color: var(--color-gold-light);
  margin-bottom: 2rem;
  font-weight: 400;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(245, 240, 232, 0.85);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* Decorative divider */
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.ornament::before,
.ornament::after {
  content: '';
  width: 60px;
  height: 1px;
  background: var(--color-gold);
  opacity: 0.5;
}

.ornament svg {
  width: 20px;
  height: 20px;
  fill: var(--color-gold);
  opacity: 0.7;
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  position: relative;
  padding: 5rem 0 4rem;
  background: linear-gradient(160deg, var(--color-primary-dark) 0%, var(--color-primary) 55%, #3d6040 100%);
  color: var(--color-cream);
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 80% at 8% 50%, rgba(200, 168, 75, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 92% 15%, rgba(139, 26, 26, 0.12) 0%, transparent 48%),
    radial-gradient(ellipse 90% 50% at 50% 115%, rgba(0, 0, 0, 0.40) 0%, transparent 55%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  pointer-events: none;
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero h1 {
  color: var(--color-cream);
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3), 0 6px 40px rgba(0, 0, 0, 0.15);
}

.page-hero p {
  color: rgba(245, 240, 232, 0.8);
  font-size: 1.1rem;
  max-width: 600px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth), background-color var(--transition-smooth);
  line-height: 1.4;
}

.btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-cream);
  box-shadow: 0 2px 12px rgba(139, 26, 26, 0.2);
}

.btn--primary:hover {
  background-color: var(--color-accent-light);
  color: var(--color-cream);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(139, 26, 26, 0.3);
}

.btn--secondary {
  background-color: transparent;
  color: var(--color-cream);
  border: 1.5px solid rgba(245, 240, 232, 0.4);
}

.btn--secondary:hover {
  background-color: rgba(245, 240, 232, 0.1);
  color: var(--color-cream);
  border-color: rgba(245, 240, 232, 0.6);
  transform: translateY(-1px);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn--outline:hover {
  background-color: var(--color-primary);
  color: var(--color-cream);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45, 74, 45, 0.2);
}

.btn--gold {
  background-color: var(--color-gold);
  color: var(--color-dark);
  box-shadow: 0 2px 12px rgba(200, 168, 75, 0.25);
}

.btn--gold:hover {
  background-color: var(--color-gold-light);
  color: var(--color-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(200, 168, 75, 0.35);
}

/* --- Cards --- */
.card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth);
  border: 1px solid rgba(45, 74, 45, 0.05);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  box-shadow: 0 4px 12px rgba(45, 74, 45, 0.15);
}

.card-icon svg {
  width: 22px;
  height: 22px;
  fill: var(--color-cream);
}

.card h3 {
  margin-bottom: 0.75rem;
}

.card p {
  color: #555;
  font-size: 0.98rem;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--color-accent);
  transition: gap var(--transition-smooth);
}

.card-link:hover {
  gap: 0.6rem;
}

/* Grid layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  color: #666;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.section-header .ornament {
  margin-top: 1rem;
}

/* --- Info Box --- */
.info-box {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: var(--color-cream);
  border-radius: var(--border-radius-lg);
  padding: 2rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.info-box::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(200, 168, 75, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.info-box h3 {
  color: var(--color-gold-light);
  margin-bottom: 0.75rem;
}

.info-box p {
  color: rgba(245, 240, 232, 0.85);
}

.info-box .btn {
  margin-top: 1rem;
}

/* --- News Cards --- */
.news-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth);
  border: 1px solid rgba(45, 74, 45, 0.05);
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.news-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  position: relative;
  overflow: hidden;
}

.news-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
}

.news-card-body {
  padding: 1.5rem;
}

.news-card-date {
  font-size: 0.82rem;
  color: var(--color-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.news-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.news-card-body p {
  font-size: 0.92rem;
  color: #666;
}

/* --- Table --- */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.styled-table thead {
  background: var(--color-primary);
  color: var(--color-cream);
}

.styled-table th {
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.styled-table td {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--color-light);
  font-size: 0.95rem;
}

.styled-table tbody tr:last-child td {
  border-bottom: none;
}

.styled-table tbody tr:hover {
  background-color: rgba(45, 74, 45, 0.03);
}

/* --- Footer --- */
.site-footer {
  background: var(--color-dark);
  color: rgba(245, 240, 232, 0.7);
  padding: 3.5rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.footer-brand .site-logo img {
  height: 40px;
  margin-bottom: 1rem;
  filter: brightness(1.2);
}

.footer-brand p {
  font-size: 0.92rem;
  color: rgba(245, 240, 232, 0.6);
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-display);
  color: var(--color-cream);
  font-size: 1rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: rgba(245, 240, 232, 0.6);
  font-size: 0.9rem;
  transition: color var(--transition-smooth);
}

.footer-col a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  border-top: 1px solid rgba(245, 240, 232, 0.1);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.4);
}

.footer-social {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 1rem 0.45rem 0.75rem;
  border-radius: 100px;
  background: rgba(245, 240, 232, 0.08);
  color: rgba(245, 240, 232, 0.8);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color var(--transition-smooth), color var(--transition-smooth), transform var(--transition-spring);
}

.footer-social:hover {
  background: rgba(200, 168, 75, 0.2);
  color: var(--color-cream);
  transform: translateY(-2px);
}

.footer-social:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.footer-social:active {
  transform: translateY(0) scale(0.97);
}

.footer-social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }
.animate-in:nth-child(6) { animation-delay: 0.6s; }

.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in scroll-reveal containers */
.scroll-reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.scroll-reveal-stagger.visible > *:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal-stagger.visible > *:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal-stagger.visible > *:nth-child(3) { transition-delay: 0.15s; }
.scroll-reveal-stagger.visible > *:nth-child(4) { transition-delay: 0.2s; }
.scroll-reveal-stagger.visible > *:nth-child(5) { transition-delay: 0.25s; }
.scroll-reveal-stagger.visible > *:nth-child(6) { transition-delay: 0.3s; }

.scroll-reveal-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* --- Calendar --- */
.external-calendar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: var(--color-white);
  border: 1px solid rgba(45, 74, 45, 0.08);
  border-left: 4px solid var(--color-gold);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow);
  color: var(--color-dark);
  text-decoration: none;
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth);
}

.external-calendar:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  color: var(--color-dark);
}

.external-calendar:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.external-calendar:active {
  transform: translateY(0) scale(0.99);
}

.external-calendar__text {
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}

.external-calendar__text strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--color-primary-dark);
}

.external-calendar__text span {
  font-size: 0.9rem;
  color: #6b6b63;
}

.external-calendar__cta {
  flex-shrink: 0;
  padding: 0.45rem 1.1rem;
  border-radius: 100px;
  background: var(--color-primary);
  color: var(--color-cream);
  font-size: 0.9rem;
  font-weight: 600;
}

.calendar-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-btn {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1.5px solid var(--color-light);
  background: var(--color-white);
  color: var(--color-dark);
  border-radius: 100px;
  cursor: pointer;
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth), color var(--transition-smooth);
}

.filter-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.filter-btn.active {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-cream);
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.event-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(45, 74, 45, 0.05);
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth);
}

.event-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.event-item {
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.event-item:target {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px rgba(200, 168, 75, 0.35), var(--shadow-hover);
}

.event-date-badge {
  flex-shrink: 0;
  width: 64px;
  height: 72px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-cream);
  box-shadow: 0 4px 12px rgba(45, 74, 45, 0.15);
}

.event-date-badge .day {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.event-date-badge .month {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.event-date-badge .year {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-top: 1px;
}

.events-empty {
  font-style: italic;
  color: #888;
  margin-top: 0.5rem;
}

/* Past events (history) */
.events-past {
  margin-top: 3rem;
}

.events-past summary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1.5px solid var(--color-light);
  background: var(--color-white);
  color: var(--color-dark);
  border-radius: 100px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: border-color var(--transition-smooth), color var(--transition-smooth), transform var(--transition-spring);
}

.events-past summary::-webkit-details-marker {
  display: none;
}

.events-past summary::before {
  content: '';
  width: 0.45em;
  height: 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--transition-spring);
}

.events-past[open] summary::before {
  transform: rotate(45deg);
}

.events-past summary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.events-past summary:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.events-past summary:active {
  transform: scale(0.97);
}

.events-past-list {
  margin-top: 1rem;
}

.events-past .event-item {
  opacity: 0.7;
  box-shadow: none;
}

.events-past .event-item:hover {
  transform: none;
  box-shadow: none;
}

.events-past .event-date-badge {
  filter: grayscale(0.6);
}

.event-details h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.event-meta {
  font-size: 0.88rem;
  color: #888;
  margin-bottom: 0.35rem;
}

.event-tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 100px;
  margin-top: 0.5rem;
}

.event-tag--speltraff {
  background: rgba(45, 74, 45, 0.1);
  color: var(--color-primary);
}

.event-tag--stamma {
  background: rgba(139, 26, 26, 0.1);
  color: var(--color-accent);
}

.event-tag--ovrigt {
  background: rgba(200, 168, 75, 0.15);
  color: #8a7530;
}

@media (max-width: 600px) {
  .event-item {
    flex-direction: column;
    gap: 1rem;
  }
  .event-date-badge {
    width: auto;
    height: auto;
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
  }
  .event-date-badge .month,
  .event-date-badge .year {
    margin-top: 0;
  }
}

/* --- Gallery --- */
.masonry-grid {
  columns: 3;
  column-gap: 1.5rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth);
}

.masonry-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-elevated);
}

.masonry-item img,
.masonry-item .gallery-placeholder {
  width: 100%;
  display: block;
}

.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-cream);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
  position: relative;
  overflow: hidden;
}

.gallery-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
}

.gallery-placeholder span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 8px rgba(0,0,0,0.3);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(26, 26, 24, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  border-radius: var(--border-radius-lg);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.lightbox.open .lightbox-content {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(245, 240, 232, 0.1);
  color: var(--color-cream);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-smooth), transform var(--transition-spring);
}

.lightbox-close:hover {
  background: rgba(245, 240, 232, 0.2);
  transform: scale(1.1);
}

.lightbox-close:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .masonry-grid {
    columns: 2;
    column-gap: 1rem;
  }
  .masonry-item {
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .masonry-grid {
    columns: 1;
  }
}

/* --- Content --- */
.content-block {
  max-width: 800px;
}

.content-block p + p {
  margin-top: 0;
}

.content-block h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.content-block h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content-block ul, .content-block ol {
  margin-bottom: 1em;
  padding-left: 1.5rem;
}

.content-block li {
  margin-bottom: 0.35rem;
}

/* Two-column content */
.content-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .content-2col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Spelman / Person cards --- */
.person-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth);
  border: 1px solid rgba(45, 74, 45, 0.05);
}

.person-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.person-card-img {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.person-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent 60%);
}

.person-card-img svg {
  width: 48px;
  height: 48px;
  fill: rgba(245, 240, 232, 0.3);
  position: relative;
  z-index: 1;
}

.person-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.person-card-body {
  padding: 1.5rem;
}

.person-card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.person-card-body .role {
  font-size: 0.88rem;
  color: var(--color-gold);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.person-card-body p {
  font-size: 0.92rem;
  color: #666;
}

/* --- Group cards --- */
.group-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-gold);
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth);
}

.group-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.group-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.group-card p {
  font-size: 0.92rem;
  color: #666;
}

/* --- Download cards (noter) --- */
.download-card {
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition-spring), box-shadow var(--transition-smooth);
  border: 1px solid rgba(45, 74, 45, 0.05);
}

.download-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.download-card-header {
  padding: 2rem;
  background: linear-gradient(135deg, var(--color-cream-dark) 0%, var(--color-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  position: relative;
}

.download-card-header svg {
  width: 48px;
  height: 48px;
  fill: var(--color-primary);
  opacity: 0.5;
}

.download-card-body {
  padding: 1.5rem;
}

.download-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.download-card-body p {
  font-size: 0.92rem;
  color: #666;
  margin-bottom: 1rem;
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  color: rgba(245, 240, 232, 0.5);
}

.breadcrumb a {
  color: rgba(245, 240, 232, 0.6);
}

.breadcrumb a:hover {
  color: var(--color-gold);
}

/* --- Utility --- */
.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.text-accent { color: var(--color-accent); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
