/* Base styles */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Global button styles */
button {
  display: inline-flex;
  align-items: center;
  padding: .5rem 1rem .5rem 1rem;
  border-radius: 9999px;
  border: 2px solid #60a5fa;
  background-color: transparent;
  color: #60a5fa;
  font-size: 18px;
  font-weight: 500;
  transition: all 200ms;
  cursor: pointer;
}

button:hover {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

button:focus {
  outline: none;
  box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px rgba(59, 130, 246, 0.2);
}

/* Navigation shared styles */
.nav-surface {
  background-color: #111827;
  border-top: 1px solid #374151;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.1);
  /* Extend background to bottom edge of screen on iOS */
  padding-bottom: env(safe-area-inset-bottom);
  /* Fallback for devices that don't support env() */
  padding-bottom: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 16px;
  max-width: 640px;
  margin: 0 auto;
  /* Safe area padding is now handled by nav-surface */
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  text-decoration: none;
  color: #9ca3af;
  transition: all 0.2s ease;
  border-radius: 12px;
  min-width: 64px;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
}

.nav-link.active .nav-icon {
  transform: scale(1.1);
}

.nav-icon {
  margin-bottom: 4px;
  transition: transform 0.2s ease;
}

.nav-text {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

.nav-link.active .nav-text {
  font-weight: 600;
}

/* Footer desktop layout */
.footer-desktop {
  background-color: #1f2937;
  border-top: 1px solid #374151;
}

.footer-container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 24px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    gap: 0;
  }
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-link {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #f3f4f6;
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social {
  color: #9ca3af;
  transition: color 0.2s ease;
}

.footer-social:hover {
  color: #f3f4f6;
}

.footer-copyright {
  font-size: 14px;
  color: #9ca3af;
}

html {
  background-color: #111827;
  color-scheme: dark;
}

:root {
  --font-family: 'Montserrat', system-ui, sans-serif;
  color-scheme: dark;
  font-family: var(--font-family);
  line-height: 1.7;
  font-weight: 400;
  background-color: #111827;
  color: #f3f4f6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  min-width: 320px;
  background-color: #111827;
  color: #f3f4f6;
  font-family: 'Montserrat', sans-serif;
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 2rem;
  min-height: 50vh;
}

section {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-between;
  align-items: stretch;
  gap: 1.5rem;
  padding: 1.5rem 1.5rem 2rem 1.5rem;
  > * {
    flex: 1 1 0%;
    display: flex;
    flex-flow: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* Force dark theme globally */
.dark {
  color-scheme: dark;
}

/* Typography improvements for dark theme */
h1 {
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: -0.025em;
  color: white;
  line-height: 1.1;
  margin: 0;
}

@media (min-width: 1024px) {
  h1 {
    font-size: 3.75rem;
  }
}

h2 {
  font-size: 1.875rem;
  font-weight: 400;
  color: white;
  line-height: 1.375;
  margin: 0;
}

@media (min-width: 1024px) {
  h2 {
    font-size: 2.25rem;
  }
}

h3 {
  font-size: 1.25rem;
  font-weight: 500;
  color: white;
  line-height: 1.625;
  margin: 0;
}

@media (min-width: 1024px) {
  h3 {
    font-size: 1.5rem;
  }
}

p {
  font-size: 1rem;
  color: #d1d5db;
  line-height: 1.625;
  margin: 0;
}

@media (min-width: 1024px) {
  p {
    font-size: 1.125rem;
  }
}

/* Logo animations */
.logo-svg {
  transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-svg:hover {
  transform: scale(1.1);
  filter: brightness(1.2);
}

/* Ensure sticky header works properly */
.sticky {
  position: -webkit-sticky;
  position: sticky;
}

/* Safe area support for mobile devices */
@supports (padding: env(safe-area-inset-bottom)) {
  .safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
