/* mantsala.net. Otsikot Francois One, leipäteksti Source Serif 4, käyttöliittymä Figtree. */
@font-face {
  font-family: "Francois One";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("fonts/francois-one-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Francois One";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("fonts/francois-one-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("fonts/figtree-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-display: swap;
  font-weight: 300 900;
  src: url("fonts/figtree-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("fonts/source-serif-4-latin-opsz-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url("fonts/source-serif-4-latin-ext-opsz-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --blue: #0057f0; /* Hyväksytyn vaakalogon kirjainten täyttöväri. */
  --forest: #093d32;
  --gold: #bf9f4f;
  --gold-text: color-mix(in srgb, var(--gold) 70%, black);
  --silver: #cccccc;
  --paper: #ffffff;
  --blue-light: color-mix(in srgb, var(--blue) 8%, var(--paper));
  --blue-map: color-mix(in srgb, var(--blue) 22%, var(--paper));
  --blue-on-dark: color-mix(in srgb, var(--blue) 30%, var(--paper));
  --forest-light: color-mix(in srgb, var(--forest) 16%, var(--paper));
  --gold-wash: color-mix(in srgb, var(--gold) 4%, var(--paper));
  --gold-light: color-mix(in srgb, var(--gold) 40%, var(--paper));
  --silver-light: color-mix(in srgb, var(--silver) 25%, var(--paper));
  --forest-control: color-mix(in srgb, var(--forest) 90%, var(--paper));
  --forest-line: color-mix(in srgb, var(--forest) 74%, var(--paper));
  --on-dark: var(--silver-light);
  --paper-2: var(--silver-light);
  --card: var(--paper);
  --line: color-mix(in srgb, var(--silver) 70%, var(--paper));
  --ink: #161616;
  --ink-2: color-mix(in srgb, var(--ink) 82%, var(--silver));
  --ink-3: color-mix(in srgb, var(--ink) 63%, var(--silver));
  --heading: "Francois One", "Arial Narrow", sans-serif;
  --reading: "Source Serif 4", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 14px;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-optical-sizing: auto;
}
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
:is(.panel, .contact, .site-foot) :focus-visible { outline-color: var(--gold-light); }

.skip { position: absolute; left: -999px; top: 0; background: var(--forest); color: var(--on-dark); padding: 8px 14px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Ylätunniste */
.site-head { border-bottom: 1px solid var(--line); background: var(--paper); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 6px 16px; min-height: 68px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: block; max-width: 100%; }
.brand-mark { display: block; width: clamp(196px, 28vw, 256px); max-width: 100%; height: auto; }
.site-nav { display: flex; gap: 6px 20px; flex-wrap: wrap; font-size: 0.95rem; font-weight: 550; }
.site-nav a { color: var(--blue); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--blue); }

/* Hero */
.hero { padding: clamp(32px, 6vw, 72px) 0 clamp(16px, 3vw, 28px); }
.home-hero { position: relative; isolation: isolate; display: grid; min-height: clamp(24rem, 29vw, 39rem); padding: 0; overflow: hidden; background: var(--gold-wash); }
.home-hero > * { grid-area: 1 / 1; }
.hero-layout { width: 100%; align-self: center; padding-block: clamp(2rem, 3.2vw, 3.5rem); }
.hero-copy { max-width: 46%; }
.home-hero .hero-copy h1 { font-size: clamp(2.55rem, 4vw, 4.1rem); max-width: none; text-wrap: balance; }
.home-hero .lead { max-width: 40ch; margin-block: .85rem 1.25rem; font-size: clamp(1.05rem, 1.55vw, 1.2rem); }
.season-scene { position: relative; z-index: -1; overflow: hidden; }
.season-scene::before, .season-scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.season-scene::before { inset: -24px; background: var(--season-art) left center / cover no-repeat; filter: blur(20px); opacity: .14; }
.season-scene::after { left: auto; width: 58%; background: var(--season-art) right center / cover no-repeat; mask-image: linear-gradient(90deg, transparent 0, #000 23%); }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; color: var(--forest); margin: 0 0 14px; }
h1, h2, h3, h4, h5, h6 { font-family: var(--heading); font-weight: 400; font-variant-caps: normal; text-transform: none; color: var(--forest); letter-spacing: normal; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 5rem); max-width: 16ch; }
h1 em { font-style: normal; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; }
.lead { font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--ink-2); max-width: 46ch; margin: 18px 0 0; line-height: 1.5; }

.lead, .prose p, .prose li, .news p, .card p { font-family: var(--reading); }
.prose p:not(.meta), .prose li, .news p { font-size: 1.125rem; }

/* Etusivun matka-aikanosto */
.travel-window { padding: clamp(2rem, 4vw, 3.75rem) 0; }
.travel-window h2 { margin: 0 0 1.25rem; }
.travel-window-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch; gap: clamp(16px, 3vw, 32px); }
.travel-map-link { display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 1rem 1rem; text-decoration: none; }
.travel-map-link:hover { border-color: var(--blue); }
.travel-map-link img { display: block; width: min(100%, 30.5rem); height: auto; }
.travel-map-link > span { display: block; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; text-align: center; }
.travel-summary { background: var(--forest); color: var(--on-dark); border-radius: var(--radius); padding: clamp(1.1rem, 2.4vw, 2rem); align-content: center; }
.travel-summary h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); color: inherit; }
.travel-summary p { margin: .55rem 0 1rem; max-width: 40ch; font-size: .95rem; line-height: 1.35; }
.travel-summary table { width: 100%; border-collapse: collapse; line-height: 1.28; font-variant-numeric: tabular-nums; }
.travel-summary th, .travel-summary td { padding: .5rem .3rem; text-align: right; }
.travel-summary th:first-child { padding-left: 0; text-align: left; }
.travel-summary td { font-weight: 650; white-space: nowrap; }
.travel-summary thead { font-size: .83rem; }
.travel-summary tbody tr { border-top: 1px solid var(--forest-line); }
.travel-summary tbody th { font-weight: 500; }
.travel-summary th small { display: block; max-width: 24ch; margin-top: .2em; font-size: .79rem; line-height: 1.25; }
/* Karttaosio */
.map-section { padding: 8px 0 clamp(40px, 6vw, 72px); }
.map-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: clamp(16px, 3vw, 32px); align-items: start; }
.map-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(8px, 1.5vw, 16px); position: relative; }
.map-card svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.map-hint { font-size: 0.85rem; color: var(--ink-3); margin: 6px 6px 2px; }

.mk-vpoint { cursor: pointer; }
.mk-village { cursor: pointer; stroke: var(--card); stroke-width: 1.4; stroke-linejoin: round; transition: fill 0.15s ease; vector-effect: non-scaling-stroke; }
.mk-village.t0 { fill: var(--silver-light); } .mk-village.t1 { fill: var(--blue-light); }
.mk-village.t2 { fill: var(--blue-map); } .mk-village.t3 { fill: var(--forest-light); }
.mk-village:hover { fill: var(--silver); }
.mk-village.is-on { fill: var(--gold); }
.mk-outline { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.mk-vlabel { font-family: var(--sans); font-weight: 650; fill: var(--ink-2); cursor: pointer; pointer-events: all; paint-order: stroke; stroke: rgba(255,255,255,0.85); stroke-width: 3px; stroke-linejoin: round; }
.mk-vlabel.is-on { fill: var(--ink); }
.mk-arm { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.mk-armlabel { font-family: var(--sans); font-size: 10px; font-weight: 600; fill: var(--ink-3); paint-order: stroke; stroke: var(--paper); stroke-width: 3px; pointer-events: none; }
.mk-station { fill: var(--ink); stroke: var(--card); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mk-route { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; vector-effect: non-scaling-stroke; pointer-events: none; }
.mk-route.is-rail { stroke: var(--blue); stroke-dasharray: 1 0; }
.mk-dest { fill: var(--card); stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mk-dest.is-big { fill: var(--ink); }
.mk-dname { font-family: var(--heading); font-weight: 400; fill: var(--ink); }
.mk-dtime { font-family: var(--sans); font-weight: 700; fill: var(--blue); }
.mk-dpill { fill: var(--card); stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }

.panel { background: var(--forest); color: var(--on-dark); border-radius: var(--radius); padding: clamp(18px, 2.5vw, 28px); position: sticky; top: 16px; }
.panel h2 { color: inherit; font-size: clamp(1.5rem, 2.6vw, 2rem); }
.panel .eyebrow { color: inherit; }
.panel .sub { font-size: 0.95rem; margin: 6px 0 16px; }
.panel select { width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--forest-light); background: var(--forest-control); color: var(--on-dark); margin-bottom: 14px; }
.times { list-style: none; margin: 0; padding: 0; }
.times li { display: grid; grid-template-columns: minmax(0, 1fr) 5.7em 5.7em; gap: 4px 8px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--forest-line); }
.times .dn { font-family: var(--heading); font-size: 1.15rem; font-weight: 400; overflow-wrap: anywhere; }
.times .car, .times .rail { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; text-align: right; }
.times .note { grid-column: 1 / -1; font-size: 0.82rem; margin-top: -2px; }
.times-head { display: grid; grid-template-columns: minmax(0, 1fr) 5.7em 5.7em; gap: 8px; padding-bottom: 6px; }
.times-head span { font-size: 0.75rem; letter-spacing: 0.03em; }
.times-head span:nth-child(2), .times-head span:nth-child(3) { text-align: right; }
.panel-foot { font-size: 0.8rem; margin: 14px 0 0; line-height: 1.5; }
.panel-foot a { color: var(--blue-on-dark); }
.far { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--forest-line); }
.far h3 { color: inherit; font-size: 1.15rem; letter-spacing: 0.01em; margin-bottom: 4px; }

/* Tekstiosiot */
.band { padding: clamp(44px, 7vw, 88px) 0; }
.band.alt { background: var(--gold-wash); }
.prose { max-width: 62ch; }
.prose p { margin: 0 0 1em; }
.prose h2 + p { margin-top: 18px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: start; }

.news { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.recruitment-label { display: block; margin: 0 0 .65rem; font: 400 1rem/1.3 var(--heading); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-text); }
.news h3 { font-size: clamp(1.4rem, 2.4vw, 1.75rem); margin-bottom: 10px; }
.news p { margin: 0 0 1em; color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: var(--on-dark); font-weight: 700; text-decoration: none; padding: 12px 20px; border-radius: 99px; }
.btn:hover { text-decoration: underline; }
.btn.ghost { background: transparent; color: var(--blue); border: 1.5px solid currentColor; }
.btn.ghost:hover { background: var(--blue); color: var(--paper); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 28px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--ink); display: block; }
.card:hover { border-color: var(--ink-3); }
.card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.card p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }

/* Artikkelisivu (harjoittelija) */
.article { padding: clamp(32px, 6vw, 64px) 0 clamp(48px, 7vw, 88px); }
.internship-intro { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.25rem, 3vw, 2.5rem); align-items: center; }
.internship-intro > div { min-width: 0; container-type: inline-size; }
.internship-intro h1 { max-width: none; font-size: clamp(2rem, 13cqi, 4rem); overflow-wrap: anywhere; }
.internship-intro img { display: block; width: 100%; height: auto; }
.article .prose h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin: 1.8em 0 0.5em; }
.article .prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.article .prose li { margin-bottom: 0.4em; }
.contact { background: var(--forest); color: var(--on-dark); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); margin-top: 32px; }
.contact h2 { color: inherit; margin: 0 0 10px !important; }
.contact a { color: var(--blue-on-dark); font-weight: 700; }
.meta { font-size: 0.85rem; color: var(--ink-3); margin-top: 14px; }

/* Alatunniste */
.site-foot { background: var(--forest); color: var(--on-dark); padding: 36px 0 48px; font-size: 0.9rem; }
.site-foot .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.site-foot-mark { display: block; width: 8.5rem; height: auto; }
.site-foot h3 { color: inherit; font-size: 1.15rem; margin-bottom: 8px; }
.site-foot p { margin: 0 0 0.6em; }
.site-foot a { color: var(--blue-on-dark); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 1000px) {
  .home-hero { display: flex; flex-direction: column; min-height: 0; }
  .hero-layout { order: -1; padding-block: 1.75rem 1.25rem; }
  .hero-copy { max-width: 100%; }
  .home-hero .hero-copy h1 { text-wrap: initial; }
  .home-hero .lead { max-width: 60ch; }
  .season-scene { aspect-ratio: 1400 / 788; width: 100%; max-height: 29rem; }
  .season-scene::before { display: none; }
  .season-scene::after { width: 100%; background-size: contain; background-position: center; mask-image: none; }
}
@media (max-width: 880px) {
  .internship-intro, .travel-window-grid, .map-grid, .two-col { grid-template-columns: 1fr; }
  .two-col > .news, .travel-summary { order: -1; }
  .panel { position: static; }
}
@media (max-width: 420px) {
  .times li, .times-head { grid-template-columns: minmax(0, 1fr) 5.1em 5.1em; font-size: .94rem; }
  .times .dn { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
