/* ── ORAVA ─────────────────────────────────────────────────────────────────
   Direction A. The warm, image-led descendant of scouts/kirkas — same paper,
   same Selecta, same one-weight-step between headline and body, same rounded
   photo blocks. One thing moves: the loud element is no longer the scarf
   yellow but ORAVANPUNAINEN, the colour perhepartio carries in Suomen
   Partiolaisten merkkijärjestelmä. Yellow stays, demoted to a hairline and
   the odd marker, because it is still He-Si's scarf.

   Everything is a little softer than kirkas: bigger corner radius, lower
   contrast rules, more air under headings. A page for a parent deciding
   whether to bring a four-year-old outside on a Saturday morning.
   ─────────────────────────────────────────────────────────────────────── */

:root {
  --paper:    #F5F1E8;
  --paper-2:  #ECE5D6;
  --paper-3:  #E2D9C6;
  --ink:      #1B1C18;
  --ink-60:   #5E605A;
  --ink-30:   #A6A49B;
  --line:     #DBD3C1;
  --line-2:   #CFC5AF;

  --orava:    #C04F2A;   /* oravanpunainen — perhepartion oma väri */
  --orava-lt: #F6E5DC;
  --orava-dk: #8E3A1D;
  --blue:     #12376F;   /* He-Si:n huivi */
  --blue-lt:  #E3E9F2;
  --sun:      #F0C33C;   /* the yellow lily on the scarf */
  --metsa:    #2E4630;

  --pad: clamp(20px, 5vw, 72px);
  --r: 22px;
  --r-sm: 14px;
  --shell: 1440px;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Selecta', system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.55;
  letter-spacing: -0.005em;
}

.shell { max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }
.narrow { max-width: 980px; }

/* ── type ─────────────────────────────────────────────────────────────── */
.h1 { font-size: clamp(38px, 6.4vw, 88px); font-weight: 500; line-height: .98; letter-spacing: -0.038em; }
.h2 { font-size: clamp(27px, 3.3vw, 48px); font-weight: 500; line-height: 1.05; letter-spacing: -0.032em; }
.h3 { font-size: clamp(19px, 1.5vw, 24px); font-weight: 500; line-height: 1.2; letter-spacing: -0.02em; }
.h4 { font-size: clamp(17px, 1.2vw, 19px); font-weight: 500; line-height: 1.25; letter-spacing: -0.015em; }
.lede { font-size: clamp(18px, 1.5vw, 23px); line-height: 1.45; letter-spacing: -0.015em; font-weight: 400; }
.small { font-size: 14px; line-height: 1.5; }
.muted { color: var(--ink-60); }
.eyebrow {
  font-size: 11.5px; font-weight: 500; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-60);
}
.eyebrow.hot { color: var(--orava); }

/* ── chrome ───────────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; gap: 24px;
  padding: 13px var(--pad);
  transition: background .35s ease, color .35s, box-shadow .35s, backdrop-filter .35s;
  color: #fff;
}
.nav.solid {
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }

/* the lockup is name over troop; scope the small caps to the second line only,
   or the selector also catches the wrapper and shrinks the name with it */
.brand .txt { display: block; line-height: 1.15; }
.brand b { font-size: 16px; font-weight: 500; letter-spacing: -0.022em; display: block; }
.brand .txt > span { font-size: 10.5px; letter-spacing: .13em; text-transform: uppercase; opacity: .66; display: block; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; font-size: 14.5px; opacity: .84; transition: opacity .2s; }
.nav-links a:hover { opacity: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--orava); color: #FFF6F1;
  padding: 11px 21px; border-radius: 999px;
  font-size: 14.5px; font-weight: 500; text-decoration: none; letter-spacing: -0.01em;
  transition: transform .2s cubic-bezier(.2,.8,.3,1), background .2s;
  white-space: nowrap;
}
.pill:hover { transform: translateY(-1.5px); background: var(--orava-dk); }
.pill.ghost { background: transparent; border: 1px solid currentColor; color: inherit; }
.pill.ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.pill.sun { background: var(--sun); color: var(--ink); }
.pill.sun:hover { background: #F5CE58; }
.burger { display: none; }

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: min(92svh, 880px); display: flex; align-items: flex-end; overflow: hidden; }
.hero-img { position: absolute; inset: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; }
.hero-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,10,.58) 0%, rgba(10,12,10,.06) 32%, rgba(10,12,10,.24) 58%, rgba(8,10,8,.82) 100%);
}
.hero-body { position: relative; z-index: 2; color: #fff; width: 100%; padding-bottom: clamp(32px, 6vh, 72px); }
.hero .h1 { max-width: 13ch; text-wrap: balance; }
.hero-sub { margin-top: 20px; max-width: 44ch; opacity: .93; }
.hero-cta { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta {
  margin-top: clamp(30px, 6vh, 54px); padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.3);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 16px 28px;
}
.hero-meta div { font-size: 13.5px; opacity: .88; }
.hero-meta b { display: block; font-weight: 500; font-size: 17px; opacity: 1; letter-spacing: -0.015em; margin-top: 2px; }

/* ── next-up band ─────────────────────────────────────────────────────── */
.next { background: var(--orava); color: #FFF2EA; padding-block: clamp(24px, 3vw, 38px); }
.next-in { display: grid; grid-template-columns: auto 1fr auto; gap: clamp(18px, 3.5vw, 52px); align-items: center; }
.next .eyebrow { color: rgba(255,242,234,.66); }
.next .when { font-variant-numeric: tabular-nums; font-size: clamp(17px, 1.5vw, 21px); font-weight: 500; margin-top: 4px; }
.next h2 { font-size: clamp(20px, 2vw, 30px); font-weight: 500; letter-spacing: -0.028em; line-height: 1.1; }
.next p { font-size: 15px; opacity: .8; margin-top: 5px; }
.next .pill { background: #FFF2EA; color: var(--orava-dk); }
.next .pill:hover { background: #fff; }

/* ── generic section ──────────────────────────────────────────────────── */
section { padding-block: clamp(62px, 8.5vw, 128px); }
.sec-head { display: grid; gap: 17px; max-width: 60ch; }
.sec-head .h2 { max-width: 18ch; }

/* ── the four promises ────────────────────────────────────────────────── */
.promises { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2px; margin-top: clamp(38px, 5vw, 64px); background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.promise { background: var(--paper); padding: 28px 24px 32px; display: grid; gap: 9px; align-content: start; }
.promise .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--orava); margin-bottom: 5px; }
.promise p { font-size: 15px; color: var(--ink-60); }

/* ── split feature ────────────────────────────────────────────────────── */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(26px, 4vw, 72px); align-items: center; }
.split + .split { margin-top: clamp(48px, 7vw, 108px); }
.split.flip > figure { order: 2; }
.split figure { position: relative; border-radius: var(--r); overflow: hidden; background: var(--paper-2); aspect-ratio: 4 / 3; }
.split figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.split-txt { display: grid; gap: 18px; align-content: center; }
.split-txt .h2 { max-width: 15ch; }
.split-txt p { max-width: 45ch; }

/* ── calendar rail (home preview) ─────────────────────────────────────── */
.rail-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: clamp(36px, 5vw, 58px); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(320px, 78vw); gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 22px;
  padding-bottom: 14px; scrollbar-width: thin;
  /* let the rail bleed to the viewport edge while the page keeps its gutter */
  margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad);
}
.rail > * { scroll-snap-align: start; }
.ev {
  /* the rail sits on paper-2, so the card takes the lighter paper to lift off it */
  background: var(--paper); border-radius: var(--r); overflow: hidden;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .4s cubic-bezier(.2,.8,.3,1);
}
.ev:hover { transform: translateY(-4px); }
.ev-img { aspect-ratio: 5 / 4; overflow: hidden; background: var(--paper-3); }
.ev-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.8,.3,1); }
.ev:hover .ev-img img { transform: scale(1.04); }
.ev-body { padding: 18px 20px 22px; display: grid; gap: 7px; align-content: start; flex: 1; }
.ev-date {
  display: inline-flex; align-items: baseline; gap: 7px;
  font-variant-numeric: tabular-nums; font-size: 12.5px; letter-spacing: .04em;
  color: var(--orava); font-weight: 500; text-transform: uppercase;
}
.ev-where { font-size: 14px; color: var(--ink-60); }
.ev-lead { font-size: 14.5px; color: var(--ink-60); line-height: 1.45; }

/* strip of photographs from the season just gone */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(230px, 56vw); gap: 10px; overflow-x: auto; margin-top: 16px; padding-bottom: 12px; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad); }
.strip figure { border-radius: var(--r-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--paper-2); }
.strip img { width: 100%; height: 100%; object-fit: cover; }

/* ── orava: the badge ladder ──────────────────────────────────────────── */
.ladder { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.ladder li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-60); }
.ladder i { width: 22px; height: 22px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

/* six items, so three across leaves no orphan cell at any width */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); gap: 2px; margin-top: clamp(40px, 5vw, 66px); background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { background: var(--paper); padding: 26px 24px 30px; display: grid; gap: 9px; align-content: start; }
.tile p { font-size: 14.5px; color: var(--ink-60); }

/* ── the nine — expander list ─────────────────────────────────────────── */
.nine { margin-top: clamp(38px, 5vw, 62px); }
.nine details { border-top: 1px solid var(--line); }
.nine details:last-child { border-bottom: 1px solid var(--line); }
.nine summary {
  list-style: none; cursor: pointer; padding-block: 21px;
  display: grid; grid-template-columns: 3rem 1fr auto; gap: 18px; align-items: baseline;
}
.nine summary::-webkit-details-marker { display: none; }
.nine summary:hover .n-name { color: var(--orava); }
.n-num { font-variant-numeric: tabular-nums; color: var(--ink-30); font-size: 14px; }
.n-name { font-size: clamp(19px, 1.8vw, 27px); font-weight: 500; letter-spacing: -0.025em; transition: color .2s; }
.n-plus { color: var(--ink-30); font-size: 21px; line-height: 1; transition: transform .3s; }
.nine details[open] .n-plus { transform: rotate(45deg); }
.n-body { padding: 0 0 30px; display: grid; gap: 20px; grid-template-columns: 3rem minmax(0,1fr) minmax(0,1fr); }
.n-body > :first-child { grid-column: 2 / 3; }
.n-gen { color: var(--ink-60); font-style: normal; padding-left: 16px; border-left: 2px solid var(--sun); font-size: 15px; }

/* ── ages 3–6 ─────────────────────────────────────────────────────────── */
.years { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 14px; margin-top: clamp(38px, 5vw, 60px); }
.year { background: var(--paper-2); border-radius: var(--r); padding: 24px 22px 26px; display: grid; gap: 10px; align-content: start; }
.year .n { font-size: clamp(40px, 4vw, 58px); font-weight: 500; line-height: .9; letter-spacing: -0.05em; color: var(--orava); }
.year .n sup { font-size: .34em; font-weight: 500; letter-spacing: 0; vertical-align: super; color: var(--ink-30); margin-left: 3px; }
.year p { font-size: 14.5px; color: var(--ink-60); }
.year ul { margin-top: 4px; display: grid; gap: 5px; }
.year li { font-size: 13.5px; padding-left: 15px; position: relative; }
.year li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--sun); }

/* ── families rota ────────────────────────────────────────────────────── */
.rota { width: 100%; margin-top: clamp(34px, 4vw, 52px); font-size: 15.5px; }
.rota th { text-align: left; font-weight: 500; font-size: 11.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--ink-60); padding-bottom: 12px; }
.rota td { padding: 15px 16px 15px 0; border-top: 1px solid var(--line); vertical-align: baseline; }
.rota td:first-child { font-weight: 500; }
.rota td.dim { color: var(--ink-60); }
.rota .turn { color: var(--orava); font-variant-numeric: tabular-nums; }

/* ── steps ────────────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); gap: 2px; margin-top: 42px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.step { background: var(--paper); padding: 28px 24px 32px; display: grid; gap: 10px; align-content: start; }
.step-n { font-variant-numeric: tabular-nums; color: var(--orava); font-size: 28px; font-weight: 500; letter-spacing: -0.03em; }
.step p { font-size: 15px; color: var(--ink-60); }

/* ── huuto ────────────────────────────────────────────────────────────── */
.huuto { background: var(--metsa); color: var(--paper); text-align: center; }
.huuto-lines { font-size: clamp(30px, 5.4vw, 72px); font-weight: 500; letter-spacing: -0.042em; line-height: 1.02; }
.huuto-lines span { display: block; }
.huuto-lines span:nth-child(2) { color: var(--sun); }
.huuto-lines span:nth-child(3) { color: #E8A985; }

/* ── contacts / links ─────────────────────────────────────────────────── */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(252px, 1fr)); gap: 2px; margin-top: 38px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.person { background: var(--paper); padding: 24px; display: grid; gap: 3px; align-content: start; }
.person .eyebrow { margin-bottom: 6px; }
.person a { color: var(--blue); text-decoration: none; font-size: 15px; word-break: break-all; }
.person a:hover { text-decoration: underline; }

.links { display: grid; gap: 2px; margin-top: 38px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lnk { background: var(--paper); padding: 22px 24px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 24px; align-items: center; text-decoration: none; transition: background .2s; }
.lnk:hover { background: var(--orava-lt); }
.lnk p { font-size: 14.5px; color: var(--ink-60); grid-column: 1; }
.lnk .go { grid-row: 1 / 3; grid-column: 2; font-size: 22px; color: var(--ink-30); }
.lnk:hover .go { color: var(--orava); }

/* ── footer ───────────────────────────────────────────────────────────── */
footer { background: var(--paper-2); padding-block: clamp(46px, 6vw, 76px) 32px; }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 34px; }
.foot-grid h4 { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-60); font-weight: 500; margin-bottom: 12px; }
.foot-grid li { padding: 4px 0; font-size: 15px; }
.foot-grid a { text-decoration: none; }
.foot-grid a:hover { text-decoration: underline; }
.colophon { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 12px 30px; font-size: 12.5px; color: var(--ink-60); }
.colophon a { color: var(--ink-60); }
.colophon .wide { flex-basis: 100%; line-height: 1.65; }

/* ── lightbox ─────────────────────────────────────────────────────────── */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(16,14,12,.94); display: grid; place-items: center; padding: clamp(16px, 4vw, 56px); }
.lb[hidden] { display: none; }
.lb-fig { max-width: min(1400px, 92vw); max-height: 88svh; display: grid; gap: 14px; }
.lb-fig img { max-width: 100%; max-height: 78svh; width: auto; height: auto; object-fit: contain; border-radius: 6px; margin-inline: auto; }
.lb figcaption { color: rgba(245,241,232,.72); font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; text-align: center; }
.lb figcaption a { color: rgba(245,241,232,.5); }
.lb button { position: absolute; color: #F5F1E8; opacity: .6; transition: opacity .2s; line-height: 1; }
.lb button:hover { opacity: 1; }
.lb-close { top: 18px; right: 22px; font-size: 34px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); font-size: 52px; padding: 10px 18px; }
.lb-prev { left: 6px; } .lb-next { right: 6px; }

/* ── credits disclosure ───────────────────────────────────────────────── */
.creds { flex-basis: 100%; font-size: 12.5px; color: var(--ink-60); }
.creds summary { cursor: pointer; list-style: none; display: inline-flex; gap: 8px; align-items: center; }
.creds summary::-webkit-details-marker { display: none; }
.creds summary::before { content: '+'; font-size: 15px; line-height: 1; }
.creds[open] summary::before { content: '–'; }
.creds summary:hover { color: var(--ink); }
.creds ul { margin-top: 12px; columns: 2; column-gap: 40px; }
.creds li { break-inside: avoid; padding: 2px 0; line-height: 1.45; }
@media (max-width: 760px) { .creds ul { columns: 1; } }


/* ── borrowed marks ───────────────────────────────────────────────────────
   The troop crest sits in the nav lockup and the Suomen Partiolaiset
   wordmark once in the footer — the way every lippukunta site places them,
   hesi.fi included. The crest is a raster with its own soft modelling, so it
   gets no extra shadow; the SP mark is pure paths and takes `color`. */
.crest { display: block; flex: none; line-height: 0; }
.crest img { height: 34px; width: auto; display: block; }
.nav:not(.solid) .crest img { filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }

.kattojarjesto { display: grid; gap: 12px; align-content: start; }
.sp-mark { display: block; color: var(--blue); width: 148px; max-width: 100%; }
.sp-mark svg { width: 100%; height: auto; display: block; transition: color .2s; }
.sp-mark:hover { color: var(--orava); }

/* ── reveal ───────────────────────────────────────────────────────────── */
.rv { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.3,1); }
.rv.in { opacity: 1; transform: none; }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: grid; position: fixed; inset: 56px 0 auto 0; gap: 0;
    background: var(--paper); color: var(--ink); padding: 8px var(--pad) 22px;
    box-shadow: 0 20px 40px rgba(0,0,0,.1);
  }
  .nav-links.open a { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 17px; opacity: 1; }
  .burger { display: grid; gap: 5px; margin-left: auto; padding: 8px; }
  .burger i { display: block; width: 22px; height: 1.5px; background: currentColor; }
  .nav .pill { display: none; }
  .next-in { grid-template-columns: 1fr; }
  .n-body { grid-template-columns: 1fr; }
  .n-body > :first-child { grid-column: 1; }
  .nine summary { grid-template-columns: 2.4rem 1fr auto; }
  .split.flip > figure { order: 0; }
}
