:root {
  --home-bg: #f5f7fb;
  --home-surface: #ffffff;
  --home-surface-muted: #eef2f7;
  --home-text: #172033;
  --home-text-muted: #5d6a7f;
  --home-primary: #2f5f8f;
  --home-primary-dark: #23496e;
  --home-accent: #d59a2f;
  --home-border: #dce3ec;
  --home-shadow: 0 18px 45px rgba(23, 32, 51, 0.12);
  --home-radius: 1.25rem;
  --home-max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.homepage {
  margin: 0;
  background: var(--home-bg);
  color: var(--home-text);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.6;
}

body.homepage a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: var(--home-surface);
  color: var(--home-primary-dark);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(220, 227, 236, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.site-nav {
  display: flex;
  width: min(calc(100% - 2rem), var(--home-max-width));
  min-height: 4.5rem;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--home-text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 0.75rem;
  background: var(--home-primary);
  color: #ffffff;
  font-weight: 800;
}

.nav-toggle {
  display: none;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--home-border);
  border-radius: 0.75rem;
  background: var(--home-surface);
  color: var(--home-text);
  font: inherit;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links a {
  padding: 0.65rem 0.8rem;
  border-radius: 0.65rem;
  color: var(--home-text-muted);
  font-weight: 650;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  background: var(--home-surface-muted);
  color: var(--home-text);
}

.nav-links .nav-login {
  margin-left: 0.35rem;
  background: var(--home-primary);
  color: #ffffff;
}

.nav-links .nav-login:hover,
.nav-links .nav-login:focus-visible {
  background: var(--home-primary-dark);
  color: #ffffff;
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(100deg, rgba(23, 32, 51, 0.92), rgba(35, 73, 110, 0.72)),
    url("skole.png") center/cover;
  color: #ffffff;
}

.hero-inner {
  width: min(calc(100% - 2rem), var(--home-max-width));
  margin: 0 auto;
  padding: clamp(5.5rem, 10vw, 8.5rem) 0 clamp(4.5rem, 8vw, 7rem);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 1rem;
  color: #f6d792;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.8rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-lead {
  max-width: 680px;
  margin: 1.5rem 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

.button-link {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  background: var(--home-primary);
  color: #ffffff;
  font-weight: 750;
  text-decoration: none;
}

.button-link:hover,
.button-link:focus-visible {
  background: var(--home-primary-dark);
  color: #ffffff;
}

.button-link.secondary {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
}

.button-link.secondary:hover,
.button-link.secondary:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.page-shell {
  width: min(calc(100% - 2rem), var(--home-max-width));
  margin: 0 auto;
}

.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section:not([hidden]) + .section:not([hidden]) {
  border-top: 1px solid var(--home-border);
}

.section-heading {
  display: grid;
  max-width: 760px;
  gap: 0.7rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-heading p {
  margin: 0;
  color: var(--home-text-muted);
  font-size: 1.05rem;
}

.highlight-grid,
.support-grid,
.projects-grid {
  display: grid;
  gap: 1rem;
}

.highlight-grid {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}

.card-panel {
  border: 1px solid var(--home-border);
  border-radius: var(--home-radius);
  background: var(--home-surface);
  box-shadow: 0 8px 30px rgba(23, 32, 51, 0.06);
}

.event-card {
  display: grid;
  min-height: 260px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  align-content: space-between;
  background: linear-gradient(145deg, #ffffff, #f4f7fb);
}

.event-card .event-label {
  color: var(--home-primary);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.event-card h3 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.55rem, 4vw, 2.25rem);
}

.event-date {
  margin: 0.8rem 0 0;
  color: var(--home-text-muted);
  font-size: 1.05rem;
}

.event-status {
  margin: 1rem 0 0;
  color: var(--home-text-muted);
}

.mission-card {
  display: grid;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  align-content: center;
  background: var(--home-primary);
  color: #ffffff;
}

.mission-card h3 {
  margin: 0;
  font-size: 1.55rem;
}

.mission-card p {
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.82);
}

.support-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.support-card {
  padding: 1.5rem;
}

.support-icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border-radius: 0.8rem;
  background: #edf3f9;
  color: var(--home-primary);
  font-weight: 850;
}

.support-card h3 {
  margin: 1rem 0 0.55rem;
  font-size: 1.05rem;
}

.support-card p {
  margin: 0;
  color: var(--home-text-muted);
}

.projects-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-card {
  padding: 1.4rem;
}

.project-amount {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--home-primary);
  font-size: 1.15rem;
  font-weight: 800;
}

.project-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.project-card p {
  margin: 0.7rem 0 0;
  color: var(--home-text-muted);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 1.5rem;
  border: 1px dashed var(--home-border);
  border-radius: var(--home-radius);
  background: var(--home-surface);
  color: var(--home-text-muted);
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  background: var(--home-text);
  color: #ffffff;
}

.cta-panel h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.35rem);
}

.cta-panel p {
  max-width: 650px;
  margin: 0.7rem 0 0;
  color: rgba(255, 255, 255, 0.76);
}

.site-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--home-border);
  background: #e9eef5;
}

.footer-inner {
  display: flex;
  width: min(calc(100% - 2rem), var(--home-max-width));
  min-height: 7rem;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--home-text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  font-weight: 650;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .support-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlight-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-nav {
    flex-wrap: wrap;
    padding: 0.7rem 0;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    padding-bottom: 0.4rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
  }

  .nav-links .nav-login {
    margin-left: 0;
  }

  .support-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .cta-panel,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-inner {
    padding: 1.5rem 0;
  }
}

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