/* ══════════════════════════════
   CypherAir — Shared Styles
   ══════════════════════════════ */

:root {
  --color-bg: #FAFAFA;
  --color-surface: #FFFFFF;
  --color-text: #1A1A1A;
  --color-text-secondary: #6B6B6B;
  --color-accent: #0071E3;
  --color-accent-light: #EBF4FF;
  --color-border: #E8E8E8;
  --color-badge-bg: #FFF3E0;
  --color-badge-text: #E65100;
  --font-display-en: 'Instrument Serif', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  --max-width: 1080px;
  --section-gap: 140px;
}

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

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

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

/* ── Nav ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display-en);
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-lang a {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s;
}

.nav-lang a:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.nav-lang a.active {
  background: var(--color-text);
  color: #fff;
}

/* ── Hero ── */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 160px 32px 80px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 36px;
  animation: fadeInDown 0.8s ease both;
}

.hero-badge::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  background: var(--color-badge-text);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: 28px;
  animation: fadeInUp 0.8s ease 0.1s both;
}

.hero h1 em {
  color: var(--color-accent);
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto 44px;
  line-height: 1.75;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* ── Hero Actions ── */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  padding: 14px 28px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-surface);
  transition: all 0.2s;
}

.btn-hero svg {
  flex-shrink: 0;
}

.btn-hero:hover {
  border-color: #ccc;
  background: var(--color-bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* ── Available Badge ── */
.hero-badge.available {
  background: #E8F5E9;
  color: #2E7D32;
}

.hero-badge.available::before {
  background: #2E7D32;
}

.hero-note {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin-top: 16px;
  animation: fadeInUp 0.8s ease 0.5s both;
}

/* ── CTA Actions ── */
.cta-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

/* ── Section common ── */
section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

.section-spacer {
  height: var(--section-gap);
}

.section-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 540px;
  line-height: 1.75;
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 64px;
}

.feature-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 40px 32px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 1.4rem;
}

.feature-icon.offline { background: #E8F5E9; }
.feature-icon.standard { background: #E3F2FD; }
.feature-icon.easy { background: #FFF3E0; }
.feature-icon.secure { background: #FCE4EC; }
.feature-icon.file { background: #F3E5F5; }
.feature-icon.open { background: #E0F2F1; }

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
}

/* ── How it Works ── */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 64px;
}

.step {
  text-align: center;
  position: relative;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 36px;
  right: -18px;
  width: 36px;
  height: 1px;
  background: var(--color-border);
}

.step-num {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: var(--font-display-en);
  font-size: 1.6rem;
  color: var(--color-accent);
  transition: all 0.3s ease;
}

.step:hover .step-num {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ── Tech Specs ── */
.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 64px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  transition: border-color 0.2s;
}

.spec-item:hover {
  border-color: #ccc;
}

.spec-key {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-width: 120px;
  flex-shrink: 0;
}

.spec-val {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}

/* ── CTA Banner ── */
.cta-banner {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 28px;
  padding: 80px 40px;
  text-align: center;
  margin-top: var(--section-gap);
}

.cta-banner h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.cta-banner p {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Footer ── */
footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 32px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--color-border);
  margin-top: 80px;
}

.footer-left {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.footer-right {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.footer-right a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

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

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ── Dark Mode ── */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0A0A0A;
    --color-surface: #151515;
    --color-text: #F0F0F0;
    --color-text-secondary: #999;
    --color-accent: #4DA3FF;
    --color-accent-light: #1A2A3F;
    --color-border: #262626;
    --color-badge-bg: #2A1E0E;
    --color-badge-text: #FFB74D;
  }

  body { background: var(--color-bg); }

  nav {
    background: rgba(10, 10, 10, 0.85);
    border-bottom-color: var(--color-border);
  }

  .hero-badge.available { background: #0E2A10; color: #66BB6A; }
  .hero-badge.available::before { background: #66BB6A; }
  .btn-hero:hover { border-color: #444; background: #1A1A1A; box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

  .feature-icon.offline { background: #1A2E1A; }
  .feature-icon.standard { background: #142333; }
  .feature-icon.easy { background: #2A1E0E; }
  .feature-icon.secure { background: #2A1520; }
  .feature-icon.file { background: #231A2E; }
  .feature-icon.open { background: #132926; }

  .feature-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  }

  .nav-lang a {
    color: #999;
  }

  .nav-lang a:hover {
    background: #262626;
    color: #F0F0F0;
  }

  .nav-lang a.active {
    background: #F0F0F0;
    color: #0A0A0A;
  }
}

/* ── Responsive ── */
@media (max-width: 900px) {
  :root { --section-gap: 100px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .step::after { display: none; }
}

@media (max-width: 600px) {
  :root { --section-gap: 80px; }
  .hero { padding: 130px 20px 60px; }
  section { padding: 0 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .specs-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 56px 24px; border-radius: 20px; }
  footer { flex-direction: column; gap: 12px; text-align: center; }
  .nav-inner { padding: 0 20px; }
  .hero-actions { flex-direction: column; gap: 10px; align-items: center; }
  .btn-hero { padding: 10px 20px; font-size: 0.85rem; border-radius: 10px; gap: 8px; }
  .btn-hero svg { width: 16px; height: 16px; }
  .btn-hero-secondary { border-color: transparent; background: transparent; color: var(--color-text-secondary); }
}

/* ── Privacy Policy ── */
.privacy-content {
  max-width: 680px;
  margin: 0 auto;
}

.privacy-content h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 40px;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.privacy-content h2:first-child {
  margin-top: 0;
}

.privacy-content p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
}

/* ══════════════════════════════
   Language-specific overrides
   ══════════════════════════════ */

/* Chinese: use serif display font, adjust spacing */
html[lang="zh-CN"] {
  --font-display: 'Noto Serif SC', 'Songti SC', Georgia, serif;
}

html[lang="zh-CN"] body {
  line-height: 1.8;
}

html[lang="zh-CN"] .hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

html[lang="zh-CN"] .hero h1 em {
  font-style: normal;
}

html[lang="zh-CN"] .hero-sub {
  font-size: 1.15rem;
  max-width: 520px;
  line-height: 1.85;
}

html[lang="zh-CN"] .hero-badge {
  letter-spacing: 0.04em;
}

html[lang="zh-CN"] .section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.8vw, 2.8rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

html[lang="zh-CN"] .section-desc {
  max-width: 520px;
  line-height: 1.85;
}

html[lang="zh-CN"] .feature-card h3 {
  letter-spacing: 0.01em;
}

html[lang="zh-CN"] .feature-card p {
  line-height: 1.7;
}

html[lang="zh-CN"] .step p {
  line-height: 1.7;
}

html[lang="zh-CN"] .spec-key {
  text-transform: none;
  letter-spacing: 0.04em;
  min-width: 100px;
}

html[lang="zh-CN"] .cta-banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

html[lang="zh-CN"] .cta-banner p {
  max-width: 460px;
  line-height: 1.85;
}

html[lang="zh-CN"] .privacy-content p {
  line-height: 1.85;
}

/* English: use serif display font */
html[lang="en"] .hero h1,
html[lang="en"] .section-title,
html[lang="en"] .cta-banner h2 {
  font-family: var(--font-display-en);
}

html[lang="en"] .hero h1 em {
  font-style: italic;
}
