:root {
  --snow: #f9fbff;
  --frost: #e6eef7;
  --midnight: #0f1d2b;
  --rescue-red: #ed3b45;
  --faint-blue: rgba(255, 255, 255, 0.75);
  --max-width: 1200px;
  --shadow: 0 20px 45px rgba(22, 32, 50, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Source Sans 3', 'Segoe UI', sans-serif;
  background: var(--snow);
  color: var(--midnight);
  line-height: 1.6;
  color: white;
}

.side-nav {
  position: fixed;
  top: 30%;
  right: 1.5rem;
  transform: translateY(-50%);
  padding: 1rem 0.9rem;
  border-radius: 2rem;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 40px rgba(15, 29, 43, 0.25);
  z-index: 20;
  border: 1px solid rgba(15, 29, 43, 0.08);
}

.side-nav div {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.4rem;
}

.side-nav a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 1rem;
  color: var(--midnight);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
}

.side-nav a:hover,
.side-nav a:focus-visible {
  background: var(--midnight);
  color: white;
}

.side-nav img {
  width: 10em;
}

h1,
h2,
h3,
h4 {
  font-family: 'Oswald', 'Impact', sans-serif;
  letter-spacing: 0.02em;
  margin: 0;
}

h2 { font-size: 300% }
h3 { font-size: 160% }

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

.noise-overlay {
  position: fixed;
  inset: 0;
  background-image: url('https://www.transparenttextures.com/patterns/noise-pattern-with-subtle-cross-lines.png');
  opacity: 0.15;
  pointer-events: none;
  mix-blend-mode: soft-light;
  z-index: 1;
}

.hero {
  position: relative;
  min-height: 90vh;
  background: linear-gradient(120deg, rgba(15, 29, 43, 0.85), rgba(15, 29, 43, 0.15)),
    url('images/lavina.jpeg') center/cover fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem clamp(1.5rem, 5vw, 6rem);
  overflow: hidden;
}

.hero__content,
.hero__meta {
  position: relative;
  z-index: 2;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(4em, 10vw, 6rem);
}

.hero__lead {
  max-width: 600px;
  font-size: 1.2rem;
  margin-top: 1rem;
}

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

.meta__label {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.3rem;
}

.meta__value {
  font-size: 1.2rem;
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  margin-top: 2ex;
  margin-bottom: 2ex;
  justify-content: center;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  border: none;
  background: white;
  color: var(--midnight);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: none;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.section {
  position: relative;
  padding: 5rem clamp(1.5rem, 4vw, 5rem);
  overflow: hidden;
}

.section__intro {
  max-width: 600px;
  margin-bottom: 3rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.8rem;
  color: #8093ad;
  margin-bottom: 0.5rem;
}

.apply {
  background: linear-gradient(120deg, rgba(15, 29, 43, 0.85), rgba(15, 29, 43, 0.6)), url('images/zavod.jpeg') center/cover fixed;
}

.apply__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30ex, 1fr));
  gap: 1.5rem;
}

.teams__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30ex, 1fr));
  gap: 1.5rem;
}

.timeline {
  background: linear-gradient(120deg, rgba(15, 29, 43, 0.85), rgba(15, 29, 43, 0.6)),
    url('images/plan.jpeg') center/cover fixed;
}

.timeline__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(50ex, 1fr));
  gap: 1.5rem;
}

.timeline__item {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
}

.timeline__item table {
  margin-block-start: 1em;
  margin-block-end: 1em;
}

.timeline__item th {
  font-weight: bold;
  text-align: right;
  padding-right: 1ex;
}

.timeline__item td {
  font-weight: normal;
  text-align: left;
}

.form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(30ex, 1fr));
  gap: 1.5rem;
  max-width: 100ex;
}

label {
  display: flex;
  flex-direction: column;
  margin-top: 1ex;
  font-weight: 600;
  letter-spacing: 0.05em;
  gap: 0.3rem;
}

input,
textarea {
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

input:focus,
textarea:focus {
  outline: 2px solid white;
}

.form__note {
  min-height: 1.5rem;
  margin: 0;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.form__note.is-visible {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 29, 43, 0.8);
}

.modal__content {
  position: relative;
  width: min(90vw, 600px);
  background: rgba(15, 29, 43, 0.95);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  z-index: 1;
}

.modal__content--video {
  width: min(90vw, 800px);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal__close {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal__image {
  border-radius: 0.5rem;
  width: 100%;
  height: auto;
}

.modal__video {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.modal__video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0.5rem;
}

.teams {
  background: url('https://images.unsplash.com/photo-1454496522488-7a8e488e8606?auto=format&fit=crop&w=1600&q=80') center/cover fixed;
  color: white;
}

.teams h2 {
  color: white;
}

.teams::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(14, 27, 40, 0.8);
  z-index: 0;
}

.teams > * {
  position: relative;
  z-index: 1;
}

.teams__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 30ex);
  gap: 1.5rem;
}

.team {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(5px);
}

.team h3,
.team p,
.team .tag {
  color: white;
}

.tag {
  display: inline-flex;
  padding: 0.2rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-top: 0.5rem;
}

.contact {
  background: var(--midnight);
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--midnight);
  color: white;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .side-nav {
    position: static;
    transform: none;
    justify-content: center;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-radius: 0;
    border-left: none;
    box-shadow: none;
    gap: 0.3rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.95);
  }

  .side-nav img {
    width: 5em;
  }

  .side-nav div {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 0;
    margin: 0;
   }

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

  .btn {
    width: 100%;
  }

  .section__intro {
    margin-bottom: 2rem;
  }

  .timeline__grid {
    grid-template-columns: repeat(auto-fit, minmax(40ex, 1fr));
  }

}
