/* Varastohaku – tyylit */
:root {
  --blue: #1f4e8c;
  --blue-dark: #163a69;
  --blue-soft: #e8eff8;
  --orange: #f2a33a;
  --fg: #1d2330;
  --muted: #5d6675;
  --line: #e2e6ec;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.55;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { line-height: 1.25; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); font-size: .9rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Ylätunniste */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--fg); font-size: 1.3rem; letter-spacing: -.01em; }
.logo b { color: var(--blue); }
.logo-small { font-size: 1.05rem; }
.main-nav { display: flex; gap: 1.25rem; }
.main-nav a { text-decoration: none; color: var(--fg); font-weight: 500; }
.main-nav a:hover { color: var(--blue); }

/* Etusivun hero ja haku */
.hero { background: linear-gradient(160deg, var(--blue) 0%, var(--blue-dark) 100%); color: #fff; padding: 2.75rem 0 3rem; }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .5rem; }
.hero p { margin: 0 0 1.5rem; max-width: 40rem; opacity: .92; font-size: 1.05rem; }
.hero .stats { font-weight: 600; opacity: 1; margin-top: 1.25rem; font-size: .95rem; }
.search { display: flex; gap: .5rem; flex-wrap: wrap; max-width: 44rem; }
.search input { flex: 1 1 16rem; font: inherit; padding: .8rem 1rem; border-radius: var(--radius); border: 0; }
.btn { font: inherit; font-weight: 600; border: 0; border-radius: var(--radius); padding: .8rem 1.2rem; cursor: pointer; text-decoration: none; display: inline-block; }
.btn-primary { background: var(--orange); color: #1d2330; }
.btn-primary:hover { background: #e8942a; color: #1d2330; }
.btn-ghost { background: rgba(255, 255, 255, .14); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .24); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); color: #fff; }

#hakutulokset { margin-top: 1.5rem; }
#hakutulokset h2 { font-size: 1.15rem; margin: 0 0 .75rem; }
.result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); }
.result-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem .9rem; }
.result-list a { text-decoration: none; display: flex; flex-direction: column; }
.result-list a span { color: var(--muted); font-size: .9rem; }
.dist { font-weight: 600; white-space: nowrap; color: var(--blue); }

/* Osiot */
section { margin: 2.5rem 0; }
section > h2 { font-size: 1.5rem; margin: 0 0 1rem; }
.lead { font-size: 1.05rem; max-width: 46rem; }

/* Kartta */
.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-soft); }
.map-small { height: 300px; }
.pin span { display: block; width: 22px; height: 22px; border-radius: 50% 50% 50% 0; background: var(--blue); border: 3px solid #fff; transform: rotate(-45deg); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.leaflet-popup-content { font: inherit; font-size: .95rem; }

/* Kaupunki- ja toimijaruudukko */
.grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr)); padding: 0; margin: 0; list-style: none; }
.grid a { display: flex; flex-direction: column; gap: .1rem; height: 100%; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--fg); background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.grid a:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.grid strong { font-weight: 600; overflow-wrap: anywhere; }
.grid span { color: var(--muted); font-size: .85rem; }

/* Kohdekortit */
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); padding: 0; list-style: none; margin: 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: var(--bg); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: .35rem; }
.card h3 { margin: 0; font-size: 1.1rem; }
.card h3 a { text-decoration: none; }
.card .brand { font-size: .85rem; color: var(--muted); }
.card .addr { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .25rem 0 0; padding: 0; list-style: none; }
.tags li { background: var(--blue-soft); color: var(--blue-dark); font-size: .8rem; padding: .15rem .55rem; border-radius: 999px; }
.tags li.size { background: #fdf1df; color: #7a4a0c; font-weight: 600; }

/* Murupolku ja otsikot */
.crumbs { font-size: .9rem; color: var(--muted); margin: 1.25rem 0 0; }
.crumbs a { color: var(--muted); }
.page-head { margin: .75rem 0 1.5rem; }
.page-head h1 { margin: 0 0 .4rem; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.page-head p { margin: 0; color: var(--muted); max-width: 46rem; }

/* Kohdesivu */
.detail { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); align-items: start; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0 0 1.25rem; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; }
.source { margin-top: 1rem; }
.nearby { list-style: none; padding: 0; margin: 0; }
.nearby li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.nearby li:last-child { border-bottom: 0; }

/* Oppaat */
.article { max-width: 46rem; }
.article h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); margin: .75rem 0 1rem; }
.article h2 { font-size: 1.4rem; margin: 2.25rem 0 .6rem; }
.article h3 { font-size: 1.1rem; margin: 1.5rem 0 .4rem; }
.article p, .article li { font-size: 1.03rem; }
.article li { margin-bottom: .35rem; }
.ingressi { font-size: 1.15rem !important; color: #3b4352; }
.checklist { padding-left: 1.4rem; }
.checklist li { margin-bottom: .7rem; }
.size-table { display: grid; gap: .75rem; margin: 1rem 0; }
.size-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; align-items: start; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.size-row h3 { margin: 0 0 .25rem; }
.size-row ul { margin: 0; padding-left: 1.1rem; }
.size-badge { background: #fdf1df; color: #7a4a0c; font-weight: 700; border-radius: var(--radius); padding: .6rem .5rem; text-align: center; }
.cta { margin: 2.5rem 0 0; background: var(--blue-soft); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.cta h2 { margin: 0 0 .25rem; font-size: 1.25rem; }
.cta-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: .75rem 0 0; }
.guide-grid { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }

/* Alatunniste */
.site-footer { margin-top: 4rem; background: var(--bg-soft); border-top: 1px solid var(--line); padding: 2rem 0; font-size: .9rem; color: var(--muted); }
.footer-inner { display: grid; gap: 2rem; grid-template-columns: 1fr 1fr 1fr; }
.footer-inner p { margin: .5rem 0 0; }
.footer-links { list-style: none; padding: 0; margin: .5rem 0 0; }
.footer-links li { margin-bottom: .3rem; }
.footer-links a { color: var(--muted); }

/* Mobiili */
@media (max-width: 760px) {
  .main-nav { gap: .9rem; font-size: .95rem; }
  .main-nav a:nth-child(-n+2) { display: none; }
  .size-row { grid-template-columns: 1fr; gap: .5rem; }
  .size-badge { justify-self: start; padding: .3rem .75rem; }
  .hero { padding: 2rem 0 2.25rem; }
  .map { height: 360px; }
  .detail { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1rem; }
}
