/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* CSS Custom Properties with fallbacks */
:root {
  --gap-small: 0.5rem;
  --gap-medium: 1rem;
  --gap-large: 2rem;
}

/* Fallback for browsers that don't support gap */
@supports not (gap: 1rem) {
  .music-cards > * {
    margin: var(--gap-large);
  }
  
  .panel.three .cards > * {
    margin: var(--gap-large);
  }
  
  .dock > * {
    margin-bottom: var(--gap-medium);
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #e2e8f0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem; /* Fallback for older browsers */
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 2rem; /* Fallback for older browsers */
  font-size: clamp(2rem, 4vw, 3rem);
  color: #f8fafc;
}

h3 {
  font-size: 1.5rem; /* Fallback for older browsers */
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #e2e8f0;
}

p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  color: #cbd5e1;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.site-header {
  background: rgba(15, 23, 42, 0.8);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
}

.site-header .container {
  display: flex;
  justify-content: flex-start;
  margin: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.5));
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #f8fafc;
}

/* Dock */
.dock {
  position: fixed;
  left: 2rem;
  top: 100px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dock-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.8);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 12px;
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 200px;
}

.dock-item:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(96, 165, 250, 0.3);
  transform: translateX(5px);
  box-shadow: 0 8px 32px rgba(96, 165, 250, 0.2);
}

.dock-item .dot {
  width: 8px;
  height: 8px;
  background: #60a5fa;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.5);
}

.dock-item .label {
  font-weight: 500;
  font-size: 0.9rem;
}

/* Main content */
main {
  margin-top: 60px;
  padding: 1rem 0;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}

.hero .subhead {
  font-size: 1.3rem;
  color: #94a3b8;
  max-width: 900px;
  margin: 0 auto 3rem;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
}

/* Sections */
.intro {
  padding: 4rem 0;
  text-align: center;
}

.intro h2 {
  margin-bottom: 2rem;
}

.intro p {
  max-width: 800px;
  margin: 0 auto 2rem;
  font-size: 1.2rem;
}

/* Pill list */
.pill-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  list-style: none;
  margin-top: 3rem;
}

.pill-list li {
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #60a5fa;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Panel and cards */
.panel {
  padding: 2rem 0;
}

.panel.three .cards {
  display: flex; /* Fallback for older browsers */
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 0.5rem;
  display: grid; /* Modern browsers */
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.panel.three .cards > * {
  margin: 1rem; /* Fallback for gap in older browsers */
  flex: 1 1 300px; /* Fallback flex behavior */
}

.card {
  background: rgba(15, 23, 42, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.card:hover {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(96, 165, 250, 0.3);
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card h3 {
  color: #60a5fa;
  margin-bottom: 1rem;
}

.card p {
  margin-bottom: 1.5rem;
  color: #cbd5e1;
}

.card-link {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.card-link:hover {
  color: #c084fc;
}

/* Video styling */
.video-container {
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

/* Construction image styling */
.construction-image {
  text-align: center;
  margin: 2rem 0;
}

.construction-image img {
  width: 50%;
  height: auto;
  border-radius: 8px;
}

.safe-network-video,
.autonomi-video,
.coloney-video,
.install-video,
.features-video,
.routing-video,
.replication-video,
.content-video,
.apps-video,
.data-video,
.collab-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.video-description {
  color: #94a3b8;
  font-size: 0.95rem;
  text-align: center;
  margin-bottom: 0;
}

/* Music Panel */
.music-panel {
  padding: 4rem 0;
  background: rgba(15, 23, 42, 0.3);
}

.music-cards {
  display: flex; /* Fallback for older browsers */
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 800px;
  margin: 0 auto;
  display: grid; /* Modern browsers */
  grid-template-columns: 1fr 1fr;
}

.music-cards > * {
  margin: 1rem; /* Fallback for gap in older browsers */
}

.music-cards > *:first-child {
  margin-left: 0;
}

.music-cards > *:last-child {
  margin-right: 0;
}

.music-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.music-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.music-info h3 {
  margin-bottom: 0.5rem;
  color: #f8fafc;
}

.music-info p {
  margin-bottom: 0;
  color: #94a3b8;
  font-size: 0.95rem;
}

.play-button {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.play-button:hover {
  transform: scale(1.1);
  box-shadow: 0 0 30px rgba(96, 165, 250, 0.6);
}

.play-button:active {
  transform: scale(0.95);
}

.play-button.playing {
  background: linear-gradient(135deg, #f472b6, #ec4899);
}

.play-button.playing .play-icon svg {
  transform: scale(0.8);
}

.play-icon {
  color: white;
  transition: all 0.3s ease;
}

.play-icon svg {
  transition: transform 0.3s ease;
}

/* Footer */
.site-footer {
  background: rgba(15, 23, 42, 0.9);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.site-footer .container {
  margin: 0;
}

.foot-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 2rem;
}

.brand.small .brand-mark {
  width: 2rem;
  height: 2rem;
}

.brand.small .brand-name {
  font-size: 1.2rem;
}

.legal {
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  padding-top: 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
  .dock {
    left: 1rem;
    min-width: 160px;
  }
  
  .dock-item {
    min-width: 160px;
    padding: 0.5rem 0.75rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 4rem 0;
  }
  
  .panel.three .cards {
    grid-template-columns: 1fr;
  }
  
  .music-cards {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .foot-row {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .dock {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    flex-direction: row;
    overflow-x: auto;
    padding: 1rem;
    margin: 1rem 0;
  }
  
  .dock-item {
    min-width: auto;
    white-space: nowrap;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
}
