/* ==========================================================================
   ZenTension – Modern Minimalist Industrial Design System
   ========================================================================== */

:root {
  --bg-primary: #151618;
  --bg-surface: #1E2126;
  --bg-surface-elevated: #242830;
  --bg-surface-alt: #181A1D;

  --border-subtle: #2C3037;
  --border-medium: #383D46;
  --border-highlight: #4A515E;

  --accent-terracotta: #CF725C;
  --accent-terracotta-glow: rgba(207, 114, 92, 0.25);
  --accent-gold: #D6A752;
  --accent-gold-glow: rgba(214, 167, 82, 0.22);
  --accent-slate: #567799;
  --accent-sage: #5C7C6D;
  --accent-charcoal: #41464D;

  --text-primary: #E8EAEF;
  --text-secondary: #9FA4AF;
  --text-muted: #656A75;
  --text-inverse: #151618;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 30px var(--accent-terracotta-glow);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Option if toggled */
[data-theme="light"] {
  --bg-primary: #F5F1E9;
  --bg-surface: #E9E4DA;
  --bg-surface-elevated: #EDE8DE;
  --bg-surface-alt: #DFD8CC;

  --border-subtle: #D8D2C6;
  --border-medium: #C8C0B2;
  --border-highlight: #B4AA9A;

  --text-primary: #1E2024;
  --text-secondary: #6B675E;
  --text-muted: #9E978B;
  --text-inverse: #FFFFFF;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(207, 114, 92, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 10% 30%, rgba(86, 119, 153, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(214, 167, 82, 0.05) 0%, transparent 45%);
}

/* Subtle Orthogonal Dot Grid Background */
.bg-grid-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Header & Floating Navigation */
.site-header {
  position: sticky;
  top: 16px;
  z-index: 100;
  padding: 0 24px;
}

.nav-bar {
  max-width: 1140px;
  margin: 0 auto;
  background: rgba(30, 33, 38, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-normal);
}

.nav-bar:hover {
  border-color: var(--border-medium);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color var(--transition-fast);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Switcher Dropdown */
.language-switcher {
  position: relative;
}

.language-switcher-btn {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.language-switcher-btn:hover {
  border-color: var(--border-medium);
  background: var(--bg-surface);
}

.language-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  max-height: 380px;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 200;
}

.language-switcher.open .language-dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.lang-option:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.lang-option.selected {
  background: rgba(207, 114, 92, 0.12);
  color: var(--accent-terracotta);
  font-weight: 600;
}

.lang-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lang-native {
  font-weight: 600;
}

.lang-en {
  font-size: 11px;
  color: var(--text-muted);
}

.lang-check {
  font-size: 12px;
  opacity: 0;
}

.lang-option.selected .lang-check {
  opacity: 1;
}

/* Buttons & CTA */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-terracotta), #BD5E48);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(207, 114, 92, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(207, 114, 92, 0.5);
}

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

.btn-secondary:hover {
  border-color: var(--border-medium);
  background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.hero-section {
  padding: 70px 0 80px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(207, 114, 92, 0.12);
  border: 1px solid rgba(207, 114, 92, 0.3);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  margin-bottom: 20px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-terracotta);
  box-shadow: 0 0 8px var(--accent-terracotta);
}

.hero-title {
  font-size: 54px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -1.2px;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Device Frame & Canvas Preview */
.preview-device {
  position: relative;
  background: #191B1F;
  border: 2px solid #2F333B;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 40px rgba(207, 114, 92, 0.12);
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.device-notch {
  width: 90px;
  height: 6px;
  background: #252830;
  border-radius: 999px;
  margin: 4px auto 12px;
}

.device-screen {
  background: #151618;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid #23272F;
  position: relative;
  aspect-ratio: 9 / 14;
  display: flex;
  flex-direction: column;
}

.preview-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(21, 22, 24, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 10;
}

.preview-badge-level {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-terracotta);
  background: rgba(207, 114, 92, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(207, 114, 92, 0.25);
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.preview-icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.preview-icon-btn.muted svg {
  opacity: 0.35;
}

.preview-canvas-wrap {
  flex: 1;
  position: relative;
  width: 100%;
  height: 100%;
  cursor: pointer;
  user-select: none;
}

#previewCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.preview-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 33, 38, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  pointer-events: none;
  white-space: nowrap;
  animation: pulse-subtle 2.5s infinite;
}

@keyframes pulse-subtle {
  0%, 100% { opacity: 0.85; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.02); }
}

.preview-toast {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(30, 33, 38, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--accent-terracotta);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  padding: 16px 24px;
  border-radius: var(--radius-md);
  text-align: center;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 20;
}

.preview-toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.preview-toast-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--accent-gold);
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Sections Base */
.section {
  padding: 100px 0;
  position: relative;
}

.section-alt {
  background: rgba(24, 26, 29, 0.6);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}

.section-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Cards Grid */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
  position: relative;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  color: var(--accent-terracotta);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.card-desc {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Aesthetic Showcase */
.avatar-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 36px;
}

.avatar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.avatar-item:hover {
  transform: translateY(-2px);
  border-color: var(--accent-gold);
}

.avatar-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.avatar-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--border-medium);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.faq-icon {
  width: 20px;
  height: 20px;
  color: var(--accent-terracotta);
  transition: transform 0.2s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.65;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding: 0 24px 20px;
}

/* CTA Banner */
.cta-box {
  background: linear-gradient(135deg, rgba(30, 33, 38, 0.95), rgba(36, 40, 48, 0.95));
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 60px 48px;
  text-align: center;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(207, 114, 92, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.cta-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 16px;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 36px;
}

.store-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 12px 22px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.store-badge:hover {
  transform: translateY(-2px);
  border-color: var(--accent-terracotta);
}

.store-badge-text {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.store-badge-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.store-badge-store {
  font-size: 15px;
  font-weight: 700;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #111214;
  padding: 60px 0 40px;
  font-size: 14px;
}

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

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  text-decoration: none;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--accent-terracotta);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 13px;
}

/* Legal Documents Styling (Privacy & Terms) */
.legal-page {
  padding: 60px 0 100px;
}

.legal-header {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-title {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 10px;
}

.legal-updated {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-gold);
}

.legal-content {
  max-width: 840px;
  margin: 0 auto;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.legal-content h2 {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 700;
  margin: 36px 0 14px;
  letter-spacing: -0.3px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.legal-content h3 {
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 10px;
}

.legal-content p {
  margin-bottom: 16px;
}

.legal-content ul, .legal-content ol {
  margin: 0 0 20px 24px;
}

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

.legal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin: 24px 0;
}

.legal-box-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    text-align: center;
  }

  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-stats {
    max-width: 500px;
    margin: 0 auto;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px;
  }
}

@media (max-width: 768px) {
  .site-header {
    top: 8px;
    padding: 0 12px;
  }

  .nav-bar {
    padding: 8px 14px;
  }

  .nav-links {
    display: none; /* Mobile menu handles this */
  }

  .hero-title {
    font-size: 38px;
  }

  .section-title {
    font-size: 30px;
  }

  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .preview-device {
    max-width: 320px;
  }
}
