* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}
body {
  background-color: #121212;
  color: #ffffff;
  font-family: Arial, sans-serif;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  padding: 96px 20px 20px; /* top padding for fixed nav */
  position: relative;
}
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.bg::before,
.bg::after {
  content: "";
  position: absolute;
  opacity: 0.05;
  filter: grayscale(100%) contrast(90%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.bg::before {
  top: -10%;
  left: -20%;
  width: 130vmax;
  height: 130vmax;
  transform: rotate(-18deg);
  background-image: url("assets/Elevationv1.png");
}
.bg::after {
  bottom: -25%;
  right: -20%;
  width: 130vmax;
  height: 130vmax;
  transform: rotate(22deg);
  background-image: url("assets/mapv1.png");
}
/* Ensure fixed-position UI (nav, language switcher, back-to-top) are not overridden */
body > *:not(.bg):not(.nav):not(.lang-switcher):not(.to-top) {
  position: relative;
  z-index: 1;
}
.nav {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 500;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid #2a2a2a;
  padding: 10px 12px;
  transition: transform 0.2s ease;
}
.nav.nav--hidden {
  transform: translateY(-100%);
}
.nav a {
  color: #ddd;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 6px 8px;
  border-radius: 6px;
  flex: 0 0 auto;
}
.nav a:hover {
  color: #fff;
  background: #1e1e1e;
}
.nav a.active {
  color: #fff;
  background: #2a2a2a;
}
/* Back-to-top button */
.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  width: 56px;
  height: 56px;
  background: #1e1e1e;
  border: 1px solid #3a3a3a;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.to-top:hover {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}
.to-top.show {
  opacity: 0.9;
  pointer-events: auto;
  transform: translateY(0);
}
.to-top img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: none;
}
/* Tooltip for back-to-top */
.to-top[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  right: 64px;
  bottom: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #eee;
  border: 1px solid #333;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.to-top:hover::after,
.to-top:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}
section {
  width: 100%;
  scroll-margin-top: 120px; /* account for two-line nav height on mobile */
}
.section {
  max-width: 860px;
  margin: 24px auto 0 auto;
  text-align: left;
  padding: 0 12px;
}
.hero {
  text-align: center;
}
.section h2 {
  margin: 0 0 8px 0;
  font-size: 1.6rem;
}
.muted {
  color: #cfcfcf;
}
.grid {
  display: grid;
  gap: 16px;
}
.grid.two {
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .nav {
    gap: 8px;
  }
  .nav a {
    font-size: 0.9rem;
    padding: 6px 6px;
  }
}
.img-card {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 8px;
}
.img-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
.lang-switcher {
  position: fixed;
  /* top is dynamically set via JS to nav height + 8px; keep a fallback */
  top: 56px;
  right: 12px;
  z-index: 600;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.lang-switcher.nav--hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.lang-select {
  background: #1e1e1e;
  color: #eee;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
}
.lang-select:focus-visible {
  outline: 2px solid #4caf50;
  outline-offset: 2px;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

p {
  font-size: 1.25rem;
  margin: 10px 0;
}

.emoji-art {
  font-size: 2rem;
  margin-top: 20px;
}

.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  width: 100%;
  /* max-width: 600px; */
}

.logo-container img {
  width: 100%;
  max-width: 300px;
  height: auto;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  p {
    font-size: 1rem;
  }

  .emoji-art {
    font-size: 1.5rem;
  }

  .logo-container img {
    max-width: 80%;
  }
}

/* Preregistration form styles */
.card {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
  width: 100%;
  max-width: 560px;
  text-align: left;
}
.card h2 {
  margin: 0 0 8px 0;
  font-size: 1.4rem;
}
.subtle {
  color: #cfcfcf;
  font-size: 0.95rem;
  margin: 0 0 12px 0;
}
.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.field {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
  margin-bottom: 12px;
}
label {
  font-size: 0.95rem;
  margin-bottom: 6px;
}
input[type="text"],
input[type="email"] {
  background: #121212;
  color: #fff;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 1rem;
  outline: none;
}
input[type="text"]:focus,
input[type="email"]:focus {
  border-color: #555;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 12px 0;
}
.checkbox input {
  margin-top: 3px;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
button[type="submit"] {
  background: #4caf50;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 1rem;
  cursor: pointer;
}
button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
.error {
  color: #ff6b6b;
  font-size: 0.95rem;
}
.success {
  color: #7cd992;
  font-size: 1rem;
}
/* Tooltip */
.info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.info-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #aaa;
  color: #ddd;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 16px;
  text-align: center;
  cursor: default;
  position: relative;
}
.tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  background: #222;
  color: #eee;
  border: 1px solid #333;
  padding: 10px 12px;
  border-radius: 8px;
  width: 280px;
  font-size: 0.9rem;
  line-height: 1.3;
  transition: opacity 0.15s ease-in-out;
  z-index: 10;
  text-align: left;
}
.tooltip::after {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #333;
}
.info-icon:hover .tooltip,
.info-icon:focus .tooltip {
  visibility: visible;
  opacity: 1;
}
