:root {
  --bg: #f6f9fc;
  --surface: #ffffff;
  --surface-soft: #edf5f8;
  --ink: #102235;
  --muted: #52677b;
  --primary: #123a5a;
  --primary-strong: #09253d;
  --secondary: #0d7581;
  --secondary-soft: #d9f0f2;
  --accent: #f4b63d;
  --accent-strong: #d99008;
  --line: #d7e3ec;
  --line-strong: #a9c4d5;
  --shadow: 0 16px 40px rgba(9, 37, 61, 0.12);
  --shadow-soft: 0 8px 24px rgba(9, 37, 61, 0.08);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", "Avenir Next", Arial, sans-serif;
  background:
    linear-gradient(180deg, rgba(217, 240, 242, 0.48), transparent 360px),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

a {
  color: var(--secondary);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--primary);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(244, 182, 61, 0.9);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  background: var(--surface);
  border: 2px solid var(--primary);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 37, 61, 0.96);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(7, 25, 41, 0.28);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  text-decoration: none;
  color: #ffffff;
  font-weight: 750;
  font-size: 1rem;
}

.brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: #ffffff;
  border-radius: 50%;
  padding: 5px;
}

.brand span {
  overflow-wrap: anywhere;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
}

.site-nav a {
  text-decoration: none;
  color: #d9eaf8;
  padding: 0.48rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.site-nav a[aria-current="page"] {
  background: var(--accent);
  color: #261b05;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 36px;
  padding: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 30px;
  height: 3px;
  margin: 5px auto;
  border-radius: 999px;
  background: #ffffff;
}

.site-main {
  padding-top: 76px;
}

.hero {
  position: relative;
  background:
    linear-gradient(105deg, rgba(7, 30, 50, 0.94), rgba(13, 117, 129, 0.82)),
    url("../images/background.png") center/cover no-repeat;
  color: #f4f9ff;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -42% 48%;
  height: 82%;
  background: radial-gradient(circle, rgba(244, 182, 61, 0.44), transparent 62%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 5.2rem 0 4.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  align-items: center;
  gap: 3rem;
}

.eyebrow,
.section-kicker,
.role-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
}

.eyebrow {
  color: #d8ecff;
}

.eyebrow-light,
.section-kicker,
.role-label {
  color: var(--secondary);
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(2.2rem, 4.8vw, 4.4rem);
  line-height: 1.04;
  margin: 0;
}

.tagline {
  max-width: 58ch;
  margin: 1.2rem 0 1.65rem;
  font-size: clamp(1.04rem, 1.8vw, 1.25rem);
  color: #e9f4ff;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0;
  margin: 1.45rem 0 0;
  list-style: none;
}

.hero-facts li {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f4f9ff;
  padding: 0.36rem 0.68rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.hero-logo {
  width: min(360px, 100%);
  justify-self: end;
  filter: drop-shadow(0 18px 34px rgba(0, 0, 0, 0.28));
}

.cta,
.cta-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.cta {
  background: var(--accent);
  color: #221804;
  border: 2px solid transparent;
  box-shadow: 0 10px 20px rgba(6, 24, 40, 0.18);
}

.cta:hover,
.cta:focus-visible {
  transform: translateY(-1px);
  background: #ffc64d;
  color: #221804;
  box-shadow: 0 12px 26px rgba(6, 24, 40, 0.24);
}

.cta-secondary {
  min-height: 52px;
  padding: 0.76rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.cta-secondary:hover,
.cta-secondary:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.cta-large {
  min-height: 56px;
  padding: 0.8rem 1.45rem;
  font-size: 1.03rem;
}

.cta-small {
  min-height: 44px;
  padding: 0.58rem 1.05rem;
}

.content-section {
  margin-top: 3rem;
}

.intro-panel,
.resource-panel,
.source-projects-card,
.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.intro-panel {
  padding: 2rem;
  margin-top: 2.4rem;
}

.intro-grid,
.participate-layout,
.resource-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 2rem;
  align-items: start;
}

.intro-grid h2,
.section-heading h2,
.participate-layout h2,
.resource-panel h2,
.page-header h1,
.source-projects-toolbar h2,
.contact-card h2 {
  margin: 0;
  line-height: 1.14;
  color: var(--ink);
}

.intro-grid h2,
.section-heading h2,
.participate-layout h2,
.resource-panel h2 {
  font-size: clamp(1.7rem, 3vw, 2.45rem);
}

.intro-grid p,
.section-heading p,
.participate-layout p,
.resource-panel p,
.page-header p,
.contact-card p,
.type-card p,
.role-card p,
.timeline-list p,
.projects-note,
.source-projects-toolbar p {
  color: var(--muted);
}

.intro-grid p,
.participate-layout p,
.resource-panel p {
  margin: 1rem 0 0;
}

.intro-summary {
  border-left: 4px solid var(--accent);
  padding-left: 1.2rem;
}

.section-band {
  padding: 3rem 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), #e9f3f7 24%, #e9f3f7 76%, rgba(255, 255, 255, 0));
}

.section-heading {
  max-width: 760px;
  margin-bottom: 1.4rem;
}

.section-heading p {
  margin: 0.65rem 0 0;
}

.role-grid,
.type-grid,
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.role-card,
.type-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1.35rem;
  box-shadow: var(--shadow-soft);
}

.role-card h3,
.type-card h3 {
  margin: 0;
  line-height: 1.2;
  color: var(--primary);
}

.role-card p,
.type-card p {
  margin: 0.75rem 0 0;
}

.type-illustration {
  width: 100%;
  max-width: 300px;
  margin: 0.9rem auto 0;
  border-radius: 8px;
}

.type-card {
  min-height: 150px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(217, 240, 242, 0.9), rgba(255, 255, 255, 0.92)),
    var(--surface);
}

.illustration-credit {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-style: italic;
}

.callout-note {
  margin: 1rem 0 0;
  padding: 1rem 1.1rem;
  border: 1px solid #e3c16b;
  border-radius: var(--radius);
  background: #fff7df;
  color: #5b430c;
}

.participate-layout {
  align-items: center;
}

.steps-list {
  display: grid;
  gap: 0.75rem;
}

.step-item {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  padding: 0.9rem;
}

.step-item span {
  display: inline-grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
}

.step-item p {
  margin: 0;
}

.timeline-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.timeline-list li {
  position: relative;
  padding: 1.25rem;
  min-height: 190px;
}

.timeline-list li + li {
  border-left: 1px solid var(--line);
}

.timeline-list span {
  display: block;
  margin-bottom: 0.85rem;
  color: var(--secondary);
  font-weight: 850;
}

.timeline-list p {
  margin: 0;
}

.resource-panel {
  padding: 1.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.resource-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.resource-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.48rem 0.85rem;
  background: #ffffff;
  text-decoration: none;
  font-weight: 800;
}

.page-header {
  margin-top: 2.6rem;
  margin-bottom: 1.2rem;
  max-width: 820px;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.page-header p {
  margin: 0.75rem 0 0;
  font-size: 1.05rem;
}

.projects-header,
.contact-header {
  max-width: none;
  padding-inline: 0;
  text-align: left;
}

.source-projects-card {
  padding: 1.25rem;
  margin-bottom: 2.5rem;
  text-align: left;
}

.source-projects-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0.35rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.source-projects-toolbar h2 {
  font-size: 1.35rem;
}

.source-projects-toolbar p {
  margin: 0.25rem 0 0;
}

.projects-state {
  display: grid;
  justify-items: start;
  align-content: center;
  text-align: left;
  gap: 0.75rem;
  min-height: 190px;
  padding: 1.4rem;
  color: var(--muted);
}

#projects-error {
  color: #7c2d12;
  background: #fff2eb;
  border: 1px solid #f3c1a5;
  border-radius: var(--radius);
  margin-top: 1rem;
  min-height: 120px;
}

#projects-empty {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-top: 1rem;
  min-height: 120px;
}

.hidden {
  display: none;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 4px solid #d6e6f5;
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.project-button {
  position: relative;
  display: flex;
  min-height: 120px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  border: 1px solid #b7d5dc;
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #f8fcfd, #eef8fa),
    var(--surface);
  color: var(--primary);
  font-weight: 800;
  padding: 1rem;
  box-shadow: 0 4px 14px rgba(9, 37, 61, 0.06);
  transition: transform 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.project-button::after {
  content: "Open";
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 850;
}

.project-button:hover,
.project-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--secondary);
  color: var(--primary);
  box-shadow: var(--shadow-soft);
}

.projects-note {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  text-align: left;
}

.contact-grid {
  margin-bottom: 2.5rem;
}

.contact-card {
  padding: 1.35rem;
  text-align: left;
}

.contact-card p {
  margin: 0.75rem 0 0;
}

.contact-card .cta {
  margin-top: 1rem;
}

.inline-links {
  justify-content: flex-start;
  margin-top: 1rem;
}

.site-footer {
  margin-top: 2rem;
  background: #09253d;
  color: #d3e6f7;
  padding: 1.1rem 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-content p {
  margin: 0;
}

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

.footer-links a {
  color: #d3e6f7;
}

@media (max-width: 940px) {
  .hero-inner,
  .intro-grid,
  .participate-layout,
  .resource-panel {
    grid-template-columns: 1fr;
  }

  .hero-logo {
    width: min(300px, 76%);
    justify-self: start;
  }

  .timeline-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-list li:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .timeline-list li:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .resource-links {
    justify-content: flex-start;
  }
}

@media (max-width: 800px) {
  .menu-toggle {
    display: block;
    flex: 0 0 auto;
  }

  .site-nav {
    position: absolute;
    right: 1.2rem;
    top: 76px;
    width: min(310px, calc(100vw - 2.4rem));
    background: #10314d;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    box-shadow: 0 18px 34px rgba(1, 12, 20, 0.45);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    display: none;
  }

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

  .site-nav a {
    border-radius: 0;
    padding: 0.9rem 1rem;
  }

  .brand {
    font-size: 0.92rem;
  }

  body.menu-open {
    overflow: hidden;
  }

  .source-projects-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .role-grid,
  .type-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(1120px, calc(100% - 1.25rem));
  }

  .hero-inner {
    padding: 3.9rem 0 3.4rem;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-actions,
  .hero-actions .cta,
  .hero-actions .cta-secondary {
    width: 100%;
  }

  .hero-facts {
    display: grid;
    grid-template-columns: 1fr;
  }

  .intro-panel,
  .resource-panel,
  .source-projects-card,
  .contact-card,
  .role-card,
  .type-card {
    padding: 1rem;
  }

  .content-section {
    margin-top: 2.2rem;
  }

  .section-band {
    padding: 2.25rem 0;
  }

  .timeline-list {
    grid-template-columns: 1fr;
  }

  .timeline-list li {
    min-height: auto;
  }

  .timeline-list li + li,
  .timeline-list li:nth-child(3),
  .timeline-list li:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .cta:hover,
  .cta:focus-visible,
  .project-button:hover,
  .project-button:focus-visible {
    transform: none;
  }
}
