/* ============================================
   VIVIR EN CHINA — v2 Design System
   Red + Gold + Jade — Hispanic × Chinese
   Fonts: Playfair Display + Nunito
   ============================================ */

/* === TOKENS === */
:root {
  --vermillion: #c0392b;
  --cinnabar: #a8321e;
  --cinnabar-glow: rgba(192,57,43,0.12);
  --gold: #e8b230;
  --gold-bright: #f5c842;
  --gold-soft: #fce9a8;
  --gold-glow: rgba(245,200,66,0.18);
  --jade: #1a8a5c;
  --jade-soft: #e4f5ec;
  --jade-deep: #136b47;
  --ink: #2b2322;
  --charcoal: #3a3130;
  --body: #4a4040;
  --muted: #7a6e6e;
  --light-muted: #a89e9e;
  --warm-bg: #fdf9f5;
  --warm-bg-alt: #f7f0e8;
  --paper: #fffcf8;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-w: 1180px;
  --content-w: 780px;
  --radius: 14px;
  --shadow-sm: 0 2px 8px rgba(43,35,34,0.06);
  --shadow-md: 0 8px 30px rgba(43,35,34,0.08);
  --shadow-lg: 0 16px 50px rgba(43,35,34,0.12);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans); font-size: 17px; line-height: 1.75;
  color: var(--body); background: var(--warm-bg);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--gold-soft); color: var(--ink); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--warm-bg); }
::-webkit-scrollbar-thumb { background: var(--vermillion); border-radius: 4px; }
a { color: var(--vermillion); }

/* === NAV === */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(43,35,34,0.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 62px;
}
.nav-logo {
  font-family: var(--serif); font-size: 1.35rem; font-weight: 700;
  color: #fff; text-decoration: none;
}
.nav-logo span { color: var(--gold-bright); }
.nav-links { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  color: rgba(255,255,255,0.65); text-decoration: none;
  font-size: 0.8rem; font-weight: 600; padding: 7px 13px;
  border-radius: 8px; transition: all 0.2s;
  letter-spacing: 0.03em; text-transform: uppercase;
}
.nav-links a:hover { color: #fff; background: rgba(255,255,255,0.08); }
.nav-links a.active { color: var(--gold-bright); }
.nav-toggle {
  display: none; background: none; border: none;
  color: #fff; font-size: 1.4rem; cursor: pointer; padding: 8px;
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: rgba(43,35,34,0.98); flex-direction: column; padding: 12px 16px; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 13px 18px; font-size: 0.88rem; }
}

/* === HERO === */
.hero {
  position: relative; min-height: 92vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; padding: 100px 28px 100px;
  background:
    radial-gradient(ellipse at 25% 85%, rgba(192,57,43,0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 15%, rgba(245,200,66,0.16) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(26,138,92,0.06) 0%, transparent 60%),
    linear-gradient(175deg, #2b1a18 0%, #1f1512 35%, #1a100e 65%, #221815 100%);
}
.hero--short { min-height: 55vh; padding: 100px 28px 60px; }
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: 0.035;
  background-image:
    linear-gradient(0deg, rgba(255,255,255,0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.5) 1px, transparent 1px);
  background-size: 48px 48px; pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 90px; background: var(--warm-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-content {
  position: relative; z-index: 2; max-width: 760px;
  animation: heroIn 0.9s ease forwards;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold-bright);
  margin-bottom: 28px; padding: 8px 20px;
  border: 1px solid rgba(245,200,66,0.35); border-radius: 50px;
  background: rgba(245,200,66,0.08);
}
.hero-badge::before { content: '🏮'; font-size: 0.9rem; }
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: #fff; line-height: 1.15; letter-spacing: -0.015em;
  margin-bottom: 24px; font-weight: 700;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-bright);
  text-shadow: 0 0 50px rgba(245,200,66,0.35);
}
.hero-sub {
  font-size: 1.15rem; color: rgba(255,255,255,0.6);
  max-width: 560px; margin: 0 auto 36px; line-height: 1.8;
}
.hero-cta {
  display: inline-block; padding: 15px 36px;
  background: var(--vermillion); color: #fff;
  font-family: var(--sans); font-size: 0.92rem; font-weight: 700;
  text-decoration: none; border-radius: 50px;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(192,57,43,0.3);
}
.hero-cta:hover { background: var(--cinnabar); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(192,57,43,0.4); }
/* Hero variants per page */
.hero--vpn { background: radial-gradient(ellipse at 30% 80%, rgba(26,39,64,0.6) 0%, transparent 60%), radial-gradient(ellipse at 70% 20%, rgba(192,57,43,0.15) 0%, transparent 50%), linear-gradient(175deg, #0d1b2a 0%, #1a100e 100%); }
.hero--visa { background: radial-gradient(ellipse at 30% 80%, rgba(26,138,92,0.15) 0%, transparent 60%), linear-gradient(175deg, #1a2a1a 0%, #1a100e 100%); }
.hero--cost { background: radial-gradient(ellipse at 30% 80%, rgba(212,162,78,0.15) 0%, transparent 60%), linear-gradient(175deg, #2a2010 0%, #1a100e 100%); }
.hero--insurance { background: radial-gradient(ellipse at 30% 80%, rgba(192,57,43,0.2) 0%, transparent 60%), linear-gradient(175deg, #2a1a1a 0%, #1a100e 100%); }
.hero--money { background: radial-gradient(ellipse at 30% 80%, rgba(212,162,78,0.2) 0%, transparent 60%), linear-gradient(175deg, #2a2510 0%, #1a100e 100%); }
.hero--language { background: radial-gradient(ellipse at 30% 80%, rgba(100,40,120,0.15) 0%, transparent 60%), linear-gradient(175deg, #2a1028 0%, #1a100e 100%); }
.hero--cities { background: radial-gradient(ellipse at 30% 80%, rgba(26,40,56,0.4) 0%, transparent 60%), linear-gradient(175deg, #1b2838 0%, #1a100e 100%); }
.hero--esim { background: radial-gradient(ellipse at 30% 80%, rgba(16,40,58,0.4) 0%, transparent 60%), linear-gradient(175deg, #10283a 0%, #1a100e 100%); }

/* === TRUST BAR === */
.trust { background: var(--ink); position: relative; z-index: 2; }
.trust-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 32px 28px;
  display: flex; justify-content: center; gap: 40px; flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,0.6); font-size: 0.88rem; font-weight: 500;
}
.trust-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; background: rgba(255,255,255,0.06);
}

/* === SECTIONS === */
.section { max-width: var(--max-w); margin: 0 auto; padding: 70px 28px 80px; }
.section-head { text-align: center; margin-bottom: 52px; }
.section-head h2 {
  font-family: var(--serif); font-size: 2.2rem; font-weight: 700;
  color: var(--ink); margin-bottom: 14px;
}
.section-head p { color: var(--muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }
.section-head .accent-line {
  display: block; width: 50px; height: 3px; margin: 18px auto 0;
  background: linear-gradient(90deg, var(--vermillion), var(--gold-bright));
  border-radius: 2px;
}

/* === GUIDE CARDS GRID === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.card {
  position: relative; background: var(--paper); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: inherit;
  transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  border: 1px solid rgba(0,0,0,0.05); box-shadow: var(--shadow-sm);
  opacity: 0; animation: cardIn 0.5s ease forwards;
}
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }
.card:nth-child(5) { animation-delay: 0.25s; }
.card:nth-child(6) { animation-delay: 0.3s; }
.card:nth-child(7) { animation-delay: 0.35s; }
.card:nth-child(8) { animation-delay: 0.4s; }
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(192,57,43,0.15); }
.card-top {
  height: 140px; display: flex; align-items: center; justify-content: center;
  font-size: 3rem; position: relative; overflow: hidden;
}
.card-top .card-emoji { position: relative; z-index: 2; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2)); }
.card-top::before {
  content: ''; position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px; border-top: 2px solid rgba(255,255,255,0.12); border-right: 2px solid rgba(255,255,255,0.12); border-radius: 0 6px 0 0;
}
.card-top::after {
  content: ''; position: absolute; bottom: 10px; left: 10px;
  width: 28px; height: 28px; border-bottom: 2px solid rgba(255,255,255,0.12); border-left: 2px solid rgba(255,255,255,0.12); border-radius: 0 0 0 6px;
}
.card-top--vpn { background: linear-gradient(135deg, #1a2740, #2a4060, #1a3050); }
.card-top--cost { background: linear-gradient(135deg, #3a2a10, #5a4420, #4a3818); }
.card-top--visa { background: linear-gradient(135deg, #1a3020, #2a5038, #1a4028); }
.card-top--insurance { background: linear-gradient(135deg, #3a1a1a, #5a2828, #4a2020); }
.card-top--money { background: linear-gradient(135deg, #3a3010, #5a4a20, #4a3a18); }
.card-top--language { background: linear-gradient(135deg, #2a1028, #4a2048, #3a1838); }
.card-top--cities { background: linear-gradient(135deg, #1a2838, #2a4050, #203848); }
.card-top--esim { background: linear-gradient(135deg, #10283a, #1a4060, #103050); }
.card-body { padding: 22px 24px 26px; }
.card-body h3 {
  font-family: var(--serif); font-size: 1.2rem; font-weight: 700;
  color: var(--ink); margin-bottom: 8px; line-height: 1.35;
}
.card-body p { font-size: 0.88rem; color: var(--muted); line-height: 1.65; margin-bottom: 14px; }
.card-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.08em; padding: 5px 11px; border-radius: 6px;
}
.card-tag--essential { background: var(--cinnabar-glow); color: var(--vermillion); }
.card-tag--guide { background: var(--jade-soft); color: var(--jade); }
.card-tag--compare { background: var(--gold-glow); color: #8a6a10; }
.card-arrow {
  position: absolute; bottom: 24px; right: 24px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--warm-bg-alt); display: flex;
  align-items: center; justify-content: center;
  font-size: 0.85rem; color: var(--muted); transition: all 0.3s;
}
.card:hover .card-arrow { background: var(--vermillion); color: #fff; transform: translateX(3px); }

/* === PROSE (Article pages) === */
.prose {
  max-width: var(--content-w); margin: 0 auto; padding: 40px 28px 60px;
}
.prose h2 {
  font-family: var(--serif); font-size: 1.65rem; font-weight: 700;
  color: var(--ink); margin: 48px 0 16px; line-height: 1.3;
}
.prose h2:first-of-type { margin-top: 24px; }
.prose h3 {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 700;
  color: var(--charcoal); margin: 32px 0 12px;
}
.prose p { margin-bottom: 18px; }
.prose strong { color: var(--ink); }
.prose a { color: var(--vermillion); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--cinnabar); }
.prose ol, .prose ul { margin: 0 0 24px 24px; }
.prose li { margin-bottom: 8px; }

/* Updated badge */
.updated-badge {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  color: var(--jade); background: var(--jade-soft);
  padding: 5px 14px; border-radius: 50px; margin-bottom: 24px;
}

/* === COMPARISON TABLE === */
.comparison-table-wrap { overflow-x: auto; margin: 24px 0 32px; border-radius: var(--radius); }
.comparison-table {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
  background: var(--paper); border: 1px solid rgba(0,0,0,0.06);
  border-radius: var(--radius); overflow: hidden;
}
.comparison-table thead { background: var(--ink); color: #fff; }
.comparison-table th {
  padding: 14px 16px; text-align: left; font-weight: 700;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em;
}
.comparison-table td { padding: 14px 16px; border-bottom: 1px solid rgba(0,0,0,0.04); }
.comparison-table tbody tr:hover { background: var(--warm-bg-alt); }
.comparison-table tr.pick { background: rgba(245,200,66,0.06); }
.comparison-table tr.pick td:first-child { border-left: 3px solid var(--gold-bright); }
.comparison-table a { color: var(--vermillion); font-weight: 700; text-decoration: none; }
.comparison-table a:hover { text-decoration: underline; }

/* === CALLOUT BOXES === */
.callout {
  background: var(--cinnabar-glow); border-left: 4px solid var(--vermillion);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px; margin: 28px 0;
}
.callout--jade { background: var(--jade-soft); border-left-color: var(--jade); }
.callout--gold { background: var(--gold-glow); border-left-color: var(--gold-bright); }
.callout-title { font-weight: 800; font-size: 0.9rem; margin-bottom: 8px; color: var(--ink); }
.callout p { margin-bottom: 0; font-size: 0.92rem; }

/* === AFFILIATE CARD === */
.affiliate-card {
  background: var(--paper); border: 2px solid var(--gold-bright);
  border-radius: var(--radius); padding: 28px;
  display: flex; gap: 20px; align-items: flex-start;
  margin: 32px 0; box-shadow: 0 4px 20px rgba(245,200,66,0.1);
}
.emoji-icon { font-size: 2.5rem; flex-shrink: 0; }
.affiliate-card-body h4 {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 700;
  color: var(--ink); margin-bottom: 8px;
}
.affiliate-card-body p { font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; }
@media (max-width: 480px) {
  .affiliate-card { flex-direction: column; }
}

/* === BUTTONS === */
.btn {
  display: inline-block; padding: 13px 28px; border-radius: 50px;
  font-family: var(--sans); font-weight: 700; font-size: 0.88rem;
  text-decoration: none; transition: all 0.3s; cursor: pointer; border: none;
}
.btn--primary {
  background: var(--vermillion); color: #fff;
  box-shadow: 0 4px 16px rgba(192,57,43,0.25);
}
.btn--primary:hover { background: var(--cinnabar); transform: translateY(-1px); color: #fff; }
.btn--sm { padding: 10px 22px; font-size: 0.82rem; }

/* === PROS/CONS === */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.pros-cons > div {
  background: var(--paper); border-radius: var(--radius); padding: 20px;
  border: 1px solid rgba(0,0,0,0.06);
}
.pros h4 { color: var(--jade); font-size: 0.9rem; font-weight: 800; margin-bottom: 10px; }
.cons h4 { color: var(--vermillion); font-size: 0.9rem; font-weight: 800; margin-bottom: 10px; }
.pros-cons ul { list-style: none; margin: 0; padding: 0; }
.pros-cons li { padding: 6px 0; font-size: 0.88rem; padding-left: 20px; position: relative; }
.pros li::before { content: '✓'; position: absolute; left: 0; color: var(--jade); font-weight: 700; }
.cons li::before { content: '✗'; position: absolute; left: 0; color: var(--vermillion); font-weight: 700; }
@media (max-width: 480px) { .pros-cons { grid-template-columns: 1fr; } }

/* === WHY SECTION === */
.why { background: var(--warm-bg-alt); padding: 80px 28px; position: relative; overflow: hidden; }
.why::before {
  content: ''; position: absolute; top: -40px; left: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, var(--cinnabar-glow), transparent 70%); opacity: 0.5;
}
.why::after {
  content: ''; position: absolute; bottom: -40px; right: -40px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,200,66,0.18), transparent 70%); opacity: 0.6;
}
.why-inner { max-width: var(--content-w); margin: 0 auto; text-align: center; position: relative; z-index: 2; }
.why-inner h2 { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--ink); margin-bottom: 20px; }
.why-inner p { color: var(--muted); font-size: 1.05rem; max-width: 580px; margin: 0 auto 24px; line-height: 1.85; }
.why-features { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; margin-top: 40px; }
.why-feat { text-align: center; max-width: 200px; }
.why-feat-icon {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.why-feat-icon--red { background: var(--cinnabar-glow); }
.why-feat-icon--gold { background: rgba(245,200,66,0.15); }
.why-feat-icon--jade { background: var(--jade-soft); }
.why-feat h4 { font-size: 0.95rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.why-feat p { font-size: 0.82rem; color: var(--muted); line-height: 1.55; margin: 0; }

/* Ornament */
.ornament {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin: 40px 0; color: var(--gold-bright); font-size: 0.75rem; user-select: none;
}
.ornament::before, .ornament::after { content: ''; width: 40px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.ornament::after { background: linear-gradient(90deg, var(--gold), transparent); }
/* Also the old class for backwards compat */
.cn-pattern { display: block; text-align: center; font-size: 0.8rem; letter-spacing: 0.6em; color: var(--gold); margin: 48px 0; user-select: none; }

/* === FOOTER === */
.footer { background: var(--ink); color: rgba(255,255,255,0.5); padding: 60px 28px 36px; }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px;
}
.footer-brand h3 { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-brand h3 span { color: var(--gold-bright); }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 360px; }
.footer-col h4 {
  color: rgba(255,255,255,0.75); font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; font-weight: 700;
}
.footer-col a { display: block; color: rgba(255,255,255,0.45); text-decoration: none; font-size: 0.88rem; padding: 5px 0; transition: color 0.2s; }
.footer-col a:hover { color: var(--gold-bright); }
.footer-bottom {
  max-width: var(--max-w); margin: 36px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; justify-content: space-between; font-size: 0.78rem; flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,0.35); text-decoration: none; }
.footer-bottom a:hover { color: var(--gold-bright); }
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

/* === ANIMATIONS === */
@keyframes heroIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* === RESPONSIVE === */
@media (max-width: 480px) {
  .grid { grid-template-columns: 1fr; }
  .trust-inner { gap: 20px; }
  .why-features { gap: 24px; flex-direction: column; align-items: center; }
}
