/* =============================================
   ALMS — Advanced Lighting Measurement System
   Modern Light-Theme Design System
   ============================================= */

/* ---------- Google Fonts (loaded via <link> in HTML) ---------- */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Palette - Light Theme */
  --bg-primary:    #ffffff;
  --bg-secondary:  #f8fafc;
  --bg-card:       rgba(255, 255, 255, 0.9);
  --bg-glass:      rgba(255, 255, 255, 0.7);
  --bg-glass-hover:rgba(255, 255, 255, 0.95);

  --accent:         #006747;          /* USF Green */
  --accent-dim:     rgba(0, 103, 71, 0.08);
  --accent-glow:    rgba(0, 103, 71, 0.2);
  --accent-alt:     #CFC493;          /* USF Gold */
  --accent-alt-dim: rgba(207, 196, 147, 0.1);
  --danger:         #ef4444;
  --success:        #006747;          /* Align success with brand green */
  --warning:        #CFC493;          /* Align warning with brand gold */

  --text-primary:   #0f172a;          /* deep slate */
  --text-secondary: #475569;          /* slate gray */
  --text-muted:     #94a3b8;
  --border:         rgba(0, 0, 0, 0.08);
  --border-accent:  rgba(0, 103, 71, 0.15);

  /* Typography */
  --ff-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --ff-heading: 'Montserrat', sans-serif;
  --ff-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --section-py: clamp(4rem, 8vw, 7rem);
  --container-px: clamp(1.25rem, 4vw, 3rem);
  --container-max: 1200px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --duration: .35s;

  /* Etch Accents - Light Mode */
  --etch-line: rgba(0, 103, 71, 0.05);
  --etch-glow: rgba(0, 103, 71, 0.02);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--ff-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--accent); text-decoration: none; transition: color var(--duration) var(--ease); outline: none; }
a:hover { color: var(--accent-alt); }

/* Focus States for Accessibility */
:focus-visible {
  outline: 3px solid var(--accent-alt);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

.secondary-nav .btn-main:focus-visible,
.hero-btn:focus-visible,
.download-btn:focus-visible {
  outline-color: var(--accent);
}

ul { list-style: none; }

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ---------- Section ---------- */
.section {
  padding: var(--section-py) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ff-mono);
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: .35rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--border-accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: .75rem auto 0;
}

/* Section alternating backgrounds */
.section--alt {
  background: var(--bg-secondary);
}

.section--gradient {
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* ---------- Glassmorphism Card ---------- */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: all var(--duration) var(--ease);
}

.glass-card:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 103, 71, .08);
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: .75rem 0;
  transition: all var(--duration) var(--ease);
  background: #006747; /* USF Green Title Bar */
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
  background: rgba(0, 103, 71, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--ff-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: #ffffff;
  letter-spacing: .03em;
}

.navbar-brand svg, .navbar-brand img {
  height: 36px;
  width: auto;
}

.navbar-brand .brand-accent {
  color: var(--accent-alt);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-links a {
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--ff-heading);
  font-size: .875rem;
  font-weight: 500;
  padding: .5rem .85rem;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-alt);
  background: var(--accent-alt-dim);
}

.nav-links a.nav-cta {
  background: #ffffff;
  color: var(--accent);
  font-weight: 700;
  font-size: .8rem;
  padding: .4rem .85rem;
  border-radius: 100px;
  margin-left: .5rem;
}

.nav-links a.nav-cta:hover {
  background: var(--accent-alt);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--accent-glow);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: all .3s var(--ease);
}
.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); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 0 80px; 
  text-align: center;
  overflow: hidden;
  background: #F8FAFC;
  /* subtle base gradient */
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #f1f5f9 100%);
}

/* Animated Background Blobs */
.hero::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(0, 103, 71, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, rgba(207, 196, 147, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 40% 80%, rgba(0, 103, 71, 0.03) 0%, transparent 35%);
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  animation: heroMesh 25s ease-in-out infinite alternate;
}

@keyframes heroMesh {
  0% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, 5%) rotate(2deg); }
  66% { transform: translate(-3%, 2%) rotate(-1deg); }
  100% { transform: translate(0%, 0%) rotate(0deg); }
}

/* Technical Grid removed */

.section-etch-grid {
  position: relative;
  overflow: hidden;
}

#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  padding: 3rem var(--container-px);
  border-radius: var(--radius-lg);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ff-mono);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  padding: .4rem 1.2rem;
  border-radius: 100px;
  border: 1px solid var(--border-accent);
  margin-bottom: 1.75rem;
  animation: fadeInUp .8s var(--ease) both;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
  animation: fadeInUp .8s .15s var(--ease) both;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent), var(--accent-alt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  /* text-shadow: 0 0 30px rgba(14, 165, 233, 0.1); removed for readability on light */
}

.hero-impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
  width: 100%;
  animation: fadeInUp .8s .6s var(--ease) both;
}

.impact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  transition: all var(--duration) var(--ease);
}

.impact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px -5px rgba(0, 103, 71, 0.1), 0 4px 6px -2px rgba(0, 103, 71, 0.05);
  border-color: var(--border-accent);
}

.impact-icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 0.5rem;
  background: var(--accent-dim);
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-accent);
}

.impact-value {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 0.15rem;
  font-family: var(--ff-mono);
  letter-spacing: -0.02em;
}

.impact-value .accent-text {
  color: var(--accent);
}

.impact-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp .8s .3s var(--ease) both;
}

/* ---------- Heatmap Strip (removed — unused) ---------- */


.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp .8s .45s var(--ease) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ff-heading);
  font-weight: 600;
  font-size: .95rem;
  padding: .75rem 1.75rem;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}
.btn-primary:hover {
  background: var(--accent-alt);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

/* Hero scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  color: var(--text-muted);
  font-size: .75rem;
  font-family: var(--ff-mono);
  animation: bounce 2s infinite;
}

.hero-scroll .chevron {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
}


/* =============================================
   INTRODUCTION
   ============================================= */

.intro-image {
  text-align: center;
}

.alms-photo {
  max-width: 450px;
  width: 100%;
  margin: 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,.08);
  transition: all var(--duration) var(--ease);
}

.alms-photo:hover {
  border-color: var(--border-accent);
  box-shadow: 0 8px 40px rgba(0, 103, 71, .1);
  transform: translateY(-2px);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.intro-text p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
}

.feature-item:hover {
  background: var(--bg-glass-hover);
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 1.1rem;
}

.feature-item h4 {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .15rem;
}

.feature-item span {
  font-size: .8rem;
  color: var(--text-muted);
  font-family: var(--ff-mono);
}

/* =============================================
   COMPARISON (Manual vs ALMS)
   ============================================= */
.comparison-wrapper {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: stretch;
}

.comparison-card {
  padding: 2.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.comparison-card.old {
  border-color: rgba(239,68,68,.2);
  background: #F4F4F6;
}
.comparison-card.old:hover {
  border-color: rgba(239,68,68,.4);
  box-shadow: 0 8px 32px rgba(239,68,68,.08);
}

.comparison-card.new {
  border: 1px solid var(--border-accent);
  background: rgba(0, 103, 71, 0.03);
  box-shadow: 0 4px 20px rgba(0, 0, 103, 0.04);
}
.comparison-card.new:hover {
  border-color: var(--accent);
  background: rgba(0, 103, 71, 0.06);
  box-shadow: 0 12px 40px rgba(0, 103, 71, 0.15);
  transform: translateY(-8px);
}

.comparison-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  transition: color var(--duration) var(--ease);
}

.comparison-card.old h3 { color: var(--danger); }
.comparison-card.new h3 { color: var(--accent); }

.comparison-card ul {
  text-align: left;
  display: grid;
  grid-template-rows: repeat(5, 1fr);
  height: 100%;
  flex-grow: 1;
}

.comparison-card li {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem 0;
  color: var(--text-secondary);
  font-size: .95rem;
}

.comparison-card li:last-child { border-bottom: none; }

.comparison-card li .icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transition: transform 0.3s var(--ease);
}

.comparison-card:hover li .icon {
  transform: scale(1.1);
}

.comparison-card.old li .icon { color: var(--danger); background: rgba(239, 68, 68, 0.05); }
.comparison-card.new li .icon { color: var(--success); background: rgba(0, 103, 71, 0.05); }

.comparison-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}

.comparison-arrow {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border: 4px solid #ffffff;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  z-index: 5;
}

/* =============================================
   APPLICATION TABS
   ============================================= */
.app-tabs {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-bottom: 3rem;
  padding: 0.4rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

/* Sliding Indicator — height is set dynamically via JS (updateIndicator) */
.tab-indicator {
  position: absolute;
  background: var(--accent);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px var(--accent-glow);
  transition: all 0.4s var(--ease);
  z-index: 0;
  pointer-events: none;
}

.app-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--ff-heading);
  font-size: .82rem;
  font-weight: 500;
  padding: .65rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background-color: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--duration) var(--ease);
  z-index: 1;
}

.app-tab svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  transition: transform var(--duration) var(--ease);
}

.app-tab.active {
  color: #ffffff;
  font-weight: 600;
}

.app-tab.active svg {
  opacity: 1;
  transform: scale(1.1);
  color: #ffffff;
}

.tab-panel {
  display: none;
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.tab-panel.active {
  display: block;
  opacity: 1;
  animation: slideFadeIn 0.5s var(--ease) forwards;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.tab-content-grid {
  display: grid;
  grid-template-columns: 42% 58%;
  gap: 3rem;
  align-items: flex-start; /* Align to top for long lists */
}

.tab-content-stacked {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.tab-text {
  background-color: #F4F4F6;
  padding: 1.5rem;
  border-radius: var(--radius-md);
}

.tab-content-grid .tab-text h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.tab-content-grid .tab-text ul {
  list-style: none;
}

.tab-content-grid .tab-text li {
  position: relative;
  padding: .5rem 0 .5rem 1.5rem;
  color: var(--text-secondary);
  font-size: .95rem;
}

.tab-content-grid .tab-text li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.tab-visual img, .tab-visual-full img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
  transition: transform 0.6s var(--ease);
}

.tab-panel.active .tab-visual img, 
.tab-panel.active .tab-visual-full img {
  transform: scale(1);
}

.tab-visual-full:hover img {
  transform: scale(1.02);
  border-color: var(--accent);
}

.tab-visual-full {
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  margin: 0 auto;
}

.tab-visual-full img {
  width: 100%;
  height: auto;
  display: block;
}

/* Browser Mockup (Big Data dashboard style) */
.browser-mockup {
  background: #1e293b;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  margin: 2rem auto;
  max-width: 1000px;
}

.browser-header {
  background: #0f172a;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.browser-dot.red { background: #ff5f56; }
.browser-dot.yellow { background: #ffbd2e; }
.browser-dot.green { background: #27c93f; }

.browser-address {
  background: #1e293b;
  height: 20px;
  flex: 1;
  border-radius: 4px;
  margin-left: 1rem;
  opacity: 0.5;
}

.browser-content {
  line-height: 0;
}

.browser-content img {
  width: 100%;
  height: auto;
}

/* =============================================
   TESTIMONIAL / TIMELINE
   ============================================= */
#testimonial {
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

#research {
  padding-top: clamp(2rem, 5vw, 4rem);
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px; /* Mobile position */
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--border) 100%);
  opacity: 0.25;
}

@media (min-width: 992px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

.timeline-item {
  position: relative;
  padding-left: 64px;
  margin-bottom: 3.5rem;
  width: 100%;
}

@media (min-width: 992px) {
  .timeline-item {
    padding-left: 0;
    width: 50%;
    margin-bottom: 4rem;
  }
  
  .timeline-item:nth-child(even) {
    margin-left: auto;
    padding-left: 50px;
  }
  
  .timeline-item:nth-child(odd) {
    margin-right: auto;
    padding-right: 50px;
    text-align: right;
  }
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: 17px;
  top: 8px;
  width: 18px;
  height: 18px;
  background: var(--bg-primary);
  border: 4px solid var(--border);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg-primary);
  transition: all 0.5s var(--ease);
}

@media (min-width: 992px) {
  .timeline-dot {
    left: auto;
    right: -9px;
  }
  
  .timeline-item:nth-child(even) .timeline-dot {
    left: -9px;
    right: auto;
  }
}

.timeline-item.visible .timeline-dot {
  border-color: var(--accent);
  background: var(--accent);
  transform: scale(1.1);
}

.timeline-item.award .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent-glow);
}

.timeline-date {
  font-family: var(--ff-mono);
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: .5rem;
  display: block;
}

.timeline-card {
  padding: 1.5rem;
  background-color: #F4F4F6;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}

.timeline-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 103, 71, 0.08);
}

@media (min-width: 992px) {
  .timeline-item:nth-child(odd) .timeline-card:hover {
    transform: translateX(-4px);
  }
  .timeline-item:nth-child(even) .timeline-card:hover {
    transform: translateX(4px);
  }
}

.timeline-card.glass-card {
  background: #F4F4F6;
}

.timeline-card h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .75rem;
}

.timeline-card ul {
  list-style: none;
}

.timeline-card li {
  position: relative;
  padding: .35rem 0 .35rem 1.25rem;
  color: var(--text-secondary);
  font-size: .95rem;
}

@media (min-width: 992px) {
  .timeline-item:nth-child(odd) .timeline-card ul {
    display: inline-block;
    text-align: left;
  }
}

.timeline-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.award-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--accent); /* USF Green */
  border: 1.5px solid var(--accent-alt); /* USF Gold Border */
  color: var(--accent-alt); /* USF Gold Text */
  font-size: .75rem;
  font-weight: 700;
  padding: .35rem .9rem;
  border-radius: 100px;
  margin-bottom: .85rem;
  box-shadow: 0 4px 12px rgba(0, 103, 71, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =============================================
   RESEARCH
   ============================================= */
.research-categories {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.research-category {
  border-radius: var(--radius-md);
  overflow: hidden;
}

.research-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.5rem;
  color: var(--text-primary);
  font-family: var(--ff-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.research-category-header:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-accent);
}

.research-category-header.open {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-color: var(--border-accent);
  background: var(--accent-dim);
}

.research-category-header .chevron-icon {
  transition: transform .3s var(--ease);
  color: var(--text-muted);
}

.research-category-header.open .chevron-icon {
  transform: rotate(180deg);
  color: var(--accent);
}

.research-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height .5s var(--ease);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.research-list.open {
  max-height: 2000px;
}

.research-link {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: #F4F4F6;
  transition: background var(--duration) var(--ease);
}

.research-link:last-child { border-bottom: none; }

.research-link:hover {
  background: var(--bg-glass-hover);
}

.research-link .link-icon {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: .15rem;
}

.research-link .link-text {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.research-link:hover .link-text { color: var(--accent); }

/* =============================================
   DOWNLOAD
   ============================================= */
.downloads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.download-card {
  padding: 0;
  overflow: hidden;
  background-color: #F4F4F6;
}

.download-card.glass-card {
  background: #F4F4F6;
}

.download-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--border);
}

.download-card-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

.version-badge {
  font-family: var(--ff-mono);
  font-size: .75rem;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  padding: .25rem .75rem;
  border-radius: 100px;
  border: 1px solid var(--border-accent);
}

.download-card-body {
  padding: 1.5rem 1.75rem;
}

.download-card-body p {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 1.25rem;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
  font-size: .9rem;
  padding: .65rem 1.5rem;
  border-radius: 100px;
  transition: all var(--duration) var(--ease);
}

.download-btn:hover {
  background: var(--accent-alt);
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

/* Collapsible in downloads */
.dl-collapse-trigger {
  display: flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--ff-sans);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  padding: .5rem 0;
  margin-top: .75rem;
  transition: color var(--duration) var(--ease);
}

.dl-collapse-trigger:hover { color: var(--accent); }

.dl-collapse-trigger .chevron-sm {
  transition: transform .3s var(--ease);
  font-size: .7rem;
}

.dl-collapse-trigger.open .chevron-sm {
  transform: rotate(180deg);
}

.dl-collapse-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease);
}

.dl-collapse-body.open {
  max-height: 1200px;
}

.dl-collapse-body ul {
  padding: .5rem 0;
}

.dl-collapse-body li {
  padding: .3rem 0;
}

.dl-collapse-body li a {
  font-size: .85rem;
  color: var(--text-muted);
}

.dl-collapse-body li a:hover {
  color: var(--accent);
}

.changelog {
  padding: .75rem 0;
}

.changelog h5 {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .35rem;
  font-family: var(--ff-mono);
}

.changelog ul {
  padding: 0 0 .75rem;
}

.changelog li {
  padding: .2rem 0 .2rem 1rem;
  font-size: .8rem;
  color: var(--text-muted);
  position: relative;
}

.changelog li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* =============================================
   CONTACT / FOOTER
   ============================================= */
.footer {
  background: #006747; /* USF Green Footer */
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 4.5rem 0 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #ffffff;
}

.footer-brand .brand-accent { color: var(--accent-alt); }

.footer-desc {
  color: rgba(255, 255, 255, 0.6);
  font-size: .92rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.footer h4 {
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1.25rem;
  color: #ffffff;
}

.footer-links li {
  margin-bottom: .4rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: .9rem;
  transition: color var(--duration) var(--ease);
}

.footer-links a:hover { color: var(--accent-alt); }

.contact-line {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: .9rem;
  margin-bottom: .6rem;
}

.contact-line a {
  color: var(--accent-alt);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.contact-line a:hover {
  filter: brightness(1.2);
  text-decoration-thickness: 2px;
}

.contact-line .c-icon {
  color: var(--accent-alt);
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: .8rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom a { color: rgba(255, 255, 255, 0.4); }
.footer-bottom a:hover { color: var(--accent-alt); }

/* =============================================
   SCROLL REVEAL ANIMATIONS
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }
.reveal-delay-4 { transition-delay: .4s; }
.reveal-delay-5 { transition-delay: .5s; }
.reveal-delay-6 { transition-delay: .6s; }
.reveal-delay-7 { transition-delay: .7s; }
.reveal-delay-8 { transition-delay: .8s; }

/* =============================================
   KEYFRAME ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40%  { transform: translateX(-50%) translateY(-6px); }
  60%  { transform: translateX(-50%) translateY(-3px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px var(--accent-glow); }
  50%      { box-shadow: 0 0 24px var(--accent-glow); }
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .hero-impact-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .intro-grid { grid-template-columns: 1fr; }

  .tab-content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .comparison-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .comparison-divider {
    justify-content: center;
    padding: 1rem 0;
  }

  .comparison-arrow {
    transform: rotate(90deg);
  }

  .downloads-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  .hero-impact-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem;
  }

  .hero-impact-grid .impact-card:last-child {
    grid-column: 1 / -1;
  }

  /* Hide tab indicator on mobile scrollable tabs */
  .tab-indicator {
    display: none;
  }

  /* Increase touch targets for downloads */
  .dl-collapse-trigger {
    padding: 1rem 0;
    min-height: 44px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(0, 103, 71, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: .75rem;
    padding: 2rem;
    transition: right .4s var(--ease);
    border-left: 1px solid var(--border);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1rem;
    padding: .75rem 1rem;
    width: 100%;
    text-align: center;
  }

  .nav-toggle { display: flex; }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -1.5rem;
  }

  .features-grid { grid-template-columns: 1fr; }

  .hero-title { font-size: clamp(1.8rem, 7vw, 2.5rem); }

  .app-tabs {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem;
    margin: 0 auto 2rem;
    gap: 0.5rem;
  }

  .app-tab {
    white-space: normal;
    justify-content: center;
    text-align: center;
    flex: 1 1 calc(33.333% - 0.5rem);
    min-width: 150px;
    max-width: 220px;
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
  }

  .app-tab.active {
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid var(--border-accent);
  }

  .downloads-grid { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }

  .footer-bottom {
    flex-direction: column;
    gap: .5rem;
    text-align: center;
  }
}

/* Hide mobile-only FAB on all screen sizes by default */
.mobile-cta-fab {
  display: none;
}

@media (max-width: 480px) {
  .hero-impact-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .impact-card { padding: 1.25rem .75rem; }
  .impact-card .impact-value { font-size: 1.5rem; }

  .app-tab {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
    max-width: 100%;
  }
  
  /* Floating CTA Mobile */
  .mobile-cta-fab {
    display: flex;
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    background: var(--accent);
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0, 103, 71, 0.4);
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    animation: slideUpFade 0.5s var(--ease) both;
  }
  
  .mobile-cta-fab svg { width: 18px; height: 18px; }
}

@media (max-width: 360px) {
  .app-tabs {
    gap: 0.4rem;
    padding: 0.4rem;
  }

  .app-tab {
    flex: 1 1 100%;
    font-size: 0.78rem;
    padding: 0.55rem 0.65rem;
    gap: 0.35rem;
  }

  .app-tab svg {
    width: 16px;
    height: 16px;
  }
}

@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   TECHNICAL INFOGRAPHIC
   ============================================= */
.infographic-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-top: 4rem;
}

.car-diagram {
  position: relative;
  padding: 2rem;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.car-svg-wrapper {
  filter: drop-shadow(0 0 20px var(--accent-glow));
  width: 100%;
  max-width: 500px;
}

.diag-point {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent);
  z-index: 10;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all 0.3s ease;
}

.diag-point:hover, .diag-point.active {
  background: #fff;
  box-shadow: 0 0 25px #fff, 0 0 10px var(--accent-glow);
  transform: scale(1.2);
}

.diag-point::after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
  pointer-events: none;
}

.diag-point:hover::after, .diag-point.active::after {
  border-color: #fff;
}

.diag-label {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-accent);
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: var(--ff-mono);
  color: var(--accent);
  white-space: nowrap;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  z-index: 11;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(3.0); opacity: 0; }
}

@media (max-width: 1024px) {
  .infographic-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

.metric-item {
  transition: all 0.3s ease;
}

.metric-item:hover {
  background: var(--bg-glass-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* ---------- Scroll to Top ---------- */
#scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease);
  box-shadow: 0 4px 20px rgba(0, 103, 71, 0.3);
  border: none;
  outline: none;
  transform: translateY(20px);
}

#scroll-to-top.visible {
  opacity: 0.75;
  visibility: visible;
  transform: translateY(0);
}

#scroll-to-top:hover {
  opacity: 1;
  background: var(--accent-alt);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 103, 71, 0.4);
}

@media (max-width: 480px) {
  #scroll-to-top {
    bottom: 5.5rem; /* Avoid clashing with mobile Dashboard CTA */
    right: 1.5rem;
    width: 44px;
    height: 44px;
  }
}

/* ---------- Research Year Badge ---------- */
.research-year {
  display: inline-flex;
  align-items: center;
  font-family: var(--ff-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  padding: 0.1rem 0.6rem;
  border-radius: 4px;
  margin-left: auto;
  border: 1px solid var(--border-accent);
  flex-shrink: 0;
}

/* Overrides for research-link hover (padding-left shift) */
.research-link:hover {
  background: var(--bg-primary);
  padding-left: 1.25rem;
}

.link-text {
  flex: 1;
  line-height: 1.4;
}

.card-icon {
  width: 28px; 
  height: 28px;
  min-width: 28px;
  color: var(--accent);
  opacity: 0.8;
}

.download-btn svg {
  width: 14px;
  height: 14px;
  min-width: 14px;
}
