/* ============================================================
   KORA Intro Page — Style Sheet
   Design: editorial warm (CN) / clean city guide (EN)
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

/* === Theme: Chinese Mode (default) === */
[data-lang="zh"] {
  --bg: #FAF3E0;
  --bg-alt: #F5ECD7;
  --surface: #FFFFFF;
  --surface-hover: #FFF8F0;
  --text: #2D1B0E;
  --text-muted: #7A6B5D;
  --text-light: #A89888;
  --accent: #C23B22;
  --accent-hover: #A83020;
  --accent-soft: rgba(194, 59, 34, 0.08);
  --accent-glow: rgba(194, 59, 34, 0.15);
  --border: rgba(45, 27, 14, 0.1);
  --border-strong: rgba(45, 27, 14, 0.2);
  --shadow-sm: 0 1px 3px rgba(45, 27, 14, 0.06);
  --shadow-md: 0 4px 16px rgba(45, 27, 14, 0.08);
  --shadow-lg: 0 8px 32px rgba(45, 27, 14, 0.1);
  --chat-user: #F5ECD7;
  --chat-user-text: #2D1B0E;
  --chat-bot: #FFFFFF;
  --chat-bot-text: #2D1B0E;
  --chat-header: #F8F1E3;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* === Theme: English Mode === */
[data-lang="en"] {
  --bg: #FFFFFF;
  --bg-alt: #F8FAFB;
  --surface: #FFFFFF;
  --surface-hover: #F1F5F9;
  --text: #1A365D;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --accent: #1A365D;
  --accent-hover: #0F2440;
  --accent-soft: rgba(26, 54, 93, 0.06);
  --accent-glow: rgba(26, 54, 93, 0.12);
  --border: rgba(26, 54, 93, 0.1);
  --border-strong: rgba(26, 54, 93, 0.2);
  --shadow-sm: 0 1px 3px rgba(26, 54, 93, 0.05);
  --shadow-md: 0 4px 16px rgba(26, 54, 93, 0.06);
  --shadow-lg: 0 8px 32px rgba(26, 54, 93, 0.08);
  --chat-user: #E8EDF4;
  --chat-user-text: #1A365D;
  --chat-bot: #FFFFFF;
  --chat-bot-text: #1A365D;
  --chat-header: #F1F5F9;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

[data-lang="zh"] { --font-display: 'Noto Serif SC', 'Songti SC', 'SimSun', serif; --font-body: 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif; }
[data-lang="en"] { --font-display: 'Outfit', sans-serif; --font-body: 'Outfit', system-ui, sans-serif; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; }

/* === Language Gate === */
.lang-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #FAFAF8 0%, #F5F2ED 50%, #EDEAE4 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.lang-gate::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 70%, rgba(194, 59, 34, 0.04), transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(26, 54, 93, 0.04), transparent 60%);
  pointer-events: none;
}

.lang-gate.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lang-gate__inner {
  text-align: center;
  padding: 2rem;
}

.lang-gate__logo {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 700;
  color: #C23B22;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.lang-gate__subtitle {
  font-family: 'Outfit', 'PingFang SC', sans-serif;
  font-size: 1.1rem;
  color: #7A6B5D;
  margin-bottom: 3rem;
}

.lang-gate__buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.lang-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2rem 3rem;
  border: 2px solid rgba(45, 27, 14, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  min-width: 160px;
}

.lang-btn:hover {
  border-color: #C23B22;
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(194, 59, 34, 0.15);
}

.lang-btn__flag {
  font-size: 2.5rem;
  line-height: 1;
}

.lang-btn__label {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2D1B0E;
}

/* === Language Toggle === */
.lang-toggle {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  opacity: 0;
  visibility: hidden;
}

.lang-toggle.visible {
  opacity: 1;
  visibility: visible;
}

.lang-toggle:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
}

.lang-toggle__icon {
  font-size: 1rem;
  line-height: 1;
}

/* === Navigation Bar === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(250, 243, 224, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-lang="en"] .navbar {
  background: rgba(255, 255, 255, 0.85);
}

.navbar.visible {
  transform: translateY(0);
}

.navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  height: 60px;
}

.navbar__brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-decoration: none;
}

.navbar__links {
  display: flex;
  gap: 2rem;
}

.navbar__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.navbar__links a:hover {
  color: var(--accent);
}

.navbar__cta {
  font-size: 0.85rem;
  font-weight: 600;
  color: #FFFFFF;
  background: var(--accent);
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.navbar__cta:hover {
  background: var(--accent-hover);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.navbar__menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
}

.navbar__menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.25s ease;
}

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

.navbar__menu-btn.active span:nth-child(2) {
  opacity: 0;
}

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

.navbar__mobile {
  display: none;
  flex-direction: column;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid var(--border);
  background: inherit;
}

.navbar__mobile.open {
  display: flex;
}

.navbar__mobile a {
  padding: 0.65rem 0;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.navbar__mobile a:hover {
  color: var(--accent);
}

.navbar__mobile-cta {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: #FFFFFF;
  text-align: center;
  border-radius: var(--radius-full);
  font-weight: 600;
  border: none;
}

.navbar__mobile-cta:hover {
  color: #FFFFFF;
  background: var(--accent-hover);
}

@media (max-width: 768px) {
  .navbar__links,
  .navbar__cta {
    display: none;
  }
  .navbar__menu-btn {
    display: flex;
  }
  .navbar__inner {
    padding: 0 1.25rem;
  }
}

/* === Main Content === */
.main {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease 0.2s;
}

.main.visible {
  opacity: 1;
  visibility: visible;
}

/* === Section Base === */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.75rem;
}

/* === Scroll Reveal === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* === Hero === */
.hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 10%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

.hero__badge {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1.25rem;
}

[data-lang="zh"] .hero__title {
  letter-spacing: 0.05em;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 50ch;
  margin-bottom: 2rem;
}

.hero__stats {
  display: flex;
  gap: 2rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.hero__stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.hero__stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.5rem;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 16px rgba(194, 59, 34, 0.25);
  position: relative;
  overflow: hidden;
}

[data-lang="en"] .hero__cta {
  box-shadow: 0 4px 16px rgba(26, 54, 93, 0.25);
}

.hero__cta:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(194, 59, 34, 0.3);
  color: #FFFFFF;
}

.hero__cta:active {
  transform: translateY(0);
}

.hero__cta::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: ctaPulse 2.5s ease-in-out infinite;
}

@keyframes ctaPulse {
  0%, 100% { opacity: 0; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(1.04); }
}

/* Hero Visual: Chat Preview */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__chat-preview {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.chat-preview__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.25rem;
  background: var(--chat-header);
  border-bottom: 1px solid var(--border);
}

.chat-preview__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  font-family: 'Outfit', sans-serif;
}

.chat-preview__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.chat-preview__status {
  font-size: 0.75rem;
  color: #22C55E;
}

.chat-preview__messages {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 140px;
}

/* Chat Bubbles */
.chat-bubble {
  max-width: 85%;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-word;
}

.chat-bubble--user {
  align-self: flex-end;
  background: var(--chat-user);
  color: var(--chat-user-text);
  border-bottom-right-radius: 4px;
}

.chat-bubble--bot {
  align-self: flex-start;
  background: var(--chat-bot);
  color: var(--chat-bot-text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

/* === About Section === */
.about {
  padding: 5rem 2rem;
  background: var(--bg-alt);
}

.about__container {
  max-width: 1100px;
  margin: 0 auto;
}

.about__header {
  text-align: center;
  margin-bottom: 3rem;
}

.about__lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 1rem auto 0;
  line-height: 1.8;
}

.about__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.about-card__icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.about-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.about-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.about__quote {
  text-align: center;
  max-width: 750px;
  margin: 0 auto;
  padding: 2.5rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
}

.about__quote::before {
  content: '"';
  position: absolute;
  top: -0.2rem;
  left: 1.5rem;
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--accent);
  opacity: 0.15;
  line-height: 1;
}

.about__quote blockquote {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.about__quote cite {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: normal;
  font-weight: 600;
}

@media (max-width: 768px) {
  .about__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .about {
    padding: 3.5rem 1.25rem;
  }
}

/* === Why Section === */
.why {
  padding: 5rem 2rem;
}

.why__container {
  max-width: 1100px;
  margin: 0 auto;
}

.why__lead {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 1rem auto 3rem;
  line-height: 1.7;
}

/* Compare Table */
.compare-table-wrap {
  overflow-x: auto;
  margin-bottom: 3.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 650px;
}

.compare-table th,
.compare-table td {
  padding: 0.85rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.compare-table th {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--text);
  background: var(--bg-alt);
  white-space: nowrap;
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  min-width: 160px;
}

.compare-table__kora {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  font-weight: 700 !important;
}

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

.compare-table tbody tr:hover {
  background: var(--surface-hover);
}

/* Why Features */
.why-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.why-feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.why-feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.why-feature__num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.08;
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  line-height: 1;
}

[data-lang="en"] .why-feature__num {
  opacity: 0.06;
}

.why-feature__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.why-feature__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .why {
    padding: 3.5rem 1.25rem;
  }
  .why-features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .why-feature {
    padding: 1.5rem;
  }
}

/* === Features === */
.features {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.features__title {
  margin-bottom: 3rem;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

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

.feature-card__icon {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 1rem;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.6rem;
}

.feature-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* 5 items in 3-col grid: natural flow */
.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* === Chat Groups === */
.chats {
  padding: 5rem 2rem;
  background: var(--bg-alt);
}

.chats__title {
  max-width: 1200px;
  margin: 0 auto 0.75rem;
}

.chats__subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.chats__groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.chat-group {
  display: flex;
  flex-direction: column;
}

.chat-group__label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.chat-group__emoji {
  font-size: 1.25rem;
}

.chat-window {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-window__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--chat-header);
  border-bottom: 1px solid var(--border);
}

.chat-window__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  font-family: 'Outfit', sans-serif;
}

.chat-window__name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.chat-window__status {
  font-size: 0.7rem;
  color: #22C55E;
}

.chat-window__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-height: 200px;
  flex: 1;
}

/* Chat Messages */
.chat-msg {
  max-width: 88%;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-msg--user {
  align-self: flex-end;
  background: var(--chat-user);
  color: var(--chat-user-text);
  border-bottom-right-radius: 4px;
}

.chat-msg--bot {
  align-self: flex-start;
  background: var(--chat-bot);
  color: var(--chat-bot-text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.chat-msg--typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 0.6rem 1rem;
  background: var(--chat-bot);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  border-bottom-left-radius: 4px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chat-msg--typing.show {
  opacity: 1;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-light);
  animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

/* Initially hide animated messages */
.chat-msg[data-msg] {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.chat-msg[data-msg].shown {
  opacity: 1;
  transform: translateY(0);
}

.chat-group__source {
  padding: 0.5rem 1rem;
  font-size: 0.7rem;
  color: var(--text-light);
  text-align: right;
  border-top: 1px solid var(--border);
}

/* === How To Start === */
.howto {
  padding: 5rem 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.howto__title {
  margin-bottom: 3rem;
}

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

.step {
  text-align: center;
  padding: 2rem 1.5rem;
  position: relative;
}

.step__num {
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-soft);
  line-height: 1;
  opacity: 0.6;
}

[data-lang="en"] .step__num {
  color: rgba(26, 54, 93, 0.08);
}

.step__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1;
}

.step__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.step__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === CTA Section === */
.cta-section {
  padding: 5rem 2rem;
  background: var(--bg-alt);
}

.cta-section__inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.cta-section__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.cta-section__subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.cta-section__btn {
  display: inline-flex;
  align-items: center;
  padding: 1rem 3rem;
  background: var(--accent);
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(194, 59, 34, 0.25);
  margin-bottom: 2rem;
}

[data-lang="en"] .cta-section__btn {
  box-shadow: 0 4px 20px rgba(26, 54, 93, 0.25);
}

.cta-section__btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(194, 59, 34, 0.3);
  color: #FFFFFF;
}

.cta-section__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.cta-section__dot {
  color: var(--text-light);
}

/* === Footer === */
.footer {
  padding: 2.5rem 2rem;
  border-top: 1px solid var(--border);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

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

.footer__links a:hover {
  color: var(--accent);
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* === Responsive === */
@media (max-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .chats__groups {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 5rem 1.25rem 3rem;
    gap: 2.5rem;
    text-align: center;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero__stats {
    justify-content: center;
  }

  .hero__visual {
    order: -1;
  }

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

  .features {
    padding: 3.5rem 1.25rem;
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

  .chats {
    padding: 3.5rem 1.25rem;
  }

  .chats__groups {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .howto {
    padding: 3.5rem 1.25rem;
  }

  .howto__steps {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .step {
    padding: 1.5rem 1rem;
  }

  .cta-section {
    padding: 3.5rem 1.25rem;
  }

  .lang-gate__buttons {
    flex-direction: column;
    align-items: center;
  }

  .lang-btn {
    min-width: 200px;
  }

  .lang-toggle {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2rem;
  }

  .hero__stats {
    gap: 1.25rem;
  }

  .hero__stat-num {
    font-size: 1.25rem;
  }
}
