@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&display=swap');

/* Global Styles */
body {
  margin: 0;
  color: #eee;
  line-height: 1.5;
  background-color: #660000;
  min-height: 100dvh;
  font-family: Lexend, Arial, Helvetica, sans-serif;
  display: flex;
  flex-direction: column;
}

a {
  color: #ffc401;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

h1,
h2,
h3,
h4 {
  font-weight: 500;
  font-family: DM Serif Display, Arial, Helvetica, sans-serif;
}

hr {
  width: 80%;
  height: 2px;
  background-color: #701809;
  border: none;
}

input,
button,
textarea {
  font-family: inherit;
}

.main-body {
  width: 100%;
  height: auto;
}

/* Navigation Bar */
.mega-menu {
  display: flex;
  align-items: center;
  position: sticky;
  top: 0px;
  height: 90px;
  z-index: 100;
  padding-inline: 28px;
  transition: all 0.15s;
}

.mega-menu.transparent {
  margin-top: -90px;
}

.logo {
  margin-right: 24px;
  width: 48px;
}

.mega-menu a {
  display: block;
  width: max-content;
  color: #dfbb78a9;
  border-radius: 8px;
  text-align: center;
  padding: 8px 24px;
  text-decoration: none;
  font-size: 18px;
  transition: all 0.2s;
  position: relative;
}

.menu-links {
  display: flex;
  gap: 12px;
}

.menu-icon {
  display: none;
  margin-left: auto;
}

/* Collapse all of the links on smaller screens to a hamburger menu */
@media (width < 768px) {
  .menu-links {
    position: absolute;
    flex-direction: column;
    top: 90px;
    left: 0;
    width: 100%;
    background-color: #330000;
    padding: 24px;
    z-index: 100;
    gap: 12px;
    opacity: 0;
    transition: all 0.2s;
    pointer-events: none;
  }

  .menu-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-content: center;
    color: #dfbb78a9;
    border-radius: 8px;
    cursor: pointer;
  }

  .mega-menu a {
    width: 100%;
  }

  #menu-toggle:checked + .menu-links {
    opacity: 1;
    pointer-events: all;
  }

  body:has(#menu-toggle:checked) .menu-icon {
    color: #ffae18;
    background: #ebbd345e;
  }

  body:has(#menu-toggle:checked) .mega-menu {
    background-color: #330000;
  }

  body:has(#menu-toggle:checked) {
    overflow: hidden;
  }
}

/* Change the color of links on hover */
.mega-menu a:hover {
  background-color: #ebbd345e;
  color: #ffae18;
}

/* Highlights the current page if active */
.mega-menu a.active {
  background-color: #ffae1841;
  color: #ffae18;
}

.mega-menu.scrolled {
  background-color: #330000;
}

/* Home Page */
/* hero banner styling */
.main-hero {
  background: url('./assets/twice-cover.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 5% 10%;
  padding-block: max(100px, 5%);
}

.hp-title,
.hp-desc,
.hp-desc-2,
.hp-platforms,
.cta {
  opacity: 0;
  transform: translateY(24px);
  animation: to-up 1s ease forwards;
}

.hp-title {
  padding-bottom: 10px;
  animation-delay: 0ms;
}

.hp-desc {
  max-width: 600px;
  text-wrap: balance;
  font-size: 20px;
  margin-block: 28px;
  animation-delay: 100ms;
}

.hp-desc-2 {
  animation-delay: 200ms;
}

.hp-platforms {
  font-size: 36px;
  margin-block: 12px;
  font-weight: 500;
  color: #fffa;
  animation-delay: 300ms;
}

.cta {
  display: inline-block;
  padding: 15px 20px;
  background-color: #ffae1779;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
  font-size: 22px;
  animation-delay: 400ms;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  width: max-content;
  gap: 12px;
}

.cta:hover {
  background-color: #fbf5f3;
  color: #ffae18;
}

@keyframes to-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Announcements */
.announcements {
  padding: 24px;
  gap: 24px;
}

.announcement {
  display: flex;
  gap: 24px;
  align-items: center;
}

.announcement-img {
  width: min(500px, 50%);
  border-radius: 12px;
  height: max-content;
  aspect-ratio: 1;
}

.announcement-title {
  margin-top: 0;
  font-size: 22px;
}

.announcement-desc {
  text-align: justify;
  border-top: 2px solid #ec6b6b5b;
  padding-top: 16px;
  opacity: 0.8;
}

@media (width < 768px) {
  .announcement {
    flex-direction: column;
  }

  .announcement-img {
    width: 100%;
  }
}

/* Secondary Banner */
.secondary-banner {
  height: 600px;
  position: relative;
  display: flex;
  align-items: center;
}

.secondary-banner::before {
  content: '';
  position: absolute;
  z-index: 1;
  inset: 0;
  background: #0008;
}

.secondary-banner video {
  position: absolute;
  object-fit: cover;
  inset: 0;
  width: 100%;
  height: 100%;
}

.secondary-banner .banner-content {
  padding: 10%;
  position: relative;
  z-index: 2;
}

/* Showcase Album */
.image-column {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-bottom: 48px;
}

.image-column a {
  width: min(400px, 80%);
  transition: all 0.3s ease;
  line-height: 0;
  border-radius: 8px;
  overflow: hidden;
}

.image-column img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.image-column a:hover {
  transform: scale(1.02);
  box-shadow: 0 0 0 2px #ffae18;
}

.section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  width: min(1340px, 100%);
  margin: 0 auto;
  padding: 24px 4px;
}

.section h2,
.section-header {
  font-size: 28px;
  margin-block: 12px;
}

/* About Page */
.about-hero {
  padding: 5% 10%;
  text-align: justify;
  padding-top: max(100px, 5%);
  background: #300 url('./assets/twice-about-cover.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (width < 768px) {
  .about-hero {
    background: #300;
  }
}

.about-hero p {
  max-width: 600px;
  color: #c5bfbe;
  text-wrap: balance;
}

.member-poses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  padding: 12px;
  transition: all 0.3s ease;
}

.member-poses img {
  width: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
}

.members {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  justify-content: center;
  width: 100%;
  padding: 12px;
  gap: 12px;
}

.member {
  background-color: #000;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 8px;
  flex-direction: column;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 1px #681b04;
}

.member h3 {
  margin-bottom: 0;
}

.member p {
  font-size: 0.8rem;
}

.member img {
  width: 100%;
  object-fit: cover;
  position: absolute;
  transform: scale(1);
  transition: all 0.3s ease;
  inset: 0;
}

.member .member-details {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 0 24px;
  flex-direction: column;
  z-index: 1;
  transition: all 0.3s ease;
  transform: translateY(calc(100% - 60px));
}

.member::before {
  content: '';
  background: linear-gradient(to bottom, transparent 0%, #000 100%);
  position: absolute;
  inset: 0;
  top: 60%;
  z-index: 1;
  transition: all 0.3s ease;
}

/* Blur all members that are not hovered */
body:has(.member:hover) .member:not(:hover),
body:has(.member:hover) .member-poses {
  opacity: 0.8;
  filter: blur(2px);
}

.member:hover {
  transform: scale(1.02);
  box-shadow: 0 0 0 1px #ffae18;
}

.member:hover::before {
  top: 0;
}

.member:hover .member-details {
  transform: translateY(0);
}

.member:hover img {
  transform: scale(1.05);
  filter: brightness(0.4);
}

/* Contact Page */
.contact-location {
  text-align: center;
  padding-block: 28px;
}

iframe {
  background: url('./assets/map-placeholder.webp');
  background-size: cover;
  background-position: center;
}

.contact {
  display: flex;
  justify-content: center;
  color: #000;
  padding-block: 20px;
}

.contact fieldset {
  width: min(700px, 90%);
  border-radius: 6px;
  background-color: #ffffff;
  border: none;
  padding: 24px;
}

.contact form {
  display: flex;
  flex-direction: column;
}

.contact input,
.contact textarea {
  padding: 12px;
  font-size: 16px;
  flex-grow: 1;
  border-radius: 5px;
  border: 1px solid #999;
  resize: vertical;
  margin-bottom: 20px;
}

.contact button {
  padding: 12px;
  font-size: 16px;
  border-radius: 5px;
  border: none;
  background-color: #900;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact button:hover {
  background-color: #ffae18;
}

.contact h2 {
  text-align: center;
}

/* Footer */
footer {
  margin-top: auto;
  background: #330000;
  color: #fff9;
  display: grid;
  text-align: center;
  grid-template-columns: repeat(auto-fit, minmax(min(700px, 100%), 1fr));
  flex-direction: column;
  place-items: center;
  padding: 48px 12px;
  gap: 12px;
}

.footer-img {
  width: min(400px, 80%);
}

.footer .social-media {
  display: flex;
  gap: 12px;
}

.social-media a {
  text-decoration: none;
  color: #fff;
  font-size: 48px;
}

.footer-img-jyp,
.social-media a {
  opacity: 0.6;
  transition: all 0.2s ease;
}

.footer-img-jyp:hover,
.social-media a:hover {
  opacity: 1;
}
