@import url("fonts/fonts.css");

/* ==========================================================================
   Auto Vode Oy. Tokenit
   ========================================================================== */
:root {
  --paper: #f4f4f2;
  --white: #ffffff;
  --ink: #0e0f11;
  --ink-2: #17181b;
  --text: #141518;
  --muted: #5e6166;
  --fg: #f3f3f1;
  --fg-muted: #a5a8ad;
  --red: #d10019;
  --red-deep: #a80014;
  --line: rgba(14, 15, 17, 0.12);
  --line-soft: rgba(14, 15, 17, 0.07);
  --line-dark: rgba(243, 243, 241, 0.16);

  --display: "Bricolage Grotesque", "Schibsted Grotesk", system-ui, sans-serif;
  --body: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;

  --shadow-card: 0 1px 2px rgba(14, 15, 17, 0.05), 0 10px 26px -12px rgba(14, 15, 17, 0.22);
  --shadow-lift: 0 2px 6px rgba(14, 15, 17, 0.07), 0 22px 44px -18px rgba(14, 15, 17, 0.3);
  --shadow-slab: 0 2px 4px rgba(14, 15, 17, 0.06), 0 28px 60px -26px rgba(14, 15, 17, 0.42);

  --r-card: 14px;
  --r-slab: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --gut: clamp(1.15rem, 4vw, 3.25rem);
  --wrap: 1280px;
  --sec: clamp(4.5rem, 9vw, 8.5rem);
}

/* ==========================================================================
   Perusta
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-variation-settings: "opsz" 96;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.0;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--red); color: #fff; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--red);
  color: #fff;
  padding: 0.75rem 1.15rem;
  font-weight: 700;
  border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap;
}

.mono {
  font-family: var(--mono);
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   Ikonit
   ========================================================================== */
.i {
  width: 1em; height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.i-fill { fill: currentColor; stroke: none; }

/* ==========================================================================
   Napit
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  flex: none;
  cursor: pointer;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
    border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-solid { background: var(--red); color: #fff; }
.btn-solid:hover { background: var(--red-deep); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--text); }

.btn-ghost.on-dark {
  color: var(--fg);
  border-color: rgba(243, 243, 241, 0.4);
}
.btn-ghost.on-dark:hover { border-color: var(--fg); background: rgba(243, 243, 241, 0.08); }

.btn .i { width: 1.05em; height: 1.05em; }
.btn:hover .i-arrow { transform: translateX(3px); }
.i-arrow { transition: transform 0.25s var(--ease); }

.textlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.textlink:hover { color: var(--red); border-color: var(--red); }
.textlink.on-dark { color: var(--fg); border-color: var(--line-dark); }
.textlink.on-dark:hover { color: #fff; border-color: #fff; }

/* ==========================================================================
   Header
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--white);
  border-bottom: 1px solid var(--line-soft);
}

.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.01em;
  color: var(--muted);
}
.topbar-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.5rem;
  min-height: 34px;
  padding-block: 0.35rem;
}
.topbar a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  transition: color 0.2s var(--ease);
}
.topbar a:hover { color: var(--red); }
.topbar .sep { margin-left: auto; }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 74px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { width: 172px; height: auto; }

.nav { display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1.9rem); }
.nav a {
  position: relative;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  padding: 0.4rem 0;
  color: var(--text);
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease);
}
.nav a:hover { color: var(--red); }
.nav a:hover::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--red); font-weight: 700; }
.nav a[aria-current="page"]::after { transform: scaleX(1); }


.burger {
  display: none;
  align-items: center;
  gap: 0.55em;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 0.95rem;
  font: 700 0.9rem/1 var(--body);
  color: var(--text);
  cursor: pointer;
}
.burger .i { width: 1.15em; height: 1.15em; }

.mobnav {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: var(--white);
  padding-block: 0.5rem 1.4rem;
}
.mobnav.open { display: block; }
.mobnav a {
  display: block;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.mobnav a[aria-current="page"] { color: var(--red); }
.mobnav .btn { margin-top: 1.15rem; width: 100%; justify-content: center; }

@media (max-width: 940px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .topbar .hide-sm { display: none; }
  .brand img { width: 148px; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--ink);
  color: var(--fg);
  overflow: hidden;
  min-height: clamp(500px, 78vh, 760px);
  display: flex;
  align-items: flex-end;
  padding-block: clamp(5rem, 12vw, 8rem) clamp(6.5rem, 11vw, 9rem);
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
  transform: scale(1.08);
  animation: heroDrift 14s var(--ease) forwards;
}
@keyframes heroDrift { to { transform: scale(1); } }

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, rgba(14, 15, 17, 0.95) 0%, rgba(14, 15, 17, 0.86) 32%, rgba(14, 15, 17, 0.55) 62%, rgba(14, 15, 17, 0.3) 82%, rgba(14, 15, 17, 0.45) 100%);
}

.hero h1 {
  font-size: clamp(2.6rem, 7.4vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 700;
  max-width: 16ch;
}
.hero h1 .l2 { display: block; color: var(--fg-muted); font-weight: 600; }
.hero p {
  margin-top: 1.35rem;
  max-width: 46ch;
  color: #e2e3e1;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
}
.hero-cta {
  margin-top: 2.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.js .step { opacity: 0; transform: translateY(18px); animation: stepIn 0.85s var(--ease) forwards; }
.step-1 { animation-delay: 0.06s; }
.step-2 { animation-delay: 0.16s; }
.step-3 { animation-delay: 0.26s; }
.step-4 { animation-delay: 0.36s; }
@keyframes stepIn { to { opacity: 1; transform: none; } }

/* ==========================================================================
   Hakuslabi
   ========================================================================== */
.searchwrap { position: relative; z-index: 5; }
.searchwrap .wrap { margin-top: clamp(-4.5rem, -6vw, -3rem); }

.search {
  background: var(--white);
  border-radius: var(--r-slab);
  box-shadow: var(--shadow-slab);
  padding: clamp(1.35rem, 2.4vw, 1.9rem);
}
.search-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.search-head h2 { font-size: 1.4rem; letter-spacing: -0.02em; }
.search-head .hint {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}
.search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 0.85rem;
  align-items: end;
}
@media (max-width: 900px) {
  .search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-grid .btn { grid-column: 1 / -1; justify-content: center; }
}

.field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.field > label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.field select,
.field input,
.field textarea {
  width: 100%;
  font: 500 0.98rem/1.2 var(--body);
  color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.82rem 0.9rem;
  appearance: none;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235E6166' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 15px;
  padding-right: 2.3rem;
}
.field select:hover,
.field input:hover,
.field textarea:hover { border-color: rgba(14, 15, 17, 0.24); }
.field select:focus-visible,
.field input:focus-visible,
.field textarea:focus-visible { background: var(--white); }
.field input::placeholder { color: var(--muted); }

/* ==========================================================================
   Osiot
   ========================================================================== */
.sec { padding-block: var(--sec); }
.sec-tight { padding-block: clamp(3rem, 6vw, 5rem); }

.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.9rem, 3.5vw, 2.9rem);
}
.sec-head h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  letter-spacing: -0.028em;
}
.sec-head .count {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
}

/* ==========================================================================
   Autokortti
   ========================================================================== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: clamp(1rem, 1.8vw, 1.6rem);
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ececeb;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.card:hover .card-media img { transform: scale(1.04); }

.tag {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.55rem;
  border-radius: 5px;
}

.card-body {
  padding: 1.05rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.card-title {
  font-family: var(--display);
  font-variation-settings: "opsz" 24;
  font-weight: 600;
  font-size: 1.22rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.card-variant {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-spec {
  margin-top: 0.55rem;
  word-spacing: -0.12em;
  font-family: var(--mono);
  font-size: 0.755rem;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.card-foot {
  margin-top: auto;
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-top: 1px solid var(--line-soft);
}
.card-price {
  font-family: var(--mono);
  word-spacing: -0.3em;
  font-weight: 500;
  font-size: 1.18rem;
  color: var(--red);
  letter-spacing: -0.02em;
}
.card-more {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
}
.card:hover .card-more { color: var(--text); }
.card:hover .card-more .i-arrow { transform: translateX(3px); }

/* Etusivun epasymmetrinen ruudukko */
.grid-feature {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.6rem);
}
.grid-feature > * { grid-column: span 3; }
.grid-feature > .is-lead { grid-column: span 7; }
.grid-feature > .is-second { grid-column: span 5; }
.grid-feature > .is-lead .card-media { aspect-ratio: 16 / 9; }
.grid-feature > .is-lead .card-title { font-size: clamp(1.5rem, 2.4vw, 2.05rem); }
.grid-feature > .is-lead .card-price { font-size: 1.45rem; }
.grid-feature > .is-lead .card-body,
.grid-feature > .is-second .card-body { padding: 1.35rem 1.5rem 1.5rem; }
.grid-feature > .is-second .card-title { font-size: 1.45rem; }

@media (max-width: 1080px) {
  .grid-feature > * { grid-column: span 6; }
  .grid-feature > .is-lead,
  .grid-feature > .is-second { grid-column: span 12; }
}
@media (max-width: 620px) {
  .grid-feature > * { grid-column: span 12; }
  .cards { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Tumma kaista: uudet autot
   ========================================================================== */
.band {
  background: var(--ink);
  color: var(--fg);
}
.band h2 { color: var(--fg); }
.band p { color: var(--fg-muted); }

.band-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: end;
  margin-bottom: clamp(2.2rem, 4vw, 3.4rem);
}
@media (max-width: 860px) { .band-top { grid-template-columns: 1fr; } }
.band-top h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
.band-top p { max-width: 52ch; }

.logos {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(0.7rem, 1.4vw, 1.1rem);
}
@media (max-width: 860px) { .logos { grid-template-columns: repeat(2, 1fr); } }

.logo-card {
  background: var(--white);
  border-radius: 12px;
  min-height: 116px;
  display: grid;
  place-items: center;
  padding: 1.4rem 1.1rem;
  text-decoration: none;
  transition: transform 0.35s var(--ease);
}
.logo-card:hover { transform: translateY(-4px); }
.logo-card img {
  max-height: 46px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.7;
  transition: filter 0.35s var(--ease), opacity 0.35s var(--ease);
}
.logo-card:hover img { filter: none; opacity: 1; }

/* Merkkikortti uudet-autot-sivulla */
.brandcards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.5rem);
}
@media (max-width: 1080px) { .brandcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .brandcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.brandcard {
  background: var(--white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: clamp(1.6rem, 2.6vw, 2.2rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-decoration: none;
  color: inherit;
  min-height: 230px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.brandcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.brandcard-logo {
  height: 58px;
  max-width: 100%;
  display: flex;
  align-items: center;
}
.brandcard-logo img {
  max-height: 58px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
  transition: filter 0.35s var(--ease), opacity 0.35s var(--ease);
}
.brandcard:hover .brandcard-logo img { filter: none; opacity: 1; }
.brandcard-name {
  margin-top: auto;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}
.brandcard .card-more { color: var(--red); }

/* ==========================================================================
   Yritys, aukiolot, kartta
   ========================================================================== */
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 940px) { .about { grid-template-columns: 1fr; } }
.about h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  margin-bottom: 1.5rem;
}
.about-copy p { max-width: 68ch; color: #26282c; }

.panel {
  background: var(--white);
  border-radius: var(--r-slab);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 2.6vw, 2rem);
}
.panel h3 {
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.panel + .panel { margin-top: 1rem; }

.hours { list-style: none; margin: 0; padding: 0; }
.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.86rem;
}
.hours li:last-child { border-bottom: 0; }
.hours li.now { color: var(--text); font-weight: 500; }
.hours .d { color: var(--muted); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.9rem;
}
.status .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #9a9da2;
  flex: none;
}
.status.is-open .dot { background: #17913f; }
.status.is-open { color: #14762f; }

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.7rem; }
.contact-list a,
.contact-list span {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--text);
  transition: color 0.2s var(--ease);
}
.contact-list a:hover { color: var(--red); }
.contact-list .i { color: var(--red); width: 1.05em; height: 1.05em; }

.map {
  position: relative;
  border-radius: var(--r-slab);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #e6e6e4;
  width: 100%;
  aspect-ratio: 21 / 8;
}
@media (max-width: 860px) { .map { aspect-ratio: 4 / 3; } }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ==========================================================================
   Myyjat
   ========================================================================== */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}
.person {
  background: var(--white);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
}
.person h3 {
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.9rem;
}
.person .contact-list a { font-size: 0.92rem; }

/* ==========================================================================
   Sivun otsikkopalkki (alasivut)
   ========================================================================== */
.pagehead {
  padding-block: clamp(2.6rem, 5vw, 4.2rem) clamp(1.6rem, 3vw, 2.4rem);
  border-bottom: 1px solid var(--line-soft);
}
.pagehead h1 {
  font-size: clamp(2.2rem, 5.4vw, 4rem);
  letter-spacing: -0.032em;
  font-weight: 700;
}
.pagehead p {
  margin-top: 0.9rem;
  color: var(--muted);
  max-width: 58ch;
}

.crumbs {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45em;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--red); }

/* ==========================================================================
   Suodattimet (vaihtoautot)
   ========================================================================== */
.filters {
  position: sticky;
  top: 74px;
  z-index: 40;
  background: rgba(244, 244, 242, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  padding-block: 1rem;
}
@media (max-width: 940px) { .filters { position: static; } }

.filter-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
}
@media (max-width: 1080px) { .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.filter-grid .field select { background: var(--white); padding-block: 0.7rem; font-size: 0.92rem; }

.resultbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}
.resultbar .count {
  font-family: var(--mono);
  font-size: 0.84rem;
  color: var(--muted);
}
.resultbar .count b { color: var(--text); font-weight: 500; }

.sortrow { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.sortrow label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.sortrow select {
  font: 500 0.9rem/1.2 var(--body);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.55rem 2.1rem 0.55rem 0.9rem;
  appearance: none;
  color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235E6166' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 14px;
}
.dirbtn {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.dirbtn:hover { border-color: var(--text); }
.dirbtn .i { width: 1.05em; height: 1.05em; transition: transform 0.3s var(--ease); }
.dirbtn[data-dir="desc"] .i { transform: rotate(180deg); }
.dirbtn[aria-pressed] { }

.reset {
  background: none;
  border: 0;
  padding: 0;
  font: 700 0.86rem/1 var(--body);
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reset:hover { color: var(--red); }

.empty {
  padding: clamp(3rem, 8vw, 6rem) 1rem;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--r-slab);
}
.empty p {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 1.3rem;
}

/* ==========================================================================
   Autosivu
   ========================================================================== */
.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 3.4vw, 3.2rem);
  align-items: start;
}
@media (max-width: 980px) { .detail { grid-template-columns: 1fr; } }

.gal-main {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #ececeb;
  border-radius: var(--r-slab);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.gal-main img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.gal-nav {
  position: absolute;
  bottom: 0.9rem; right: 0.9rem;
  display: flex;
  gap: 0.45rem;
}
.gal-nav button {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(14, 15, 17, 0.18);
  transition: background-color 0.2s var(--ease);
}
.gal-nav button:hover { background: #fff; }
.gal-nav .i { width: 1.15em; height: 1.15em; }
.gal-nav .prev .i { transform: rotate(180deg); }
.gal-count {
  position: absolute;
  bottom: 1.35rem; left: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #fff;
  background: rgba(14, 15, 17, 0.6);
  padding: 0.25rem 0.55rem;
  border-radius: 5px;
}

.thumbs {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (max-width: 620px) { .thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.thumb {
  padding: 0;
  border: 0;
  background: #ececeb;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  position: relative;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.62; transition: opacity 0.3s var(--ease); }
.thumb:hover img { opacity: 0.9; }
.thumb[aria-current="true"] img { opacity: 1; }
.thumb[aria-current="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--red);
  border-radius: 8px;
}

.buy { position: sticky; top: 110px; }
@media (max-width: 980px) { .buy { position: static; } }
.buy h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  letter-spacing: -0.03em;
  font-weight: 700;
}
.buy .variant {
  margin-top: 0.7rem;
  color: var(--muted);
  font-size: 1.02rem;
}
.buy .price {
  font-family: var(--mono);
  word-spacing: -0.36em;
  font-weight: 500;
  font-size: clamp(2.1rem, 4.4vw, 3rem);
  color: var(--red);
  letter-spacing: -0.035em;
  margin-top: 1.1rem;
  line-height: 1;
}
.keyspecs {
  margin: 1.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.keyspecs div {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.keyspecs dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.keyspecs dd {
  margin: 0.25rem 0 0;
  font-family: var(--mono);
  font-size: 0.98rem;
  font-weight: 500;
}

.specs {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 4vw, 4rem);
}
@media (max-width: 720px) { .specs { grid-template-columns: 1fr; } }
.specs .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.specs dt { color: var(--muted); font-size: 0.93rem; }
.specs dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: right;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.chip {
  background: var(--white);
  border-radius: 999px;
  padding: 0.5rem 0.95rem;
  font-size: 0.87rem;
  color: #2a2c30;
  box-shadow: 0 1px 2px rgba(14, 15, 17, 0.05);
}
.chip.hidden { display: none; }

.formcard {
  background: var(--white);
  border-radius: var(--r-slab);
  box-shadow: var(--shadow-card);
  padding: clamp(1.5rem, 2.8vw, 2.1rem);
}
.formcard h2, .formcard h3 { font-size: 1.4rem; letter-spacing: -0.02em; margin-bottom: 1.1rem; }
.form-grid { display: grid; gap: 0.9rem; }
.form-grid .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem; }
@media (max-width: 560px) { .form-grid .two { grid-template-columns: 1fr; } }
.form-grid .btn { justify-content: center; margin-top: 0.35rem; }
.formnote {
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
}
.thanks {
  display: none;
  align-items: flex-start;
  gap: 0.7rem;
  background: rgba(23, 145, 63, 0.08);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
  color: #14622a;
}
.thanks.show { display: flex; }
.thanks .i { color: #17913f; margin-top: 0.2em; }

/* ==========================================================================
   Muut kohteet
   ========================================================================== */
.linkcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.6rem); }
@media (max-width: 800px) { .linkcards { grid-template-columns: 1fr; } }
.linkcard {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(2rem, 6vw, 4rem);
  min-height: clamp(230px, 25vw, 330px);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border-radius: var(--r-slab);
  background: var(--ink);
  color: var(--fg);
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.45s var(--ease);
}
.linkcard:nth-child(2) { background: var(--white); color: var(--text); box-shadow: var(--shadow-card); }
.linkcard:hover { transform: translateY(-5px); }
.linkcard h2 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  letter-spacing: -0.032em;
  font-weight: 700;
}
.linkcard .go {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 700;
  font-size: 1.02rem;
}
.linkcard:hover .i-arrow { transform: translateX(5px); }
.linkcard .rule {
  display: block;
  height: 1px;
  background: var(--line-dark);
  margin-bottom: 1.1rem;
}
.linkcard:nth-child(2) .rule { background: var(--line); }

/* ==========================================================================
   Sisaltosivu (rekisteriseloste)
   ========================================================================== */
.prose { max-width: 72ch; }
.prose h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  letter-spacing: -0.02em;
  margin: 2.6rem 0 0.9rem;
}
.prose h2:first-child { margin-top: 0; }
.prose p { color: #26282c; }
.prose ul { padding-left: 1.15rem; margin: 0 0 1.05em; color: #26282c; }
.prose li { margin-bottom: 0.3rem; }
.prose address {
  font-style: normal;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.75;
}

/* ==========================================================================
   Kuvat sisallossa
   ========================================================================== */
.figure {
  border-radius: var(--r-slab);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #ececeb;
}
.figure img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: var(--ink);
  color: var(--fg-muted);
  padding-block: clamp(3rem, 6vw, 4.75rem) 2rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.8rem, 4vw, 3rem);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

.footer h3 {
  color: var(--fg);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.footer a {
  text-decoration: none;
  font-size: 0.93rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  transition: color 0.2s var(--ease);
}
.footer a:hover { color: var(--fg); }
.footer .i { width: 1em; height: 1em; }
.footer-brand img {
  width: 178px;
  height: auto;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.footer-brand p {
  margin-top: 1.15rem;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.75;
  max-width: 26ch;
}
.footer-bottom {
  margin-top: clamp(2.4rem, 5vw, 3.5rem);
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.footer-bottom .sep { margin-left: auto; }

/* ==========================================================================
   Reveal
   ========================================================================== */
.js .rev { opacity: 0; transform: translateY(22px); }
.js .rev.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--d, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  .rev, .step { opacity: 1 !important; transform: none !important; }
  .hero-media img { transform: none; }
}
