/* header */
.hero {
  position: relative;
  overflow: hidden;
}

.hero-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-evenly;
  height: 100vh;
  position: relative;
  z-index: 3;
}

.appalhack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero-title {
  font-family: "Story Script", sans-serif;
  color: var(--muted-olive);
  letter-spacing: 0.75rem;
  margin-bottom: -1.5rem;
  font-size: clamp(var(--size-30), 11vw, var(--size-100));
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
  text-shadow:
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000;
}

.event-date {
  font-family: "Story Script", sans-serif;
  color: var(--muted-olive);
  margin-bottom: 0;
  letter-spacing: 0.5rem;
  font-size: clamp(var(--size-30), 11vw, var(--size-50));
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
  text-shadow:
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000;
}

/* cloud layer */
.clouds {
  background: url("../assets/clouds.png") repeat-x;
  background-size: contain;
  position: absolute;
  top: 75px;
  left: 0;
  width: 200%;
  height: 100vh;
  pointer-events: none;
  opacity: 0.3;
  z-index: 1;
  will-change: transform;
  animation: moveClouds 120s linear infinite;
}

@keyframes moveClouds {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* mountain layer */
.mountains {
  background: url("../assets/mountains.png") no-repeat bottom center;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  position: absolute;
  background-size: cover;
  z-index: 2;
}

/* Navbar Styles */
.navbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background-color: var(--ash-brown);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: all 0.3s ease;
  overflow: hidden;
}

.navbar.sticky {
  position: fixed;
  top: 0;
  left: 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: clamp(0.5rem, 2vw, 3rem);
  position: relative;
}

.nav-links a {
  color: var(--tea-green);
  font-size: clamp(var(--size-14), 3vw, var(--size-20));
  transform: translateY(60px);
  animation: slideUp 0.8s forwards;
}

.nav-links a:hover {
  color: var(--muted-olive);
  transition: color 0.3s ease;
}

.nav-links a:nth-child(1) {
  animation-delay: 0.1s;
}

.nav-links a:nth-child(2) {
  animation-delay: 0.2s;
}

.nav-links a:nth-child(3) {
  animation-delay: 0.3s;
}

.nav-links a:nth-child(4) {
  animation-delay: 0.4s;
}

.nav-links a:nth-child(5) {
  animation-delay: 0.5s;
}

.nav-links a:nth-child(6) {
  animation-delay: 0.6s;
}

.nav-links a:nth-child(7) {
  animation-delay: 0.7s;
}

.nav-links a:nth-child(8) {
  animation-delay: 0.8s;
}

@keyframes slideUp {
  to {
    transform: translateY(0);
  }
}

/* about */
.about {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

#countdown-timer {
  display: flex;
  gap: clamp(1rem, 3vw, 2rem);
  justify-content: center;
  align-items: center;
}

.timer-item {
  text-align: center;
  padding: 0.75rem;
  border-radius: 1rem;
  min-width: 80px;
  background-color: var(--ash-brown);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

.timer-item span {
  display: block;
  font-size: var(--size-40);
  font-weight: bold;
  color: var(--vanilla-cream);
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.timer-item span.flip {
  animation: flipNumber 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes flipNumber {
  0% {
    transform: rotateX(0deg);
  }

  50% {
    transform: rotateX(90deg);
    opacity: 0;
  }

  51% {
    transform: rotateX(-90deg);
  }

  100% {
    transform: rotateX(0deg);
    opacity: 1;
  }
}

#seconds.pulse {
  animation: pulse 1s ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.1);
  }
}

.timer-item p {
  font-size: var(--size-16);
  color: var(--vanilla-cream);
  margin-top: 0.5rem;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.about .social-link {
  background-color: var(--ash-brown);
  border-radius: 1rem;
  padding: .5rem;
  transition: background-color 0.3s ease;
}

.about .social-link:hover {
  background-color: var(--muted-olive);
}

.about .social-link svg {
  width: 48px;
  height: 48px;
}

.about .social-link.mail-icon svg path {
  transition: stroke 0.3s ease;
}

.about .social-link.mail-icon:hover svg path {
  stroke: var(--ash-brown);
}

.about .social-link.instagram-icon svg path,
.about .social-link.discord-icon svg path {
  transition: fill 0.3s ease;
}

.about .social-link.instagram-icon:hover svg path,
.about .social-link.discord-icon:hover svg path {
  fill: var(--ash-brown);
}


/* schedule */
.schedule {
  padding-top: 1rem;
}

.schedule-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.schedule-row {
  display: flex;
  gap: 2.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: wrap;
}

.schedule-row .time {
  font-weight: 900;
  font-size: var(--size-40);
  color: var(--faded-copper);
  text-align: right;
  flex-shrink: 0;
  min-width: 200px;
}

.schedule-row .event {
  flex: 1;
  padding: 1rem 1.5rem;
  background: var(--tea-green);
  border-radius: 1rem;
  border-left: 6px solid var(--muted-olive);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  min-width: 360px;
}

/* rules */
.rules-list {
  list-style: none;
  font-size: var(--size-20);
  line-height: 2;
}

.rules-list li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  font-weight: 900;
}

.rules-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--muted-olive);
  font-size: 1.4rem;
}

/* team and judges */
.person-groups {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.person-group {
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  gap: 1rem;
  width: 220px;
}

.person-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--tea-green);
  border: 3px solid var(--muted-olive);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  text-align: center;
  font-weight: 900;
  font-size: var(--size-20);
}

.person-card span {
  color: var(--faded-copper);
  font-size: var(--size-18);
  font-weight: 500;
}

/* sponsors and prizes */
.image-cards {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.image-card {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  border: 5px solid var(--faded-copper);
  border-radius: 1rem;
  width: 300px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  user-select: none;
}

.image-container {
  flex: 1;
  width: 250px;
  height: 250px;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.image-card:hover .image-container img {
  transform: scale(1.05);
}

.prizes-wrapper .image-card {
  cursor: default;
}

.prizes-wrapper .image-card:hover .image-container img {
  transform: none;
}

.image-title {
  background: var(--muted-olive);
  color: var(--vanilla-cream);
  text-align: center;
  padding: 1rem;
  font-size: var(--size-20);
  width: 100%;
  font-weight: 900;
}

/* form */
.apply {
  padding: 5rem 0 5rem 0;
  background-color: var(--tea-green);
}

.apply-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.apply-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  order: 0;
}

.apply-left h2 {
  margin-bottom: 2rem;
}

.tshirt-container {
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  pointer-events: none;
  max-width: 450px;
  overflow: hidden;
}

.tshirt-container .tshirt {
  max-width: 100%;
  flex-shrink: 0;
  transform: rotate(-10deg);
}

.apply-right {
  flex: 1;
  background-color: var(--vanilla-cream);
  border-radius: 1rem;
  z-index: 1;
  order: 1;
}

.apply-right > form > div:first-child {
  text-align: center;
}

.apply-right > form > div h2 {
  margin: 0;
}

.apply-right form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 3rem;
}

.form-data {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-data label {
  font-weight: 900;
}

.form-data input {
  padding: 10px;
  border: 3px solid var(--faded-copper);
  border-radius: 1rem;
}

.form-data input:focus {
  border: 3px solid var(--muted-olive);
  outline: none;
}

.radio-field {
  display: flex;
  align-items: center;
}

.form-data input[type="radio"] {
  appearance: none;
  margin-right: 0.3rem;
  cursor: pointer;
}

.form-data input[type="radio"]:checked {
  background-color: var(--muted-olive);
  user-select: none;
  border: 3px solid var(--faded-copper);
}

.form-name, .form-email, .form-discord, .form-size {
  display: flex;
  flex-direction: column;
}

.form-name label, .form-email label, .form-discord label, .form-size label {
  font-size: var(--size-20);
}

.form-allergy, .form-year {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-allergy label, .form-year label {
  margin: 0;
  cursor: pointer;
}

.form-allergy > label:first-of-type, .form-year > label:first-of-type {
  font-size: var(--size-20);
}

#otherAllergiesText {
  display: none;
}

.form-size select {
  padding: 10px;
  padding-right: 2.5rem;
  border: 3px solid var(--faded-copper);
  border-radius: 1rem;
  cursor: pointer;
  background-color: white;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236c584c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
}

.form-size select:invalid {
  color: rgba(0, 0, 0, 0.6);
}

.form-size select:focus {
  border: 3px solid var(--muted-olive);
  outline: none;
}

.action-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.action-buttons button[type="submit"] {
  text-align: center;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  background-color: var(--muted-olive);
  border-radius: 1rem;
  padding: 0.75rem 2.5rem;
  transition: box-shadow 0.3s ease-out, transform 0.3s ease-out;
  color: var(--vanilla-cream);
  font-size: var(--size-20);
  font-weight: 900;
}

.action-buttons button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.action-buttons button[type="submit"]:disabled:hover {
  transform: none;
  box-shadow: none;
}

.action-buttons button[type="submit"]:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}

#formFeedback {
  text-align: center;
  font-weight: 500;
  font-size: var(--size-18);
}

#formFeedback.loading {
  color: var(--muted-olive);
}

#formFeedback.success {
  color: green;
}

#formFeedback.error {
  color: darkred;
}

form.is-submitting {
  opacity: 0.6;
  pointer-events: none;
}

/* faq */
.faq {
  padding-top: 1rem;
}

.faq-item {
  margin-bottom: 1rem;
  padding: 1rem 0;
  border-bottom: 2px solid var(--muted-olive);
}

.faq-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  cursor: pointer;
  user-select: none;
}

.faq-toggle h3 {
  color: var(--faded-copper);
}

.toggle-icon {
  font-size: 1.5rem;
  color: var(--muted-olive);
  font-weight: 900;
  transition: transform 0.5s ease-out;
  transform-origin: center center;
}

.faq-item[open] .toggle-icon {
  transform: rotate(135deg);
}

.faq-content {
  padding: 0.5rem 0 1rem 0;
  font-weight: 900;
}

.faq a {
  color: var(--muted-olive);
}

.faq a:hover {
  text-decoration: underline;
}

.faq .email {
  color: var(--muted-olive);
}

.faq .email:hover {
  text-decoration: underline;
}

/* footer */
.footer {
  padding: 1rem 0 1rem 0;
  background-color: var(--ash-brown);
}

.footer-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--vanilla-cream);
  gap: 1rem;
}

.footer-right {
  display: flex;
  font-size: var(--size-14);
  align-items: center;
}

.footer-left .social-link svg {
  height: 32px;
  width: 32px;
  transition: transform 0.3s ease;
}

.footer-left .social-link:hover svg {
  transform: translateY(-5px);
}