/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Geist, Inter, sans-serif;
  background: #fffdf9;
  color: #222;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

/* === Navbar === */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: transparent;

  /* transparent at top */
  border-bottom: none;
  padding: 20px 40px;
  transition:
    background 0.3s ease,
    box-shadow 0.3s ease,
    padding 0.3s ease;
}

header.scrolled {
  background: #fff;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 10px rgb(0 0 0 / 8%);
  padding: 10px 40px;
}

.nav-container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: relative;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo img {
  height: 65px;
  width: auto;
}

.logo .chapter {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: #444;
}

/* Center: Nav links */
.nav-center {
  justify-self: center;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
}

.nav-links a {
  font-size: 1rem;
  font-weight: 500;
  color: #222;
  transition:
    color 0.3s ease,
    border-bottom 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #064;
  border-bottom: 2px solid #064;
  padding-bottom: 2px;
}

/* === Hero === */
.hero {
  background: #fffdf9;
  min-height: calc(100vh - 250px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-align: center;
  padding: 0 20px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: clamp(
    150px,
    calc((100vw - min(800px, calc(100vw - 40px))) / 2 + 100px),
    500px
  );
  height: 100%;
  background: #315ca9;
  clip-path: polygon(0 0, 100% 0, 66% 100%, 0 100%);
  z-index: 0;
  opacity: 0.15;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: clamp(
    150px,
    calc((100vw - min(800px, calc(100vw - 40px))) / 2 + 100px),
    500px
  );
  height: 100%;
  background: #064;
  clip-path: polygon(33% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
  opacity: 0.15;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  background: #fffdf9;
  padding: 48px 40px;
  border-radius: 24px;
}

/* === Playing Cards === */
.playing-cards {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.playing-card {
  position: absolute;
  width: 180px;
  height: 240px;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  box-shadow:
    0 4px 12px rgb(0 0 0 / 15%),
    0 1px 3px rgb(0 0 0 / 10%),
    inset 0 0 0 1px rgb(0 0 0 / 5%);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  animation: float 6s ease-in-out infinite;
  cursor: pointer;
  pointer-events: auto;
}

.playing-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* Card Positions - Scattered around the hero */
.card-1 {
  --rotate: -12deg;

  top: 8%;
  left: 5%;
  transform: rotate(-12deg);
  animation-delay: 0s;
}

.card-2 {
  --rotate: 8deg;

  top: 15%;
  left: 15%;
  transform: rotate(8deg);
  animation-delay: 0.5s;
  width: 160px;
  height: 210px;
}

.card-3 {
  --rotate: 15deg;

  top: 5%;
  right: 12%;
  transform: rotate(15deg);
  animation-delay: 1s;
}

.card-4 {
  --rotate: -8deg;

  top: 45%;
  left: 3%;
  transform: rotate(-8deg);
  animation-delay: 1.5s;
  width: 170px;
  height: 225px;
}

.card-5 {
  --rotate: 10deg;

  bottom: 12%;
  left: 8%;
  transform: rotate(10deg);
  animation-delay: 2s;
}

.card-6 {
  --rotate: -15deg;

  top: 50%;
  right: 5%;
  transform: rotate(-15deg);
  animation-delay: 2.5s;
}

.card-7 {
  --rotate: 12deg;

  bottom: 15%;
  right: 10%;
  transform: rotate(12deg);
  animation-delay: 3s;
  width: 165px;
  height: 218px;
}

.card-8 {
  --rotate: -10deg;

  top: 25%;
  right: 5%;
  transform: rotate(-10deg);
  animation-delay: 3.5s;
  width: 155px;
  height: 205px;
  opacity: 0.8;
}

.card-9 {
  --rotate: 18deg;

  bottom: 25%;
  left: 18%;
  transform: rotate(18deg);
  animation-delay: 4s;
  width: 158px;
  height: 208px;
  opacity: 0.85;
}

.card-10 {
  --rotate: -5deg;

  top: 35%;
  left: 12%;
  transform: rotate(-5deg);
  animation-delay: 4.5s;
  width: 162px;
  height: 214px;
  opacity: 0.9;
}

/* Float Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--rotate));
  }

  50% {
    transform: translateY(-15px) rotate(var(--rotate));
  }
}

/* Hover effect */
.playing-card:hover {
  transform: scale(1.05) rotate(0deg) !important;
  z-index: 5;
  box-shadow:
    0 8px 24px rgb(0 0 0 / 20%),
    0 2px 6px rgb(0 0 0 / 15%);
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  margin-bottom: 15px;
  color: #036;
}

.hero p {
  font-size: clamp(1rem, 3vw, 1.2rem);
  margin-bottom: 30px;
  color: #333;
}

.hero-button {
  background: #064;
  color: #fff;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  transition:
    background 0.2s,
    transform 0.2s;
}

.hero-button:hover {
  background: #015237;
  transform: translateY(-2px);
}

/* === Sections === */
.section {
  padding: 100px 60px;
}

.section.alt {
  background: #faf7f2;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section h2 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 25px;
  color: #036;
}

.section p {
  font-size: 1.1rem;
  color: #444;
}

/* === Members Grid === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 12px rgb(0 0 0 / 8%);
  padding: 20px;
  text-align: center;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgb(0 0 0 / 10%);
}

.card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 15px;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #036;
}

.card p {
  font-size: 1rem;
  color: #555;
}

/* === Rush Cards (slanted style) === */
.rush-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.rush-card {
  background: #064;
  color: #fff;
  padding: 40px;
  border-radius: 16px;
  transform: skew(-3deg);
  box-shadow: 0 6px 12px rgb(0 0 0 / 10%);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.rush-card:hover {
  transform: skew(-3deg) translateY(-5px);
  box-shadow: 0 10px 20px rgb(0 0 0 / 15%);
}

.rush-card h3 {
  margin-bottom: 12px;
  font-size: 1.4rem;
  font-weight: 600;
}

.rush-card p {
  font-size: 1rem;
  color: #fff;
}

/* === Footer === */
footer {
  background: #036;
  color: #fafafa;
  padding: 60px 40px 30px;
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

footer h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  font-weight: 600;
}

footer a {
  color: #fafafa;
  border-bottom: 1px solid rgb(255 255 255 / 30%);
}

footer a:hover {
  color: #fff;
  border-bottom-color: #fff;
}

footer .copyright {
  margin-top: 20px;
  font-size: 0.85rem;
  color: #ccc;
}

/* === Mobile Navbar === */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  z-index: 1002;
  position: relative;
  padding: 8px;
  border: 0;
  background: transparent;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #036;
  border-radius: 3px;
  transition: 0.3s;
}

/* Mobile menu overlay (darkened backdrop) */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgb(0 0 0 / 50%);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

@media (width <= 1024px) {
  .playing-card {
    width: 140px;
    height: 185px;
  }

  .card-2 {
    width: 130px;
    height: 172px;
  }

  .card-4 {
    width: 135px;
    height: 178px;
  }

  .card-7 {
    width: 132px;
    height: 175px;
  }

  .card-8,
  .card-9,
  .card-10 {
    display: none;
  }
}

@media (width <= 768px) {
  .playing-card {
    width: 110px;
    height: 145px;
    opacity: 0.7;
  }

  .card-2,
  .card-4,
  .card-7 {
    width: 110px;
    height: 145px;
  }

  .card-5,
  .card-6,
  .card-7 {
    display: none;
  }
}

@media (width <= 650px) {
  .hero::before,
  .hero::after {
    display: none;
  }

  .playing-cards {
    display: none;
  }

  .hero-content {
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    padding: 24px 20px;
  }

  body.home-page::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: #315ca9;
    clip-path: polygon(0 0, 100% 0, 100% 60%, 0 100%);
    opacity: 0.12;
    z-index: 999;
    pointer-events: none;
  }

  body.home-page::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 300px;
    background: #064;
    clip-path: polygon(0 40%, 100% 0, 100% 100%, 0 100%);
    opacity: 0.12;
    z-index: 999;
    pointer-events: none;
  }
}

@media (width <= 768px) {
  /* Change grid to push hamburger to the right */
  .nav-container {
    grid-template-columns: auto 1fr;
  }

  .nav-center {
    justify-self: end;
    display: flex;
    align-items: center;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    gap: 30px;
    width: 280px;
    max-width: 80vw;
    padding: 100px 40px 40px;
    box-shadow: -4px 0 12px rgb(0 0 0 / 15%);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: inline-block;
    font-size: 1.2rem;
    padding: 10px 0;
    border-bottom: 2px solid transparent;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: #064;
    border-bottom-color: #064;
  }

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

  .menu-toggle.open span {
    background: #036;
  }

  .section {
    padding: 60px 20px;
  }

  .hero {
    min-height: calc(100vh - 200px);
  }

  .hero::before,
  .hero::after {
    width: clamp(
      80px,
      calc((100vw - min(800px, 100vw - 40px)) / 2 + 50px),
      150px
    );
    opacity: 0.1;
  }

  .grid,
  .rush-grid {
    gap: 20px;
  }
}

/* Hamburger menu animation - transforms to X when open */
.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}
