/* Awuu — awuu.app.
   Paletti on apin oma (src/theme.js): hiekka, kerma, brändioranssi, metsä.
   Muu ilme on rakennettu tuotteen omasta maailmasta: kartta, reitti, etäisyys.
   Display = Bricolage Grotesque, leipäteksti = Plus Jakarta Sans (apin fontti),
   apuväri/data = Space Mono (karttamerkinnät). */

/* Itse isännöidyt fontit (Google Fontsin latin-osajoukot, muuttuvat leikkaukset). */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/BricolageGrotesque-latin.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: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("/fonts/PlusJakartaSans-latin.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: "Space Mono"; font-style: normal; font-weight: 700; font-display: swap; src: url("/fonts/SpaceMono-latin.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; }

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

:root {
  --sand: #E6E2D9;
  --cream: #FCFAEE;
  --orange: #FF6801;
  --forest: #0C5446;
  --ink: #241E1A;

  --ink-70: rgba(36, 30, 26, .72);
  --ink-45: rgba(36, 30, 26, .48);
  --ink-12: rgba(36, 30, 26, .12);

  --display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "Space Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gut: clamp(20px, 5vw, 56px);
  --max: 1060px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--sand);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--orange); color: var(--cream); }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ─── mittakaava ─────────────────────────────────────────────── */

.shell { max-width: var(--max); margin: 0 auto; padding-inline: var(--gut); }

/* ─── monospace-etiketti: sivuston rakenteellinen perusyksikkö ── */

.tag {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-45);
}

/* ─── ylätunniste ────────────────────────────────────────────── */

.topbar {
  max-width: var(--max);
  margin: 0 auto;
  padding: 22px var(--gut) 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -.02em;
  color: var(--orange);
  text-decoration: none;
}
.topbar nav { display: flex; gap: 22px; flex-wrap: wrap; }
.topbar nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-70);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.topbar nav a:hover { color: var(--ink); border-bottom-color: var(--orange); }

/* ─── hero ───────────────────────────────────────────────────── */

.hero { padding: clamp(48px, 9vw, 96px) 0 0; }

.hero-copy { max-width: 760px; }
.hero .tag { display: block; margin-bottom: 18px; }

h1 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 6.4vw, 66px);
  line-height: 1.0;
  letter-spacing: -.035em;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--orange); }

.hero-sub {
  margin-top: 20px;
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--ink-70);
  max-width: 46ch;
}

/* ─── kartta: sivun signature ────────────────────────────────── */

.map {
  margin-top: clamp(28px, 5vw, 52px);
  background: var(--cream);
  border-radius: 20px;
  padding: clamp(14px, 2.4vw, 26px);
  position: relative;
}
.map svg { display: block; width: 100%; height: auto; }
.map-note {
  position: absolute;
  right: clamp(18px, 2.8vw, 32px);
  bottom: clamp(16px, 2.4vw, 26px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-45);
  text-align: right;
  max-width: 27ch;
  line-height: 1.5;
}

/* reitin piirtyminen */
.route {
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: draw 2.4s cubic-bezier(.65, 0, .35, 1) .25s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

.stop { opacity: 0; animation: pop .5s cubic-bezier(.2, 1.3, .5, 1) forwards; }
.stop-1 { animation-delay: .35s; }
.stop-2 { animation-delay: 1.0s; }
.stop-3 { animation-delay: 1.55s; }
.stop-4 { animation-delay: 2.15s; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.stop-label { font-family: var(--mono); font-size: 16px; font-weight: 700; fill: var(--ink); }
.stop-dist  { font-family: var(--mono); font-size: 15px; fill: var(--ink-45); }

/* ─── kauppatila ─────────────────────────────────────────────── */

.release {
  margin-top: clamp(32px, 5vw, 56px);
  display: flex;
  align-items: center;
  gap: 18px 26px;
  flex-wrap: wrap;
  padding-block: 22px;
  border-top: 1px solid var(--ink-12);
  border-bottom: 1px solid var(--ink-12);
}
.release-status {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange);
  display: flex;
  align-items: center;
  gap: 9px;
}
.release-status::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  animation: blink 2.6s ease-in-out infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.release p { color: var(--ink-70); font-size: 15px; margin: 0; }

/* ─── osiot ──────────────────────────────────────────────────── */

section { padding-block: clamp(52px, 8vw, 96px); }
section > .shell > .tag { display: block; margin-bottom: 12px; }

h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 40px);
  line-height: 1.08;
  letter-spacing: -.025em;
  margin-bottom: 8px;
  text-wrap: balance;
}
.section-lead { color: var(--ink-70); max-width: 52ch; margin-bottom: clamp(28px, 4vw, 44px); }

/* ─── selite: ominaisuudet kartan merkintöinä ────────────────── */

.legend { border-top: 1px solid var(--ink-12); }
.legend-row {
  display: grid;
  grid-template-columns: minmax(0, 16ch) minmax(0, 1fr);
  gap: 6px 40px;
  align-items: start;
  padding-block: 22px;
  border-bottom: 1px solid var(--ink-12);
}
.legend-row h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -.015em;
  line-height: 1.25;
}
.legend-row p { color: var(--ink-70); font-size: 15px; }

/* ─── askeleet: aito järjestys, siksi numeroitu ──────────────── */

.steps { list-style: none; counter-reset: s; max-width: 62ch; }
.steps li {
  counter-increment: s;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 20px;
  padding-bottom: 30px;
  position: relative;
}
.steps li::before {
  content: counter(s, decimal-leading-zero);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--orange);
  padding-top: 3px;
}
/* askeleita yhdistävä viiva jatkaa hero-kartan reittiä */
.steps li::after {
  content: "";
  position: absolute;
  left: 13px; top: 26px; bottom: 4px;
  border-left: 1px dashed var(--ink-12);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps p { color: var(--ink-70); }
.steps strong { color: var(--ink); font-weight: 600; }

/* ─── tumma lohko: yksityisyys ───────────────────────────────── */

.dark {
  background: var(--forest);
  color: var(--cream);
  border-radius: 20px;
  padding: clamp(30px, 5vw, 60px);
}
.dark .tag { color: rgba(252, 250, 238, .55); }
.dark h2 { color: var(--cream); }
.dark p { color: rgba(252, 250, 238, .8); max-width: 58ch; }
.dark p + p { margin-top: 14px; }
.dark a { color: var(--cream); text-decoration-color: rgba(252, 250, 238, .45); text-underline-offset: 3px; }
.dark a:hover { text-decoration-color: var(--cream); }

/* ─── leipätekstisivut (opas, UKK) ───────────────────────────── */

.prose { max-width: 68ch; padding-block: clamp(36px, 6vw, 64px) clamp(56px, 8vw, 96px); }
.prose h1 { font-size: clamp(34px, 5.4vw, 54px); margin-bottom: 14px; }
.prose .lead { font-size: 18px; color: var(--ink-70); margin-bottom: 8px; }
.prose h2 {
  font-size: clamp(21px, 2.6vw, 27px);
  margin-top: clamp(44px, 6vw, 64px);
  padding-top: 20px;
  border-top: 1px solid var(--ink-12);
}
.prose h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -.01em;
  margin: 28px 0 6px;
  color: var(--forest);
}
.prose p { color: var(--ink-70); margin-bottom: 14px; }
.prose ul, .prose ol { color: var(--ink-70); margin: 0 0 16px 20px; }
.prose li { margin-bottom: 8px; padding-left: 4px; }
.prose li::marker { color: var(--ink-45); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--orange); text-underline-offset: 3px; }

/* UKK: kysymys kantaa oman rytminsä */
.q {
  font-family: var(--display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -.01em;
  color: var(--ink);
  margin: 30px 0 6px;
  line-height: 1.35;
}
.prose h2 + .q { margin-top: 20px; }

/* huomiolaatikko */
.note {
  background: var(--cream);
  border-radius: 14px;
  padding: 20px 22px;
  margin: 22px 0;
  border-left: 3px solid var(--forest);
}
.note p:last-child { margin-bottom: 0; }

/* ─── uutiskirjelomake ───────────────────────────────────────── */

/* Sama lomake kolmessa paikassa: etusivun CTA-osiossa (oranssi tausta),
   footerkaistalla (kerma) ja vahvistussivun "linkki vanheni" -tilassa. */
.newsletter-band {
  background: var(--cream);
  border-top: 1px solid var(--ink-12);
  padding: 56px var(--gut);
}
.newsletter-band .nl-inner { max-width: var(--max); margin: 0 auto; display: grid; gap: 12px 48px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: center; }
.newsletter-band h2 { font-family: var(--display); font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; margin: 0 0 8px; color: var(--ink); }
.newsletter-band p.nl-lead { margin: 0; color: var(--ink-70); font-size: 15px; line-height: 1.55; }
@media (max-width: 720px) { .newsletter-band .nl-inner { grid-template-columns: 1fr; } }

form.newsletter { margin: 0; }
.nl-fields { display: grid; gap: 12px; }
.nl-row { display: flex; gap: 10px; flex-wrap: wrap; }
.nl-row input[type="email"] {
  flex: 1 1 220px; min-width: 0;
  font: 500 15px/1.2 var(--body); color: var(--ink);
  background: #fff; border: 1.5px solid var(--ink-12); border-radius: 999px;
  padding: 13px 18px; outline: none;
}
.nl-row input[type="email"]:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 104, 1, .18); }
.nl-row button {
  font: 600 15px/1.2 var(--body); color: var(--cream); background: var(--ink);
  border: 0; border-radius: 999px; padding: 13px 24px; cursor: pointer; white-space: nowrap;
}
.nl-row button:hover { background: #3a322c; }
.nl-row button:disabled { opacity: .6; cursor: progress; }
.nl-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--ink-70); cursor: pointer; }
.nl-consent input { margin: 3px 0 0; accent-color: var(--orange); flex: none; width: 16px; height: 16px; }
.nl-consent a { color: inherit; text-decoration: underline; }
.nl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.nl-msg { margin: 0; font-size: 14px; line-height: 1.5; min-height: 0; }
.nl-msg:empty { display: none; }
.nl-msg--ok { color: var(--forest); font-weight: 600; }
.nl-msg--err { color: #B3260E; }
.nl-turnstile:empty { display: none; }

/* ─── alatunniste ────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--ink-12);
  padding: 34px var(--gut) 48px;
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px 40px;
  flex-wrap: wrap;
}
footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer nav a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-70);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
footer nav a:hover { color: var(--ink); border-bottom-color: var(--orange); }
.colophon { font-family: var(--mono); font-size: 11px; color: var(--ink-45); line-height: 1.7; }

.lang-switch {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--ink-70);
  background: none;
  border: none;
  border-bottom: 1px solid var(--ink-12);
  padding: 0 0 2px;
  cursor: pointer;
}
.lang-switch:hover { color: var(--ink); border-bottom-color: var(--orange); }

[hidden] { display: none !important; }

/* ─── responsiivisuus ────────────────────────────────────────── */

@media (max-width: 720px) {
  .legend-row { grid-template-columns: 1fr; gap: 4px; }
  .map-note { position: static; margin-top: 14px; text-align: left; max-width: none; }
  .topbar { align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route { animation: none; stroke-dashoffset: 0; }
  .stop { animation: none; opacity: 1; }
  .release-status::before { animation: none; }
}
