/* ============================================
   BACKWOODS DEVELOPMENT - Main Stylesheet
   ============================================ */

/* CSS Variables - Design System */
:root {
  --bg-primary: #1a1f1c;
  --bg-secondary: #252b27;
  --green-deep: #2d3b2d;
  --green-accent: #3d5a3d;
  --text-primary: #e6efea;
  --text-secondary: #b8c4bc;
  --text-muted: #7a8a7e;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --transition: 0.3s ease;
  --border-radius: 8px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--green-accent);
}

img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(26, 31, 28, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(61, 90, 61, 0.2);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green-accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

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

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

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-bg::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(26, 31, 28, 0.7) 0%,
    rgba(26, 31, 28, 0.85) 50%,
    rgba(26, 31, 28, 0.95) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
}

.hero-logo {
  margin-bottom: 3rem;
}

.hero-logo img {
  max-width: 350px;
  height: auto;
}

/* ============================================
   3D ROTATING TEXT
   ============================================ */
.rotating-text-container {
  perspective: 1000px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 2rem 0 3rem;
}

.rotating-text {
  transform-style: preserve-3d;
  animation: rotateText 16s infinite;
  position: relative;
  height: 80px;
}

.rotating-text span {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  backface-visibility: hidden;
  text-shadow: 0 0 40px rgba(61, 90, 61, 0.5);
}

.rotating-text span:nth-child(1) {
  transform: translateX(-50%) rotateX(0deg) translateZ(60px);
}

.rotating-text span:nth-child(2) {
  transform: translateX(-50%) rotateX(-90deg) translateZ(60px);
}

.rotating-text span:nth-child(3) {
  transform: translateX(-50%) rotateX(-180deg) translateZ(60px);
}

.rotating-text span:nth-child(4) {
  transform: translateX(-50%) rotateX(-270deg) translateZ(60px);
}

@keyframes rotateText {
  0%, 20% {
    transform: rotateX(0deg);
  }
  25%, 45% {
    transform: rotateX(90deg);
  }
  50%, 70% {
    transform: rotateX(180deg);
  }
  75%, 95% {
    transform: rotateX(270deg);
  }
  100% {
    transform: rotateX(360deg);
  }
}

/* ============================================
   BUTTONS & CTAs
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--green-accent);
  color: var(--text-primary);
}

.btn-primary:hover {
  background: #4a6b4a;
  color: var(--text-primary);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--green-accent);
}

.btn-outline:hover {
  background: var(--green-accent);
  color: var(--text-primary);
}

.btn-store {
  background: var(--bg-secondary);
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--green-deep);
}

.btn-store:hover {
  background: var(--green-deep);
  color: var(--text-primary);
}

.btn-store img {
  height: 24px;
  width: auto;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  padding: 6rem 2rem;
}

.section-dark {
  background: var(--bg-secondary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   INTRO SECTION
   ============================================ */
.intro {
  text-align: center;
  padding: 5rem 2rem;
  background: linear-gradient(to bottom, var(--bg-primary), var(--bg-secondary));
}

.intro-text {
  font-size: 1.5rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

.intro-text strong {
  color: var(--text-primary);
}

/* ============================================
   APP CARDS
   ============================================ */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.app-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 2rem;
  border: 1px solid var(--green-deep);
  transition: all var(--transition);
}

.app-card:hover {
  transform: translateY(-5px);
  border-color: var(--green-accent);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.app-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.app-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.app-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
}

.about-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.about-content p:first-of-type {
  font-size: 1.25rem;
  color: var(--text-primary);
}

/* ============================================
   LEGAL / POLICY PAGES
   ============================================ */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 0.75rem;
}

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.75rem;
}

.legal-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.legal-content ul {
  margin: 0 0 1.5rem 1.25rem;
  padding-left: 1rem;
  list-style: disc;
}

.legal-content li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.legal-content strong {
  color: var(--text-primary);
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.contact-tagline {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  color: var(--text-primary);
  padding: 1.5rem 2.5rem;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  border: 1px solid var(--green-deep);
  transition: all var(--transition);
}

.contact-email:hover {
  border-color: var(--green-accent);
  background: var(--green-deep);
  color: var(--text-primary);
}

.contact-email svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--green-deep);
  padding: 3rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo img {
  height: 30px;
  width: auto;
  opacity: 0.8;
}

.footer-center {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ============================================
   PAGE HEADER (for inner pages)
   ============================================ */
.page-header {
  padding: 8rem 2rem 4rem;
  background: linear-gradient(to bottom, var(--bg-secondary), var(--bg-primary));
  text-align: center;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .rotating-text span {
    font-size: 2.5rem;
  }

  .hero-logo img {
    max-width: 280px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(26, 31, 28, 0.98);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 5rem 1.5rem 3rem;
  }

  .hero-logo img {
    max-width: 220px;
  }

  .rotating-text-container {
    height: 80px;
    margin: 1.5rem 0 2rem;
  }

  .rotating-text span {
    font-size: 1.5rem;
    letter-spacing: 0.05em;
  }

  .rotating-text span:nth-child(1) {
    transform: translateX(-50%) rotateX(0deg) translateZ(40px);
  }

  .rotating-text span:nth-child(2) {
    transform: translateX(-50%) rotateX(-90deg) translateZ(40px);
  }

  .rotating-text span:nth-child(3) {
    transform: translateX(-50%) rotateX(-180deg) translateZ(40px);
  }

  .rotating-text span:nth-child(4) {
    transform: translateX(-50%) rotateX(-270deg) translateZ(40px);
  }

  .section {
    padding: 4rem 1.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .intro-text {
    font-size: 1.2rem;
  }

  .page-header {
    padding: 6rem 1.5rem 3rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .about-content h1,
  .contact-content h1 {
    font-size: 2rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .rotating-text span {
    font-size: 1.2rem;
  }

  .btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
  }

  .app-card {
    padding: 1.5rem;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
