/* The country sites, in the look of lifesim.com (apps/landing/src/styles.css, 2026-12-01):
   a black page, a rounded hero card of real in-game footage, Nichrome05 titles with a purple edge,
   blue gem buttons, and cream article pages set in Inter. */

@font-face {
  font-family: "LifeSim Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/Inter-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Nichrome05";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("fonts/Nichrome05-Ultra.woff2") format("woff2");
}

:root {
  --sans: "LifeSim Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", Helvetica, Arial,
    "Noto Sans", Roboto, "DejaVu Sans", "Noto Sans Thai", Thonburi, "Leelawadee UI", sans-serif;
  --display: "Nichrome05", "LifeSim Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  /* A title with a letter that Nichrome05 lacks (Greek, Cyrillic, CJK, Arabic, Hebrew, Thai) uses the system's heaviest sans. */
  --display-fallback: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue",
    Arial, "DejaVu Sans", "Hiragino Sans", "Apple SD Gothic Neo", "PingFang TC", "Noto Sans CJK JP", "Noto Sans CJK KR",
    "Noto Sans CJK TC", "Noto Sans Hebrew", "Noto Sans Arabic", "Noto Sans Thai", sans-serif;
  /* Latin/Greek/Cyrillic fonts come before the CJK ones: a CJK font draws Greek letters full-width. */
  --edge: #45407e;
  --blue: #007aff;
  --blue-kicker: #2997ff;
  --ink: #1d1d1f;
  --text: #424245;
  --muted: #6e6e73;
  --rule: #d8d6cc;
  --link: #0066cc;
  --page: #faf9f5;
  --card: #f0eee6;
  --night: #141413;
  --gutter: max(20px, env(safe-area-inset-left));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #000;
  color: #fff;
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: -0.02em;
  -webkit-font-smoothing: antialiased;
}
:lang(ja) body, :lang(ko) body, :lang(zh) body, :lang(th) body, :lang(ar) body, :lang(he) body { letter-spacing: 0; }
/* Korean breaks between words (keep-all); Japanese and Chinese break between characters (normal),
   with phrase-aware breaking for Japanese headings where the browser supports it. */
:lang(ko) { word-break: keep-all; overflow-wrap: anywhere; }
:lang(ja), :lang(zh) { word-break: normal; overflow-wrap: anywhere; line-break: strict; }
:lang(ja) :is(h1, h2, h3, .hero-title, .hero-brand, .hero-kicker, .card-title, .night-title) { word-break: auto-phrase; }
img { max-width: 100%; }
a { color: inherit; }

/* ---------- Gem buttons ---------- */
.gem {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(180deg, #ffffff59, #fff0 45%),
    radial-gradient(circle at 30% 25%, #5fb0ff, #1f8bff 35%, #007aff 70%, #0064d6);
  box-shadow: 0 8px 22px -6px #007aff73, 0 2px 6px #0003, inset 0 1px 0 #ffffff8c, inset 0 -2px 4px #00000026;
  border: 1px solid #0064d6;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.gem:hover { filter: brightness(1.06); transform: translateY(-1px); }
.gem:active { transform: translateY(1px); }
.gem-small { padding: 7px 16px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.gem-medium { padding: 13px 22px; font-size: 17px; font-weight: 600; }
.glass-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 35px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  background: linear-gradient(180deg, #ffffff1f, #fff0 55%), #1c1c2280;
  box-shadow: inset 0 1px 0 #ffffff59, inset 0 0 0 1px #ffffff1f, inset 0 -1px 0 #00000026, 0 10px 30px #0000004d,
    0 1px 3px #00000040;
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  text-shadow: 0 1px 2px #000a;
}

/* ---------- Top bar ---------- */
.topbar {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 calc(var(--gutter) + 8px);
}
.bar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: #fff; }
.bar-logo { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.bar-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bar-name.display-fallback { font-family: var(--display-fallback); font-size: 17px; }
.bar-by { font-size: 12px; opacity: 0.65; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 14px; flex: none; }
.topbar-actions .bar-link { font-size: 15px; text-decoration: none; opacity: 0.9; }
.page .topbar {
  position: sticky;
  top: 0;
  background: #ffffffb3;
  -webkit-backdrop-filter: saturate(1.6) blur(20px);
  backdrop-filter: saturate(1.6) blur(20px);
  border-bottom: 1px solid #0000000f;
  color: var(--ink);
}
.page .bar-brand { color: var(--ink); }
.page .bar-name { text-shadow: none; }

/* ---------- Home hero: the rounded card of real in-game footage ---------- */
.home { background: #000; min-height: 100vh; }
.hero-wrap { padding: calc(64px + env(safe-area-inset-top)) calc(var(--gutter) + 12px) 0; }
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: min(820px, calc(100svh - 96px));
  border-radius: 28px;
  border: 1px solid #ffffff14;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(36px, 7vh, 64px) 20px 88px;
  background: #0b0b14;
}
.hero-media { position: absolute; inset: 0; z-index: -2; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #0a0a1af2 0%, #0a0a1ab3 32%, #0a0a1a40 62%, #0a0a1a26 100%);
}
.hero-lockup { position: relative; display: inline-flex; flex-direction: column; align-items: center; margin-bottom: 26px; }
.hero-brand {
  margin: 0;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(30px, 5.4vw, 58px);
  line-height: 1;
  letter-spacing: 0;
  color: #fff;
  -webkit-text-stroke: 1.5px #ffffff;
  text-shadow: 0 0.07em 0 #45407e, 0 0.1em 0 #2c2858, 0 6px 18px #0009;
}
.hero-brand.display-fallback { font-family: var(--display-fallback); -webkit-text-stroke: 0; }
.hero-ring { width: 72px; height: 72px; border-radius: 50%; display: block; filter: drop-shadow(0 6px 18px #0009); }
/* "<flag> <brand>": Inter, not the display face, as a quiet label under the ring. */
.hero-country {
  margin: 14px 0 0;
  font-family: "LifeSim Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: clamp(17px, 2.2vw, 22px);
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 2px 10px #000a;
}
.hero-by {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: #ffffffcc;
  text-decoration: none;
}
.hero-by .wordmark { height: 26px; width: auto; display: block; filter: drop-shadow(0 3px 8px #0008); }
.hero-title {
  word-spacing: 0.08em;
  margin: 0;
  max-width: 16ch;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(48px, 9vw, 96px);
  line-height: 1.08;
  letter-spacing: -0.007em;
  color: #fff;
  text-shadow: 0 0.07em 0 var(--edge), 0 6px 18px #0008;
  text-wrap: balance;
}
.hero-title.display-fallback { font-family: var(--display-fallback); font-size: clamp(40px, 7.5vw, 84px); line-height: 1.15; }
.hero-kicker {
  margin: 18px auto 0;
  max-width: 30ch;
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.03em;
  text-shadow: 0 1px 2px #000a;
  text-wrap: balance;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin-top: 32px; width: 100%; }
.play-free {
  min-width: min(486px, 100%);
  padding: 10px 40px 10px 12px;
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 31px);
  font-weight: 900;
  color: #faf8f3;
  background: linear-gradient(180deg, #fff3, #fff0 55%), #007aff;
  border: 0;
  box-shadow: inset 0 1px 0 #ffffff59, inset 0 0 0 1px #ffffff1f, inset 0 -1px 0 #00000026, 0 10px 30px #0000004d;
}
.play-free.display-fallback { font-family: var(--display-fallback); }
.play-face { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #ffffffe6; flex: none; }
.play-free .label { flex: 1; text-align: center; word-spacing: 0.12em; }
.hero-second { padding: 18px 24px; font-size: 17px; }
.footage-badge {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 6px;
  background: #0009;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.footage-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; }

/* ---------- Home sections on black ---------- */
.night { max-width: 1180px; margin: 0 auto; padding: 88px calc(var(--gutter) + 12px) 24px; }
.night-title {
  margin: 0 0 10px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(34px, 4.6vw, 47px);
  line-height: 1.05;
  letter-spacing: -0.007em;
  text-shadow: 0 0.07em 0 var(--edge), 0 6px 18px #0008;
}
.night-title.display-fallback { font-family: var(--display-fallback); }
.night-lead { margin: 0 0 32px; max-width: 46rem; color: #ffffffc2; font-size: 17px; line-height: 1.5; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  padding: 20px;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  text-decoration: none;
  color: #fff;
  background: radial-gradient(120% 90% at 20% 0%, #3a3570 0%, #191830 55%, #0d0d18 100%);
  border: 1px solid #ffffff1a;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-3px); border-color: #ffffff40; }
.card img.card-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: 0.9; }
.card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, #0000 25%, #000c 85%); }
.card-tag { align-self: flex-start; margin-bottom: auto; padding: 5px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.card-title { margin: 0 0 6px; font-size: 21px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.card-text { margin: 0 0 14px; font-size: 15px; line-height: 1.4; color: #ffffffcc; }
.card-cta { align-self: flex-start; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.prose-night { max-width: 46rem; color: #ffffffc2; font-size: 17px; line-height: 1.6; }
.prose-night h3 { color: #fff; font-size: 20px; margin: 28px 0 8px; letter-spacing: -0.02em; }
.prose-night p { margin: 0 0 14px; }
.prose-night ul { padding-inline-start: 20px; margin: 0 0 14px; }
.faq-night details { border-top: 1px solid #ffffff1f; padding: 18px 0; }
.faq-night details:last-child { border-bottom: 1px solid #ffffff1f; }
.faq-night summary { cursor: pointer; font-size: 18px; font-weight: 600; color: #fff; list-style: none; }
.faq-night summary::-webkit-details-marker { display: none; }
.faq-night summary::after { content: "+"; float: inline-end; opacity: 0.6; }
.faq-night details[open] summary::after { content: "–"; }
.faq-night p { margin: 10px 0 0; color: #ffffffbd; line-height: 1.6; }
.final-cta { text-align: center; padding: 96px 20px 120px; }

/* ---------- Article pages: cream glass sheet ---------- */
.page { background: var(--page); color: var(--ink); color-scheme: light; min-height: 100vh; }
.sheet { max-width: 1104px; margin: 0 auto; padding: 56px calc(var(--gutter) + 12px) 40px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.crumbs a { color: var(--link); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.content-head { padding-bottom: 56px; border-bottom: 1px solid var(--rule); max-width: 800px; }
.content-kicker { margin: 0 0 12px; color: var(--blue-kicker); font-size: 17px; font-weight: 600; }
.content-title { margin: 0; font-size: clamp(40px, 6vw, 64px); line-height: 1.06; font-weight: 600; letter-spacing: -0.04em; text-wrap: balance; }
:lang(ja) .content-title, :lang(ko) .content-title, :lang(zh) .content-title, :lang(th) .content-title,
:lang(ar) .content-title, :lang(he) .content-title { letter-spacing: 0; line-height: 1.2; }
.content-lead { margin: 22px 0 0; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.35; color: var(--text); letter-spacing: -0.025em; }
.content-meta { margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.content-head .gem { margin-top: 32px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; align-items: start; }
.article { min-width: 0; }
.section { padding: 48px 0; border-bottom: 1px solid var(--rule); }
.section h2 { margin: 0 0 18px; font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; }
.section h3 { margin: 26px 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; }
.section p, .section li { font-size: 17px; line-height: 1.65; color: var(--text); }
.section p { margin: 0 0 14px; }
.section ul, .section ol { margin: 0 0 14px; padding-inline-start: 22px; }
.section li { margin-bottom: 6px; }
.section a { color: var(--link); }
.answer { background: var(--card); border-radius: 18px; padding: 24px 26px; margin-top: 48px; }
.answer h2 { margin: 0 0 10px; font-size: 22px; }
.answer p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--text); }
.facts { width: 100%; border-collapse: collapse; margin: 6px 0 10px; font-size: 16px; }
.facts th, .facts td { text-align: start; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--rule); }
.facts th { font-weight: 500; color: var(--text); width: 55%; }
.facts td { font-weight: 600; color: var(--ink); }
.facts td small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.table-scroll { overflow-x: auto; }
.play-box { background: var(--card); border: 1px solid #e4e1d6; border-radius: 18px; padding: 22px 24px; margin: 40px 0 0; }
.play-box h2 { margin: 0 0 8px; font-size: 20px; }
.play-box p { margin: 0 0 16px; color: var(--text); font-size: 16px; line-height: 1.5; }
.side { position: sticky; top: 96px; display: grid; gap: 28px; margin-top: 48px; }
.side-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 20px 20px 132px;
  background: linear-gradient(180deg, #fff, #f2ede4);
  border: 1px solid #e4e1d6;
  box-shadow: 0 10px 0 -4px #e4dfd2, 0 18px 30px -12px #0003;
}
.side-card .side-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; color: var(--ink); }
.side-card .side-logo img { width: 24px; height: 24px; border-radius: 50%; }
.side-card h2 { margin: 14px 0 4px; font-size: 22px; line-height: 1.15; letter-spacing: -0.03em; }
.side-card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.side-card .globe { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; object-fit: cover; width: 100%; }
.toc h2 { margin: 0 0 10px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; border-inline-start: 1px solid var(--rule); }
.toc a { display: block; padding: 6px 14px; font-size: 14px; color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--link); }
.faq details { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.faq summary { cursor: pointer; font-size: 18px; font-weight: 600; color: var(--ink); }
.faq details p { margin: 10px 0 0; }
.sources { font-size: 14px; color: var(--muted); }
.sources li { font-size: 14px; }
.related { padding: 56px 0 8px; }
.related h2 { margin: 0 0 20px; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.related .card { min-height: 240px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: #b0aea5; font-size: 13px; line-height: 1.5; padding: 48px calc(var(--gutter) + 12px) calc(40px + env(safe-area-inset-bottom)); }
.footer-inner { max-width: 1104px; margin: 0 auto; display: grid; gap: 28px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 15px; }
.footer-brand img { width: 24px; height: 24px; border-radius: 50%; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 24px; }
.footer-cols h2 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: #fff; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-cols a { color: #b0aea5; text-decoration: none; }
.footer-cols a:hover { color: #fff; }
.footer-small { border-top: 1px solid #ffffff1a; padding-top: 18px; }

/* ---------- Hub (preview index) ---------- */
.hub { max-width: 1180px; margin: 0 auto; padding: 110px calc(var(--gutter) + 12px) 80px; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.hub-grid a { display: block; padding: 16px 18px; border-radius: 16px; background: #ffffff0d; border: 1px solid #ffffff1a; text-decoration: none; }
.hub-grid a:hover { background: #ffffff1a; }
.hub-grid b { display: block; font-size: 17px; }
.hub-grid span { display: block; font-size: 13px; color: #ffffffa6; margin-top: 4px; }
.hub-grid .empty { opacity: 0.45; }

@media (max-width: 880px) {
  .layout { grid-template-columns: 1fr; gap: 0; }
  .side { position: static; margin-top: 40px; }
  .toc { display: none; }
}
@media (max-width: 560px) {
  .hero-wrap { padding-left: 12px; padding-right: 12px; }
  .hero { border-radius: 22px; padding-bottom: 76px; }
  .play-free { min-width: 100%; padding-right: 24px; }
  .play-face { width: 44px; height: 44px; }
  .bar-by, .topbar-actions .bar-link { display: none; }
  /* Long national names ("Magyarország Szimulátor") wrap to two short lines instead of being cut. */
  .bar-name, .bar-name.display-fallback { font-size: 15px; white-space: normal; line-height: 1.05; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .sheet { padding-top: 32px; }
  .section { padding: 36px 0; }
  .hero-by { align-self: center; margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Thai: no letter-spacing on tracked labels (it pulls Thai syllables apart), and a taller brand line
   so tone marks and vowels above/below don't collide with the "by LifeSim" pill. */
:lang(th) :is(.footage-badge, .card-tag, .gem-small, .toc h2, .footer-cols h2, .glass-tag) { letter-spacing: 0; }
:lang(th) .hero-brand { line-height: 1.45; }
:lang(th) .hero-by { margin-top: 2px; }
