/*
 * DiaryVault homepage foundation styles
 *
 * Extracted from home.html and loaded as a blocking,
 * homepage-only stylesheet before diaryvault-app.css.
 * Phase 2A remains the final homepage cascade layer.
 */

@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(212,168,83,0.6); } 70% { box-shadow: 0 0 0 8px rgba(212,168,83,0); } 100% { box-shadow: 0 0 0 0 rgba(212,168,83,0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes typeIn { from { width: 0; } to { width: 100%; } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulseGlow { 0%,100% { box-shadow: 0 0 0 0 rgba(212,168,83,0.2); } 50% { box-shadow: 0 0 0 8px rgba(212,168,83,0); } }
@keyframes slideMsg { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.fu { animation: fadeUp 0.7s ease both; }
@media (max-width: 540px) {
  .mini-stats { grid-template-columns: 1fr 1fr 1fr !important; gap: 0.5rem !important; }
  .lang-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 0.5rem !important; }
  .feature-grid { grid-template-columns: 1fr !important; }
  .how-steps { gap: 1rem; }
  .testi-grid { grid-template-columns: 1fr !important; }
  .stats-bar { gap: 1.5rem; flex-wrap: wrap; }
  .stat-item .stat-num { font-size: 1.4rem; }
  .sec-h2 { font-size: 1.35rem; }
}
.fu1 { animation: fadeUp 0.7s ease 0.12s both; }
.fu2 { animation: fadeUp 0.7s ease 0.24s both; }
.fu3 { animation: fadeUp 0.7s ease 0.36s both; }
.fi4 { animation: fadeIn 0.8s ease 0.5s both; }

/* ── Hero ─────────────────────────────── */
.hero {
  background: linear-gradient(168deg, #080f1f 0%, #0f1d35 20%, #1a3050 45%, #1e3a5f 70%, #243f65 100%);
  position: relative;
  overflow: hidden;
  padding: 5rem 1.25rem 0;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, #f8f5f0);
  pointer-events: none;
  z-index: 2;
}

/* Atmospheric light effects */
.hero-glow-1 {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(212,168,83,0.06) 0%, transparent 55%);
  pointer-events: none;
}

.hero-glow-2 {
  position: absolute;
  bottom: 10%;
  left: -15%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(42,77,122,0.15) 0%, transparent 55%);
  pointer-events: none;
}

/* Grid texture (disabled - was conflicting with constellation) */
.hero-grid { display: none; }

.hero-top {
  max-width: 580px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 3;
  padding-bottom: 3rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.9rem;
  background: rgba(212,168,83,0.08);
  border: 1px solid rgba(212,168,83,0.15);
  border-radius: 9999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #d4a853;
  letter-spacing: 0.05em;
  margin-bottom: 1.75rem;
  animation: pulseGlow 3s ease infinite;
}

.hero h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  color: white;
  line-height: 1.1;
  margin: 0 0 1.15rem;
  letter-spacing: -0.015em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #d4a853, #e8cc8a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.52);
  line-height: 1.65;
  max-width: 440px;
  margin: 0 auto 2rem;
}
@media (max-width: 480px) {
  .hero-sub { font-size: 0.88rem; margin: 0 auto 1.5rem; }
  .hero h1 { font-size: 2.1rem !important; }
  .hero { padding: 4.5rem 1rem 0; }
  .hero-top { padding-bottom: 2rem; }
  .hero-echo { padding-bottom: 3.5rem; }
  .hero-actions {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    width: min(100%, 300px);
  }
  .btn-gold { padding: 0.75rem 1.5rem; font-size: 0.85rem; }
  .hero-badge { font-size: 0.62rem; margin-bottom: 1.25rem; }
  .hero-note { font-size: 0.62rem; }
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 1.25rem;
  width: min(100%, 540px);
  margin: 0 auto 0.5rem;
}

.hero-actions > .btn-gold,
.hero-actions > .btn-ghost {
  width: 100%;
  min-width: 0;
  height: 100%;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  min-height: 48px;
  min-width: 200px;
  background: linear-gradient(135deg, #d4a853, #c49a48);
  color: #0c1a2e;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.25s;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: 0 2px 16px rgba(212,168,83,0.3);
  letter-spacing: 0.01em;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #e0bc6e, #d4a853);
  box-shadow: 0 6px 24px rgba(212,168,83,0.4);
  transform: translateY(-2px);
}

.btn-gold:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: all 0.15s;
  padding: 0.85rem 2rem;
  min-height: 48px;
  min-width: 200px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 0.5rem;
  background: transparent;
}

.btn-ghost:hover { color: white; border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.05); }
.btn-ghost::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.15); transform: scaleX(0); transition: transform 0.2s; }
.btn-ghost:hover::after { transform: scaleX(1); }

.hero-note {
  margin-top: 2rem;
  font-size: 0.7rem;
  color: rgba(255,255,255,0.22);
  letter-spacing: 0.03em;
}

/* ── Hero Echo Preview ────────────────── */
.hero-echo {
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  z-index: 3;
  padding-bottom: 5rem;
}

.hero-echo-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.hec-head {
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.hec-dot {
  width: 24px;
  height: 24px;
  background: rgba(212,168,83,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 4s ease infinite;
}

.hec-dot svg { width: 12px; height: 12px; color: #d4a853; transform: translate(1px, -0.5px); }
.hec-head .hec-name { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.8); }
.hec-head .hec-status { font-size: 0.6rem; color: rgba(255,255,255,0.3); margin-left: auto; display: flex; align-items: center; gap: 0.3rem; }
.hec-head .hec-status::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #d4a853; }

.hec-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 180px;
}

.hm {
  max-width: 82%;
  padding: 0.55rem 0.8rem;
  border-radius: 0.7rem;
  font-size: 0.8rem;
  line-height: 1.5;
  animation: slideMsg 0.4s ease both;
}

.hm-ai {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  border-bottom-left-radius: 0.15rem;
}

.hm-ai .hmtag {
  font-size: 0.52rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #d4a853;
  margin-bottom: 0.1rem;
}

.hm-u {
  align-self: flex-end;
  background: rgba(212,168,83,0.12);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(212,168,83,0.1);
  border-bottom-right-radius: 0.15rem;
}

.hm-ai.insight {
  background: rgba(212,168,83,0.08);
  border: 1px solid rgba(212,168,83,0.12);
}

/* ── Constellation Hero Background (v3 r1) ────────── */
.hero { position: relative; overflow: hidden; }

.hero-constellation-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* All hero content sits above the constellation */
.hero-badge,
.hero h1,
.hero-sub,
.hero-actions,
.hero-note,
.app-badges {
  position: relative;
  z-index: 2;
}

.hero h1 { text-shadow: 0 1px 12px rgba(0,0,0,0.35); }
.hero h1 em { text-shadow: none; }
.hero-sub { text-shadow: 0 1px 8px rgba(0,0,0,0.30); }

/* Field reveal */
.hcb-field, .hcb-edges { animation: hcbFieldFade 2000ms ease-out forwards; opacity: 0; }

@keyframes hcbFieldFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Constant ambient animation: dots twinkle out of phase */
.hcb-field circle {
  transform-origin: center;
  animation-name: hcbTwinkle1;
  animation-duration: 10s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
.hcb-field circle:nth-child(8n+1) { animation-name: hcbTwinkle1; animation-duration: 9s;  animation-delay: -0.3s; }
.hcb-field circle:nth-child(8n+2) { animation-name: hcbTwinkle2; animation-duration: 11s; animation-delay: -1.7s; }
.hcb-field circle:nth-child(8n+3) { animation-name: hcbTwinkle3; animation-duration: 13s; animation-delay: -2.4s; }
.hcb-field circle:nth-child(8n+4) { animation-name: hcbTwinkle1; animation-duration: 8s;  animation-delay: -4.1s; }
.hcb-field circle:nth-child(8n+5) { animation-name: hcbTwinkle2; animation-duration: 12s; animation-delay: -0.9s; }
.hcb-field circle:nth-child(8n+6) { animation-name: hcbTwinkle3; animation-duration: 14s; animation-delay: -3.6s; }
.hcb-field circle:nth-child(8n+7) { animation-name: hcbTwinkle1; animation-duration: 11s; animation-delay: -5.2s; }
.hcb-field circle:nth-child(8n+8) { animation-name: hcbTwinkle2; animation-duration: 9s;  animation-delay: -2.1s; }

@keyframes hcbTwinkle1 {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
@keyframes hcbTwinkle2 {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 1.15; }
}
@keyframes hcbTwinkle3 {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

/* Edges breathe slowly */
.hcb-edges line, .hcb-edges-center line {
  animation-name: hcbEdgeBreathe1;
  animation-duration: 12s;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
.hcb-edges line:nth-child(4n+1), .hcb-edges-center line:nth-child(4n+1) { animation-name: hcbEdgeBreathe1; animation-duration: 11s; animation-delay: -1.4s; }
.hcb-edges line:nth-child(4n+2), .hcb-edges-center line:nth-child(4n+2) { animation-name: hcbEdgeBreathe2; animation-duration: 14s; animation-delay: -3.8s; }
.hcb-edges line:nth-child(4n+3), .hcb-edges-center line:nth-child(4n+3) { animation-name: hcbEdgeBreathe3; animation-duration: 16s; animation-delay: -2.1s; }
.hcb-edges line:nth-child(4n+4), .hcb-edges-center line:nth-child(4n+4) { animation-name: hcbEdgeBreathe1; animation-duration: 13s; animation-delay: -5.7s; }

@keyframes hcbEdgeBreathe1 {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
@keyframes hcbEdgeBreathe2 {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}
@keyframes hcbEdgeBreathe3 {
  0%, 100% { opacity: 0.85; }
  50%      { opacity: 0.4; }
}

/* Mobile: slow cycles down to reduce repaint frequency */
@media (max-width: 720px) {
  .hcb-field circle { animation-duration: 18s !important; }
  .hcb-edges line { animation-duration: 22s !important; }
}

  50%      { opacity: 0.6; }
}

/* Multilingual words: fade in last, ambient soft drift */
.hcb-words .hcb-word { animation: hcbWordFade 1200ms ease-out forwards; fill-opacity: 0; }
.hcb-word-0 { animation-delay: 2800ms; }
.hcb-word-1 { animation-delay: 3200ms; }
.hcb-word-2 { animation-delay: 3600ms; }

@keyframes hcbWordFade {
  from { fill-opacity: 0; }
  to   { fill-opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .hcb-field, .hcb-edges { opacity: 1; animation: none; }
  .hcb-field circle, .hcb-edges line { animation: none; }
}

/* ── Divider ──────────────────────────── */
.section-divider {
  max-width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #d4a853, transparent);
  margin: 0 auto 3rem;
}

/* ── Values ───────────────────────────── */
.values {
  max-width: 920px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem 1rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) { .values { grid-template-columns: 1fr 1fr; gap: 1.25rem; } }

.val {
  padding: 1.75rem 1.35rem;
  border-radius: 0.85rem;
  background: white;
  border: 1px solid rgba(30,58,95,0.04);
  box-shadow: 0 1px 2px rgba(30,58,95,0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.val::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #d4a853, #e8cc8a);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

.val:hover { box-shadow: 0 12px 32px rgba(30,58,95,0.08); transform: translateY(-4px); }
.val:hover::after { transform: scaleX(1); }

.val-icon {
  width: 42px;
  height: 42px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #1e3a5f, #2a4d7a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  color: #e8cc8a;
  box-shadow: 0 2px 8px rgba(30,58,95,0.15);
}

.val h3 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.05rem;
  color: #1e3a5f;
  margin: 0 0 0.45rem;
}

.val p { font-size: 0.82rem; color: #6b7280; line-height: 1.65; margin: 0; }

/* ── How ───────────────────────────────── */
.how {
  max-width: 740px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
}

.sec-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #d4a853;
  margin-bottom: 0.5rem;
}

.sec-h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.55rem;
  color: #1e3a5f;
  margin: 0 0 2.25rem;
  line-height: 1.25;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

@media (min-width: 640px) {
  .how-steps { flex-direction: row; gap: 1.5rem; text-align: center; }
}

.how-step { flex: 1; }

.how-step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e3a5f, #2a4d7a);
  color: #e8cc8a;
  font-family: 'DM Serif Display', serif;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 6px rgba(30,58,95,0.15);
}

.how-step h4 { font-size: 0.92rem; font-weight: 600; color: #1e3a5f; margin: 0 0 0.3rem; }
.how-step p { font-size: 0.8rem; color: #6b7280; line-height: 1.55; margin: 0; }

/* ── Echo Demo ────────────────────────── */
.echo-sec {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 1.5rem 3.5rem;
}

.echo-demo {
  background: white;
  border: 1px solid rgba(30,58,95,0.06);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(30,58,95,0.06);
}

.ed-head {
  background: linear-gradient(135deg, #1a3050, #2a4d7a);
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ed-dot {
  width: 24px;
  height: 24px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ed-dot svg { width: 12px; height: 12px; color: #e8cc8a; }
.ed-head span { font-size: 0.8rem; font-weight: 600; color: white; }
.ed-head .ed-st { font-size: 0.6rem; color: rgba(255,255,255,0.35); margin-left: auto; }

.ed-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: #fafafc;
}

.eb {
  max-width: 84%;
  padding: 0.6rem 0.85rem;
  border-radius: 0.75rem;
  font-size: 0.83rem;
  line-height: 1.55;
}

.eb-ai {
  align-self: flex-start;
  background: white;
  color: #2c2c2c;
  border: 1px solid rgba(30,58,95,0.05);
  border-bottom-left-radius: 0.12rem;
}

.eb-ai .t { font-size: 0.55rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #d4a853; margin-bottom: 0.12rem; }

.eb-u {
  align-self: flex-end;
  background: #1e3a5f;
  color: white;
  border-bottom-right-radius: 0.12rem;
}

.eb-ai.insight {
  background: linear-gradient(135deg, #faf8f4, #f4f1ec);
  border-color: rgba(212,168,83,0.12);
}

.eb-ai.insight .t { color: #c49a48; }

/* ── Testimonials ─────────────────────── */
.testi-sec {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

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

@media (min-width: 640px) { .testi-grid { grid-template-columns: 1fr 1fr; } }

.testi-card {
  background: white;
  border: 1px solid rgba(30,58,95,0.05);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: all 0.25s;
}

.testi-card:hover { box-shadow: 0 6px 20px rgba(30,58,95,0.06); transform: translateY(-2px); }

.testi-card .stars { display: flex; gap: 2px; margin-bottom: 0.75rem; }
.testi-card .stars svg { width: 14px; height: 14px; color: #d4a853; fill: #d4a853; }

.testi-card blockquote {
  font-family: 'Caveat', cursive;
  font-size: 1.15rem;
  color: #374151;
  line-height: 1.4;
  margin: 0 0 0.75rem;
}

.testi-card cite {
  font-style: normal;
  font-size: 0.75rem;
  color: #9ca3af;
}

/* ── Stats ────────────────────────────── */
.stats-bar {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
  text-align: center;
}

.stat-item .stat-num {
  font-family: 'DM Serif Display', serif;
  font-size: 1.65rem;
  color: #1e3a5f;
  line-height: 1;
}

.stat-item .stat-label {
  font-size: 0.72rem;
  color: #9ca3af;
  margin-top: 0.2rem;
}

/* ── CTA ──────────────────────────────── */
.final-cta {
  background: linear-gradient(165deg, #0c1a2e, #1a3050, #1e3a5f);
  padding: 4rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-cta::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 50%;
  height: 180%;
  background: radial-gradient(ellipse, rgba(212,168,83,0.04), transparent 55%);
  pointer-events: none;
}

.final-cta-in { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; }

.final-cta h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.75rem;
  color: white;
  margin: 0 0 0.5rem;
}

.final-cta p { font-size: 0.88rem; color: rgba(255,255,255,0.45); margin: 0 0 1.75rem; line-height: 1.6; }
.final-cta .btn-gold { font-size: 0.92rem; padding: 0.85rem 2.25rem; }

.final-note {
  margin-top: 1.25rem;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.2);
}

/* ── Full Mobile Optimization ── */
@media (max-width: 480px) {
  /* Hero */
  .hero { padding: 3.5rem 1rem 0; }
  .hero h1 { font-size: 1.9rem !important; line-height: 1.15; }
  .hero-sub { font-size: 0.85rem; margin: 0 auto 1.5rem; }
  .hero-top { padding-bottom: 1.5rem; }
  .hero-echo { padding-bottom: 3rem; max-width: 100%; }
  .hero-echo-card { margin: 0 -0.25rem; }
  .hero-actions { gap: 0.75rem; flex-direction: row; justify-content: center; }
  .btn-gold { padding: 0.75rem 1.25rem; font-size: 0.82rem; min-height: 44px; }
  .btn-ghost { padding: 0.75rem 1.25rem; font-size: 0.82rem; min-height: 44px; }
  .hero-badge { font-size: 0.62rem; margin-bottom: 1rem; padding: 0.25rem 0.75rem; }
  .hero-note { font-size: 0.62rem; margin-top: 1.25rem; }
  .hec-body { min-height: 150px; padding: 0.75rem; }
  .hm { font-size: 0.75rem; max-width: 88%; }

  /* App badges */
  .app-badges { margin-top: 1rem !important; }
  .app-badges a img { height: 36px !important; }

  /* Values */
  .values { padding: 2.5rem 1rem 1rem; gap: 0.75rem; }
  .val { padding: 1.25rem 1rem; }
  .val h3 { font-size: 0.95rem; }
  .val p { font-size: 0.78rem; }
  .val-icon { width: 36px; height: 36px; margin-bottom: 0.85rem; }

  /* How it works */
  .how { padding: 2rem 1rem 2.5rem; }
  .how-steps { gap: 1.25rem; }
  .how-step h4 { font-size: 0.88rem; }
  .how-step p { font-size: 0.78rem; }

  /* Echo demo */
  .echo-sec { padding: 0 1rem 2.5rem; }
  .ed-body { padding: 0.85rem; }
  .eb { font-size: 0.78rem; max-width: 90%; }

  /* Stats */
  .stats-bar { gap: 1.5rem; padding: 0 1rem 2rem; flex-wrap: wrap; }
  .stat-item .stat-num { font-size: 1.3rem; }
  .stat-item .stat-label { font-size: 0.65rem; }

  /* Feature grid sections with inline styles */
  .feature-grid { grid-template-columns: 1fr !important; }
  .mini-stats { grid-template-columns: 1fr 1fr 1fr !important; gap: 0.5rem !important; }
  .lang-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 0.5rem !important; }

  /* Testimonials */
  .testi-sec { padding: 0 1rem 2rem; }
  .testi-grid { grid-template-columns: 1fr !important; gap: 0.75rem; }
  .testi-card { padding: 1.15rem; }
  .testi-card blockquote { font-size: 1.05rem; }

  /* Final CTA */
  .final-cta { padding: 3rem 1rem; }
  .final-cta h2 { font-size: 1.4rem; }
  .final-cta p { font-size: 0.82rem; }
  .final-cta .btn-gold { width: 100%; text-align: center; justify-content: center; }
}

/* Small phones */
@media (max-width: 360px) {
  .hero h1 { font-size: 1.65rem !important; }
  .hero-sub { font-size: 0.8rem; }
  .val h3 { font-size: 0.9rem; }
  .lang-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .stats-bar { gap: 1rem; }
  .stat-item .stat-num { font-size: 1.15rem; }
}

/* Touch targets */
@media (hover: none) and (pointer: coarse) {
  .btn-gold { min-height: 48px; }
  .btn-ghost { min-height: 48px; display: inline-flex; align-items: center; }
  .val { cursor: default; }
  .testi-card { cursor: default; }
}

/* Billing toggle */
.billing-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
.billing-toggle {
  display: inline-flex;
  padding: 0.25rem;
  background: rgba(30,58,95,0.06);
  border-radius: 0.6rem;
  border: 1px solid rgba(30,58,95,0.08);
  gap: 0.2rem;
}
.billing-btn {
  border: none;
  padding: 0.55rem 1.25rem;
  border-radius: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
  background: transparent;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
}
.billing-btn:hover {
  color: #1e3a5f;
}
.billing-btn.active {
  background: white;
  color: #1e3a5f;
  box-shadow: 0 1px 4px rgba(30,58,95,0.12);
}
.billing-save-pill {
  font-size: 0.6rem;
  background: #d4a853;
  color: #0c1a2e;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

/* Trust section mobile */
@media (max-width: 540px) {
  .trust-grid { grid-template-columns: 1fr !important; }
  .pricing-grid { grid-template-columns: 1fr !important; }
}
@media (min-width: 541px) and (max-width: 860px) {
  .pricing-grid { grid-template-columns: 1fr !important; max-width: 420px; margin: 0 auto;
}
