/* ============================================================
   COOPER DEBATE TEAM — main.css
   Cooper Middle School, McLean VA
   Designer & Developer: Hannah Shiv
   ============================================================ */

html { overflow-x: hidden; font-size: 17px; }

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

/* === CSS VARIABLES === */
:root {
  --navy:       #0d2166;
  --navy-dark:  #060d1f;
  --navy-mid:   #112870;
  --gold:       #E8A828;
  --gold-light: #F7C842;
  --gold-pale:  #FAE07C;
  --white:      #FFFFFF;
  --gray-light: #F5F7FA;
  --gray:       #e2e8f0;
  --gray-mid:   #94a3b8;
  --accent:     #3B82F6;
  --card-bg:    #0e2464;
  --overlay:    rgba(6, 13, 31, 0.88);
}

/* === BASE === */
body {
  font-family: 'Josefin Sans', sans-serif;
  background: var(--navy-dark);
  color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  line-height: 1.2;
}

h1 { font-size: clamp(2.4rem, 7vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }

p { font-size: clamp(0.9rem, 1.5vw, 1.05rem); }

a { text-decoration: none; color: inherit; }

/* === SECTION WRAPPER === */
.section-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 28px;
  height: 2px;
  background: var(--gold);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  color: var(--white);
  margin-bottom: 16px;
}

.section-sub {
  color: var(--gray-mid);
  font-size: 1rem;
  max-width: 560px;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 4px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.22s ease;
  border: 2px solid transparent;
}

.btn-gold {
  background: var(--gold);
  color: var(--navy-dark);
  border-color: var(--gold);
}
.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 160, 23, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}

/* === HOMEPAGE HERO === */
.home-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* ::after = brightened image; ::before = gradient overlay (CSS only allows 2 pseudo-elements) */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Image layer — rendered at natural colour, no filter */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/hero-stage.png?v=3') center/cover no-repeat;
  z-index: 0;
}

/* Gradient overlay: just enough at top for text legibility, zero elsewhere */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(4,8,22,0.52) 0%,
    rgba(4,8,22,0.18) 28%,
    rgba(4,8,22,0.00) 42%,
    rgba(4,8,22,0.00) 100%);
  z-index: 1;
  pointer-events: none;
}

/* === STAGE LIGHT BEAM SHAFTS === */
.hero-beams {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Left beam shaft — angled blue light */
.hero-beams::before {
  content: '';
  position: absolute;
  top: -5%;
  left: -8%;
  width: 55%;
  height: 105%;
  background: linear-gradient(148deg,
    rgba(28,90,240,0.20) 0%,
    rgba(28,90,240,0.07) 45%,
    transparent 72%
  );
  clip-path: polygon(5% 0%, 55% 0%, 100% 100%, 0% 100%);
}

/* Right beam shaft — angled crimson light */
.hero-beams::after {
  content: '';
  position: absolute;
  top: -5%;
  right: -8%;
  width: 55%;
  height: 105%;
  background: linear-gradient(212deg,
    rgba(170,14,14,0.18) 0%,
    rgba(170,14,14,0.06) 45%,
    transparent 72%
  );
  clip-path: polygon(45% 0%, 95% 0%, 100% 100%, 0% 100%);
}


.hero-content {
  position: relative;
  z-index: 2;
  padding: 140px 24px 80px;
  max-width: 900px;
  transition: padding-top 0.35s ease;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212,160,23,0.15);
  border: 1px solid rgba(212,160,23,0.4);
  border-radius: 50px;
  padding: 6px 18px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-pale);
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.6rem, 12vw, 9.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  line-height: 0.93;
  text-shadow: 0 4px 48px rgba(0,0,0,0.55);
}

.hero-title span {
  color: var(--gold);
}

/* Force "Team" onto its own line on mobile + iPad portrait; hidden on desktop/landscape */
.mob-br { display: none; }
@media (max-width: 768px) { .mob-br { display: inline; } }
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) { .mob-br { display: inline; } }

.hero-school {
  font-family: 'Josefin Sans', sans-serif;
  font-size: clamp(0.75rem, 1.5vw, 0.9rem);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-bottom: 24px;
}

.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 2.5vw, 1.6rem);
  color: var(--gold-pale);
  margin-bottom: 40px;
  letter-spacing: 0.04em;
}

.hero-tagline span {
  color: rgba(255,255,255,0.45);
  margin: 0 8px;
  font-style: normal;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.hero-scroll-label {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

.hero-scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(212,160,23,0.8), transparent);
  animation: scroll-line 2s ease-in-out infinite;
}

@keyframes scroll-line {
  0%, 100% { transform: scaleY(1); opacity: 1; }
  50% { transform: scaleY(0.6); opacity: 0.5; }
}

/* === ACHIEVEMENT BANNER === */
.achievement-banner {
  background: rgba(3,6,18,0.96);
  border-top:    1px solid rgba(232,168,40,0.25);
  border-bottom: 1px solid rgba(232,168,40,0.25);
  padding: 14px 24px;
  overflow: hidden;
}

.achievement-banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
}

.achievement-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.85);
}

.achievement-icon {
  font-size: 1.1rem;
  opacity: 0.85;
}

.achievement-text {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.80);
}

.achievement-divider {
  width: 1px;
  height: 18px;
  background: rgba(232,168,40,0.30);
}

/* === HIGHLIGHTS SECTION (3-column cards) === */
.highlights-section {
  background: rgba(5,10,28,0.97);
  padding: 52px 0;
  border-bottom: 1px solid rgba(232,168,40,0.14);
}

.highlights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.highlight-card {
  background: linear-gradient(145deg, rgba(11,26,70,0.9), rgba(6,13,38,0.9));
  border: 1px solid rgba(232,168,40,0.18);
  border-radius: 12px;
  padding: 26px 24px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease;
  display: flex;
  flex-direction: column;
}

.highlight-card:hover {
  border-color: rgba(232,168,40,0.45);
  transform: translateY(-3px);
}

.highlight-card--featured {
  border-color: rgba(232,168,40,0.40);
  background: linear-gradient(145deg, rgba(16,38,96,0.95), rgba(10,22,58,0.95));
}

.highlight-card--featured::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hl-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hl-label::before {
  content: '';
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--gold);
  flex-shrink: 0;
}

.hl-icon {
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  color: var(--gold);
  opacity: 0.9;
}

.hl-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hl-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 4px;
}

.hl-sub {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.hl-body {
  font-size: 0.84rem;
  color: var(--gray-mid);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}

.hl-body.is-quote {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.96rem;
  color: rgba(255,255,255,0.88);
  line-height: 1.72;
}

.hl-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.hl-meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.77rem;
  color: var(--gray-mid);
}

.hl-meta-row svg {
  width: 13px;
  height: 13px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.hl-link {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.70rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  transition: gap 0.2s ease, opacity 0.2s ease;
}

.hl-link:hover { gap: 9px; opacity: 0.80; }

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

/* === STATISTICS SECTION === */
.stats-section {
  background: var(--navy-dark);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.stats-section::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.stat-card {
  padding: 40px 24px;
  text-align: center;
  position: relative;
  background: rgba(13,46,86,0.4);
  border: 1px solid rgba(212,160,23,0.12);
  transition: background 0.3s ease;
}

.stat-card:hover {
  background: rgba(13,46,86,0.7);
}

.stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
  display: block;
}

.stat-suffix {
  font-size: 0.6em;
  vertical-align: super;
}

.stat-label {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-mid);
}

.stat-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 14px;
  display: block;
  opacity: 0.85;
  color: var(--gold);
}

.stat-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* === LATEST RESULTS === */
.results-section {
  background: var(--navy-mid);
  padding: 80px 0;
}

.results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 16px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.result-card {
  background: rgba(11,37,69,0.6);
  border: 1px solid rgba(212,160,23,0.18);
  border-radius: 8px;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.result-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,160,23,0.5);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.result-card:hover::before { opacity: 1; }

.result-place {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 4px;
}

.result-tournament {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 6px;
}

.result-detail {
  font-size: 0.8rem;
  color: var(--gray-mid);
  margin-bottom: 14px;
}

.result-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-tag-gold {
  background: rgba(212,160,23,0.18);
  color: var(--gold-pale);
  border: 1px solid rgba(212,160,23,0.35);
}

.result-tag-blue {
  background: rgba(59,130,246,0.18);
  color: #93c5fd;
  border: 1px solid rgba(59,130,246,0.35);
}

/* === UPCOMING EVENTS === */
.events-section {
  background: var(--navy-dark);
  padding: 80px 0;
}

.events-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.event-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(212,160,23,0.1);
}

.event-item:last-child { border-bottom: none; }

.event-date-block {
  flex-shrink: 0;
  text-align: center;
  background: rgba(212,160,23,0.1);
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: 6px;
  padding: 10px 16px;
  min-width: 60px;
}

.event-month {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

.event-day {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
}

.event-info { flex: 1; }

.event-name {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 4px;
}

.event-location {
  font-size: 0.78rem;
  color: var(--gray-mid);
  margin-bottom: 6px;
}

.event-type-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(212,160,23,0.15);
  color: var(--gold-pale);
}

/* Countdown widget */
.countdown-widget {
  background: rgba(13,46,86,0.5);
  border: 1px solid rgba(212,160,23,0.25);
  border-radius: 12px;
  padding: 36px;
  text-align: center;
}

.countdown-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.countdown-event-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  color: var(--white);
  margin-bottom: 28px;
}

.countdown-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.countdown-unit {
  text-align: center;
}

.countdown-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  display: block;
}

.countdown-unit-label {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-top: 4px;
}

.countdown-colon {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  color: var(--gold);
  align-self: flex-start;
  padding-top: 4px;
  opacity: 0.5;
}

/* === GALLERY PREVIEW === */
.gallery-section {
  background: var(--navy-mid);
  padding: 80px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 200px 200px;
  gap: 8px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}

.gallery-item:nth-child(1) { grid-column: span 5; grid-row: span 2; }
.gallery-item:nth-child(2) { grid-column: span 4; grid-row: span 1; }
.gallery-item:nth-child(3) { grid-column: span 3; grid-row: span 1; }
.gallery-item:nth-child(4) { grid-column: span 3; grid-row: span 1; }
.gallery-item:nth-child(5) { grid-column: span 4; grid-row: span 1; }

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  background: var(--card-bg);
}

.gallery-item:hover .gallery-img { transform: scale(1.08); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,26,54,0.85), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-caption {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}

/* Gallery placeholder colors */
.gallery-placeholder-1 { background: linear-gradient(135deg, #1a3a6b, #0d2040); }
.gallery-placeholder-2 { background: linear-gradient(135deg, #2a1a00, #1a0d00); }
.gallery-placeholder-3 { background: linear-gradient(135deg, #0a2040, #1a3060); }
.gallery-placeholder-4 { background: linear-gradient(135deg, #1a2a10, #0a1a05); }
.gallery-placeholder-5 { background: linear-gradient(135deg, #2a1a3a, #1a0a2a); }

/* === PHILOSOPHY QUOTE === */
.philosophy-quote {
  background: rgba(4,8,22,0.98);
  border-top:    1px solid rgba(232,168,40,0.18);
  border-bottom: 1px solid rgba(232,168,40,0.18);
  padding: 56px 0;
}

.philosophy-quote-inner {
  max-width: 820px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px 28px;
  align-items: start;
}

.philosophy-quote-mark {
  font-family: 'Cormorant Garamond', serif;
  font-size: 7rem;
  line-height: 0.7;
  color: var(--gold);
  opacity: 0.55;
  user-select: none;
}

.philosophy-quote-text {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: rgba(255,255,255,0.90);
  line-height: 1.72;
  margin-top: 20px;
  grid-column: 2;
}

.philosophy-quote-attr {
  grid-column: 2;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: -4px;
}

/* === MOBILE HERO ===
   Image (1536×1024) is stretched to 100% × 100% so it fills the full
   portrait viewport without cropping, keeping both podiums visible.
   At 100svh ≈ 812px tall, podium tops land at 35% ≈ y=284px.
   padding-top: 130px → Cooper(130), Debate(183), Team(236) — Team overlaps
   podium tops at y≈284, Debate stays just above. Subtitle/buttons flow on
   the stage with a semi-dark overlay for readability. */
@media (max-width: 768px) {
  /* Hide desktop pseudo-element layers so mobile background-image shows through */
  .hero-bg::after,
  .hero-bg::before { display: none; }

  .hero-bg {
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-image:
      linear-gradient(180deg,
        rgba(4,8,22,0.82) 0%,
        rgba(4,8,22,0.45) 16%,
        rgba(4,8,22,0.12) 28%,
        rgba(4,8,22,0.04) 38%,
        rgba(4,8,22,0.22) 52%,
        rgba(4,8,22,0.58) 68%,
        rgba(4,8,22,0.75) 82%,
        rgba(4,8,22,0.68) 100%),
      url('../images/hero-stage-mobile.png?v=3');
  }

  .hero-beams { display: none; }

  /* Full-screen portrait hero */
  .home-hero {
    min-height: 100svh;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  /* padding-top 130px → "Team" (3rd line) lands at ≈284px = 35% of 812px
     which is exactly where the podium tops appear.
     flex:1 lets margin-top:auto on .hero-school push subtitle down to the
     podium floor level (≈72% × 812px ≈ 585px). padding-bottom controls fine-tuning. */
  .hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 130px;
    padding-bottom: 28px;   /* small bottom pad — margin-top:auto drives subtitle to floor */
    max-width: 100%;
    width: 100%;
  }

  .hero-title {
    font-size: clamp(2.6rem, 14vw, 4.4rem);
    line-height: 0.95;
    margin-bottom: 0;
  }

  /* margin-top: auto pushes subtitle block to the podium-floor level */
  .hero-school {
    margin-top: auto;
    margin-bottom: 8px;
    font-size: 0.68rem;
  }

  .hero-tagline  { font-size: 0.95rem; margin-bottom: 20px; }
  .hero-buttons  { gap: 10px; }
  .hero-scroll   { display: none; }
}

/* === IPAD PORTRAIT — use landscape stage image (same as desktop/laptop) ===
   iPad Air/Pro portrait (769–1024px wide). Landscape is already fine (desktop CSS). */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
  /* Hide desktop pseudo-element layers so iPad portrait background-image shows through */
  .hero-bg::after,
  .hero-bg::before { display: none; }

  .hero-bg {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-image:
      linear-gradient(180deg,
        rgba(4,8,22,0.80) 0%,
        rgba(4,8,22,0.40) 14%,
        rgba(4,8,22,0.10) 26%,
        rgba(4,8,22,0.04) 36%,
        rgba(4,8,22,0.18) 50%,
        rgba(4,8,22,0.55) 66%,
        rgba(4,8,22,0.72) 80%,
        rgba(4,8,22,0.65) 100%),
      url('../images/hero-stage.png?v=3');
  }
  .hero-beams { display: none; }
  .home-hero  {
    min-height: 100svh;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }
  .hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 220px;   /* start Cooper a bit lower on the iPad portrait canvas */
    padding-bottom: 36px;
    max-width: 100%;
    width: 100%;
  }
  .hero-title {
    font-size: clamp(5.8rem, 11vw, 7.5rem);
    line-height: 0.95;
    margin-bottom: 0;
  }
  .hero-school { margin-top: auto; margin-bottom: 10px; font-size: 0.78rem; }
  .hero-tagline { font-size: 1.05rem; margin-bottom: 22px; }
  .hero-buttons { gap: 14px; }
  .hero-scroll  { display: none; }
}

@media (max-width: 600px) {
  .philosophy-quote-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .philosophy-quote-mark { font-size: 4rem; }
  .philosophy-quote-text, .philosophy-quote-attr { grid-column: 1; }
}

/* === JOIN CTA === */
.join-section {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-mid) 100%);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.join-section::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  border: 1px solid rgba(212,160,23,0.08);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.join-section::after {
  content: '';
  position: absolute;
  width: 900px;
  height: 900px;
  border-radius: 50%;
  border: 1px solid rgba(212,160,23,0.05);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.join-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 24px;
}

.join-icon {
  font-size: 3rem;
  margin-bottom: 24px;
  display: block;
}

.join-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--white);
  margin-bottom: 16px;
}

.join-description {
  color: var(--gray-mid);
  font-size: 1rem;
  margin-bottom: 36px;
  line-height: 1.7;
}

.join-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* === FOOTER === */
footer {
  background: #040d1c;
  padding: 64px 0 36px;
  border-top: 2px solid rgba(212,160,23,0.45);
}

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

.footer-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: var(--white);
  margin-bottom: 6px;
}

.footer-brand-school {
  font-size: 0.80rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.footer-tagline {
  font-style: italic;
  font-size: 0.94rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 20px;
}

.footer-col-title {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.62);
  transition: color 0.2s ease;
}

.footer-links a:hover { color: var(--gold-pale); }

.footer-bottom {
  border-top: 1.5px solid rgba(212,160,23,0.55);
  padding: 18px 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Left — italic signature */
.footer-sig {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.18rem;
  color: var(--white);
  letter-spacing: 0.01em;
}

.footer-sig em {
  font-style: italic;
  color: var(--gold-light);
}

/* Right — credits + copyright, bright and readable */
.footer-credit {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.82);
  text-align: right;
}

.footer-credit span {
  color: var(--gold-light);
  font-weight: 600;
}

/* === SCROLL TO TOP BUTTON === */
#scroll-top {
  position: fixed;
  bottom: 36px;
  right: 36px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #B81A1A;
  border: none;
  color: #E8A828;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  box-shadow: 0 4px 18px rgba(184,26,26,0.45);
}

#scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#scroll-top:hover {
  background: #D42020;
}

#scroll-top svg {
  width: 22px;
  height: 22px;
  stroke: #E8A828;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 768px) {
  #scroll-top {
    bottom: 24px;
    right: 20px;
    width: 42px;
    height: 42px;
  }
}

/* === PAGE HEADER (inner pages) === */
.page-header {
  padding: 140px 24px 60px;
  text-align: center;
  background: linear-gradient(180deg, rgba(7,26,54,0.95) 0%, var(--navy-dark) 100%);
  position: relative;
  overflow: hidden;
  transition: padding-top 0.35s ease;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(212,160,23,0.12) 1px, transparent 1px);
  background-size: 50px 50px;
}

.page-header-content { position: relative; z-index: 1; }

.page-header-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.page-header-label::before,
.page-header-label::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 6vw, 4rem);
  color: var(--white);
  margin-bottom: 16px;
}

.page-subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-pale);
}

/* === ANNOUNCEMENT BAR === */
.announcement-bar {
  background: linear-gradient(90deg, var(--navy-mid), #1a3a6b, var(--navy-mid));
  border-bottom: 1px solid rgba(212,160,23,0.3);
  padding: 10px 24px;
  text-align: center;
  position: relative;
  z-index: 9990;
}

.announcement-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}

.announcement-badge {
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.announcement-text {
  font-size: 0.8rem;
  color: var(--gray);
}

.announcement-text a {
  color: var(--gold-pale);
  text-decoration: underline;
}

.announcement-close {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-mid);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 4px;
}

/* === MEMBERS LOGIN BUTTON === */
#member-login-btn {
  position: fixed;
  top: 8px;
  right: 16px;
  z-index: 9998;
  background: transparent;
  border: 1.5px solid rgba(212,160,23,0.5);
  border-radius: 50px;
  padding: 8px 16px;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-pale);
  cursor: pointer;
  transition: all 0.22s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
}

#member-login-btn:hover {
  background: rgba(212,160,23,0.15);
  border-color: var(--gold);
  color: var(--gold);
}

#member-login-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* === ANIMATIONS === */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.fade-in.visible { opacity: 1; }

/* Stagger children */
.stagger > * { transition-delay: calc(var(--i, 0) * 0.1s); }

/* === INTEL THREADS (gold radiating lines when nav opens) === */
#intel-threads {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 140px;
  pointer-events: none;
  z-index: 9997;
  opacity: 0;
  transition: opacity 0.48s ease;
}
#intel-threads.open { opacity: 1; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr 1fr; }
  .events-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .gallery-item { grid-column: span 1 !important; grid-row: span 1 !important; height: 160px; }
}

@media (max-width: 600px) {
  .section { padding: 56px 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .achievement-banner-inner { gap: 16px; }
  .achievement-divider { display: none; }
  .hero-buttons { flex-direction: column; align-items: center; }
  #member-login-btn { display: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-credit { text-align: center; }
  #site-badge { width: 48px; top: 6px; left: 6px; }
}

/* === SITE BADGE (home link, top-left, all pages) === */
#site-badge {
  position: fixed;
  top: 8px;
  left: 16px;
  width: 88px;
  height: 88px;
  z-index: 9997;
  display: block;
  transition: transform 0.2s ease, opacity 0.2s ease;
  opacity: 0.92;
}
#site-badge:hover {
  transform: scale(1.08);
  opacity: 1;
}
#site-badge img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  display: block;
}
