/* ============================================================
   MOVE ABROAD CIRCLE — Main Stylesheet
   Aesthetic: Editorial travel magazine meets bold modernism
   Palette: Deep terracotta + warm sand + forest green + cream
   Fonts: Fraunces (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,600;0,9..144,700;0,9..144,900;1,9..144,300;1,9..144,400;1,9..144,700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ---- TOKENS ---- */
:root {
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;

  --text-xs:   clamp(0.72rem, 0.68rem + 0.2vw, 0.85rem);
  --text-sm:   clamp(0.875rem, 0.82rem + 0.3vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  --text-xl:   clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --text-2xl:  clamp(2rem, 1.4rem + 2.2vw, 3.5rem);
  --text-3xl:  clamp(2.75rem, 1.2rem + 4.5vw, 5.5rem);
  --text-hero: clamp(3.5rem, 0.5rem + 8vw, 8rem);

  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;
  --sp-4: 1rem;     --sp-5: 1.25rem;  --sp-6: 1.5rem;
  --sp-8: 2rem;     --sp-10: 2.5rem;  --sp-12: 3rem;
  --sp-16: 4rem;    --sp-20: 5rem;    --sp-24: 6rem;
  --sp-32: 8rem;

  --r-sm: 4px;  --r-md: 8px;  --r-lg: 14px;
  --r-xl: 20px; --r-2xl: 32px; --r-full: 9999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 200ms var(--ease);

  --max-w: 1260px;
  --max-narrow: 720px;
  --max-content: 980px;
}

/* ---- LIGHT MODE ---- */
:root, [data-theme='light'] {
  --bg:        #faf6f0;
  --surf:      #fffdfb;
  --surf-2:    #f5f0e8;
  --surf-3:    #ede6d8;
  --border:    #ddd5c3;
  --divider:   #e8e0d0;

  --text:      #1c1710;
  --text-2:    #5a5244;
  --text-3:    #9e9488;
  --text-inv:  #faf6f0;

  --primary:   #b84a2c;   /* Terracotta */
  --primary-h: #96361c;
  --primary-l: #fbeae4;
  --green:     #2d5a3d;   /* Forest */
  --green-h:   #1f4029;
  --green-l:   #d8ede0;
  --gold:      #c4860a;
  --gold-l:    #fef4d8;
  --sky:       #1e5fa0;
  --sky-l:     #daeaf8;

  --shadow-s: 0 1px 4px rgba(28, 23, 16, 0.08);
  --shadow-m: 0 4px 20px rgba(28, 23, 16, 0.11);
  --shadow-l: 0 16px 48px rgba(28, 23, 16, 0.15);
}

/* ---- DARK MODE ---- */
[data-theme='dark'] {
  --bg:        #100e0b;
  --surf:      #181410;
  --surf-2:    #201c17;
  --surf-3:    #27221c;
  --border:    #38322a;
  --divider:   #2e2922;

  --text:      #ede8e0;
  --text-2:    #9a9288;
  --text-3:    #5c5750;
  --text-inv:  #100e0b;

  --primary:   #e06b46;
  --primary-h: #ed7f5c;
  --primary-l: #2e1a13;
  --green:     #4d9464;
  --green-h:   #61ab79;
  --green-l:   #162214;
  --gold:      #d9a030;
  --gold-l:    #281f0a;
  --sky:       #4b93d8;
  --sky-l:     #0e2036;

  --shadow-s: 0 1px 4px rgba(0,0,0,0.25);
  --shadow-m: 0 4px 20px rgba(0,0,0,0.35);
  --shadow-l: 0 16px 48px rgba(0,0,0,0.45);
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t), color var(--t);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul[role='list'] { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ---- CONTAINER ---- */
.container {
  width: min(var(--max-w), 100% - var(--sp-8));
  margin-inline: auto;
}
.container--narrow {
  width: min(var(--max-narrow), 100% - var(--sp-8));
  margin-inline: auto;
}
.container--content {
  width: min(var(--max-content), 100% - var(--sp-8));
  margin-inline: auto;
}

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 240, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--divider);
  transition: background var(--t), border-color var(--t);
}
[data-theme='dark'] .site-header {
  background: rgba(16, 14, 11, 0.92);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  height: 68px;
  width: min(var(--max-w), 100% - var(--sp-8));
  margin-inline: auto;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
  text-decoration: none;
}
.nav__logo-img {
  height: 52px;
  width: auto;
  display: block;
  /* In light mode the logo is gold/tan — looks great on light bg.
     In dark mode we invert brightness so it stays visible. */
  transition: opacity var(--t);
}
.nav__logo-img:hover { opacity: 0.85; }
[data-theme='dark'] .nav__logo-img {
  filter: brightness(1.4);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  list-style: none;
  margin-left: auto;
}
.nav__links a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-md);
  transition: background var(--t), color var(--t);
}
.nav__links a:hover {
  background: var(--surf-2);
  color: var(--text);
}

.nav__right {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

/* Theme toggle */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  background: var(--surf-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), border-color var(--t);
  position: relative;
}
.theme-toggle:hover { background: var(--surf-3); }
.theme-toggle::before {
  content: '☀';
  font-size: 16px;
}
[data-theme='dark'] .theme-toggle::before { content: '🌙'; }

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--surf-2);
  border: 1px solid var(--border);
}
.nav__hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: var(--r-full);
  transition: transform var(--t), opacity var(--t);
}

/* Mobile nav drawer */
.nav__mobile {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
}
.nav__mobile.is-open { display: flex; flex-direction: column; }
.nav__mobile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.nav__mobile-panel {
  position: relative;
  margin-top: 68px;
  background: var(--surf);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.nav__mobile-panel a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: background var(--t), border-color var(--t);
}
.nav__mobile-panel a:hover {
  background: var(--surf-2);
  border-color: var(--border);
}

@media (max-width: 780px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
}

/* ============================================================
   HERO (HOME)
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--green);
  min-height: 92vh;
  display: flex;
  align-items: center;
}

.hero__bg-pattern {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.hero__bg-pattern svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.08;
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: min(var(--max-w), 100% - var(--sp-8));
  margin-inline: auto;
  padding: var(--sp-24) 0 var(--sp-20);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-16);
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-full);
  margin-bottom: var(--sp-6);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: var(--sp-6);
}
.hero__title em {
  font-style: italic;
  color: #f5c89a;
}

.hero__subtitle {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: rgba(255,255,255,0.72);
  margin-bottom: var(--sp-10);
  max-width: 500px;
  font-weight: 300;
}

.hero__ctas {
  display: flex;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-12);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--r-full);
  transition: all var(--t);
  white-space: nowrap;
  cursor: pointer;
}
.btn--primary {
  background: #fff;
  color: var(--green);
}
.btn--primary:hover {
  background: #f5c89a;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}
.btn--ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
}

.btn--sm {
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-xs);
}
.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn--outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn--solid {
  background: var(--primary);
  color: #fff;
}
.btn--solid:hover {
  background: var(--primary-h);
  transform: translateY(-1px);
  box-shadow: var(--shadow-m);
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.hero__stat {
  text-align: center;
  padding: var(--sp-4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,0.06);
}
.hero__stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #f5c89a;
  line-height: 1.1;
}
.hero__stat-label {
  display: block;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.55);
  margin-top: var(--sp-1);
  font-weight: 400;
}

/* Globe illustration on right */
.hero__globe-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hero__globe-wrap svg {
  width: min(440px, 100%);
  height: auto;
  opacity: 0.3;
  animation: globe-spin 40s linear infinite;
}
@keyframes globe-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Floating country pills on the globe */
.hero__pills {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__pill {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  animation: pill-float 6s ease-in-out infinite;
}
.hero__pill:nth-child(1) { top: 10%; left: -5%; animation-delay: 0s; }
.hero__pill:nth-child(2) { top: 25%; right: 0%; animation-delay: 1.5s; }
.hero__pill:nth-child(3) { top: 55%; left: -8%; animation-delay: 3s; }
.hero__pill:nth-child(4) { bottom: 20%; right: -5%; animation-delay: 0.8s; }
.hero__pill:nth-child(5) { bottom: 5%; left: 15%; animation-delay: 2s; }

@keyframes pill-float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}

@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: var(--sp-8); }
  .hero__globe-wrap { display: none; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 500px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__ctas { flex-direction: column; }
}

/* ============================================================
   WHY BANNER
   ============================================================ */
.why-banner {
  background: var(--primary);
  padding: var(--sp-16) 0;
  position: relative;
  overflow: hidden;
}
.why-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.why-banner__inner {
  position: relative;
  z-index: 1;
}
.why-banner h2 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--sp-5);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.why-banner p {
  font-size: var(--text-lg);
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
  font-weight: 300;
  max-width: 72ch;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: var(--sp-24) 0;
}
.section--alt {
  background: var(--surf-2);
}

.section__header {
  margin-bottom: var(--sp-12);
  max-width: 560px;
}
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--sp-3);
}
.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: var(--sp-4);
}
.section__subtitle {
  font-size: var(--text-base);
  color: var(--text-2);
  line-height: 1.65;
  font-weight: 300;
}

/* ============================================================
   COUNTRY GRID
   ============================================================ */
.country-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}

@media (max-width: 1000px) {
  .country-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .country-grid { grid-template-columns: 1fr; }
}

.country-card {
  display: flex;
  flex-direction: column;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-2xl);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
}
.country-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-l);
  border-color: var(--primary);
}

.country-card__visual {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.country-card__flag-emoji {
  font-size: 72px;
  line-height: 1;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.15));
  transition: transform var(--t);
}
.country-card:hover .country-card__flag-emoji {
  transform: scale(1.1);
}

.country-card__body {
  padding: var(--sp-5) var(--sp-6) var(--sp-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.country-card__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-2);
}
.country-card__tagline {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: var(--sp-4);
  flex: 1;
  font-weight: 300;
}
.country-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.country-card__arrow {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: auto;
  transition: gap var(--t);
}
.country-card:hover .country-card__arrow { gap: var(--sp-3); }

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.tag--nomad   { background: var(--sky-l);   color: var(--sky); }
.tag--retire  { background: var(--green-l); color: var(--green); }
.tag--invest  { background: var(--gold-l);  color: var(--gold); }
.tag--work    { background: var(--primary-l); color: var(--primary); }
.tag--primary { background: var(--surf-3); color: var(--text); }

/* ============================================================
   STEPS / CHECKLIST (HOME PAGE)
   ============================================================ */
.steps-section {
  padding: var(--sp-24) 0;
  background: var(--surf-2);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6);
  margin-top: var(--sp-12);
}
@media (max-width: 720px) {
  .steps-grid { grid-template-columns: 1fr; }
}

.step-item {
  display: flex;
  gap: var(--sp-5);
  padding: var(--sp-6);
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
}
.step-item__num {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.step-item__title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-2);
  line-height: 1.3;
}
.step-item__desc {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.65;
  font-weight: 300;
}

/* ============================================================
   DISCLAIMER BOX
   ============================================================ */
.info-box {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  background: var(--gold-l);
  border: 1px solid var(--gold);
  border-radius: var(--r-xl);
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.6;
  margin-top: var(--sp-8);
}
.info-box strong { color: var(--text); }

.warning-box {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  background: var(--primary-l);
  border: 1px solid var(--primary);
  border-radius: var(--r-xl);
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.6;
  margin: var(--sp-6) 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0e0c09;
  color: rgba(255,255,255,0.65);
  padding: var(--sp-16) 0 var(--sp-8);
}
.footer__inner {
  width: min(var(--max-w), 100% - var(--sp-8));
  margin-inline: auto;
}
.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-10);
  padding-bottom: var(--sp-12);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--sp-8);
}
@media (max-width: 860px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__top { grid-template-columns: 1fr; }
}

.footer__logo {
  height: 44px;
  width: auto;
  display: block;
  margin-bottom: var(--sp-4);
  filter: brightness(1.3);
  opacity: 0.9;
}

.footer__desc {
  font-size: var(--text-sm);
  line-height: 1.65;
  max-width: 28ch;
  font-weight: 300;
}
.footer__heading {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: var(--sp-4);
}
.footer__links { list-style: none; display: flex; flex-direction: column; gap: var(--sp-3); }
.footer__links a {
  color: rgba(255,255,255,0.6);
  font-size: var(--text-sm);
  transition: color var(--t);
}
.footer__links a:hover { color: #fff; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.footer__copy {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
}
.footer__disclaimer {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
  max-width: 50ch;
  text-align: right;
  line-height: 1.5;
}

/* ============================================================
   COUNTRY PAGES — HERO
   ============================================================ */
.country-hero {
  background: var(--green);
  padding: var(--sp-20) 0;
  position: relative;
  overflow: hidden;
}
.country-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 80px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.country-hero__inner {
  width: min(var(--max-w), 100% - var(--sp-8));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-12);
  align-items: start;
  position: relative;
  z-index: 1;
}
@media (max-width: 800px) {
  .country-hero__inner { grid-template-columns: 1fr; }
  .country-hero__quick-stats { width: 100%; }
}

.breadcrumb {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--sp-4);
}
.breadcrumb a { color: rgba(255,255,255,0.6); transition: color var(--t); }
.breadcrumb a:hover { color: #fff; }

.country-hero__back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--sp-6);
  transition: color var(--t);
  text-decoration: none;
}
.country-hero__back:hover { color: #fff; }

.country-hero__flag-emoji {
  font-size: 72px;
  margin-bottom: var(--sp-4);
  display: block;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.2));
}
.country-hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 300;
  color: #fff;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: var(--sp-5);
}
.country-hero__subtitle {
  font-size: var(--text-base);
  line-height: 1.7;
  color: rgba(255,255,255,0.72);
  max-width: 60ch;
  margin-bottom: var(--sp-6);
  font-weight: 300;
}
.country-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
}
.meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-full);
}
.meta-item strong { color: rgba(255,255,255,0.9); }

.country-hero__quick-stats {
  width: 260px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-2xl);
  padding: var(--sp-4) var(--sp-5);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.quick-stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.quick-stat:last-child {
  border-bottom: none;
}
.quick-stat__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  font-weight: 600;
  line-height: 1.3;
}
.quick-stat__value {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: #f5c89a;
  line-height: 1.2;
}

/* ============================================================
   COUNTRY PAGE — CONTENT LAYOUT
   ============================================================ */
.content-layout {
  width: min(var(--max-w), 100% - var(--sp-8));
  margin-inline: auto;
  padding: var(--sp-16) 0 var(--sp-24);
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-12);
  align-items: start;
}
@media (max-width: 1000px) {
  .content-layout { grid-template-columns: 1fr; }
  .content-sidebar { order: -1; }
}

.content-main { min-width: 0; }
.content-main > * + * { margin-top: var(--sp-8); }

.content-main p {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--text-2);
  font-weight: 300;
}
.content-main p + p { margin-top: var(--sp-5); }

.section-heading {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  padding-bottom: var(--sp-4);
  border-bottom: 2px solid var(--divider);
  margin-top: var(--sp-12) !important;
}

/* Fun fact */
.fun-fact {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  background: var(--gold-l);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--r-lg) var(--r-lg) 0;
}
.fun-fact__icon { font-size: 1.5rem; flex-shrink: 0; }
.fun-fact__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-1);
}
.fun-fact__text {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.6;
}

/* Visa cards */
.visa-card {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-6) var(--sp-8);
}
.visa-card > * + * { margin-top: var(--sp-5); }
.visa-card__header {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  justify-content: space-between;
}
.visa-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.visa-card__desc {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.7;
  font-weight: 300;
}
.visa-badge {
  flex-shrink: 0;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.visa-badge--retire  { background: var(--green-l); color: var(--green); }
.visa-badge--nomad   { background: var(--sky-l);   color: var(--sky); }
.visa-badge--invest  { background: var(--gold-l);  color: var(--gold); }
.visa-badge--work    { background: var(--primary-l); color: var(--primary); }

/* Requirements table */
.req-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.req-table thead th {
  text-align: left;
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  background: var(--surf-2);
  border-bottom: 2px solid var(--divider);
}
.req-table tbody tr { border-bottom: 1px solid var(--divider); }
.req-table tbody tr:last-child { border-bottom: none; }
.req-table td {
  padding: var(--sp-3) var(--sp-4);
  vertical-align: top;
  line-height: 1.5;
}
.req-table td:first-child {
  font-weight: 600;
  color: var(--text);
  min-width: 200px;
}
.req-table td:last-child { color: var(--text-2); font-weight: 300; }

/* Docs grid */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-2);
}
@media (max-width: 600px) { .docs-grid { grid-template-columns: 1fr; } }

.doc-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.5;
  font-weight: 300;
  padding: var(--sp-2);
}
.doc-item::before {
  content: '✓';
  width: 20px;
  height: 20px;
  background: var(--green-l);
  color: var(--green);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Steps ordered list */
.steps { list-style: none; counter-reset: steps; }
.step {
  counter-increment: steps;
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--divider);
}
.step:last-child { border-bottom: none; }
.step::before {
  content: counter(steps);
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}
.step__title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--sp-1);
}
.step__desc {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: 1.65;
  font-weight: 300;
}
/* step as just li with content directly */
.steps li.step > div { min-width: 0; }
.steps li.step > strong { font-weight: 600; color: var(--text); display: block; margin-bottom: var(--sp-1); }

/* Cost grid */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}
@media (max-width: 600px) { .cost-grid { grid-template-columns: 1fr; } }

.cost-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surf-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  gap: var(--sp-3);
}
.cost-item__label {
  font-size: var(--text-sm);
  color: var(--text-2);
  font-weight: 300;
}
.cost-item__value {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--green);
  white-space: nowrap;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.content-sidebar { position: sticky; top: 88px; }
.sidebar-card {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.sidebar-card__title {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-4);
}
.toc-list { list-style: none; }
.toc-item a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--text-sm);
  color: var(--text-2);
  border-radius: var(--r-md);
  transition: background var(--t), color var(--t);
  font-weight: 400;
}
.toc-item a:hover { background: var(--surf-2); color: var(--text); }
.toc-item a.active { background: var(--primary-l); color: var(--primary); font-weight: 500; }

.official-link {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-sm);
  color: var(--sky);
  border: 1px solid var(--sky-l);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-2);
  transition: background var(--t), border-color var(--t);
  text-decoration: none;
  line-height: 1.4;
  font-weight: 400;
}
.official-link:hover { background: var(--sky-l); border-color: var(--sky); }
.official-link:last-child { margin-bottom: 0; }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-top {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-6);
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-m);
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity var(--t), transform var(--t), background var(--t);
  z-index: 50;
  border: none;
}
.back-top.visible { opacity: 1; transform: translateY(0); }
.back-top:hover { background: var(--primary-h); }

/* ============================================================
   PAGE LOAD ANIMATIONS
   ============================================================ */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
