/* Hack4Love — Custom Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  --deep-teal: #0f313c;
  --light-blue: #76c8d6;
  --cream: #eff1e1;
  --dark-neutral: #201c1d;
  --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--dark-neutral);
  background-color: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  line-height: 1.15;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ==================== LAYOUT ==================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--cream { background-color: var(--cream); color: var(--dark-neutral); }
.section--teal { background-color: var(--deep-teal); color: var(--white); }
.section--white { background-color: var(--white); color: var(--dark-neutral); }
.section--dark { background-color: var(--dark-neutral); color: var(--white); }

/* ==================== TYPOGRAPHY ==================== */

.text-teal { color: var(--deep-teal); }
.text-blue { color: var(--light-blue); }
.text-cream { color: var(--cream); }
.text-white { color: var(--white); }
.text-dark { color: var(--dark-neutral); }

.heading-xl {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

.heading-lg {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.heading-md {
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
}

.heading-sm {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
}

.text-lg { font-size: 1.125rem; }
.text-md { font-size: 1rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.text-muted { opacity: 0.7; }
.text-center { text-align: center; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ==================== BUTTONS ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  gap: 8px;
}

.btn:hover {
  transform: scale(1.03);
}

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

.btn--primary {
  background-color: var(--light-blue);
  color: var(--deep-teal);
  border-color: var(--light-blue);
}

.btn--primary:hover {
  background-color: #5fbfcf;
  border-color: #5fbfcf;
}

.btn--secondary {
  background-color: transparent;
  color: var(--deep-teal);
  border-color: var(--deep-teal);
}

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

.btn--outline-light {
  background-color: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn--outline-light:hover {
  background-color: var(--white);
  color: var(--deep-teal);
}

.btn--teal {
  background-color: var(--deep-teal);
  color: var(--white);
  border-color: var(--deep-teal);
}

.btn--teal:hover {
  background-color: #173f4d;
  border-color: #173f4d;
}

.btn--sm {
  padding: 10px 24px;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 18px 40px;
  font-size: 1.125rem;
}

/* ==================== CARDS ==================== */

.card {
  background: var(--white);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 40px rgba(15, 49, 60, 0.1);
}

.card--teal {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.card--teal:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.card--flat {
  box-shadow: none;
  border: 1px solid rgba(32, 28, 29, 0.08);
}

/* ==================== GRID ==================== */

.grid {
  display: grid;
  gap: 24px;
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid--4, .grid--3, .grid--2 { grid-template-columns: 1fr; }
}

/* ==================== HEADER ==================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(239, 241, 225, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(32, 28, 29, 0.06);
  transition: all 0.3s ease;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.header__logo img {
  height: 40px;
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.header__nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--deep-teal);
  transition: color 0.2s ease;
  position: relative;
}

.header__nav a:hover {
  color: var(--light-blue);
}

.header__nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--light-blue);
  transition: width 0.25s ease;
}

.header__nav a:hover::after {
  width: 100%;
}

.header__cta {
  margin-left: 8px;
}

/* Mobile menu */
.header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.header__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--deep-teal);
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .header__toggle { display: flex; }
  .header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--cream);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 24px;
    transition: right 0.35s ease;
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
  }
  .header__nav.active { right: 0; }
  .header__cta { margin-left: 0; }
  .mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
  }
  .mobile-overlay.active { display: block; }
}

/* ==================== FOOTER ==================== */

.footer {
  background: var(--deep-teal);
  color: var(--white);
  padding: 64px 0 32px;
  position: relative;
  overflow: hidden;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer__logo img {
  height: 48px;
  width: auto;
  margin-bottom: 16px;
}

.footer__desc {
  font-size: 0.9375rem;
  opacity: 0.7;
  line-height: 1.7;
  max-width: 280px;
}

.footer__heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  color: var(--light-blue);
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer__links a {
  font-size: 0.9375rem;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer__links a:hover { opacity: 1; }

.footer__newsletter-input {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.footer__newsletter-input input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.footer__newsletter-input input::placeholder {
  color: rgba(255,255,255,0.4);
}

.footer__newsletter-input input:focus {
  border-color: var(--light-blue);
}

.footer__newsletter-input button {
  padding: 12px 20px;
  border-radius: 9999px;
  background: var(--light-blue);
  color: var(--deep-teal);
  border: none;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.footer__newsletter-input button:hover {
  background: #5fbfcf;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  opacity: 0.5;
}

.footer__bottom a {
  color: var(--light-blue);
  opacity: 1;
}

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

.footer__watermark {
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 300px;
  height: 300px;
  opacity: 0.04;
  pointer-events: none;
}

@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer__bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* ==================== HERO ==================== */

.hero {
  padding: 160px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero--teal {
  background: var(--deep-teal);
  color: var(--white);
}

.hero__content {
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.hero__badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero__badge--blue {
  background: rgba(118, 200, 214, 0.15);
  color: var(--light-blue);
}

.hero__title {
  margin-bottom: 24px;
}

.hero__subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.7;
  opacity: 0.85;
  margin-bottom: 40px;
  max-width: 600px;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero__watermark {
  position: absolute;
  right: -100px;
  top: 50%;
  transform: translateY(-50%);
  width: 500px;
  height: 500px;
  opacity: 0.06;
  pointer-events: none;
}

@media (max-width: 640px) {
  .hero { padding: 120px 0 64px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }
}

/* ==================== VIDEO ==================== */

.video-bg {
  position: relative;
  overflow: hidden;
}

.video-bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.video-bg__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 49, 60, 0.85);
  z-index: 1;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  border-radius: 16px;
  overflow: hidden;
  background: var(--dark-neutral);
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-embed__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--deep-teal);
  cursor: pointer;
  transition: background 0.3s;
}

.video-embed__placeholder:hover {
  background: #173f4d;
}

.video-embed__play {
  width: 72px;
  height: 72px;
  background: var(--light-blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}

.video-embed__placeholder:hover .video-embed__play {
  transform: scale(1.1);
}

.video-embed__play svg {
  width: 24px;
  height: 24px;
  fill: var(--deep-teal);
  margin-left: 3px;
}

/* ==================== COUNTDOWN ==================== */

.countdown {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.countdown__item {
  text-align: center;
}

.countdown__number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  color: var(--light-blue);
}

.countdown__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.6;
  margin-top: 4px;
}

.countdown__sep {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  opacity: 0.3;
}

/* ==================== STATS ==================== */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.stat__number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--light-blue);
  line-height: 1;
  margin-bottom: 8px;
}

.stat__label {
  font-size: 1rem;
  opacity: 0.7;
}

@media (max-width: 640px) {
  .stats { grid-template-columns: 1fr; gap: 24px; }
}

/* ==================== MATCHUP CARDS ==================== */

.matchup-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px;
  transition: all 0.3s ease;
}

.matchup-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.matchup-card__vs {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--light-blue);
  margin-bottom: 4px;
}

.matchup-card__team {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.matchup-card__org {
  font-size: 0.9375rem;
  opacity: 0.7;
  margin-bottom: 12px;
}

.matchup-card__challenge {
  font-size: 0.875rem;
  opacity: 0.6;
  line-height: 1.6;
  margin-bottom: 20px;
}

.matchup-card__actions {
  display: flex;
  gap: 8px;
}

/* ==================== LEADERBOARD ==================== */

.leaderboard {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.leaderboard__row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
}

.leaderboard__row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.leaderboard__rank {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  width: 32px;
  color: var(--light-blue);
}

.leaderboard__name {
  flex: 1;
  font-weight: 600;
}

.leaderboard__votes {
  font-size: 0.875rem;
  opacity: 0.6;
}

.leaderboard__bar {
  width: 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.leaderboard__bar-fill {
  height: 100%;
  background: var(--light-blue);
  border-radius: 3px;
}

/* ==================== JUDGE CARDS ==================== */

.judge-card {
  text-align: center;
  padding: 32px 20px;
}

.judge-card__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--light-blue);
}

.judge-card__name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 4px;
}

.judge-card__title {
  font-size: 0.8125rem;
  opacity: 0.6;
}

/* ==================== FORMS ==================== */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 6px;
  color: inherit;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid rgba(32, 28, 29, 0.15);
  background: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--dark-neutral);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--light-blue);
  box-shadow: 0 0 0 3px rgba(118, 200, 214, 0.15);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ==================== STEPS ==================== */

.steps {
  display: flex;
  gap: 32px;
  counter-reset: step;
}

.step {
  flex: 1;
  counter-increment: step;
  position: relative;
}

.step__number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--light-blue);
  color: var(--deep-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.125rem;
  margin-bottom: 16px;
}

.step__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.step__desc {
  font-size: 0.9375rem;
  opacity: 0.7;
  line-height: 1.6;
}

.step__connector {
  position: absolute;
  top: 24px;
  left: 56px;
  right: -24px;
  height: 2px;
  background: var(--light-blue);
  opacity: 0.3;
}

.step:last-child .step__connector { display: none; }

@media (max-width: 768px) {
  .steps { flex-direction: column; gap: 24px; }
  .step__connector { display: none; }
}

/* ==================== MODAL ==================== */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: 20px;
  padding: 40px;
  max-width: 480px;
  width: 100%;
  position: relative;
}

.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--dark-neutral);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.modal__close:hover { opacity: 1; }

/* ==================== TABS ==================== */

.tabs {
  display: flex;
  gap: 4px;
  background: rgba(32, 28, 29, 0.06);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 32px;
}

.tab {
  flex: 1;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--dark-neutral);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.tab.active {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ==================== UTILITIES ==================== */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mt-64 { margin-top: 64px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-600 { max-width: 600px; }
.max-w-700 { max-width: 700px; }
.max-w-800 { max-width: 800px; }
.w-full { width: 100%; }
.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

/* ==================== ANIMATIONS ==================== */

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
