/* FlowPomo Website - Modern CSS */
/* Matching FlowPomo App's Anthropic Design System */

/* Dark theme (default) */
:root {
  /* Colors - FlowPomo Anthropic Design Tokens */
  --primary: #d97757; /* Anthropic Orange - main accent */
  --primary-dark: #c56647; /* Darker orange for hover */
  --accent: #6a9bcc; /* Anthropic Blue - secondary accent */
  --success: #7ebf8e; /* Anthropic Green */
  --background: #141413; /* Anthropic Dark */
  --surface: #1e1e1d; /* Slightly lighter dark */
  --surface-light: #2a2a28; /* Card/elevated surfaces */
  --text-primary: #faf9f5; /* Anthropic Light - warm white */
  --text-secondary: #b0aea5; /* Anthropic Mid Gray */
  --border-color: rgba(250, 249, 245, 0.1);
  --gradient-start: #d97757;
  --gradient-end: #7ebf8e;

  /* Typography */
  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, sans-serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1200px;

  /* Transitions */
  --transition: all 0.3s ease;
}

/* Light theme */
[data-theme="light"] {
  --background: #faf9f5; /* Anthropic Light - warm white */
  --surface: #ffffff;
  --surface-light: #f5f4f0;
  --text-primary: #141413; /* Anthropic Dark */
  --text-secondary: #6b6860;
  --border-color: rgba(20, 20, 19, 0.1);
}

/* Auto theme based on system preference */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --background: #faf9f5;
    --surface: #ffffff;
    --surface-light: #f5f4f0;
    --text-primary: #141413;
    --text-secondary: #6b6860;
    --border-color: rgba(20, 20, 19, 0.1);
  }
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--surface-light);
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
}

.theme-toggle .sun-icon {
  display: none;
}

.theme-toggle .moon-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
  display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
  display: none;
}

[data-theme="light"] .theme-toggle {
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .nav {
  background: transparent;
  border-bottom: none;
}

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

html {
  scroll-behavior: smooth;
}

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

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

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

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

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Navigation */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  background: transparent;
  border-bottom: none;
}

@media (prefers-color-scheme: light) {
  .nav {
    background: transparent;
    border-bottom: none;
  }
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 2px solid var(--background);
  box-shadow: 0 0 0 1px var(--background);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-primary);
  opacity: 0.75;
  font-weight: 500;
  transition: var(--transition);
}

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

/* Menu Toggle Button (Hamburger) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

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

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

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

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: radial-gradient(
      ellipse at top,
      rgba(217, 119, 87, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at bottom right,
      rgba(106, 155, 204, 0.1) 0%,
      transparent 50%
    );
}

.hero-content {
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border-radius: 100px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
  background: linear-gradient(
    135deg,
    var(--gradient-start),
    var(--gradient-end)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--gradient-start),
    var(--primary-dark)
  );
  color: white;
  box-shadow: 0 4px 20px rgba(217, 119, 87, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(217, 119, 87, 0.4);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--surface-light);
  color: var(--text-primary);
}

/* Features Section */
.features {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 16px;
}

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

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 32px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 119, 87, 0.4);
}

.feature-icon {
  width: 56px;
  height: 56px;
  background: var(--surface-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.features-footer {
  text-align: center;
  margin-top: 48px;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background: var(--surface);
  padding: 60px 0 30px;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

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

.footer-brand h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.footer-links h4 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

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

.footer-links li {
  margin-bottom: 12px;
}

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

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

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Legal Pages */
.legal-page {
  padding: 140px 24px 80px;
  min-height: 100vh;
}

.legal-content {
  max-width: 800px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.legal-content .last-updated {
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--primary);
}

.legal-content h3 {
  font-size: 1.25rem;
  margin-top: 32px;
  margin-bottom: 12px;
}

.legal-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.legal-content ul,
.legal-content ol {
  color: var(--text-secondary);
  margin-left: 24px;
  margin-bottom: 16px;
}

.legal-content li {
  margin-bottom: 8px;
}

.legal-content a {
  color: var(--accent);
}

/* Language Switcher */
.lang-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
}

.lang-btn {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

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

.lang-content {
  display: none;
}

.lang-content.active {
  display: block;
}

/* Support Page */
.support-page {
  padding: 140px 24px 80px;
}

.support-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.support-content h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.support-content .subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
  margin-bottom: 48px;
}

.contact-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.contact-card h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.125rem;
  color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  /* Navigation */
  .nav {
    padding: 12px 0;
  }

  .nav-content {
    position: relative;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: -24px;
    right: -24px;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .nav-links.active {
    max-height: 300px;
    padding: 16px 24px;
  }

  .nav-links li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links li:last-child {
    border-bottom: none;
  }

  .nav-links a {
    display: block;
    font-size: 1rem;
  }

  /* Hide theme toggle in mobile nav area, show in menu */
  .theme-toggle {
    order: -1;
  }

  /* Hero Section */
  .hero {
    min-height: auto;
    padding: 100px 20px 60px;
  }

  .hero h1 {
    font-size: 2.25rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Features Section */
  .features {
    padding: 60px 20px;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .section-header p {
    font-size: 0.95rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .feature-card {
    padding: 24px;
  }

  .feature-icon {
    width: 48px;
    height: 48px;
  }

  .feature-card h3 {
    font-size: 1.1rem;
  }

  .feature-card p {
    font-size: 0.9rem;
  }

  .features-footer p {
    font-size: 1rem;
  }

  /* Footer */
  .footer {
    padding: 40px 20px 24px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }

  .footer-brand h3 {
    font-size: 1.25rem;
  }

  .footer-bottom {
    margin-top: 32px;
  }

  /* Legal Pages */
  .legal-page {
    padding: 100px 20px 60px;
  }

  .legal-content h1 {
    font-size: 1.75rem;
  }

  .legal-content h2 {
    font-size: 1.25rem;
  }

  .legal-content h3 {
    font-size: 1.1rem;
  }

  /* Support Page */
  .support-page {
    padding: 100px 20px 60px;
  }

  .support-content h1 {
    font-size: 1.75rem;
  }

  .contact-card {
    padding: 24px;
  }

  .contact-card h2 {
    font-size: 1.25rem;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .hero h1 {
    font-size: 1.875rem;
  }

  .nav-logo span {
    font-size: 1.25rem;
  }

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