/* ================================================
   MAPLE CODE STUDIOS - Main Stylesheet
   A refined, privacy-focused tech aesthetic
   ================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400&display=swap');

/* ================================================
   CSS Variables
   ================================================ */
:root {
  /* Colors - Warm maple-inspired palette */
  --color-bg: #FDFBF7;
  --color-bg-alt: #F7F3EB;
  --color-bg-dark: #1A1A1A;
  --color-text: #2D2A26;
  --color-text-muted: #6B6560;
  --color-text-light: #9A948C;
  --color-primary: #C45D35;
  --color-primary-dark: #A34A28;
  --color-primary-light: #E8D5C4;
  --color-accent: #2D5A4A;
  --color-accent-light: #D4E5DF;
  --color-border: #E5DFD5;
  --color-white: #FFFFFF;
  
  /* Typography */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 10rem;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(45, 42, 38, 0.05);
  --shadow-md: 0 4px 12px rgba(45, 42, 38, 0.08);
  --shadow-lg: 0 12px 32px rgba(45, 42, 38, 0.12);
  --shadow-xl: 0 24px 48px rgba(45, 42, 38, 0.16);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ================================================
   Typography
   ================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  letter-spacing: -0.01em;
}

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

p {
  margin-bottom: 1em;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-light {
  color: var(--color-text-light);
}

.text-center {
  text-align: center;
}

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

.container-sm {
  max-width: 800px;
}

.section {
  padding: var(--space-2xl) 0;
}

.section-lg {
  padding: var(--space-3xl) 0;
}

/* ================================================
   Header & Navigation
   ================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 251, 247, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
}

.logo:hover {
  color: var(--color-text);
}

.logo-icon {
  width: 36px;
  height: 36px;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-text);
}

.nav-link.active {
  color: var(--color-primary);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition-fast);
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
  }
  
  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .menu-toggle {
    display: block;
  }
}

/* ================================================
   Hero Section
   ================================================ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 80%;
  height: 150%;
  background: radial-gradient(ellipse at center, var(--color-primary-light) 0%, transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}

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

.hero-tagline {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-primary-light);
  border-radius: var(--radius-sm);
}

.hero h1 {
  margin-bottom: var(--space-md);
}

.hero-description {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
  max-width: 560px;
}

/* ================================================
   Buttons
   ================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--color-white);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-color: var(--color-text-light);
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  padding: 0.875rem 0;
}

.btn-ghost:hover {
  color: var(--color-primary-dark);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ================================================
   Values Section
   ================================================ */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.value-card {
  padding: var(--space-lg);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.value-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 1.5rem;
}

.value-card h3 {
  margin-bottom: var(--space-xs);
}

.value-card p {
  color: var(--color-text-muted);
  margin-bottom: 0;
  font-size: 0.9375rem;
}

/* ================================================
   Products Section
   ================================================ */
.products-section {
  background: var(--color-bg-alt);
}

.product-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
  padding: var(--space-xl);
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-top: var(--space-xl);
}

@media (max-width: 768px) {
  .product-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.product-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
}

.product-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: var(--space-sm);
}

.product-description {
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.product-features {
  list-style: none;
  margin-bottom: var(--space-lg);
}

.product-features li {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) 0;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.product-features li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 700;
}

.product-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.product-mockup {
  width: 280px;
  height: 560px;
  background: linear-gradient(135deg, var(--color-bg-dark) 0%, #2a2a2a 100%);
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-xl);
  position: relative;
}

.product-mockup-inner {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-family: var(--font-display);
  position: relative;
  overflow: hidden;
}

.product-mockup-inner::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #000;
  border-radius: 12px;
}

.mockup-logo {
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.mockup-tagline {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.5rem;
}

/* ================================================
   About / Mission Section
   ================================================ */
.mission-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.mission-quote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-style: italic;
  color: var(--color-text);
  line-height: 1.5;
  margin-bottom: var(--space-lg);
}

.mission-quote::before {
  content: '"';
  color: var(--color-primary);
}

.mission-quote::after {
  content: '"';
  color: var(--color-primary);
}

/* ================================================
   Footer
   ================================================ */
.footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

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

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

.footer-brand {
  max-width: 280px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-display);
  font-size: 1.125rem;
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.footer-brand p {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
}

.footer-column h4 {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 480px) {
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}

.footer-legal {
  display: flex;
  gap: var(--space-md);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
}

.footer-legal a:hover {
  color: var(--color-white);
}

/* ================================================
   Page Headers
   ================================================ */
.page-header {
  padding: calc(72px + var(--space-2xl)) 0 var(--space-xl);
  background: var(--color-bg-alt);
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-sm);
}

.page-header p {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ================================================
   Legal Pages (Privacy, Terms)
   ================================================ */
.legal-content {
  padding: var(--space-xl) 0 var(--space-2xl);
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.legal-content h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.legal-content h3 {
  font-size: 1.125rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-content p {
  color: var(--color-text-muted);
}

.legal-content ul, .legal-content ol {
  color: var(--color-text-muted);
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.legal-content li {
  margin-bottom: 0.5em;
}

.legal-meta {
  display: flex;
  gap: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xl);
  font-size: 0.875rem;
}

.legal-meta span {
  color: var(--color-text-muted);
}

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

/* ================================================
   Contact Section
   ================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.contact-card {
  padding: var(--space-lg);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.contact-card h3 {
  margin-bottom: var(--space-xs);
}

.contact-card p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  font-size: 0.9375rem;
}

.contact-card a {
  font-weight: 600;
}

/* ================================================
   Animations
   ================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   Utility Classes
   ================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mb-0 { margin-bottom: 0; }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
