/* sparkrun — Landing page styles
 *
 * IMPORTANT: The splash template renders with data-theme="dark" in static HTML,
 * which inverts Starlight's CSS variables. All colors here use explicit values
 * with prefers-color-scheme media queries for reliable light/dark support.
 */

/* Feature card grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 3rem 0;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Hero Video & Background */
.hero-video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 800px; /* Taller background gradient */
  z-index: -10;
  background: linear-gradient(to bottom, var(--sl-color-gray-5) 0%, var(--sl-color-black) 100%);
  pointer-events: none;
}

@media (prefers-color-scheme: light) {
  .hero-video-background {
    background: linear-gradient(to bottom, var(--sl-color-gray-5) 0%, var(--sl-color-black) 100%);
  }
}

.hero-terminal-container {
  position: absolute;
  top: 6rem;
  left: 60%; /* Shift further right to avoid text overlap */
  width: 35%;
  min-width: 450px;
  background: #0b0b0e;
  border: 1px solid #303033;
  border-radius: 0.75rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: -1;
}

.terminal-header {
  height: 2.5rem;
  background: #1e1e21;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.5rem;
  border-bottom: 1px solid #303033;
}

.terminal-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.hero-video-wrapper {
  aspect-ratio: 16 / 10;
  width: 100%;
  overflow: hidden;
  position: relative;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center; /* Bias framing to show more of the left side of the video */
  opacity: 0.9;
}

@media (max-width: 960px) {
  .hero-terminal-container {
    display: none; /* Hide on smaller screens to prioritize text */
  }
}

@media (max-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

.feature-card {
  background: #fbf8fd;
  border: 1px solid #f2f0f4;
  border-radius: 1.5rem; /* MD3 card rounding */
  padding: 2rem;
  transition: box-shadow 0.25s ease, transform 0.2s ease, background-color 0.25s ease;
}

@media (prefers-color-scheme: dark) {
  .feature-card {
    background: #1e1e21; /* MD3 surface container */
    border-color: #303033;
  }
}

.feature-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-4px);
  background: #f2f0f4;
}

@media (prefers-color-scheme: dark) {
  .feature-card:hover {
    background: #303033;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }
}

.feature-card .feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: #1b1b1f;
  letter-spacing: -0.01em;
}

@media (prefers-color-scheme: dark) {
  .feature-card h3 {
    color: #e2e2e6;
  }
}

.feature-card p {
  font-size: 0.95rem;
  color: #46464a;
  margin: 0;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  .feature-card p {
    color: #abaab0;
  }
}

/* Install command box */
.install-box {
  max-width: 42rem;
  margin: 3rem auto;
  padding-inline: 1.5rem;
}

.install-command {
  display: flex;
  align-items: center;
  background: #1b1b1f;
  color: #e2e2e6;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  font-family: var(--sl-font-mono);
  font-size: 1rem;
  gap: 1rem;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 1px solid #303033;
}

@media (prefers-color-scheme: dark) {
  .install-command {
    background: #111114;
    color: #e2e2e6;
    border-color: #303033;
  }
}

.install-command code {
  flex: 1;
  background: none !important;
  color: inherit !important;
  padding: 0 !important;
  font-size: inherit !important;
}

.install-command .copy-btn {
  background: #435e91;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.install-command .copy-btn:hover {
  background: #b0c6ff;
  color: #001a41;
}

.install-command .copy-btn.copied {
  background: #76b900;
  color: #ffffff;
}

/* Quick start section */
.quick-start {
  max-width: 64rem;
  margin: 4rem auto;
  padding-inline: 1.5rem;
}

.quick-start h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 3rem;
  color: #1b1b1f;
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  .quick-start h2 {
    color: #e2e2e6;
  }
}

.quick-start-steps {
  display: grid;
  gap: 2rem;
}

.quick-start-step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: #f2f0f4;
  padding: 1.5rem;
  border-radius: 1.5rem;
  border: 1px solid #e2e2e6;
}

@media (prefers-color-scheme: dark) {
  .quick-start-step {
    background: #1e1e21;
    border-color: #303033;
  }
}

.step-number {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: #435e91;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

@media (prefers-color-scheme: dark) {
  .step-number {
    background: #b0c6ff;
    color: #001a41;
  }
}

.step-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #1b1b1f;
}

@media (prefers-color-scheme: dark) {
  .step-content h3 {
    color: #e2e2e6;
  }
}

.step-content p {
  margin: 0 0 1rem;
  color: #46464a;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  .step-content p {
    color: #abaab0;
  }
}

.step-content pre {
  margin: 0.75rem 0 0;
  padding: 1rem 1.25rem !important;
  font-size: 0.9rem;
  background: #1b1b1f !important;
  border-radius: 0.75rem;
  overflow-x: auto;
}

.step-content pre code {
  color: #e2e2e6 !important;
  background: none !important;
  padding: 0 !important;
}

/* Coming Soon banner */
@keyframes border-glow {
  0%, 100% { border-color: rgba(118, 185, 0, 0.3); box-shadow: 0 0 8px rgba(118, 185, 0, 0.05); }
  50% { border-color: rgba(118, 185, 0, 0.7); box-shadow: 0 0 16px rgba(118, 185, 0, 0.12); }
}

.coming-soon-banner {
  max-width: 72rem;
  margin: 3rem auto;
  padding: 2rem 2.5rem;
  padding-inline: 1.5rem;
  text-align: center;
  background: #f2f0f4;
  border: 2px solid rgba(118, 185, 0, 0.4);
  border-radius: 1.5rem;
  animation: border-glow 3s ease-in-out infinite;
}

@media (prefers-color-scheme: dark) {
  .coming-soon-banner {
    background: #1e1e21;
  }
}

.coming-soon-badge {
  display: inline-block;
  background: #76b900;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

@media (prefers-color-scheme: dark) {
  .coming-soon-badge {
    background: #76b900;
    color: #ffffff;
  }
}

.coming-soon-banner h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: #1b1b1f;
}

@media (prefers-color-scheme: dark) {
  .coming-soon-banner h3 {
    color: #e2e2e6;
  }
}

.coming-soon-banner p {
  font-size: 1rem;
  color: #46464a;
  margin: 0;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  .coming-soon-banner p {
    color: #abaab0;
  }
}

.coming-soon-banner a {
  color: #435e91;
  text-decoration: none;
  font-weight: 600;
}

.coming-soon-banner a:hover {
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  .coming-soon-banner a {
    color: #b0c6ff;
  }
}

/* Footer */
.landing-footer {
  margin-top: 6rem;
  padding: 4rem 1.5rem;
  background: #f2f0f4;
  border-top: 1px solid #e2e2e6;
}

@media (prefers-color-scheme: dark) {
  .landing-footer {
    background: #111114;
    border-top-color: #1e1e21;
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  max-width: 72rem;
  margin-inline: auto;
}

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

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

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #1b1b1f;
}

@media (prefers-color-scheme: dark) {
  .footer-brand h3 {
    color: #e2e2e6;
  }
}

.footer-brand p {
  color: #46464a;
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.6;
}

@media (prefers-color-scheme: dark) {
  .footer-brand p {
    color: #abaab0;
  }
}

.footer-column h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #77767a;
  margin: 0 0 1.25rem;
}

@media (prefers-color-scheme: dark) {
  .footer-column h4 {
    color: #606064;
  }
}

.footer-column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-column li {
  margin-bottom: 0.75rem;
}

.footer-column a {
  color: #46464a;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

@media (prefers-color-scheme: dark) {
  .footer-column a {
    color: #abaab0;
  }
}

.footer-column a:hover {
  color: #435e91;
}

@media (prefers-color-scheme: dark) {
  .footer-column a:hover {
    color: #b0c6ff;
  }
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e2e6;
  color: #77767a;
  font-size: 0.9rem;
  max-width: 72rem;
  margin-inline: auto;
}

.footer-powered a {
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}

.footer-powered a:hover {
  color: #435e91;
}

@media (prefers-color-scheme: dark) {
  .footer-bottom {
    border-top-color: #1e1e21;
    color: #606064;
  }
  .footer-powered a:hover {
    color: #b0c6ff;
  }
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
