/* ------------------------------------------------
   Giving Day — UChicago Engineering Clubs
   ------------------------------------------------ */

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

:root {
  --maroon: #800000;
  --maroon-dark: #5a0000;
  --gold: #e6a817;
  --light-gray: #f5f5f0;
  --dark: #212121;
  --white: #ffffff;
  --radius: 8px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--dark);
  line-height: 1.6;
}

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

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
  cursor: pointer;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--maroon);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--maroon-dark);
}

.btn-secondary {
  background: var(--white);
  color: var(--maroon);
  border: 2px solid var(--maroon);
}

.btn-secondary:hover {
  background: var(--maroon);
  color: var(--white);
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 1rem 0;
  transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  background: rgba(90, 0, 0, 0.95);
  padding: 0.6rem 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: 'Inter', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: normal;
  color: var(--white);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.nav-brand:hover {
  opacity: 1;
}

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-cta {
  background: var(--gold);
  color: var(--dark) !important;
  opacity: 1 !important;
  padding: 0.45rem 1.25rem;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover {
  background: #f0b830;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .navbar {
    background: rgba(74, 0, 0, 0.97);
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(74, 0, 0, 0.97);
    backdrop-filter: blur(8px);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }

  .nav-links.open {
    max-height: 300px;
    opacity: 1;
    pointer-events: auto;
  }

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

  .nav-links a {
    display: block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    opacity: 1;
  }

  .nav-cta {
    margin: 0.5rem 1.5rem 1rem;
    text-align: center;
    border-radius: 50px;
    padding: 0.6rem 1.25rem !important;
  }
}

/* --- Hero wrapper (hero + progress bar fills full viewport) --- */
.hero-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #2a0000;
}

.scroll-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  align-self: center;
  margin: 0.5rem 0 1.75rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  text-decoration: none;
  opacity: 0.65;
  animation: scrollBounce 2.2s ease-in-out infinite;
  transition: opacity 0.2s, border-color 0.2s;
  position: relative;
  z-index: 2;
}

.scroll-indicator:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.75);
}

.scroll-chevron {
  display: block;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(45deg);
  margin-top: -3px;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* --- Hero --- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #800000 0%, #4a0000 40%, #2a0000 100%);
  color: var(--white);
  text-align: left;
  transition: margin-top 0.3s ease;
  padding: 7rem 1.5rem 5rem;
  overflow: hidden;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.hero-logo {
  flex: 0 0 auto;
}

.hero-logo-img {
  width: 260px;
  max-width: 100%;
  display: block;
}

.hero-text {
  flex: 1;
}

.hero-brand {
  font-family: 'Inter', 'Helvetica Neue', 'Arial', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: lowercase;
  opacity: 0;
  margin-bottom: 2rem;
  animation: heroBrandIn 0.8s ease forwards 0.2s;
}

@keyframes heroBrandIn {
  from { opacity: 0; }
  to { opacity: 0.7; }
}

.hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 3.75rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.85;
  margin-bottom: 2.5rem;
  font-weight: 300;
}

.hero .btn-primary {
  background: var(--gold);
  color: var(--dark);
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(230, 168, 23, 0.35);
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.hero .btn-primary:hover {
  background: #f0b830;
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(230, 168, 23, 0.55);
}



/* Hero countdown */
.hero-countdown {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.25rem;
  margin-bottom: 2rem;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.countdown-number {
  font-family: 'Inter', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.6;
  margin-top: 0.3rem;
}

.countdown-sep {
  font-size: 2rem;
  font-weight: 300;
  opacity: 0.4;
  margin-bottom: 1rem;
}

/* Progress section (below header) */
.progress-section {
  background: linear-gradient(180deg, #1a0000 0%, #2a0000 100%);
  padding: 2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--white);
}

/* Hero progress bar */
.hero-progress {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}

.progress-header {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.progress-raised {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
}

.progress-goal {
  font-size: 0.9rem;
  opacity: 0.7;
}

.progress-goal strong {
  font-weight: 600;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold), #f0c040);
  border-radius: 5px;
  transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(204, 138, 0, 0.4);
}

.progress-donors {
  font-size: 0.8rem;
  opacity: 0.55;
  margin-top: 0.4rem;
}

/* Hero entrance animations */
.hero-anim {
  opacity: 0;
  transform: translateY(24px);
  animation: heroFadeUp 0.7s ease forwards;
}

.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }
.hero-anim:nth-child(5) { animation-delay: 1.0s; }
.hero-anim:nth-child(6) { animation-delay: 1.2s; }

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

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- Sections --- */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--light-gray);
}

.section h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 2.25rem;
  font-weight: 400;
  margin-bottom: 1.25rem;
  text-align: center;
  color: var(--maroon);
}

.section > .container > p {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
  color: #555;
  line-height: 1.8;
}

/* --- Card Grid --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  transform: translateY(-6px);
  border-bottom-color: var(--maroon);
}

.card-img {
  background: linear-gradient(135deg, #f0efeb, #e8e8e4);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  transition: background 0.3s;
}

.card:hover .card-img {
  background: linear-gradient(135deg, #ece8e0, #e0ddd6);
}

.card-img img {
  max-height: 120px;
  object-fit: contain;
}

.card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-body h3 {
  margin-bottom: 0.5rem;
  color: var(--maroon);
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #e0e0e0;
  gap: 1rem;
}

.card-link {
  display: inline-block;
  color: var(--maroon);
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}

.card-give {
  font-size: 0.9rem;
  padding: 0.4rem 1.1rem;
  white-space: nowrap;
}

.card-body p {
  padding-bottom: 1rem;
}

.card-link::after {
  content: " \2192";
  transition: transform 0.2s;
  display: inline-block;
}

.card:hover .card-link::after {
  transform: translateX(4px);
}

.card-link:hover {
  color: var(--maroon-dark);
}

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  visibility: hidden;
  transition: background 0.3s, opacity 0.3s, visibility 0.3s;
}

.modal.active {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.6);
}

.modal-content {
  position: relative;
  display: flex;
  width: 90vw;
  height: 85vh;
  max-width: 1100px;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.active .modal-content {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  background: none;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--dark);
}

.modal-left {
  flex: 1;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-left h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 400;
  color: var(--maroon);
  margin-bottom: 1rem;
}

.modal-left p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  color: #444;
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.modal-right {
  flex: 1;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* --- Carousel --- */
.carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.carousel-slide img {
  max-width: 100%;
  max-height: calc(100% - 3rem);
  object-fit: contain;
  border-radius: var(--radius);
}

.carousel-caption {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #666;
  text-align: center;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  border: none;
  font-size: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
}

.carousel-btn:hover {
  background: var(--light-gray);
}

.carousel-prev {
  left: 0.75rem;
}

.carousel-next {
  right: 0.75rem;
}

.carousel-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: #ccc;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
  background: var(--maroon);
  transform: scale(1.25);
}

/* --- Modal Responsive --- */
@media (max-width: 768px) {
  .modal-content {
    flex-direction: column;
    height: 95vh;
    width: 95vw;
  }

  .modal-left {
    padding: 2rem 1.5rem;
    flex: 0 0 auto;
  }

  .modal-right {
    flex: 1;
    min-height: 250px;
  }
}

/* --- Gallery Strip --- */
.gallery-strip {
  overflow: hidden;
  width: 100%;
  margin-top: 2.5rem;
}

.gallery-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: galleryScroll 70s linear infinite;
}

.gallery-track:hover {
  animation-play-state: paused;
}

.gallery-item {
  flex: 0 0 auto;
  width: 320px;
  height: 210px;
  border-radius: var(--radius);
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@keyframes galleryScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Stats / Impact --- */
.stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--maroon);
}

.stat-label {
  display: block;
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.25rem;
}

/* --- Donate Section --- */
.donate-section {
  text-align: center;
}

.donate-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.donate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.donate-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-top: 4px solid var(--maroon);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.donate-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.donate-card.selected {
  border-top-color: var(--maroon);
  box-shadow: 0 0 0 3px var(--maroon), 0 6px 20px rgba(0,0,0,0.12);
  transform: translateY(-4px);
}

.donate-card-logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.donate-card-logo img {
  max-height: 64px;
  max-width: 140px;
  object-fit: contain;
}

.donate-card h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--maroon);
  margin-bottom: 0.5rem;
}

.donate-card-tagline {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.amount-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.amount-chip {
  padding: 0.4rem 0.85rem;
  border: 2px solid var(--maroon);
  border-radius: 999px;
  background: transparent;
  color: var(--maroon);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.amount-chip:hover,
.amount-chip.selected {
  background: var(--maroon);
  color: var(--white);
}

.amount-custom {
  display: flex;
  align-items: center;
  border: 2px solid var(--maroon);
  border-radius: 999px;
  padding: 0 0.85rem;
  background: transparent;
  transition: background 0.15s;
}

.amount-custom:focus-within {
  background: var(--maroon);
}

.amount-custom-prefix {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--maroon);
  transition: color 0.15s;
}

.amount-custom:focus-within .amount-custom-prefix {
  color: var(--white);
}

.amount-custom-input {
  width: 64px;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dark);
  padding: 0.4rem 0 0.4rem 0.1rem;
  outline: none;
  -moz-appearance: textfield;
}

.amount-custom-input::-webkit-outer-spin-button,
.amount-custom-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.amount-custom-input::placeholder {
  color: var(--maroon);
  opacity: 0.7;
}

.amount-custom:focus-within .amount-custom-input,
.amount-custom:focus-within .amount-custom-input::placeholder {
  color: var(--white);
  opacity: 1;
}

.donate-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2rem;
}

.donate-card-all {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.25rem 2rem;
}

.donate-card-all h3 {
  margin-bottom: 0;
  white-space: nowrap;
}

.donate-card-all .donate-card-tagline {
  margin-bottom: 0;
  text-align: left;
}

.donate-cta {
  width: calc((100% - 3rem) / 3);
  text-align: center;
}

.btn-gold {
  background: var(--gold);
  color: var(--dark);
  font-weight: 700;
  text-align: center;
}

.btn-gold:hover {
  background: #c9901a;
}

@media (max-width: 768px) {
  .donate-grid {
    grid-template-columns: 1fr;
  }

  .donate-card-all {
    flex-direction: column;
    gap: 0.5rem;
  }

  .donate-card-all .donate-card-tagline {
    text-align: center;
  }

  .donate-cta {
    width: 100%;
  }
}

/* --- Footer --- */
.footer {
  background: var(--dark);
  color: #aaa;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .hero {
    padding: 5rem 1.5rem 3.5rem;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .stats {
    gap: 1.5rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .countdown-number {
    font-size: 1.75rem;
  }

  .countdown-unit {
    min-width: 44px;
  }

  .countdown-sep {
    font-size: 1.5rem;
  }

  .hero-progress {
    max-width: 100%;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .hero-logo-img {
    width: 180px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-countdown {
    justify-content: center;
  }
}
