/* Kotipysäkki website. One stylesheet for index.html and privacy.html.
   No fonts, images or scripts are loaded from anywhere else. */

:root {
  --bg: #ffffff;
  --text: #111412;
  --muted: #66706a;
  --line: #e4e7e5;
  --surface: #f5f6f5;     /* grouped-card grey, like the lists in the app */
  --track: #e6e9e7;       /* the grey bar track */
  --amber: #e8a317;
  --green: #0b7a4f;       /* tram green, same as the line badges in the app */
  --ink: #0b3d2b;         /* deep green for headings */
  --mint: #e9f4ee;        /* soft panel behind the hero */
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --link: #0b7a4f;
  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;   /* 17px */
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0.75rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.brand img { border-radius: 8px; display: block; }

.site-header nav { display: flex; gap: 0.25rem; }
.site-header nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.site-header nav a:hover { color: var(--text); }

/* ---------- Language: Finnish by default, English when the address ends in #en ---------- */

#en { display: none; }
body:has(#en:target) #fi { display: none; }
body:has(#en:target) #en { display: block; }

/* ---------- Page body ---------- */

main {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

h1, h2, h3 { line-height: 1.1; margin: 0; }
h2 { font-size: 1.4rem; margin: 2.4rem 0 0.8rem; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; margin: 1.3rem 0 0.25rem; line-height: 1.3; }

p, ul, ol { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.45rem; }
strong { font-weight: 700; }

/* ---------- Home page: hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.75rem 3rem;
  align-items: center;
  margin-top: 0.5rem;
  padding: 2rem 1.25rem 1.5rem;
  border-radius: 28px;
  background: var(--mint);
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-size: clamp(2.7rem, 9vw, 4.9rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.02;
  color: var(--ink);
}
.hero h1 em {
  display: block;
  width: fit-content;
  font-size: 1.18em;
  font-style: italic;
  color: var(--green);
  background: linear-gradient(var(--amber), var(--amber)) 0 90% / 100% 0.11em no-repeat;
}

.hero .tagline { margin: 0 0 1.5rem; max-width: 26rem; font-size: 1.15rem; color: #2e5243; }

/* The route line: stops, rail, a tram under the overhead wire. */
.hero .line { grid-column: 1 / -1; display: block; width: 100%; height: auto; margin-top: 0.5rem; }

/* App Store badge. Quiet grey while the app is not released yet. */
.get { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0; }
.badge {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: default;
}
a.badge { background: var(--text); color: #fff; cursor: pointer; }
.device { font-size: 0.9rem; color: var(--muted); }

.hero-fig { margin: 0; }
.hero-fig img {
  display: block;
  width: 100%;
  border-radius: 6.6% / 14.2%;
  box-shadow: 0 14px 40px rgba(11, 61, 43, 0.2);
}
.hero-fig figcaption { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }

/* ---------- Features, drawn like departure rows ---------- */

.features {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
}

.board {
  list-style: none;
  margin: 0;
  padding: 0.25rem 1.25rem;
  border-radius: 20px;
  background: var(--surface);
}
.board li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) 4.5rem;
  gap: 0.9rem;
  align-items: center;
  margin: 0;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}
.board li:first-child { border-top: 0; }

.num {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  line-height: 1;
}

.what { display: block; font-size: 0.95rem; line-height: 1.35; color: var(--muted); }
.what strong { display: block; margin-bottom: 0.15rem; font-size: 1.05rem; color: var(--text); }

.mini {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: var(--track);
  overflow: hidden;
}
.mini i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--green) 75%);
}
.b1 i { width: 90%; }
.b2 i { width: 68%; }
.b3 i { width: 45%; }
.b4 i { width: 22%; }

.features .app {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 10px 30px rgba(17, 20, 18, 0.06);
}

/* ---------- Promise and small print ---------- */

h2.promise {
  margin: 4rem 0 2.5rem;
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--ink);
}
h2.promise span { display: block; }

.small-print {
  max-width: 36rem;
  font-size: 0.9rem;
  color: var(--muted);
  scroll-margin-top: 1rem;
}
.small-print p { margin: 0 0 0.6rem; }
.small-print a { font-weight: 600; }

/* ---------- Privacy page (long text) ---------- */

.doc main { max-width: 42rem; }
#fi > h1:first-child, #en > h1:first-child {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 1.5rem 0 0.75rem;
}
.doc h2 { font-size: 1.25rem; margin: 2rem 0 0.6rem; }

/* ---------- Footer ---------- */

.site-footer {
  max-width: 60rem;
  margin: 1rem auto 0;
  padding: 1.25rem 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.site-footer a { display: inline-block; padding: 0.4rem 0; }

/* ---------- Larger screens ---------- */

@media (min-width: 48rem) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 3.25rem 3rem 2rem; }
  .features { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3rem; }
}

/* No animation anywhere. This rule only makes that explicit. */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
