:root {
  --ink: #12151c;
  --ink-soft: #2a303c;
  --navy: #0a3d62;
  --navy-deep: #062a45;
  --gold: #f4c430;
  --gold-bright: #ffe08a;
  --cream: #f8f4ef;
  --paper: #faf7f1;
  --stone: #d9d0c3;
  --terracotta: #9a4b32;
  --muted: #6b645b;
  --line: rgba(244, 196, 48, 0.35);
  --shadow: 0 24px 60px rgba(14, 20, 29, 0.18);
  --radius: 18px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Outfit", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.eyebrow {
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
}

h1, h2, h3, .display {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
}

/* NAV */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 16px 0;
  transition: background 0.3s, padding 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  background: rgba(14, 20, 29, 0.92);
  backdrop-filter: blur(16px);
  padding: 10px 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.nav-inner {
  width: min(1180px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  color: var(--cream);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.7rem;
  letter-spacing: 0.02em;
}

.logo span {
  color: var(--gold-bright);
}

.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #efe6d6;
  font-size: 0.92rem;
  opacity: 0.88;
}

.nav-links a:hover {
  color: var(--gold-bright);
}

.nav-cta {
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--cream);
  padding: 8px 12px;
  border-radius: 999px;
}

/* HERO */
.hero {
  position: relative;
  min-height: 100vh;
  color: var(--cream);
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-content {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  bottom: auto !important;
  text-align: center !important;
  width: min(920px, 90%) !important;
  z-index: 2;
  padding: 0 !important;
  text-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.hero h1 {
  font-size: clamp(4rem, 10vw, 7.5rem);
  margin: 10px 0;
  max-width: none;
}

.hero-sub {
  font-size: 1.3rem;
  max-width: 50ch;
  margin: 0 auto;
  color: #efe6d6;
}

.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 48px;
  justify-content: center;
  color: #d9d0c3;
  font-size: 0.92rem;
}

.hero-meta strong {
  display: block;
  font-size: 1.35rem;
  color: var(--gold-bright);
  font-family: "Cormorant Garamond", serif;
}

/* SECTIONS */
section {
  padding: 80px 0;
}

.intro, .comparison, .countries, .trends, .tips {
  background: var(--paper);
}

h2 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 0.4em;
}

.section-head {
  margin-bottom: 40px;
}

/* STATS / CARDS */
.stats-grid, .country-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.stat-card, .country-card, .info-card {
  background: white;
  padding: 28px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-card h3, .country-card .price {
  font-size: 2.4rem;
  color: var(--navy);
  font-family: "Cormorant Garamond", serif;
  margin: 8px 0;
}

/* TABLES */
.table-wrapper {
  overflow-x: auto;
  margin: 24px 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th, td {
  padding: 16px 18px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: var(--navy);
  color: var(--cream);
  font-weight: 500;
  font-size: 0.9rem;
}

tr:hover {
  background: #f8f4ef;
}

/* CHARTS */
canvas {
  margin-top: 24px;
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

/* LISTS */
ul {
  background: white;
  padding: 28px 28px 28px 48px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

li {
  margin-bottom: 10px;
}

.source-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 16px;
}

footer {
  background: var(--navy-deep);
  color: var(--cream);
  text-align: center;
  padding: 40px 0;
  font-size: 0.92rem;
}

footer .small {
  opacity: 0.7;
  margin-top: 8px;
  font-size: 0.8rem;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  position: relative;
}

.lang-switcher {
  position: static;
  z-index: 100;
  display: flex;
  gap: 0.35rem;
  background: rgba(10, 22, 40, 0.8);
  backdrop-filter: blur(12px);
  padding: 0.25rem 0.4rem;
  border-radius: 50px;
  border: 1px solid rgba(201, 168, 106, 0.5);
  flex-wrap: nowrap;
  margin-top: 2px;
}

.lang-switcher a {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 50px;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  line-height: 1;
}

.lang-switcher a img {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
  box-shadow: rgba(255, 255, 255, 0.2) 0px 0px 0px 1px;
  flex-shrink: 0;
}

.lang-switcher a:hover,
.lang-switcher a.active {
  background: var(--gold);
  color: var(--navy-deep);
}

.lang-menu-toggle {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 101;
  background: rgba(10, 22, 40, 0.85);
  border: 1px solid rgba(201, 168, 106, 0.5);
  color: white;
  border-radius: 50px;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  align-items: center;
  gap: 0.4rem;
}

.lang-menu-toggle img {
  width: 18px;
  height: 12px;
  border-radius: 2px;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 3.2rem;
  right: 1rem;
  z-index: 100;
  background: rgba(10, 22, 40, 0.95);
  border: 1px solid rgba(201, 168, 106, 0.5);
  border-radius: 16px;
  padding: 0.5rem;
  min-width: 160px;
  backdrop-filter: blur(12px);
  flex-direction: column;
  gap: 0.3rem;
}

.lang-dropdown.show {
  display: flex;
}

.lang-dropdown a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
  background: var(--gold);
  color: var(--navy-deep);
}

.lang-dropdown a img {
  width: 20px;
  height: 14px;
  border-radius: 2px;
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    right: 16px;
    background: rgba(10, 20, 35, 0.97);
    backdrop-filter: blur(12px);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--line);
    gap: 14px;
    min-width: 180px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  }
  .menu-btn {
    display: block;
  }
  .lang-switcher {
    display: none;
  }
  .lang-menu-toggle {
    display: flex;
  }
  .hero h1 {
    font-size: 3.2rem;
  }
  .hero-meta {
    flex-wrap: wrap;
  }
}

/* Flag alignment in tables – keep flag left of country name */
td img[src*="flags/"] {
  display: inline-block !important;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
  flex-shrink: 0;
}
td:has(img[src*="flags/"]) {
  white-space: nowrap;
}
