@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500&family=Noto+Serif+TC:wght@300;400;600&display=swap');

:root {
  /* Zen Color Palette */
  --color-bg-primary: #FFF8E7; /* Rice white */
  --color-bg-secondary: #F4EFE6;
  --color-text-main: #2C3E50;
  --color-text-muted: #5D6D7E;
  --color-accent: #6A8F3F; /* Matcha / Paddy Green */
  --color-glass: rgba(255, 255, 255, 0.4);
  --color-glass-border: rgba(255, 255, 255, 0.2);
  
  /* Typography */
  --font-sans: 'Inter', -apple-system, sans-serif;
  --font-serif: 'Noto Serif TC', serif;
  
  /* Spacing & Layout */
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
  --container-width: 1100px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-primary);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* =========================================
   Typography & Utilities
   ========================================= */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--color-text-main);
  letter-spacing: 0.05em;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: opacity 0.3s ease;
}
a:hover { opacity: 0.7; }

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* =========================================
   Header & Navigation
   ========================================= */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md) 0;
  z-index: 100;
  transition: all 0.4s ease;
}

header.scrolled {
  background: rgba(255, 248, 231, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.nav-links a {
  margin-left: var(--spacing-md);
  font-size: 0.9rem;
  color: var(--color-text-main);
}

/* Language Switcher */
.lang-switcher {
  position: relative;
  display: inline-block;
  margin-left: var(--spacing-md);
}

.lang-switcher > a {
  margin-left: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: #fff;
  min-width: 120px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-radius: 8px;
  z-index: 1000;
  overflow: hidden;
  border-top: 8px solid transparent;
  background-clip: padding-box;
}

.lang-dropdown a {
  display: block;
  padding: 12px 16px;
  margin: 0;
  color: var(--color-text-main);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.lang-dropdown a:hover {
  background-color: var(--color-bg-secondary);
  opacity: 1;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher.active .lang-dropdown {
  display: block;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: 
    "text visual"
    "buttons visual";
  align-items: center;
  gap: var(--spacing-lg);
  width: 100%;
}

.hero-text {
  grid-area: text;
}

.hero-visual {
  grid-area: visual;
  position: relative;
  display: flex;
  justify-content: center;
}

.download-buttons {
  grid-area: buttons;
  display: flex;
  gap: 16px;
  width: 100%;
}

.hero-text h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

.hero-text p {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 400px;
  margin-bottom: var(--spacing-lg);
}

/* Glassmorphism Download Badge */
.download-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--color-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-glass-border);
  padding: 12px 24px;
  border-radius: 100px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  color: var(--color-text-main);
  font-weight: 500;
}

.download-badge:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  opacity: 1;
}

.download-badge.disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.2);
}

.download-buttons .download-badge {
  flex: 1;
  justify-content: center;
}

/* Floating App Mockup */
.phone-mockup {
  width: 280px;
  height: 570px;
  background-color: #fff;
  border-radius: 40px;
  box-shadow: 
    0 20px 40px rgba(0,0,0,0.1),
    inset 0 0 0 8px #f8f8f8,
    inset 0 0 0 10px #e0e0e0;
  position: relative;
  overflow: hidden;
  animation: float 6s ease-in-out infinite;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(135deg, #A8E6CF 0%, #DCEDC1 100%); /* Placeholder gradient */
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0; left: 0;
}

.phone-screen span {
  font-family: var(--font-serif);
  color: var(--color-text-main);
  opacity: 0.5;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* =========================================
   Features Section
   ========================================= */
.features {
  padding: var(--spacing-xl) 0;
  background-color: var(--color-bg-secondary);
}

.feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.feature-row:nth-child(even) {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1;
}

.feature-text h2 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-sm);
}

.feature-visual {
  flex: 1;
  height: 400px;
  background: var(--color-bg-primary);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.02);
}

/* =========================================
   Privacy Policy specific
   ========================================= */
.policy-page {
  padding-top: 120px;
  padding-bottom: var(--spacing-xl);
  max-width: 800px;
}

.policy-page h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  text-align: center;
}

.policy-page .last-updated {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-xl);
}

.policy-section {
  margin-bottom: var(--spacing-lg);
}

.policy-section h2 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--color-accent);
}

.policy-section p, .policy-section ul {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.policy-section ul {
  padding-left: 1.5rem;
}

/* =========================================
   Footer
   ========================================= */
footer {
  padding: var(--spacing-lg) 0;
  background-color: var(--color-bg-primary);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

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

.visitor-badge {
  margin-left: var(--spacing-sm);
  height: 20px;
}

/* =========================================
   Animations & JS Classes
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 12px;
  }
  
  .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }

  .nav-links a, .lang-switcher {
    margin-left: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 160px;
    padding-bottom: var(--spacing-lg);
  }
  
  .policy-page {
    padding-top: 160px;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    text-align: center;
  }
  
  .hero-text {
    order: 1;
    margin-bottom: var(--spacing-lg);
  }
  
  .hero-text h1 {
    font-size: 2.2rem;
  }
  
  .features {
    padding: var(--spacing-lg) 0;
  }
  
  .hero-visual {
    order: 2;
    margin-bottom: var(--spacing-lg);
  }

  .download-buttons {
    order: 3;
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: var(--spacing-sm);
  }
  
  .feature-row, .feature-row:nth-child(even) {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
  }
  
  .phone-mockup {
    width: 240px;
    height: 480px;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-links a, .visitor-badge {
    margin-left: 0;
  }
}
