/* ============================================================
   SayLy Website -- Design Tokens & Base Styles
   ============================================================ */

/* --- Design Tokens --- */

:root {
  --bg: #fbfbfd;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --text-dim: rgba(29,29,31,0.12);
  --border: rgba(0,0,0,0.06);
  --border-hairline: rgba(0,0,0,0.08);

  --zhJa: #4A90D9;
  --enJa: #3DB8A0;
  --koJa: #7B6FA0;
  --viJa: #5A9E72;
  --esJa: #C47A5A;

  --titanium: linear-gradient(90deg, #383838, #6a6a6a, #404040);

  --s4: 4px;
  --s8: 8px;
  --s12: 12px;
  --s16: 16px;
  --s20: 20px;
  --s24: 24px;
  --s32: 32px;

  --r12: 12px;
  --r16: 16px;
  --r20: 20px;

  --shadow-device: 0 1px 2px rgba(0,0,0,0.02),
                   0 4px 8px rgba(0,0,0,0.03),
                   0 12px 24px rgba(0,0,0,0.05),
                   0 24px 48px rgba(0,0,0,0.06);
  --shadow-card: 0 1px 1px rgba(0,0,0,0.03),
                 0 4px 8px rgba(0,0,0,0.04);
  --shadow-chip: 0 1px 2px rgba(0,0,0,0.02),
                 0 4px 12px rgba(0,0,0,0.04);

  --nav-bg: rgba(251,251,253,0.72);
  --nav-blur: saturate(180%) blur(20px);
}

/* --- Dark Mode --- */

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1d1d1f;
    --bg-alt: #161617;
    --text: #f5f5f7;
    --text-dim: rgba(245,245,247,0.12);
    --border: rgba(255,255,255,0.06);
    --border-hairline: rgba(255,255,255,0.08);
    --titanium: linear-gradient(90deg, #b0b0b0, #e0e0e0, #b8b8b8);
    --shadow-device: 0 1px 2px rgba(0,0,0,0.1),
                     0 4px 8px rgba(0,0,0,0.1),
                     0 12px 24px rgba(0,0,0,0.15),
                     0 24px 48px rgba(0,0,0,0.2);
    --shadow-card: 0 1px 1px rgba(0,0,0,0.1),
                   0 4px 8px rgba(0,0,0,0.12);
    --shadow-chip: 0 1px 2px rgba(0,0,0,0.08),
                   0 4px 12px rgba(0,0,0,0.1);
    --text-secondary: #98989d;
    --nav-bg: rgba(29,29,31,0.72);
  }
}

/* --- CSS Reset --- */

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

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  opacity: 1;
}
body.loading {
  opacity: 0;
}
body.loaded {
  opacity: 1;
  transition: opacity 0.6s ease;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

a {
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* --- Focus Styles --- */

:focus-visible {
  outline: 2px solid var(--zhJa);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- High Contrast --- */

@media (prefers-contrast: more) {
  :root {
    --border: rgba(0,0,0,0.2);
    --border-hairline: rgba(0,0,0,0.2);
    --text-secondary: #555;
  }
}

/* --- Grain Overlay --- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23grain)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* --- Navigation --- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: var(--nav-blur);
  backdrop-filter: var(--nav-blur);
  border-bottom: 0.5px solid var(--border-hairline);
  z-index: 100;
}

.nav-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.logo-text {
  display: flex;
  align-items: baseline;
}

.logo-say,
.logo-ly {
  font-size: 18px;
  letter-spacing: 0.8px;
  line-height: 1;
  background: var(--titanium);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-say {
  font-weight: 800;
}

.logo-ly {
  font-weight: 500;
}

.logo-accent {
  display: block;
  width: 18px;
  height: 1.5px;
  border-radius: 1px;
  background: linear-gradient(90deg, var(--zhJa), #5BA8E8);
}

.nav-right {
  display: flex;
  gap: 24px;
  align-items: center;
}

.lang-switch {
  display: flex;
  gap: 2px;
  background: var(--border);
  border-radius: 6px;
  padding: 2px;
}

.lang-btn {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.lang-btn.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.nav-link {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.2s;
}

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

.nav-cta {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  background: #1d1d1f;
  padding: 8px 20px;
  border-radius: 980px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: #000;
  transform: scale(1.02);
}

@media (prefers-color-scheme: dark) {
  .nav-cta {
    background: #f5f5f7;
    color: #1d1d1f;
  }

  .nav-cta:hover {
    background: #fff;
  }
}

/* --- Mobile Nav --- */

@media (max-width: 767px) {
  .nav {
    padding: 0 20px;
  }

  .nav-link {
    display: inline;
    font-size: 10px;
  }

  .nav-right {
    gap: 12px;
  }
}

/* --- Reduced Motion --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Hero Section
   ============================================================ */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 120px 40px 80px;
  position: relative;
  overflow: hidden;
}

/* --- Breathing glows --- */

@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.08); }
}

@keyframes breathe2 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.12); }
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(74,144,217,0.06) 0%, rgba(61,184,160,0.04) 40%, transparent 70%);
  filter: blur(80px);
  animation: breathe 6s ease-in-out infinite;
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  top: 30%;
  left: 60%;
  width: 500px;
  height: 500px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(123,111,160,0.05) 0%, rgba(90,158,114,0.03) 40%, transparent 70%);
  filter: blur(80px);
  animation: breathe2 8s ease-in-out infinite;
  pointer-events: none;
}

/* --- Eyebrow --- */

.hero-eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--zhJa);
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  text-align: center;
}

/* --- Title --- */

.hero-title {
  font-size: clamp(40px, 5.5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 16px;
}

/* --- Subtitle --- */

.hero-subtitle {
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
  text-align: center;
  max-width: 480px;
  margin: 0 auto 36px;
}

/* --- CTAs --- */

.hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-bottom: 64px;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1d1d1f;
  color: #fff;
  padding: 16px 32px;
  border-radius: 980px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-primary:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.cta-primary:active {
  transform: scale(0.97);
}

.cta-link {
  font-size: 16px;
  font-weight: 500;
  color: var(--zhJa);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  transition: gap 0.2s;
}

.cta-link:hover {
  gap: 8px;
}

@media (prefers-color-scheme: dark) {
  .cta-primary {
    background: #f5f5f7;
    color: #1d1d1f;
  }
}

/* --- Device container --- */

.device-container {
  position: relative;
}

.device-reflection {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 80px;
  background: radial-gradient(ellipse, rgba(74,144,217,0.08) 0%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}

/* --- iPhone mockup --- */

.iphone {
  width: 280px;
  background: var(--bg);
  border-radius: 40px;
  border: 1px solid var(--border-hairline);
  overflow: hidden;
  box-shadow: var(--shadow-device), inset 0 0.5px 0 rgba(255,255,255,0.8);
  position: relative;
}

.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px 8px;
  font-size: 14px;
  font-weight: 600;
}

.status-time {
  width: 40px;
}

.dynamic-island {
  width: 84px;
  height: 24px;
  background: #1d1d1f;
  border-radius: 20px;
}

.status-signal {
  width: 16px;
  height: 12px;
  color: var(--text);
}

.app-content {
  padding: 8px 16px 24px;
}

.app-logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: var(--titanium);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

/* --- Scene selector (underline style) --- */

.scene-selector {
  display: flex;
  align-items: stretch;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.scene-tab {
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 6px 0 8px;
  position: relative;
  cursor: default;
}

.scene-tab.active {
  font-weight: 600;
  color: var(--text);
}

.scene-tab.active::after {
  content: '';
  position: absolute;
  bottom: -0.5px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 2px;
  border-radius: 1px;
  background: var(--zhJa);
}

/* --- Detected bar --- */

.detected-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  margin-bottom: 8px;
}

.detected-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.detected-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34c759;
  flex-shrink: 0;
}

/* --- Translation cards --- */

.translation-card {
  background: #fff;
  border: 0.5px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 1px rgba(0,0,0,0.03), 0 4px 8px rgba(0,0,0,0.04);
  border-radius: 12px;
  padding: 14px;
  text-align: left;
  margin-bottom: 8px;
}

.translation-card:last-child {
  margin-bottom: 0;
}

.card-jp-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.card-jp {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

.card-speaker {
  flex-shrink: 0;
  color: var(--zhJa);
  opacity: 0.55;
  margin-top: 2px;
}

.card-note {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.card-tag {
  font-size: 9px;
  font-weight: 500;
  color: var(--zhJa);
  opacity: 0.65;
  letter-spacing: 0.6px;
  margin-top: 4px;
}

/* --- Dark mode device overrides --- */

@media (prefers-color-scheme: dark) {
  .iphone {
    background: #2c2c2e;
  }

  .dynamic-island {
    background: #000;
  }

  .translation-card {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.06);
  }
}

/* --- Hero mobile adjustments --- */

@media (max-width: 767px) {
  .hero {
    padding: 100px 20px 60px;
  }

  .hero-ctas {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 48px;
  }

  .iphone {
    width: 260px;
  }
}

/* ============================================================
   Scroll Word Reveal Section
   ============================================================ */

.reveal-section {
  min-height: 70vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  padding: 120px 40px;
}
.reveal-text {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600; line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: center; max-width: 720px;
}
.reveal-text .word {
  color: var(--text-dim);
  filter: blur(1px);
  transition: color 0.4s ease, filter 0.4s ease;
  display: inline;
}

/* ============================================================
   Feature Sections (shared layout)
   ============================================================ */

.feature {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 100px 60px; gap: 80px;
}
.feature-reverse { flex-direction: row-reverse; }
.feature-text { max-width: 400px; }
.feature-eyebrow { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.feature-title { font-size: clamp(32px, 4vw, 44px); font-weight: 700; line-height: 1.15; letter-spacing: -0.03em; margin-bottom: 16px; }
.feature-desc { font-size: 17px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 24px; }
.feature-bullets li { font-size: 15px; padding: 8px 0; display: flex; align-items: center; gap: 10px; border-bottom: 0.5px solid var(--border); }
.feature-bullets li:last-child { border: none; }
.bullet-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }

/* ============================================================
   Chat Mockup (Keyboard Feature)
   ============================================================ */

.chat-mockup { width: 300px; flex-shrink: 0; background: var(--bg); border-radius: 40px; border: 1px solid var(--border-hairline); overflow: hidden; box-shadow: var(--shadow-device); }
.chat-header { background: var(--bg-alt); padding: 40px 20px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 0.5px solid var(--border); }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--zhJa), var(--enJa)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 14px; font-weight: 600; }
.chat-name { font-size: 15px; font-weight: 600; }
.chat-sub { font-size: 11px; color: var(--text-secondary); }
.chat-body { padding: 16px; min-height: 140px; }
.chat-bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.5; margin-bottom: 8px; }
.bubble-them { background: var(--bg-alt); border-bottom-left-radius: 4px; }
.bubble-me { background: var(--zhJa); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble-meta { font-size: 10px; color: var(--text-secondary); text-align: right; margin-top: 2px; }

/* --- Keyboard Area --- */

.keyboard-area { background: var(--bg-alt); border-top: 0.5px solid var(--border); padding: 8px 12px 16px; }
.kb-scenes { display: flex; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.kb-scene-item { flex: 1; text-align: center; padding: 4px 0 6px; font-size: 11px; color: var(--text-secondary); position: relative; }
.kb-scene-item.active { font-weight: 600; color: var(--text); }
.kb-scene-item.active::after { content: ''; position: absolute; bottom: -0.5px; left: 50%; transform: translateX(-50%); width: 24px; height: 2px; background: var(--zhJa); border-radius: 1px; }
.kb-detected { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px; margin-bottom: 6px; }
.kb-detected-text { font-size: 12px; color: var(--text-secondary); }
.kb-online-dot { width: 4px; height: 4px; border-radius: 50%; background: #34c759; }
.kb-card { background: #fff; border-radius: var(--r12); padding: 10px 12px; border: 0.5px solid var(--border); box-shadow: var(--shadow-card); margin-bottom: 6px; }
.kb-jp-row { display: flex; justify-content: space-between; align-items: flex-start; }
.kb-jp-text { font-size: 13px; font-weight: 500; line-height: 1.4; }
.kb-speaker-icon { font-size: 10px; color: var(--zhJa); opacity: 0.5; }
.kb-note { font-size: 10px; color: var(--text-secondary); margin-top: 2px; }
.kb-tag { font-size: 8px; font-weight: 500; color: var(--zhJa); opacity: 0.6; letter-spacing: 0.5px; margin-top: 2px; }
.kb-bottom { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px 0; font-size: 10px; color: var(--text-secondary); }
.kb-quota { text-align: center; }
.kb-quota-bar { width: 28px; height: 1.5px; background: var(--border); border-radius: 1px; margin: 2px auto 0; overflow: hidden; }
.kb-quota-fill { width: 75%; height: 100%; background: var(--text-secondary); border-radius: 1px; }

@media (prefers-color-scheme: dark) {
  .kb-card { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.06); }
}

/* ============================================================
   Voice Mockup (Voice Feature)
   ============================================================ */

.voice-mockup { width: 300px; flex-shrink: 0; background: #1d1d1f; border-radius: 40px; border: 1px solid rgba(255,255,255,0.08); overflow: hidden; box-shadow: var(--shadow-device); }
.voice-header { padding: 40px 24px 12px; text-align: center; }
.voice-body { padding: 20px; text-align: center; }
.voice-direction { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.06); padding: 8px 16px; border-radius: 20px; margin-bottom: 24px; }
.voice-lang { font-size: 13px; color: rgba(255,255,255,0.7); font-weight: 500; }
.voice-arrow { font-size: 12px; color: rgba(255,255,255,0.3); }
.voice-result { background: rgba(255,255,255,0.04); border: 0.5px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 20px; margin-bottom: 24px; text-align: left; }
.voice-original { font-size: 14px; color: rgba(255,255,255,0.4); line-height: 1.5; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 0.5px solid rgba(255,255,255,0.06); }
.voice-translated { font-size: 18px; color: #fff; font-weight: 500; line-height: 1.5; }
.pulse-container { display: flex; justify-content: center; padding-bottom: 40px; }
.pulse-btn { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--zhJa), var(--enJa)); display: flex; align-items: center; justify-content: center; position: relative; }
.pulse-ring { position: absolute; width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(74,144,217,0.3); animation: pulse 2s ease-out infinite; }
.pulse-ring:nth-child(2) { animation-delay: 0.6s; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.pulse-icon { width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,0.9); z-index: 1; }

/* ============================================================
   Languages Section
   ============================================================ */

.languages-section { padding: 100px 40px; text-align: center; background: var(--bg-alt); }
.lang-title { font-size: clamp(24px, 3vw, 36px); font-weight: 600; letter-spacing: -0.02em; margin-bottom: 12px; }
.lang-sub { font-size: 17px; color: var(--text-secondary); margin-bottom: 40px; }
.lang-grid { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; max-width: 640px; margin: 0 auto; }
.lang-chip { display: flex; align-items: center; gap: 10px; background: var(--bg); padding: 14px 24px; border-radius: var(--r16); border: 0.5px solid var(--border); box-shadow: var(--shadow-chip); transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.3s; }
.lang-chip:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 8px 24px rgba(0,0,0,0.06); }
.lang-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lang-name { font-size: 15px; font-weight: 500; }
.lang-arrow { font-size: 12px; color: var(--text-secondary); }
.lang-jp { font-size: 15px; font-weight: 500; color: var(--text-secondary); }

/* ============================================================
   Final CTA
   ============================================================ */

.final-cta { padding: 120px 40px; text-align: center; position: relative; }
.final-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 600px; height: 400px; background: radial-gradient(circle, rgba(74,144,217,0.05) 0%, transparent 70%); filter: blur(60px); pointer-events: none; }
.final-title { font-size: clamp(32px, 4.5vw, 52px); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 16px; position: relative; z-index: 1; }
.final-sub { font-size: 17px; color: var(--text-secondary); margin-bottom: 32px; position: relative; z-index: 1; }
.final-cta .cta-primary { position: relative; z-index: 1; }

/* ============================================================
   Footer
   ============================================================ */

.footer { padding: 24px 40px; display: flex; justify-content: space-between; align-items: center; border-top: 0.5px solid var(--border); font-size: 12px; color: var(--text-secondary); }
.footer a { color: var(--text-secondary); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--text); }
.footer-links { display: flex; gap: 20px; }

/* ============================================================
   Responsive: Tablet (768-1023px)
   ============================================================ */

@media (max-width: 1023px) {
  .feature {
    flex-direction: column;
    gap: 48px;
    padding: 80px 40px;
    min-height: auto;
  }
  .feature-reverse { flex-direction: column; }
  .feature-text {
    max-width: 100%;
    text-align: center;
  }
  .feature-bullets {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
  }
  .chat-mockup,
  .voice-mockup {
    margin: 0 auto;
  }
}

/* ============================================================
   Responsive: Mobile (<768px)
   ============================================================ */

@media (max-width: 767px) {
  .reveal-section { padding: 80px 24px; }
  .feature { padding: 60px 24px; }
  .languages-section { padding: 60px 24px; }
  .lang-grid { flex-direction: column; align-items: center; }
  .lang-chip { width: 100%; max-width: 300px; justify-content: center; }
  .final-cta { padding: 80px 24px; }
  .footer {
    flex-direction: column;
    gap: 12px;
    text-align: center;
    padding: 24px;
  }
  .footer-links { justify-content: center; }
  .chat-mockup,
  .voice-mockup { width: 260px; }
}

/* ============================================================
   Premium Enhancements
   ============================================================ */

/* --- #4 Final CTA glow breathing --- */

@keyframes breathe-glow {
  0%, 100% { transform: translate(-50%,-50%) scale(1); opacity: 0.7; }
  50% { transform: translate(-50%,-50%) scale(1.1); opacity: 1; }
}
.final-glow {
  animation: breathe-glow 6s ease-in-out infinite;
}

/* --- #5 Smoother section transitions --- */

.reveal-section { position: relative; }
.reveal-section::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, var(--bg), var(--bg-alt));
  pointer-events: none;
}

.languages-section { position: relative; }
.languages-section::before {
  content: '';
  position: absolute;
  top: -60px;
  left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--bg-alt));
  pointer-events: none;
}

/* --- #6 Nav scroll shadow --- */

.nav-scrolled {
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
}

/* --- #7 Translation card hover micro-interaction --- */

.translation-card {
  transition: transform 0.25s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.25s;
}
.translation-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.04), 0 8px 16px rgba(0,0,0,0.06);
}

/* --- #8 CTA button subtle gradient + glow --- */

.cta-primary {
  background: linear-gradient(180deg, #2d2d2f, #1d1d1f);
  position: relative;
  overflow: hidden;
}
.cta-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
}
.cta-primary:hover::after {
  opacity: 1;
}

@media (prefers-color-scheme: dark) {
  .cta-primary {
    background: linear-gradient(180deg, #fff, #f0f0f0);
    color: #1d1d1f;
  }
}

/* --- #9 Language chip dot pulse --- */

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}
.lang-chip:hover .lang-dot {
  animation: dot-pulse 1.5s ease-in-out infinite;
}

/* #10 blur-to-sharp merged into main .reveal-text .word above */

/* ============================================================
   How It Works Section
   ============================================================ */

.how-section { padding: 100px 40px; text-align: center; }
.how-title { font-size: clamp(28px, 3.5vw, 40px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 60px; }
.how-grid { display: flex; align-items: flex-start; justify-content: center; gap: 0; max-width: 800px; margin: 0 auto; }
.how-step { flex: 1; max-width: 220px; padding: 0 20px; }
.how-number { font-size: 12px; font-weight: 600; color: var(--zhJa); background: rgba(74,144,217,0.08); width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.how-icon { width: 48px; height: 48px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.how-step h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.how-step p { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.how-connector { width: 40px; height: 1px; background: var(--border); margin-top: 42px; flex-shrink: 0; }

/* ============================================================
   Scenarios Section
   ============================================================ */

.scenarios-section { padding: 100px 40px; }
.scenarios-title { font-size: clamp(28px, 3.5vw, 40px); font-weight: 700; letter-spacing: -0.02em; text-align: center; margin-bottom: 8px; }
.scenarios-sub { font-size: 17px; color: var(--text-secondary); text-align: center; margin-bottom: 60px; }
.scenarios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 900px; margin: 0 auto; }
.scenario-card { padding: 28px; border-radius: var(--r20); border: 0.5px solid var(--border); background: var(--bg); box-shadow: var(--shadow-card); transition: transform 0.3s cubic-bezier(0.25,0.1,0.25,1), box-shadow 0.3s; }
.scenario-card:hover { transform: translateY(-3px); box-shadow: 0 4px 8px rgba(0,0,0,0.03), 0 12px 32px rgba(0,0,0,0.06); }
.scenario-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.scenario-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.scenario-card p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* --- New sections responsive: mobile --- */

@media (max-width: 767px) {
  .scenarios-grid { grid-template-columns: 1fr; max-width: 400px; }
  .how-section { padding: 60px 24px; }
  .how-grid { flex-direction: column; align-items: center; gap: 24px; }
  .how-connector { width: 1px; height: 24px; margin: 0; }
  .scenarios-section { padding: 60px 24px; }
}

/* --- New sections responsive: tablet --- */

@media (max-width: 1023px) and (min-width: 768px) {
  .scenarios-grid { grid-template-columns: 1fr 1fr; }
  .scenario-card:last-child { grid-column: span 2; max-width: 50%; margin: 0 auto; }
}
