/* ToFinland.fi — Nordic restyle of the Aasiaan.fi v2 design system */
:root {
  --ink: #12242c;
  --ink-soft: #2a3f48;
  --paper: #f3f6f4;
  --paper-2: #e4ece8;
  --card: #fbfdfe;
  --accent: #0b6e6a;
  --accent-dark: #085550;
  --gold: #c4a35a;
  --rule: #d5e0dc;
  --muted: #5a6e74;
  --ok: #1f7a58;
  --warn-bg: #eef3e4;
  --warn-ink: #3d4a1f;
  --th: #0c5c8c;
  --th-bg: #e6f0f6;
  --vn: #1a7a6d;
  --vn-bg: #e4f1ee;
  --kh: #3d6b8a;
  --kh-bg: #e7eef3;
  --ph: #2f6b3a;
  --ph-bg: #e7f1e8;
  --jp: #1a3d4c;
  --jp-bg: #e6ecee;
  --bl: #2a8f7a;
  --bl-bg: #e5f4ef;
  --au: #1e5f8a;
  --au-bg: #e6eef5;
  --max: 70rem;
  --nav-h: 4.25rem;
  --serif: "Newsreader", "Libre Baskerville", "Georgia", serif;
  --display: "Fraunces", "Libre Baskerville", Georgia, serif;
  --sans: "Outfit", "IBM Plex Sans", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 650; margin: 0 0 0.6em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 1.6em 0 0.5em; }
h3 { font-size: 1.25rem; margin: 1.3em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
li { margin-bottom: 0.35em; }
small, .muted { color: var(--muted); }
code, .mono { font-family: "IBM Plex Sans", ui-monospace, monospace; font-size: 0.92em; }

.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: 0.5rem 0.8rem; z-index: 100; }

.wrap { width: min(var(--max), calc(100% - 2rem)); margin-inline: auto; }
.narrow { width: min(42rem, calc(100% - 2rem)); margin-inline: auto; }

header.site {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--nav-h); gap: 1rem;
}
.logo {
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.35rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.logo span { color: var(--accent); font-weight: 500; }
nav.links { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; align-items: center; }
nav.links a {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
}
nav.links a:hover, nav.links a[aria-current="page"] { color: var(--accent); }

.nav-tools { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.lang-switch {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.lang-switch a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.15rem 0.1rem;
}
.lang-switch a:hover,
.lang-switch a[aria-current="page"] { color: var(--accent); }
.lang-switch .sep { color: var(--muted); font-weight: 400; user-select: none; }
@media (min-width: 801px) {
  nav.links { margin-left: auto; }
}
@media (max-width: 800px) {
  .nav-tools { margin-left: auto; }
}
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--rule); border-radius: 0.4rem;
  font-family: var(--sans); font-size: 0.9rem; padding: 0.35rem 0.6rem; color: var(--ink);
}

/* Heroes */
.hero {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--rule);
  background:
    radial-gradient(1200px 420px at 90% -10%, color-mix(in srgb, var(--gold) 28%, transparent), transparent 60%),
    radial-gradient(800px 300px at 0% 100%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
}
.hero-photo {
  position: relative;
  min-height: clamp(28rem, 78vh, 40rem);
  display: flex;
  align-items: flex-end;
  padding: 0;
  border: 0;
  overflow: hidden;
  color: #f4f8f7;
  background: #12242c;
}
.hero-photo.hero-page { min-height: clamp(18rem, 46vh, 26rem); }
.hero-media, .hero-shade { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
  background: linear-gradient(180deg, rgba(20, 10, 6, 0.15) 0%, rgba(20, 10, 6, 0.55) 45%, rgba(16, 8, 4, 0.88) 100%);
}
.hero-photo .wrap, .hero-photo .narrow {
  position: relative;
  z-index: 1;
  padding: 7rem 0 2.4rem;
  margin-inline: auto;
}
.hero-photo.hero-page .wrap,
.hero-photo.hero-page .narrow { padding: 5.5rem 0 2rem; }
.hero-photo h1, .hero-photo .lede { color: #f4f8f7; text-shadow: 0 1px 12px rgba(0,0,0,.35); }
.hero-photo .lede { max-width: 38rem; }
.hero-photo .meta, .hero-photo .updated, .hero-photo .placeholder-note { color: #d5e4e0; }
.hero-photo .kicker { color: #e3c57a; }
.hero-photo .price { color: #f4f8f7; }
.hero-photo .price small { color: #d5e4e0; }
.hero-photo .btn-ghost { border-color: #f4f8f7; color: #f4f8f7; }
.hero-photo .btn-ghost:hover { background: #f4f8f7; color: var(--ink); }
.hero-thaimaa .hero-shade { background: linear-gradient(180deg, rgba(80, 40, 0, .15), rgba(40, 18, 4, .86)); }
.hero-vietnam .hero-shade { background: linear-gradient(180deg, rgba(10, 40, 36, .2), rgba(6, 24, 22, .88)); }
.hero-kambodza .hero-shade { background: linear-gradient(180deg, rgba(80, 30, 8, .2), rgba(30, 10, 4, .9)); }
.hero-kambodza .hero-media img { object-position: center 50%; }
.hero-filippiinit .hero-shade { background: linear-gradient(180deg, rgba(6, 40, 48, .15), rgba(6, 22, 28, .88)); }
.hero-japani .hero-shade { background: linear-gradient(180deg, rgba(40, 16, 12, .15), rgba(20, 8, 8, .88)); }

.kicker {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.8rem;
}
.lede { font-size: 1.25rem; color: var(--ink-soft); max-width: 40rem; }
.meta { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
.photo-credit {
  font-family: var(--sans);
  font-size: 0.72rem;
  color: #d5e4e0;
  margin: 0.85rem 0 0;
  letter-spacing: 0.01em;
}
.photo-credit a { color: #e8d6a0; }
.credit-inline {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.grid { display: grid; gap: 1rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.cards { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.card, .country-card, .article-card, .sell {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 8px 24px -16px rgba(18, 36, 44, 0.35);
}
.country-card, .article-card {
  text-decoration: none;
  color: inherit;
  display: block;
  padding: 0;
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.country-card:hover, .article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -16px rgba(18, 36, 44, 0.45);
}
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: #c5d2ce; }
.card-media img, .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.country-card .card-body, .article-card .card-body { padding: 1.05rem 1.15rem 1.2rem; }
.country-card h2 { margin: 0 0 0.35em; font-size: 1.45rem; }
.country-card p, .article-card p { margin: 0; color: var(--muted); font-size: 1rem; }
.country-card.card-th { border-color: color-mix(in srgb, var(--th) 45%, var(--rule)); }
.country-card.card-th h2 { color: #0c5c8c; }
.country-card.card-vn { border-color: color-mix(in srgb, var(--vn) 45%, var(--rule)); }
.country-card.card-vn h2 { color: var(--vn); }
.country-card.card-kh { border-color: color-mix(in srgb, var(--kh) 45%, var(--rule)); }
.country-card.card-kh h2 { color: var(--kh); }
.country-card.card-ph { border-color: color-mix(in srgb, var(--ph) 45%, var(--rule)); }
.country-card.card-ph h2 { color: #2f6b3a; }
.country-card.card-jp { border-color: color-mix(in srgb, var(--jp) 45%, var(--rule)); }
.country-card.card-jp h2 { color: var(--jp); }

.article-card h3 { margin: 0.15em 0 0.4em; font-size: 1.2rem; }
.article-card .card-media { aspect-ratio: 16 / 9; }

.frame {
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--rule);
  background: #c5d2ce;
  aspect-ratio: 4 / 3;
  margin: 0;
}
.frame.wide { aspect-ratio: 16 / 9; margin: 0 0 1.2rem; }
.frame figcaption, .prose .photo-credit, .credit-under {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.4rem 0 1rem;
}

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(11, 110, 106, 0.9);
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn[aria-disabled="true"], .btn.placeholder {
  background: var(--ink-soft);
  cursor: not-allowed;
  opacity: 0.88;
  box-shadow: none;
}

section { padding: 2.8rem 0; }
section + section { border-top: 1px solid var(--rule); }
.section-head { max-width: 40rem; margin-bottom: 1.4rem; }
.tint-sand { background: var(--th-bg); border-top-color: transparent; }
.tint-lagoon { background: var(--ph-bg); border-top-color: transparent; }
.tint-jade { background: var(--vn-bg); border-top-color: transparent; }
.tint-sunrise { background: var(--kh-bg); border-top-color: transparent; }
.tint-sand .kicker { color: #0c5c8c; }
.tint-lagoon .kicker { color: #2f6b3a; }
.tint-jade .kicker { color: var(--vn); }
.tint-sunrise .kicker { color: var(--kh); }

.callout {
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-left: 4px solid var(--gold);
  padding: 0.9rem 1rem;
  border-radius: 0 0.6rem 0.6rem 0;
  margin: 1.2rem 0;
  font-size: 1rem;
}
.callout strong { display: block; margin-bottom: 0.2rem; font-family: var(--sans); font-size: 0.82rem; letter-spacing: 0.06em; text-transform: uppercase; }
.callout.info { background: var(--vn-bg); color: var(--ink); border-left-color: var(--vn); }

.table-wrap { overflow-x: auto; margin: 1rem 0 1.4rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--rule); }
th { font-family: var(--sans); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.price { font-family: var(--display); font-size: 2.4rem; font-weight: 650; letter-spacing: -0.03em; }
.price small { font-size: 1rem; font-weight: 500; color: var(--muted); }

form.signup, form.contact { display: grid; gap: 0.7rem; max-width: 24rem; }
label { font-family: var(--sans); font-size: 0.85rem; font-weight: 500; }
input[type="email"], input[type="text"], textarea {
  font: inherit; font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--ink);
}
.placeholder-note {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.prose { max-width: 42rem; }
.prose h2:first-child { margin-top: 0; }
.toc { font-size: 1rem; }
.toc a { text-decoration: none; }
.source-list { font-size: 0.98rem; }
.source-list li { word-break: break-word; }
.updated {
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 1.2rem;
}
.affiliate {
  font-family: var(--sans);
  font-size: 0.85rem;
  background: #eef3e4;
  border: 1px dashed #8a7a3a;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  color: #3d4a1f;
  white-space: nowrap;
}

footer.site {
  border-top: 0;
  padding: 2.2rem 0 2.6rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  color: #e8d3c0;
  background: #12242c;
}
footer.site a { color: #b8ddd6; text-decoration: none; }
footer.site a:hover { color: #e8d6a0; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.5rem; }
.foot-brand { font-family: var(--display); color: #f3f6f4; font-size: 1.2rem; font-weight: 650; margin-bottom: 0.4rem; }
footer.site p { color: #c9d6d3; }

@media (max-width: 800px) {
  .grid-3, .grid-2, .foot-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: inline-block; }
  nav.links {
    display: none;
    position: absolute; left: 0; right: 0; top: var(--nav-h);
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.8rem 1rem 1rem;
    flex-direction: column; align-items: flex-start;
  }
  nav.links.open { display: flex; }
  .hero { padding: 2.2rem 0 1.8rem; }
  .hero-photo, .hero-photo.hero-page { min-height: 22rem; }
  .hero-photo .wrap, .hero-photo .narrow,
  .hero-photo.hero-page .wrap, .hero-photo.hero-page .narrow { padding: 5.5rem 0 1.8rem; }
  body { font-size: 1.05rem; }
}

.card-kh .card-media img { object-position: center 50%; }
.article-card img[src*="artikkeli-thaimaa"] { object-position: center 30%; }

.hero-bali .hero-shade { background: linear-gradient(180deg, rgba(60, 10, 36, .18), rgba(28, 6, 20, .9)); }
.country-card.card-bl { border-color: color-mix(in srgb, var(--bl) 45%, var(--rule)); }
.country-card.card-bl h2 { color: #9d174d; }

/* Ilmasto- ja terveysosiot */
.climate-block { margin: 1.4rem 0 1.8rem; }
.climate-block h3 { margin: 0 0 0.45em; font-size: 1.2rem; }
.climate-table { font-family: var(--sans); font-size: 0.86rem; min-width: 28rem; }
.climate-table th { white-space: nowrap; }
.climate-table td { white-space: nowrap; }
.climate-table .mm { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 400; }
.rain { display: inline-block; font-weight: 600; padding: 0.1rem 0.4rem; border-radius: 999px; }
.rain-low { background: var(--vn-bg); color: #0f5c50; }
.rain-mid { background: var(--th-bg); color: #7a4a05; }
.rain-high { background: var(--jp-bg); color: #8a1c16; }
.climate-table tr.best td:first-child {
  box-shadow: inset 3px 0 0 var(--gold);
  font-weight: 600;
}
.climate-legend {
  display: flex; flex-wrap: wrap; gap: 0.45rem 1rem;
  font-family: var(--sans); font-size: 0.82rem; color: var(--muted);
  margin: 0.4rem 0 1rem;
}
.climate-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.health-section { margin-top: 0.4rem; }
.health-section h3 { color: var(--ink); }
@media (max-width: 800px) {
  .climate-table { font-size: 0.8rem; min-width: 24rem; }
}


.lang-switch .future { color: var(--muted); font-weight: 500; letter-spacing: 0.04em; opacity: 0.55; cursor: default; }
.country-card.card-south { border-color: color-mix(in srgb, var(--th) 45%, var(--rule)); }
.country-card.card-south h2 { color: #0c5c8c; }
.country-card.card-lake { border-color: color-mix(in srgb, var(--vn) 45%, var(--rule)); }
.country-card.card-lake h2 { color: var(--vn); }
.country-card.card-west { border-color: color-mix(in srgb, var(--kh) 45%, var(--rule)); }
.country-card.card-west h2 { color: #3d6b8a; }
.country-card.card-east { border-color: color-mix(in srgb, var(--ph) 45%, var(--rule)); }
.country-card.card-east h2 { color: #2f6b3a; }
.country-card.card-north { border-color: color-mix(in srgb, var(--jp) 45%, var(--rule)); }
.country-card.card-north h2 { color: #1a3d4c; }
.country-card.card-aurora { border-color: color-mix(in srgb, var(--bl) 45%, var(--rule)); }
.country-card.card-aurora h2 { color: #0f5c50; }
.country-card.card-aland { border-color: color-mix(in srgb, var(--au) 45%, var(--rule)); }
.country-card.card-aland h2 { color: #1e5f8a; }
.hero-north .hero-shade, .hero-aurora .hero-shade {
  background: linear-gradient(180deg, rgba(8, 20, 28, .2), rgba(6, 16, 22, .9));
}
.hero-lake .hero-shade { background: linear-gradient(180deg, rgba(8, 30, 26, .18), rgba(6, 22, 20, .9)); }
.hero-south .hero-shade { background: linear-gradient(180deg, rgba(8, 22, 36, .15), rgba(8, 20, 30, .9)); }
.hero-west .hero-shade { background: linear-gradient(180deg, rgba(10, 24, 32, .18), rgba(8, 18, 26, .9)); }
.hero-east .hero-shade { background: linear-gradient(180deg, rgba(10, 28, 16, .18), rgba(8, 20, 14, .9)); }
.hero-aland .hero-shade { background: linear-gradient(180deg, rgba(8, 24, 40, .18), rgba(8, 20, 32, .9)); }
.map-wrap { margin: 1.2rem 0 2rem; }
.map-group { margin: 0 0 1.6rem; }
.map-group h3 {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.7rem;
}
.map-grid { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.map-grid a {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.8rem;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: inherit;
}
.map-grid a:hover { border-color: var(--accent); }
.map-grid strong { display: block; font-family: var(--display); font-size: 1.15rem; }
.map-grid span { font-size: 0.92rem; color: var(--muted); }
.lang-avail {
  font-family: var(--sans);
  font-size: 0.95rem;
  background: var(--vn-bg);
  border-radius: 0.8rem;
  padding: 0.9rem 1rem;
  margin: 1rem 0;
}
.card-media.wide-pano img { object-position: center 40%; }
.rain-mid { background: #eef3e4; color: #5a4a14; }
.rain-high { background: var(--th-bg); color: #0c5c8c; }

.buy-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.2rem 0 0.6rem;
}
.buy-langs .btn { margin: 0; }
