/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
*:not(dialog) {
  margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}
body {
  /* 4. Add accessible line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input, button, textarea, select {
  font: inherit;
}

/* 8. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/*
  10. Create a root stacking context
*/
#root, #__next {
  isolation: isolate;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #F9F3EC;
  font-family: "Noto Sans", sans-serif;
  color: #4C4442;
  font-size: 17px;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr auto;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "korolev", sans-serif;
  line-height: 1em;
  margin-bottom: 0.75em;
  margin-top: 0.75em;
}

h1 {
  font-size: 42.30144px;
}

h2 {
  font-size: 35.2512px;
}

h3 {
  font-size: 29.376px;
}

h4 {
  font-size: 24.48px;
}

h5 {
  font-size: 20.4px;
}

h6 {
  font-size: 17px;
}

@media (min-width: 768px) {
  h1 {
    font-size: 70.7468530181px;
  }
  h2 {
    font-size: 53.19312257px;
  }
  h3 {
    font-size: 39.994829px;
  }
  h4 {
    font-size: 30.0713px;
  }
  h5 {
    font-size: 22.61px;
  }
  h6 {
    font-size: 17px;
  }
}
p {
  margin: 1rem 0;
}

a {
  color: #D9541B;
  text-decoration: none;
}

a:hover {
  opacity: 0.9;
}

button, a.btn {
  background-color: #104776;
  color: #FBF8F4;
  padding: 0.25rem 1rem;
  font-weight: bold;
  border: 2px solid #518fc6;
}
button:hover, a.btn:hover {
  opacity: 0.9;
  box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

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

iframe[src*="youtube.com"] {
  max-width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  margin-bottom: 2rem;
}

.single-page {
  max-width: 760px;
  margin: 2rem auto;
  padding: 1rem;
}

body .cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to right, #316593, #104776);
  color: #F9F3EC;
  font-size: 16px;
  padding: 0.5rem;
  text-align: center;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  box-shadow: -1px 0px 16px rgba(0, 0, 0, 0.25);
}

.cookie-notice button {
  background: #F9F3EC;
  color: #003d7a;
  border: none;
  padding: 0.25rem 1rem;
  margin-left: 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  width: fit-content;
}

.cookie-notice p {
  max-width: 45ch;
}

.cookie-notice a {
  color: #F9F3EC;
  text-decoration: underline;
}

.nav-link {
  text-transform: uppercase;
  font-weight: bold;
}

.social-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
  list-style: none;
}

.social-icons li svg {
  width: 2rem;
  height: 2rem;
}
.social-icons li svg * {
  fill: #104776;
}

nav.main-nav {
  display: grid;
  gap: 1rem;
  grid-template-columns: 7rem auto;
  grid-template-rows: auto auto;
  padding: 1rem;
  justify-items: start;
}

nav.main-nav .social-icons {
  justify-self: end;
}

.nav-menu {
  width: 100%;
  display: flex;
  gap: 2rem;
  list-style-type: none;
  justify-content: space-evenly;
  align-items: center;
  grid-row: 2/3;
  grid-column: 1/3;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  color: #104776;
  font-weight: bold;
  font-size: 17px;
}
.nav-menu .btn-donate {
  background-color: #D9541B;
  color: #F9F3EC;
  padding: 0.25rem 1rem;
  border: none;
  text-transform: uppercase;
}

@media (min-width: 700px) {
  nav.main-nav {
    display: grid;
    grid-template-columns: 8rem 1fr auto;
    grid-template-rows: auto;
    padding: 1rem clamp(1rem, 5vw, 5rem);
    justify-content: stretch;
  }
  .nav-menu {
    grid-column: unset;
    grid-row: unset;
    justify-content: end;
    justify-self: end;
  }
  .main-nav, .nav-menu {
    gap: clamp(2rem, 5vw, 6rem);
  }
}
.hero {
  background-size: cover;
  background-position: 50% 150px;
  position: relative;
  padding-bottom: 250px;
  --gradient-mask: linear-gradient(
    rgba(0, 0, 0, 1.0) 150px,
    rgba(0, 0, 0, 0.0) 66%
  );
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgb(16, 71, 118) 150px, rgba(16, 71, 118, 0) 66%);
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("/assets/vintage-paper.jpg");
  opacity: 0.5;
  mix-blend-mode: color-burn;
  pointer-events: none;
  z-index: 2;
  mask-image: var(--gradient-mask);
  -webkit-mask-image: var(--gradient-mask);
  /* removed mix-blend-mode */
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #F9F3EC;
  padding: 2rem;
}
.hero-content p {
  font-size: 39.994829px;
  line-height: 1.25em;
  word-wrap: normal;
  word-spacing: 100vw;
  font-family: "korolev", sans-serif;
  text-transform: uppercase;
}
.hero-content img {
  width: 8rem;
  height: 8rem;
  margin-top: 2rem;
}

@media (min-width: 700px) {
  .hero {
    background-position: center;
    padding: clamp(2rem, 3vw, 10rem);
    --gradient-mask: linear-gradient(
        to right,
    rgba(16, 71, 118, 1.0),
    rgba(16, 71, 118, 0.0) 66%
    );
  }
  .hero-content p {
    font-size: clamp(53.19312257px, 5vw, 70.7468530181px);
  }
  .hero::before {
    background: linear-gradient(to right, rgb(16, 71, 118), rgba(16, 71, 118, 0) 66%);
  }
}
.timeline {
  padding: 1rem;
  margin-bottom: 6rem;
}

.timeline h1 {
  color: #104776;
  background: url("/assets/brushstroke.svg");
  background-position: bottom;
  background-size: 80%;
  background-repeat: no-repeat;
  padding: 0 1rem 2rem;
  margin-bottom: 4rem;
  text-align: center;
}
.timeline h1 span {
  color: #6E6D6D;
  font-size: 39.994829px;
}

.timeline-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8rem;
  background: linear-gradient(90deg, transparent calc(50% - 1px), #C0B4B1 0, #C0B4B1 calc(50% + 1px), transparent 0);
}

.timeline-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background-color: #FBF8F4;
  padding: 1rem;
  box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.15);
}
.timeline-section strong {
  font-size: 1.2em;
}

.bio-cta {
  background-color: #D9541B;
  color: #F9F3EC;
  font-size: 1.2em;
  padding: 2rem;
  margin: 1rem 1rem -5rem;
  box-shadow: 0px 0px 16px rgba(0, 0, 0, 0.15);
  --r: 6px; /* radius of circles */
  mask: linear-gradient(#000 0 0) no-repeat 50%/calc(100% - 2 * var(--r)) calc(100% - 2 * var(--r)), radial-gradient(farthest-side, #000 97%, rgba(0, 0, 0, 0)) 0 0/calc(2 * var(--r)) calc(2 * var(--r)) round;
}

.timeline-form {
  display: block;
}

@media (min-width: 700px) {
  .timeline-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 2rem;
    max-width: 1000px;
  }
  .timeline-section:nth-of-type(odd) img {
    order: 2;
  }
  .timeline-section:nth-of-type(odd) .timeline-text {
    order: 1;
  }
  .timeline-section:nth-of-type(even) img {
    order: 1;
  }
  .timeline-section:nth-of-type(even) .timeline-text {
    order: 2;
  }
  .timeline-form {
    display: block;
    max-width: 760px;
  }
}
.homepage-content-wrapper {
  background-color: #C0B4B1;
  background: linear-gradient(#C0B4B1, #F9F3EC);
  border-top: 2px solid #aca7a1;
  width: 100%;
  padding: 4rem 1rem;
}

.homepage-content {
  max-width: 760px;
  margin: 0 auto;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 760px;
}

form h3 {
  font-size: 30.0713px;
  text-align: center;
}

form .form-group {
  align-items: start;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
}

.form-group label {
  font-weight: bold;
}

.checkbox-group > * {
  grid-column: 1/3;
}
.checkbox-group > * span {
  font-weight: normal;
}

form .hidden {
  display: none;
}

.btn-submit {
  grid-column: 2/3;
  width: fit-content;
}

@media (min-width: 700px) {
  form {
    margin: 0 2rem;
    padding: 1rem;
    min-width: 550px;
  }
  form .form-group {
    gap: 1rem;
    grid-template-columns: 12ch 1fr;
  }
  .form-group:not(.checkbox-group) label {
    justify-self: end;
  }
  .form-group.checkbox-group label {
    grid-column: 2/3;
  }
}
.fade-in {
  opacity: 1;
}

.no-js .fade-in {
  opacity: 1;
  transform: none;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal[hidden] {
  display: none;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1;
}
.modal-content h2 {
  font-size: 39.994829px;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
}

.modal-close:hover {
  color: #000;
}

.modal-content h2 {
  margin-top: 0;
  color: #003d7a;
}

.mailing-address {
  background: #f5f5f5;
  padding: 1.5rem;
  border-left: 4px solid #b71c1c;
  margin: 1.5rem 0;
  font-size: 1.1rem;
  line-height: 1.6;
}

.legal-text {
  font-size: 0.85rem;
  color: #666;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

/* Donate button styles */
.btn-donate {
  cursor: pointer;
  transition: background 0.2s;
}

/* Prevent body scroll when modal is open */
body.modal-open {
  overflow: hidden;
}

footer {
  background-color: #104776;
  color: #F9F3EC;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  justify-items: center;
  padding: 4rem;
}

footer .nav-list {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
footer .nav-list a {
  color: #F9F3EC;
}

footer .social-icons {
  margin: 0;
  padding: 0;
}

footer .social-icons li svg * {
  fill: #F9F3EC;
}

footer a {
  color: #F9F3EC;
}

@media (min-width: 700px) {
  footer {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    justify-items: stretch;
  }
  .nav-list {
    grid-column: 1/2;
    grid-row: 1/4;
    flex-direction: column;
    justify-self: center;
  }
}