:root {
  --bg-dark: #050b14;
  --bg-glow-1: #4a1d6e;
  --bg-glow-2: #11294d;
  --bg-glow-3: #004d40;
  --surface: rgba(18, 25, 43, 0.45);
  --surface-hover: rgba(28, 40, 68, 0.65);
  --surface-strong: rgba(20, 30, 54, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  --text-main: #f0f4ff;
  --text-muted: #94a3b8;
  --accent-cyan: #00d4ff;
  --accent-purple: #a855f7;
  --accent-green: #34d399;
  --glass-blur: blur(16px);
  --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.15);
}

::selection {
  background: rgba(0, 212, 255, 0.3);
  color: #fff;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Dynamic Ambient Background */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  background: var(--bg-dark);
}

.ambient-bg::before, .ambient-bg::after {
  content: '';
  position: absolute;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: float 20s infinite ease-in-out alternate;
}

.ambient-bg::before {
  background: radial-gradient(circle, var(--bg-glow-1), transparent 60%);
  top: -10%;
  left: -10%;
}

.ambient-bg::after {
  background: radial-gradient(circle, var(--bg-glow-2), transparent 60%);
  bottom: -10%;
  right: -10%;
  animation-delay: -10s;
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, white 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 80%);
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 5%) scale(1.1); }
}

/* Typography Headings */
h1, h2, h3, h4, .brand {
  font-family: 'Outfit', 'Space Grotesk', 'Noto Sans SC', sans-serif;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #e2e8f0;
}

/* Header & Glass Nav */
.site-header {
  position: fixed;
  top: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(90%, 1000px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.3);
  z-index: 100;
  transition: all 0.3s ease;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.05em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background: url('/assets/mask_icon.svg') no-center/contain;
  border-radius: 6px;
  background-color: var(--accent-cyan);
  mask: url('/assets/mask_icon.svg') no-repeat center / contain;
  -webkit-mask: url('/assets/mask_icon.svg') no-repeat center / contain;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-main);
}

.lang-toggle {
  display: flex;
  background: var(--surface-strong);
  border-radius: 20px;
  padding: 4px; border: 1px solid var(--border);
}

.lang-toggle a, .lang-toggle span {
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 16px;
  transition: all 0.2s;
}

.lang-toggle .active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

/* Layout */
.container {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 8rem 0;
  position: relative;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  font-family: 'Outfit', sans-serif;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #3b82f6 100%);
  color: #030712;
  box-shadow: 0 4px 14px 0 rgba(0, 212, 255, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px 0 rgba(0, 212, 255, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 8rem;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text .badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(0, 212, 255, 0.1);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--accent-cyan);
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero-text .subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.hero-demo-container {
  position: relative;
  perspective: 1000px;
}

.demo-glass-pane {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(168, 85, 247, 0.15);
  backdrop-filter: blur(20px);
  transform: rotateY(-10deg) rotateX(5deg);
  transition: transform 0.5s ease;
  position: relative;
  overflow: hidden;
}

.demo-glass-pane:hover {
  transform: rotateY(0) rotateX(0);
}

.demo-original, .demo-translated {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(255,255,255,0.05);
}

.demo-original p {
  font-size: 1.1rem;
  color: #cbd5e1;
  font-weight: 500;
}

.demo-translated p {
  font-size: 1.1rem;
  color: var(--accent-green);
  font-weight: 600;
}

.demo-mask {
  position: relative;
  height: 80px;
  border: 2px dashed var(--accent-cyan);
  border-radius: 12px;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.05);
  overflow: hidden;
}

.scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px 2px var(--accent-cyan);
  animation: scan 2s infinite linear;
}

@keyframes scan {
  0% { top: 0; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.demo-mask span {
  font-size: 0.875rem;
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 1;
}

/* Features Grid */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 5rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.125rem;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.glass-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  backdrop-filter: var(--glass-blur);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.glass-card:hover {
  transform: translateY(-8px);
  background: var(--surface-hover);
  border-color: var(--border-light);
  box-shadow: var(--shadow-glow);
}

.glass-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Comparison Section */
.compare-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

.compare-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
}

.compare-box.pro {
  background: linear-gradient(180deg, rgba(20, 30, 54, 0.8), rgba(15, 23, 42, 0.6));
  border-color: rgba(0, 212, 255, 0.3);
  position: relative;
}

.compare-box.pro::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 20px;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  pointer-events: none;
}

.compare-box h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.compare-box ul {
  list-style: none;
}

.compare-box li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.compare-box li::before {
  content: '✕';
  position: absolute;
  left: 0;
  color: #ef4444;
  font-weight: bold;
}

.compare-box.pro li {
  color: var(--text-main);
}

.compare-box.pro li::before {
  content: '✓';
  color: var(--accent-cyan);
}

/* Scenarios */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.scenario-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s;
}

.scenario-card:hover {
  background: var(--surface-hover);
  transform: scale(1.02);
}

.scenario-card h3 {
  color: var(--accent-cyan);
  font-size: 1.1rem;
}

/* Tables */
.glass-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.glass-table th {
  background: rgba(0,0,0,0.2);
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-weight: 600;
  color: #fff;
  border-bottom: 1px solid var(--border);
}

.glass-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: var(--text-muted);
}

.glass-table tr:last-child td {
  border-bottom: none;
}

.glass-table td:last-child {
  color: var(--accent-green);
  font-weight: 500;
}

/* Privacy Flow */
.privacy-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem 3rem;
  margin-top: 2rem;
}

.flow-step {
  text-align: center;
  flex: 1;
}

.flow-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent-purple);
}

.flow-step:nth-child(3) .flow-icon {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.3);
  color: var(--accent-cyan);
}

.flow-arrow {
  color: var(--border-light);
  font-size: 1.5rem;
}

/* CTA & Footer */
.cta-section {
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.8));
  border-top: 1px solid var(--border);
  padding: 6rem 0;
  position: relative;
}

.subscribe-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 2rem auto 0;
}

.subscribe-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 1.25rem;
  color: #fff;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.3s;
}

.subscribe-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
  background: #020617;
}

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

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

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

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

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

/* Responsive */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text .subtitle {
    margin: 0 auto 2.5rem;
  }
  .hero-actions {
    justify-content: center;
  }
  .compare-container {
    grid-template-columns: 1fr;
  }
  .privacy-flow {
    flex-direction: column;
    gap: 2rem;
  }
  .flow-arrow {
    transform: rotate(90deg);
  }
  .site-header {
    width: 95%;
    top: 1rem;
  }
  .nav-links {
    display: none; /* simple mobile nav */
  }
}

@media (max-width: 600px) {
  h1 { font-size: 2.2rem; }
  .scenario-grid { grid-template-columns: 1fr; }
  .subscribe-form { flex-direction: column; }
  .subscribe-input { padding: 0.875rem 1.25rem; }
  .footer-content { flex-direction: column; text-align: center; }
}

/* Policy Pages */
body.policy-body {
  background: #f7f7f5;
  color: #1f2937;
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  line-height: 1.8;
  overflow-x: visible;
}

body.policy-body::before,
body.policy-body::after {
  content: none;
}

.policy-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 247, 245, 0.94);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.policy-header-inner {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 0 32px;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.policy-brand {
  color: #111827;
  font-family: 'Outfit', 'Space Grotesk', 'Noto Sans SC', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.policy-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
}

.policy-lang-switch a,
.policy-lang-switch span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #4b5563;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.policy-lang-switch a:hover {
  background: #f3f4f6;
  color: #111827;
}

.policy-lang-switch .is-active {
  background: #111827;
  color: #ffffff;
}

.policy-main {
  width: 100%;
  padding: 48px 24px 56px;
}

.policy-article {
  width: min(100%, 820px);
  margin: 0 auto;
  padding: 48px 56px 56px;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.05);
}

.policy-document-header {
  margin-bottom: 38px;
  padding-bottom: 28px;
  border-bottom: 1px solid #eceff3;
}

.policy-eyebrow {
  margin-bottom: 12px;
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.policy-article h1,
.policy-article h2 {
  color: #111827;
  background: none;
  -webkit-text-fill-color: initial;
  letter-spacing: -0.02em;
}

.policy-article h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
}

.policy-meta {
  margin-top: 16px;
  color: #6b7280;
  font-size: 0.98rem;
}

.policy-lead {
  margin-top: 18px;
  color: #374151;
  font-size: 1.05rem;
  line-height: 1.85;
}

.policy-article h2 {
  margin-top: 34px;
  margin-bottom: 14px;
  font-size: 1.28rem;
  font-weight: 600;
  line-height: 1.45;
}

.policy-article p,
.policy-article li {
  color: #374151;
  font-size: 1rem;
  line-height: 1.85;
}

.policy-article p + p {
  margin-top: 16px;
}

.policy-article ul {
  margin: 12px 0 0;
  padding-left: 1.4rem;
}

.policy-article li + li {
  margin-top: 10px;
}

.policy-article a,
.policy-footer a {
  color: #1f4f8a;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
}

.policy-article a:hover,
.policy-footer a:hover {
  color: #163b69;
}

.policy-note {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #dbe4f0;
  border-left: 3px solid #94a3b8;
  border-radius: 12px;
  background: #f8fafc;
  color: #334155;
}

.policy-footer {
  width: 100%;
  padding: 0 24px 48px;
  background: transparent;
  border-top: 0;
}

.policy-footer-inner {
  width: min(100%, 820px);
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.policy-footer-inner p {
  color: #6b7280;
  font-size: 0.92rem;
}

.policy-footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.policy-footer-links a {
  font-size: 0.92rem;
}

@media (max-width: 900px) {
  .policy-header-inner {
    padding: 0 24px;
  }

  .policy-main {
    padding: 36px 20px 44px;
  }

  .policy-article {
    padding: 40px 32px 44px;
    border-radius: 20px;
  }
}

@media (max-width: 600px) {
  .policy-header-inner {
    min-height: 64px;
    padding: 0 16px;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: center;
    gap: 12px;
  }

  .policy-lang-switch a,
  .policy-lang-switch span {
    min-width: 64px;
    padding: 6px 10px;
    font-size: 0.88rem;
  }

  .policy-main {
    padding: 24px 16px 32px;
  }

  .policy-article {
    padding: 30px 20px 34px;
    border-radius: 16px;
  }

  .policy-document-header {
    margin-bottom: 30px;
    padding-bottom: 22px;
  }

  .policy-article h1 {
    font-size: 1.8rem;
  }

  .policy-article h2 {
    font-size: 1.18rem;
    margin-top: 28px;
  }

  .policy-meta,
  .policy-lead,
  .policy-article p,
  .policy-article li {
    font-size: 0.98rem;
  }

  .policy-footer {
    padding: 0 16px 32px;
  }

  .policy-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
