/* Team MICH — Assistantly-inspired design system
   Foundation: shipwreck-dashboard-shell (radii, button feel, breakpoint logic)
   Look:       light cream + deep navy + warm red, scroll-revealed typography */

:root {
  --bg: #faf6ee;
  --bg-soft: #f3ecdf;
  --bg-card: #ffffff;
  --ink: #15172e;
  --ink-soft: #3a3f5e;
  --muted: #6b7185;
  --line: rgba(21, 23, 46, 0.08);

  --accent: #ef3e3e;       /* MS red */
  --accent-deep: #c92020;
  --indigo: #4338ca;       /* deep blue accent (sea cliff) */
  --sun: #f6b93b;          /* warm yellow card */
  --grass: #2bb673;        /* MS green */
  --sky: #4a90e2;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --shadow-card: 0 18px 40px rgba(21, 23, 46, 0.08), 0 2px 6px rgba(21, 23, 46, 0.04);
  --shadow-pop: 0 26px 60px rgba(21, 23, 46, 0.18);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1240px;

  /* Opt out of mobile-browser auto/forced dark mode so the white sponsor
     cards never get inverted (which hid several dark logos). */
  color-scheme: light;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
  width: 100%;
}

/* ---------- NAV ---------- */
.site-nav {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  pointer-events: none;
}
.nav-shell {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 12px 14px 12px 22px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(21, 23, 46, 0.06);
  border-radius: var(--radius-pill);
  box-shadow: 0 12px 36px rgba(21, 23, 46, 0.08);
  width: min(1180px, calc(100vw - 36px));
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 15px;
  color: var(--ink);
}
.nav-brand img { height: 36px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 6px;
}
.nav-links a {
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active {
  background: rgba(21, 23, 46, 0.06);
  color: var(--ink);
}
.nav-cta {
  background: var(--ink);
  color: #fff !important;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14.5px;
  transition: transform .15s, background .2s, box-shadow .2s;
  box-shadow: 0 8px 22px rgba(21, 23, 46, 0.22);
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 10px 28px rgba(239, 62, 62, 0.32); }

.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 14px 30px rgba(239,62,62,0.32); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 18px 36px rgba(239,62,62,0.42); }
.btn-dark { background: var(--ink); color: #fff; box-shadow: 0 14px 30px rgba(21,23,46,0.22); }
.btn-dark:hover { background: #000; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-arrow::after { content: '→'; font-size: 18px; transition: transform .2s; }
.btn-arrow:hover::after { transform: translateX(4px); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 160px 0 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute;
  width: 700px; height: 700px;
  border-radius: 50%;
  top: -260px; right: -180px;
  background: radial-gradient(circle, rgba(239,62,62,0.18), transparent 60%);
  filter: blur(20px);
}
.hero-bg::after {
  content: '';
  position: absolute;
  width: 560px; height: 560px;
  border-radius: 50%;
  bottom: -200px; left: -160px;
  background: radial-gradient(circle, rgba(67,56,202,0.16), transparent 60%);
  filter: blur(20px);
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(21,23,46,0.06);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}
.hero-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(239,62,62,0.18); }

.display {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 7.4vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.display .accent { color: var(--accent); }
.display .stroke { color: transparent; -webkit-text-stroke: 2px var(--ink); }

.hero-sub {
  margin-top: 28px;
  max-width: 540px;
  font-size: 19px;
  color: var(--ink-soft);
}
.hero-cta-row {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* Countdown */
.countdown {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 540px;
}
.cd-cell {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.cd-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.cd-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 6px;
}

/* Hero photo collage */
.hero-photos {
  position: relative;
  min-height: 540px;
}
.photo-card {
  position: absolute;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  transition: transform .8s cubic-bezier(.2,.8,.2,1);
  background: var(--bg-soft);
}
.photo-card img { width: 100%; height: 100%; object-fit: cover; }
.photo-card.card-1 { width: 62%; height: 70%; top: 6%;  left: 18%; transform: rotate(-6deg); z-index: 3; }
.photo-card.card-2 { width: 50%; height: 56%; top: 24%; left: -2%; transform: rotate(-14deg); background: var(--sun); z-index: 2; }
.photo-card.card-3 { width: 48%; height: 50%; top: 44%; right: -2%; transform: rotate(8deg); background: var(--indigo); z-index: 2; }
.photo-card.card-4 { width: 46%; height: 46%; bottom: 0; left: 22%; transform: rotate(4deg); background: var(--accent); z-index: 1; }

/* Mobile "shuffling deck" — top card is dealt to the back on a loop.
   Resting position of each card is driven by --depth (0 = front). */
@keyframes deck-deal {
  0%   { transform: translateY(0) scale(1) rotate(0deg); z-index: 30; }
  28%  { transform: translateY(-38px) scale(1.06) rotate(-6deg); z-index: 30; }
  29%  { z-index: 1; }
  62%  { transform: translateY(-6px) scale(0.99) rotate(-1deg); }
  100% {
    z-index: 1;
    transform:
      translateY(calc(var(--maxDepth, 2) * 16px))
      scale(calc(1 - var(--maxDepth, 2) * 0.055))
      rotate(calc((var(--maxDepth, 2) - 1) * 2.2deg));
  }
}

/* ---------- SECTIONS ---------- */
.section {
  position: relative;
  padding: 120px 0;
}
.section-tight { padding: 80px 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--ink); color: #fff; }
.section-dark .muted, .section-dark .eyebrow { color: rgba(255,255,255,0.7); }

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
}
.h1, .h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: inherit;
}
.h1 { font-size: clamp(40px, 6vw, 84px); line-height: 1.02; }
.h2 { font-size: clamp(32px, 4.6vw, 64px); line-height: 1.05; }
.lead {
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 620px;
  margin-top: 22px;
}
.section-dark .lead { color: rgba(255,255,255,0.78); }

/* About / split sections */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split.reverse > :first-child { order: 2; }
.split-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 5/4;
  box-shadow: var(--shadow-pop);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
.split-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, transparent 60%, rgba(21,23,46,0.18));
  pointer-events: none;
}

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.stat {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--line);
}
.section-dark .stat { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1;
}
.section-dark .stat-num { color: #fff; }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 8px; letter-spacing: 0.04em; text-transform: uppercase; font-weight: 600; }
.section-dark .stat-label { color: rgba(255,255,255,0.7); }

/* Sponsors */
.sponsor-tier { margin-top: 48px; }
.sponsor-tier h3 {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.sponsor-tier h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.sponsor-grid {
  display: grid;
  gap: 20px;
}
.sponsor-grid.cols-naming { grid-template-columns: 1fr; }
.sponsor-grid.cols-platinum { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.sponsor-grid.cols-gold     { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.sponsor-grid.cols-silver   { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.sponsor-grid.cols-bronze   { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.sponsor-grid:not(.cols-naming) { grid-auto-rows: 190px; }
.sponsor-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  aspect-ratio: auto;
  transition: transform .25s ease, box-shadow .25s ease;
}
.sponsor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.sponsor-card img { max-height: 110px; max-width: 80%; object-fit: contain; filter: saturate(0.9); }
.sponsor-card.naming { aspect-ratio: 16/5; padding: 36px; max-width: 720px; margin: 0 auto; }
.sponsor-card.naming { height: auto; }
.sponsor-card.naming img { max-height: 160px; max-width: 90%; }
.sponsor-card.dark-bg { background: var(--ink); border-color: rgba(255,255,255,0.08); }
.sponsor-card.dark-bg img { filter: none; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}
.contact-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}
.contact-card .label { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-bottom: 12px; font-weight: 700; }
.contact-card .value { font-size: 22px; font-weight: 700; color: #fff; }
.contact-card a.value:hover { color: var(--accent); }

/* Footer */
.site-footer {
  background: #0c0d1f;
  color: rgba(255,255,255,0.7);
  padding: 80px 0 32px;
  position: relative;
  overflow: hidden;
}
.footer-massive {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(48px, 9vw, 140px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 60px;
}
.footer-massive .accent { color: var(--accent); }
.footer-meta {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 28px;
  font-size: 14px;
}
.footer-powered {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.footer-powered a { display: inline-flex; align-items: center; }
.footer-powered img { width: 118px; height: auto; display: block; }
.footer-meta a:hover { color: #fff; }

/* Events */
.event-coming {
  text-align: center;
  padding: 100px 40px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

/* ---------- SCROLL ANIMATIONS ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }

/* word-by-word display reveal */
.wordwrap { display: inline; }
.word {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(0.4em);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1);
}
.word.in { opacity: 1; transform: none; }

/* hero photo cards animate apart on scroll progression */
.scroll-stage { will-change: transform; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero-photos { min-height: 460px; max-width: 540px; margin: 0 auto; }
  .split { grid-template-columns: 1fr; gap: 48px; }
  .split.reverse > :first-child { order: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav-links {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(21, 23, 46, 0.06);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(21, 23, 46, 0.16);
    margin: 0;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
  }
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    transition: opacity .2s ease, transform .2s ease, visibility 0s;
  }
  .nav-links a {
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 14px;
  }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-cta { display: none; }
  .nav-shell { padding: 10px 14px; gap: 10px; position: relative; }
  .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); }
  .nav-toggle span { transition: transform .2s ease, opacity .2s ease; }
}
@media (max-width: 720px) {
  .hero { padding: 130px 0 60px; }
  .countdown { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cd-cell { padding: 12px 8px; }
  .cd-num { font-size: 26px; }
  .section { padding: 80px 0; }
  .stats { grid-template-columns: 1fr; }

  /* Hero photos become an auto-shuffling deck on phones (JS adds .deck) */
  .hero-photos.deck {
    position: relative;
    min-height: 0;
    width: 100%;
    max-width: 330px;
    height: 350px;
    margin: 8px auto 0;
    perspective: 1400px;
    overflow: visible;
    will-change: transform;
  }
  .hero-photos.deck .photo-card {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    background: var(--bg-soft);
    box-shadow: var(--shadow-pop);
    transform-origin: 50% 60%;
    transform:
      translateY(calc(var(--depth, 0) * 16px))
      scale(calc(1 - var(--depth, 0) * 0.055))
      rotate(calc((var(--depth, 0) - 1) * 2.2deg));
    transition: transform .7s cubic-bezier(.2,.8,.2,1);
  }
  .hero-photos.deck .photo-card img { width: 100%; height: 100%; object-fit: cover; }
  .hero-photos.deck .photo-card.dealing { animation: deck-deal .95s cubic-bezier(.45,.05,.3,1) forwards; }

  /* Two sponsor logos per row on phones (was one — page ran very long) */
  .sponsor-grid.cols-platinum,
  .sponsor-grid.cols-gold,
  .sponsor-grid.cols-silver,
  .sponsor-grid.cols-bronze {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .sponsor-card { padding: 16px; }
  .sponsor-grid:not(.cols-naming) { grid-auto-rows: 130px; }
  .sponsor-card img { max-height: 60px; }
  .sponsor-tier h3::after { display: none; }

  /* Naming-rights card: fill the cell and cap the logo to card width so the
     fixed-size logo can never overflow the viewport on narrow phones */
  .sponsor-card.naming {
    aspect-ratio: auto;
    width: 100%;
    max-width: 100%;
    min-height: 120px;
    padding: 22px;
    margin: 0;
  }
  .sponsor-card.naming img { max-height: 92px; max-width: 100%; width: auto; }

  .footer-meta { justify-content: center; padding-bottom: 4px; }
  .footer-powered { position: static; transform: none; order: 1; width: 100%; justify-content: center; }
  .footer-meta > div:last-child { order: 2; }
}
