/* Terranova Landing Page Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Nunito:wght@300;400;600;700&display=swap');

/* CSS Custom Properties - Brand Colors */
:root {
  /* Primary - Warm amber/terracotta */
  --color-primary: #f4a261;
  --color-primary-dark: #d4a373;
  --color-primary-light: #e9c46a;

  /* Paper/Light tones */
  --color-paper: #fefae0;
  --color-paper-warm: #fff8f0;
  --color-cream: #fffcf2;

  /* Text */
  --color-text-dark: #5a4a3a;
  --color-text-medium: #6b5344;
  --color-text-light: #fefae0;

  /* Backgrounds */
  --color-bg-dark: #1a1a1a;
  --color-bg-warm: #2a2520;

  /* Accents */
  --color-accent-coral: #e07a5f;
  --color-accent-siena: #bc6c25;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Typography */
  --font-display: 'Libre Baskerville', Georgia, serif;
  --font-body: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text-dark);
  background-color: var(--color-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text-dark);
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  margin-bottom: var(--spacing-sm);
}

a {
  color: var(--color-accent-siena);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--color-primary);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

section {
  padding: var(--spacing-xl) 0;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(90, 74, 58, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem var(--spacing-md);
  gap: var(--spacing-md);
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text-dark);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  transition: opacity 0.3s ease;
}

.navbar__logo:hover {
  opacity: 0.8;
}

.navbar__logo-img {
  width: 32px;
  height: 32px;
}

.navbar__nav {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
}

.navbar__link {
  color: var(--color-text-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.navbar__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.navbar__link:hover {
  color: var(--color-primary);
}

.navbar__link:hover::after {
  width: 100%;
}

.navbar__language {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  border: 2px solid var(--color-primary);
  border-radius: 25px;
  padding: 0.3rem 0.5rem;
  background: white;
}

.navbar__lang-item {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text-dark);
  transition: all 0.3s ease;
  cursor: pointer;
}

.navbar__lang-item:hover {
  background: rgba(244, 162, 97, 0.1);
  color: var(--color-primary);
}

.navbar__lang-item--active {
  background: var(--color-primary);
  color: white;
  cursor: default;
}

.navbar__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.navbar__mobile-toggle span {
  width: 25px;
  height: 3px;
  background: var(--color-text-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.navbar__mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.navbar__mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.navbar__mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Adjust hero to account for fixed navbar */
.hero {
  margin-top: 70px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent-coral) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(244, 162, 97, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 162, 97, 0.4);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-dark);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

/* Hero Section */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--color-paper-warm) 0%, var(--color-cream) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(244, 162, 97, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: fadeInUp 1s ease;
}

.hero__logo {
  max-width: 400px;
  margin: 0 auto var(--spacing-md);
  opacity: 0;
  animation: fadeIn 1.5s ease 0.3s forwards;
}

.hero__logo img {
  width: 100%;
  height: auto;
}

.hero__title {
  color: var(--color-text-dark);
  margin-bottom: var(--spacing-md);
  opacity: 0;
  animation: fadeInUp 1s ease 0.5s forwards;
}

.hero__subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: var(--color-text-medium);
  max-width: 700px;
  margin: 0 auto var(--spacing-lg);
  opacity: 0;
  animation: fadeInUp 1s ease 0.7s forwards;
}

.hero__cta {
  opacity: 0;
  animation: fadeInUp 1s ease 0.9s forwards;
}

/* Section Styles */
.section {
  padding: var(--spacing-xl) 0;
}

.section--alt {
  background-color: var(--color-paper-warm);
}

.section--dark {
  background: linear-gradient(135deg, var(--color-bg-warm) 0%, var(--color-bg-dark) 100%);
  color: var(--color-text-light);
}

.section--dark h2,
.section--dark h3 {
  color: var(--color-text-light);
}

.section__header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--spacing-lg);
}

.section__title {
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent-coral) 100%);
  border-radius: 2px;
}

/* What is Terranova */
.what-is {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.what-is__content {
  animation: fadeInLeft 0.8s ease;
}

.what-is__visual {
  background: linear-gradient(135deg, rgba(244, 162, 97, 0.1) 0%, rgba(233, 196, 106, 0.1) 100%);
  border-radius: 20px;
  padding: var(--spacing-lg);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInRight 0.8s ease;
}

/* RoverLab Section */
.roverlab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
  align-items: center;
}

.roverlab__visual {
  background: linear-gradient(135deg, rgba(224, 122, 95, 0.1) 0%, rgba(244, 162, 97, 0.1) 100%);
  border-radius: 20px;
  padding: var(--spacing-lg);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.roverlab__content {
  animation: fadeInRight 0.8s ease;
}

.roverlab__badge {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-text-dark);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
}

/* How It Works */
.how-it-works__steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.step {
  text-align: center;
  padding: var(--spacing-md);
  background: white;
  border-radius: 15px;
  transition: all 0.3s ease;
  position: relative;
}

.step:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(90, 74, 58, 0.1);
}

.step__number {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent-coral) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto var(--spacing-sm);
  font-family: var(--font-display);
}

.step__title {
  font-size: 1.3rem;
  margin-bottom: var(--spacing-xs);
}

.step__description {
  color: var(--color-text-medium);
  font-size: 1rem;
}

/* Open Source Section */
.opensource__content {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.opensource__tagline {
  font-size: 1.5rem;
  font-family: var(--font-display);
  color: var(--color-primary-light);
  margin-bottom: var(--spacing-md);
}

.opensource__tech {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-top: var(--spacing-md);
}

.tech-badge {
  background: rgba(254, 250, 224, 0.1);
  color: var(--color-text-light);
  padding: 0.5rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  border: 1px solid rgba(254, 250, 224, 0.2);
}

/* Get Involved Section */
.get-involved__content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-form {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  min-width: 250px;
  padding: 1rem 1.5rem;
  border: 2px solid var(--color-primary);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: white;
  color: var(--color-text-dark);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--color-accent-coral);
}

.newsletter-form button {
  flex-shrink: 0;
}

.community-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

/* Footer */
.footer {
  background: var(--color-bg-dark);
  color: var(--color-text-light);
  padding: var(--spacing-lg) 0 var(--spacing-md);
  text-align: center;
}

.footer__logo {
  max-width: 200px;
  margin: 0 auto var(--spacing-md);
}

.footer__logo img {
  width: 100%;
  height: auto;
  filter: brightness(0) invert(1);
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--color-text-light);
  transition: color 0.3s ease;
}

.footer__links a:hover {
  color: var(--color-primary);
}

.footer__tagline {
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Language Switcher */
.language-switcher {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin: var(--spacing-md) 0;
  flex-wrap: wrap;
}

.language-switcher__item {
  color: var(--color-text-light);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 1px solid rgba(254, 250, 224, 0.2);
}

.language-switcher__item:hover {
  background: rgba(254, 250, 224, 0.1);
  border-color: var(--color-primary);
}

.language-switcher__item--active {
  background: var(--color-primary);
  color: var(--color-bg-dark);
  border-color: var(--color-primary);
  font-weight: 600;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
  :root {
    --spacing-xl: 4rem;
    --spacing-lg: 3rem;
  }

  /* Mobile Navbar */
  .navbar__mobile-toggle {
    display: flex;
  }

  .navbar__container {
    flex-wrap: wrap;
  }

  .navbar__nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-top: 1px solid rgba(90, 74, 58, 0.1);
  }

  .navbar--open .navbar__nav {
    display: flex;
  }

  .navbar__link::after {
    display: none;
  }

  .navbar__language {
    order: -1;
  }

  .what-is,
  .roverlab {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }

  .roverlab {
    direction: rtl;
  }

  .roverlab > * {
    direction: ltr;
  }

  .how-it-works__steps {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input {
    width: 100%;
  }

  .hero {
    min-height: 80vh;
  }

  .btn {
    padding: 0.9rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .container {
    padding: 0 var(--spacing-sm);
  }

  section {
    padding: var(--spacing-lg) 0;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}
