/* Global Styles */
* {
  box-sizing: border-box;
}

:root {
  --background: #000000;
  --foreground: #ffffff;
  --muted: #1a1a1a;
  --muted-foreground: #a1a1aa;
  --primary: #ffffff;
  --border: #333333;
  --card: #111111;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

/* Header */
header {
  height: 80px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-weight: 600;
  font-size: 20px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--muted-foreground);
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--foreground);
}

/* Main Content Spacing for Fixed Header */
main {
  padding-top: 80px;
}

.btn {
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-outline {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
}

.btn-outline:hover {
  background: var(--muted);
}

.btn-primary {
  background-color: var(--foreground);
  color: var(--background);
  border: 1px solid var(--foreground);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-ghost {
  background: transparent;
  color: var(--muted-foreground);
  padding: 10px 10px;
  /* Reduced padding for ghost button */
}

.btn-ghost:hover {
  color: var(--foreground);
}

/* Hero */
/* Hero */
.hero {
  padding: 100px 0 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: 64px;
  letter-spacing: -2px;
  line-height: 1.1;
  margin: 0 0 24px 0;
  font-weight: 600;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 20px;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* Animations */
.rails-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 40px;
  align-items: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Form Styles */
.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted-foreground);
}

.form-input {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 6px;
  color: var(--foreground);
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--foreground);
}

textarea.form-input {
  min-height: 120px;
  resize: vertical;
}

/* New Utility Classes */
.grid-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

/* Footer Content Utility */
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 0;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  z-index: 102;
  /* Ensure above nav-links */
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--foreground);
  transition: all 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  h1 {
    font-size: 40px !important;
    /* Smaller H1 */
  }

  .hero {
    padding: 60px 0 40px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  h2 {
    font-size: 28px !important;
    /* Smaller H2 */
  }

  p {
    font-size: 16px !important;
    /* Smaller body text */
  }

  /* Navigation */
  .mobile-menu-btn {
    display: flex;
    /* Show hamburger */
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    height: 100vh;
    background: var(--background);
    flex-direction: column;
    padding: 100px 24px 40px;
    gap: 32px;
    transform: translateX(100%);
    /* Slide from right */
    opacity: 1;
    transition: transform 0.3s ease-in-out;
    z-index: 101;
    /* Below menu button */
    pointer-events: all;
    /* Always allow events if visible, but hidden by transform */
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 18px;
    color: var(--foreground);
  }

  .btn-outline {
    display: none;
    /* Hide 'Request access' in header on mobile if cluttered, or move into menu */
  }

  /* Move 'Request access' into menu logically (requires JS or duplicating link, simplified for now) */

  /* Index: Supported Rails */
  .rails-preview>div>div:last-child {
    grid-template-columns: repeat(2, 1fr) !important;
    /* 2 columns */
    gap: 24px !important;
  }

  /* Index: Platform Image */
  .platform-image>div>div {
    height: 300px !important;
  }

  .platform-image h2 {
    font-size: 24px !important;
  }

  /* Rails Page: Rail Sections */
  .rail-grid {
    grid-template-columns: 1fr !important;
    /* Stack columns */
    gap: 40px !important;
  }

  .rail-section .container>div:first-child {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px !important;
  }

  /* Utility for 2-column grids */
  .grid-two-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
  }

  /* Specific overrides if needed, but utility should handle it */

  /* Footer */
  .footer-content {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 24px;
    padding: 32px 0 40px !important;
    /* Adjust padding for mobile */
  }

  .footer-content>div,
  .footer-content>p {
    width: 100%;
    text-align: left;
  }

  /* Responsive Rails Grid */
  .rails-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    /* Switch to 2 columns on mobile */
    gap: 24px !important;
  }
}