:root {
  --blue: #2f5fae;
  --blue-dark: #224f9e;
  --text: #212121;
  --muted: #616161;
  --line: #bdbdbd;
  --white: #ffffff;
  --soft: #f7f7f7;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: var(--text);
  font-family: Comfortaa, Montserrat, Arial, sans-serif;
  margin: 0;
}

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

a {
  color: var(--blue-dark);
}

.site-header {
  align-items: center;
  background: rgba(7, 18, 42, 0.86);
  backdrop-filter: blur(10px);
  color: var(--white);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  left: 0;
  min-height: 64px;
  padding: 12px 28px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 10;
}

.site-title {
  color: inherit;
  font-size: 22px;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: flex-end;
  min-width: 0;
}

nav a,
.search-mark {
  color: inherit;
  font-size: 15px;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.language-toggle {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  display: inline-flex;
  height: 30px;
}

.language-toggle button {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  height: 28px;
  min-width: 36px;
  padding: 0 8px;
}

.language-toggle button[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.9);
  color: var(--blue-dark);
}

.search-mark {
  font-size: 30px;
  line-height: 1;
  transform: rotate(-15deg);
}

.hero,
.section-hero {
  align-items: center;
  display: grid;
  justify-items: center;
  overflow: hidden;
  position: relative;
  text-align: center;
}

.hero {
  min-height: 430px;
}

.hero img,
.section-hero img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.hero-home img {
  object-position: center 39%;
}

.hero-shade {
  background: rgba(0, 0, 0, 0.42);
  inset: 0;
  position: absolute;
}

.hero h1,
.section-hero h2 {
  color: var(--white);
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0;
  max-width: 1000px;
  padding: 0 24px;
  position: relative;
  text-transform: uppercase;
  z-index: 1;
}

.edition-link {
  min-height: 330px;
  padding: 34px 22px 44px;
}

.edition-link a {
  display: inline-block;
  margin-left: min(18vw, 300px);
}

.countdown {
  margin: 54px auto 0;
  max-width: 780px;
  text-align: center;
}

.countdown p {
  color: var(--blue-dark);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.countdown-clock {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.countdown-clock span {
  border: 1px solid #d6d6d6;
  color: var(--muted);
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 14px 8px;
  place-items: center;
  text-transform: uppercase;
}

.countdown-clock em {
  font-style: normal;
}

.countdown-clock strong {
  color: var(--blue-dark);
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
}

.blue-band {
  background: var(--blue);
  color: var(--white);
  padding: 42px 24px;
  text-align: center;
}

.blue-band h2 {
  font-size: clamp(26px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.45;
  margin: 0 auto;
  max-width: 900px;
}

.athlete-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1180px;
  padding: 38px 56px 48px;
}

.athlete-card {
  color: inherit;
  display: grid;
  gap: 16px;
  text-align: center;
  text-decoration: none;
}

.athlete-card h3 {
  color: var(--blue-dark);
  display: inline-block;
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 700;
  margin: 0;
  text-decoration: underline;
}

.poster {
  aspect-ratio: 1 / 1;
  background:
    linear-gradient(180deg, rgba(6, 14, 30, 0.08), rgba(6, 14, 30, 0.54)),
    url("/assets/images/hero-pool.png") center / cover;
  display: flex;
  align-items: end;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.poster::before {
  background: linear-gradient(90deg, rgba(8, 30, 72, 0.64), rgba(47, 95, 174, 0.08));
  bottom: 0;
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  width: 100%;
}

.poster span {
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: var(--white);
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  padding: 9px 12px;
  position: relative;
  text-transform: uppercase;
  z-index: 1;
}

.poster-one {
  filter: grayscale(0.35) contrast(1.08);
  background-position: center 45%;
}

.poster-two {
  filter: saturate(1.05);
  background-position: center 53%;
}

.poster-three {
  filter: grayscale(0.22) contrast(1.08);
  background-position: center 62%;
}

.news-band {
  align-items: center;
  background: var(--blue);
  color: var(--white);
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(240px, 0.7fr) minmax(320px, 1fr);
  padding: 42px min(10vw, 150px);
}

.news-title h2 {
  color: var(--white);
  display: inline-block;
  font-size: clamp(34px, 4vw, 54px);
  margin: 0;
  text-decoration: underline;
}

.news-card {
  align-items: center;
  background: rgba(255, 255, 255, 0.13);
  display: grid;
  gap: 16px;
  grid-template-columns: 160px 1fr;
  min-height: 160px;
  padding: 12px;
}

.news-card img {
  aspect-ratio: 4 / 3;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.news-card h3 {
  font-family: Montserrat, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.35;
  margin: 0 0 12px;
}

.news-card p {
  font-size: 16px;
  line-height: 1.55;
  margin: 0;
}

.venue-section {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 0.9fr);
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 56px 42px;
}

.venue-poster {
  align-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    url("/assets/images/hero-pool.png") center / cover;
  display: grid;
  min-height: 420px;
  padding: 36px;
  text-align: center;
}

.venue-poster span {
  color: var(--blue);
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(58px, 8vw, 110px);
  font-weight: 700;
}

.venue-poster strong {
  color: #2e92c7;
  font-size: clamp(38px, 5vw, 72px);
}

.venue-poster p {
  color: #333;
  font-family: Montserrat, Arial, sans-serif;
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
}

.venue-map iframe {
  border: 0;
  height: 100%;
  min-height: 420px;
  width: 100%;
}

.page-section {
  scroll-margin-top: 70px;
}

.section-hero {
  min-height: 430px;
}

.mini-hero img {
  object-position: center 50%;
}

.light-hero {
  min-height: 610px;
}

.light-hero img {
  filter: brightness(1.22) saturate(0.9);
  opacity: 0.76;
}

.light-hero h2 {
  color: var(--blue-dark);
}

.dark-hero {
  min-height: 610px;
}

.dark-hero p {
  color: var(--white);
  font-size: 17px;
  margin: 84px 0 0;
  position: relative;
  z-index: 1;
}

.sponsor-grid {
  display: grid;
  gap: 50px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1120px;
  padding: 46px 56px 36px;
  text-align: center;
}

.sponsor-logo {
  align-items: center;
  border: 10px solid #e21d2f;
  border-radius: 18px;
  color: #e21d2f;
  display: inline-flex;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 74px;
  font-weight: 700;
  height: 210px;
  justify-content: center;
  max-width: 300px;
  width: 100%;
}

.sponsor-logo.gold {
  border-color: #b39b00;
  color: #204d9a;
}

.sponsor-grid h3 {
  color: var(--blue-dark);
  font-family: Montserrat, Arial, sans-serif;
  font-size: 26px;
  margin: 24px 0;
}

.wide-button {
  background: var(--blue);
  border-radius: 4px;
  color: var(--white);
  display: block;
  margin: 0 auto 24px;
  max-width: 560px;
  padding: 11px 20px;
  text-align: center;
  text-decoration: none;
}

.why-sponsor {
  align-items: center;
  background: var(--blue);
  color: var(--white);
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(240px, 0.9fr) minmax(280px, 1.1fr);
  padding: 24px min(10vw, 150px);
}

.why-sponsor img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.why-sponsor h3 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.35;
  margin: 0 0 16px;
}

.why-sponsor p {
  line-height: 1.7;
  margin: 0;
}

.info-columns,
.clinic-grid,
.about-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 1120px;
  padding: 48px 56px;
}

.info-columns article,
.clinic-grid article,
.about-grid article,
.upload-form,
.photo-card,
.empty-gallery {
  border: 1px solid #e0e0e0;
  padding: 24px;
}

.info-columns h3,
.clinic-grid h3,
.about-grid h3 {
  color: var(--blue-dark);
  font-family: Montserrat, Arial, sans-serif;
  margin: 0 0 12px;
}

.info-columns p,
.clinic-grid p,
.about-grid p,
.info-columns li {
  color: var(--muted);
  line-height: 1.65;
}

.about-section,
.photo-section {
  padding: 64px 56px;
}

.about-section h2,
.photo-copy h2 {
  color: var(--blue-dark);
  font-size: clamp(36px, 4vw, 56px);
  margin: 0 auto 24px;
  max-width: 1120px;
  text-decoration: underline;
}

.photo-section {
  background: var(--soft);
}

.photo-copy {
  margin: 0 auto;
  max-width: 1120px;
}

.photo-copy p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

.upload-form {
  background: var(--white);
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 auto;
  max-width: 900px;
}

.upload-form label {
  display: grid;
  gap: 7px;
}

.upload-form label:nth-of-type(4),
.upload-form button,
.form-status {
  grid-column: 1 / -1;
}

.upload-form span {
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
}

.upload-form input {
  border: 1px solid #d1d1d1;
  border-radius: 0;
  font: inherit;
  min-height: 44px;
  padding: 10px 12px;
}

.upload-form button {
  background: var(--blue);
  border: 0;
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
}

.form-status {
  color: var(--muted);
  margin: 0;
  min-height: 20px;
}

.form-status.success {
  color: #087a3d;
}

.form-status.error {
  color: #b00020;
}

.photo-gallery {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 28px auto 0;
  max-width: 1120px;
}

.photo-card {
  background: var(--white);
}

.photo-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.photo-card div {
  display: grid;
  gap: 8px;
  padding-top: 14px;
}

.photo-card strong {
  color: var(--blue-dark);
}

.photo-card span,
.empty-gallery {
  color: var(--muted);
}

.photo-delete {
  background: transparent;
  border: 1px solid #d1d1d1;
  color: var(--blue-dark);
  cursor: pointer;
  font: inherit;
  justify-self: start;
  padding: 8px 12px;
}

.empty-gallery {
  background: var(--white);
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.empty-gallery strong {
  color: var(--text);
}

footer {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 22px;
  justify-items: center;
  margin: 0 auto;
  max-width: 1120px;
  padding: 38px 24px;
}

.socials {
  display: flex;
  gap: 16px;
}

.socials span {
  align-items: center;
  border-radius: 50%;
  color: var(--white);
  display: inline-flex;
  font-family: Arial, sans-serif;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.socials span:nth-child(1) {
  background: #1877f2;
}

.socials span:nth-child(2) {
  background: #e6005c;
}

.socials span:nth-child(3) {
  background: #000;
}

@media (max-width: 1120px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 10px 22px 12px;
  }

  nav {
    justify-content: flex-start;
    width: 100%;
  }

  nav a {
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .site-header {
    position: absolute;
  }

  nav {
    gap: 10px 16px;
  }

  nav a {
    font-size: 14px;
  }

  .edition-link {
    min-height: 220px;
  }

  .edition-link a {
    margin-left: 0;
  }

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

  .athlete-grid,
  .sponsor-grid,
  .venue-section,
  .news-band,
  .why-sponsor,
  .info-columns,
  .clinic-grid,
  .about-grid,
  .photo-gallery,
  .upload-form {
    grid-template-columns: 1fr;
  }

  .athlete-grid,
  .sponsor-grid,
  .venue-section,
  .info-columns,
  .clinic-grid,
  .about-grid,
  .about-section,
  .photo-section {
    padding-left: 24px;
    padding-right: 24px;
  }

  .news-card {
    grid-template-columns: 1fr;
  }

  .hero,
  .section-hero,
  .light-hero,
  .dark-hero {
    min-height: 520px;
  }
}

@media (max-width: 520px) {
  .site-title {
    font-size: 20px;
  }

  .hero h1,
  .section-hero h2 {
    font-size: 30px;
  }

  .blue-band h2 {
    font-size: 25px;
  }

  .countdown-clock {
    gap: 8px;
  }

  .athlete-card h3 {
    font-size: 22px;
  }

  .venue-poster {
    min-height: 320px;
  }
}
