/* ==========================================================================
   Mars DPW Website — Test Build
   Target Design System: http://mars.college/
   Background Color: #f3ede1 (Warm Desert Cream)
   Primary Accent: #e05638 (Mars Red Rectangular Buttons)
   ========================================================================== */

/* 1. Global Variables & Design Tokens */
:root {
  /* Colors matched to http://mars.college */
  --bg-page: #f3ede1;
  --bg-section-alt: #e9e1d2;
  --bg-section-dark: #0f141d;
  --bg-card: #ffffff;
  --bg-card-dark: #141b27;
  
  --text-main: #181d26;
  --text-muted: #4a5568;
  --text-dim: #718096;
  --text-light: #f3ede1;

  /* Red Rectangle Accent (from mars.college Apply button) */
  --color-red: #e05638;
  --color-red-hover: #c84326;
  --color-gold: #b45309;
  
  --border-subtle: rgba(24, 29, 38, 0.12);
  --border-dark: rgba(243, 237, 225, 0.12);
  --border-clay: rgba(224, 86, 56, 0.35);

  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, monospace;

  /* Spacing & Sizes */
  --shell-max: 1200px;
  --radius-rect: 4px; /* Red Rectangle button radius matching mars.college */
  --radius-md: 12px;
  --radius-lg: 20px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-page);
  color: var(--text-main);
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

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

.u-shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.u-section {
  padding-block: 5.5rem;
  background-color: var(--bg-page);
  border-bottom: 1px solid var(--border-subtle);
}

.u-section.is-night {
  background-color: var(--bg-section-dark);
  color: var(--text-light);
  border-bottom: 1px solid var(--border-dark);
}

.u-section.is-night h1,
.u-section.is-night h2,
.u-section.is-night h3 {
  color: var(--text-light);
}

/* Eyebrows & Monospace Labels */
.u-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.75rem;
}

.u-index {
  font-family: var(--font-mono);
  color: var(--color-red);
  font-weight: 700;
}

.u-label {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}

.is-night .u-label {
  color: #a0aec0;
}

.u-label--clay {
  color: var(--color-red);
  background: rgba(224, 86, 56, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-rect);
  border: 1px solid var(--border-clay);
}

.u-display {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

/* Red Rectangular Apply Buttons (Matching http://mars.college) */
.hdr__apply,
.u-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--color-red);
  color: #ffffff !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-rect); /* Sharp red rectangle button shape */
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(224, 86, 56, 0.25);
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.hdr__apply:hover,
.u-cta:hover {
  background-color: var(--color-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(224, 86, 56, 0.35);
}

.u-cta-lg {
  font-size: 1.1rem;
  padding: 0.85rem 2rem;
}

.u-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-clay);
  padding-bottom: 2px;
}

.is-night .u-link {
  color: var(--text-light);
}

.u-link:hover {
  color: var(--color-red);
  border-color: var(--color-red);
}

/* 3. Header with Mars Logo & Link (Top Left) */
.hdr {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(243, 237, 225, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding-block: 0.8rem;
}

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

.hdr__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.hdr__brand:hover {
  opacity: 0.85;
}

.hdr__logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.hdr__word {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: #181d26;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hdr__subbrand {
  color: var(--color-red);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: rgba(224, 86, 56, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-rect);
  border: 1px solid var(--border-clay);
}

.hdr__nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.hdr__nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.hdr__nav-links a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hdr__nav-links a:hover {
  color: var(--text-main);
}

@media (max-width: 768px) {
  .hdr__nav-links { display: none; }
}

/* 4. Hero Section — Compact Padding */
.hero6 {
  position: relative;
  padding-top: 120px;
  padding-bottom: 1rem;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero6__bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero6__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero6__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(243, 237, 225, 0.72) 0%, rgba(243, 237, 225, 0.94) 80%, #f3ede1 100%);
}

.hero6__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero6__title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin-bottom: 1.25rem;
  color: #181d26;
}

.hero6__title-em {
  color: var(--color-red);
  font-style: normal;
}

.hero6__lede {
  font-size: 1.25rem;
  color: #2d3748;
  line-height: 1.65;
  margin-bottom: 0;
  max-width: 720px;
  font-weight: 400;
}

/* 5. Vertical Timeline Section (Compact Padding) */
.timeline6 {
  position: relative;
  padding-top: 2rem;
  padding-bottom: 4.5rem;
  background-color: var(--bg-page);
  color: var(--text-main);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

.timeline6__content {
  position: relative;
  z-index: 2;
}

.tl6__list {
  list-style: none;
  max-width: 900px;
  margin-top: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.tl6__item {
  display: flex;
  gap: 1.5rem;
  padding: 1.75rem 2rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 12px rgba(24, 29, 38, 0.04);
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

@media (max-width: 640px) {
  .tl6__item {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
  }
}

.tl6__item:hover {
  transform: translateY(-2px);
  border-color: var(--border-clay);
  box-shadow: 0 8px 24px rgba(224, 86, 56, 0.12);
}

.tl6__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-width: 140px;
  flex-shrink: 0;
}

.tl6__index {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-red);
}

.tl6__date {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-gold);
  background: rgba(180, 83, 9, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-rect);
  border: 1px solid rgba(180, 83, 9, 0.3);
}

.tl6__body {
  flex: 1;
}

.tl6__title {
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.tl6__desc {
  font-size: 1.05rem;
  color: #334155;
  line-height: 1.65;
  margin-bottom: 0.8rem;
}

.tl6__callout {
  background: rgba(224, 86, 56, 0.07);
  border-left: 3px solid var(--color-red);
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-rect);
  font-size: 0.95rem;
  color: #1e293b;
  margin-top: 0.75rem;
  line-height: 1.6;
}

.tl6__sublist {
  list-style: none;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tl6__subitem {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.98rem;
  color: #334155;
}

.tl6__note {
  font-size: 0.85rem;
  color: #64748b;
  font-style: italic;
  margin-top: 0.6rem;
}

/* 6. Benefits Section (benefits6) */
.benefits6__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 2.5rem;
}

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

.benefit6__card {
  background: var(--bg-card-dark);
  color: var(--text-light);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.benefit6__card:hover {
  transform: translateY(-3px);
  border-color: var(--border-clay);
}

.benefit6__title {
  color: var(--text-light);
  font-size: 1.3rem;
  margin-bottom: 0.6rem;
}

.benefit6__desc {
  font-size: 0.98rem;
  color: #a0aec0;
}

/* 7. Carousel Gallery Section */
.gallery-section {
  background: var(--bg-section-dark);
}

.carousel-viewport {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-dark);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(20, 27, 39, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-light);
  border: 1px solid var(--border-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.carousel-btn:hover {
  background: var(--color-red);
  color: #fff;
}

.prev-btn { left: 1.25rem; }
.next-btn { right: 1.25rem; }

.carousel-counter {
  position: absolute;
  bottom: 1.25rem;
  left: 1.25rem;
  background: rgba(20, 27, 39, 0.9);
  backdrop-filter: blur(8px);
  color: var(--text-light);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.35rem 0.85rem;
  border-radius: 99px;
  border: 1px solid var(--border-dark);
  z-index: 10;
}

.carousel-expand-btn {
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 38px;
  height: 38px;
  background: rgba(20, 27, 39, 0.9);
  backdrop-filter: blur(8px);
  color: var(--text-light);
  border: 1px solid var(--border-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.carousel-expand-btn:hover {
  background: var(--color-red);
  color: #fff;
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dot.active {
  background: var(--color-red);
  width: 24px;
  border-radius: 6px;
}

.carousel-thumbnails {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.thumb-btn {
  width: 80px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-rect);
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  opacity: 0.5;
  transition: all var(--transition-fast);
  background: #000;
}

.thumb-btn.active {
  opacity: 1;
  border-color: var(--color-red);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 11, 0.92);
  backdrop-filter: blur(16px);
}

.lightbox-content {
  position: relative;
  z-index: 10;
  max-width: 1100px;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-dark);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.lightbox-close {
  position: absolute;
  top: -45px;
  right: 0;
  font-size: 2.4rem;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

/* 8. Footer with Mars Logo & Link (Lower Left) */
.ftr {
  background: var(--bg-section-dark);
  color: var(--text-light);
  border-top: 1px solid var(--border-dark);
  padding-block: 3rem;
}

.ftr__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.ftr__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text-light);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.ftr__brand:hover {
  opacity: 0.85;
}

.ftr__logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.ftr__word {
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ftr__subbrand {
  color: var(--color-red);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(224, 86, 56, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-rect);
  border: 1px solid var(--border-clay);
}

.ftr__copy {
  font-size: 0.9rem;
  color: #a0aec0;
}
