/* Akaan Ajoneuvopalvelu */
:root {
  --bg: #eceef1;
  /* Renkaan kulutuspinta. Voimakkuus: stroke-opacity, kuvion koko: width/height */
  --bg-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='36'%3E%3Cg fill='none' stroke='%23596070' stroke-opacity='.1' stroke-width='1' stroke-linecap='round'%3E%3Cpath d='M0 6 28 20 56 6'/%3E%3Cpath d='M9 27 17 31M47 27 39 31' stroke-width='1.2'/%3E%3C/g%3E%3C/svg%3E");
  /* Aiempi kuvio (aaltoilevat ajolinjat):
  --bg-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='24'%3E%3Cpath d='M0 12C20 4 60 4 80 12S140 20 160 12' fill='none' stroke='%23b3173f' stroke-opacity='.12' stroke-width='1'/%3E%3C/svg%3E"); */
  --surface: #ffffff;
  --ink: #15161b;
  --muted: #565a64;
  --line: #dde0e5;
  --red: #b3173f;
  --red-dark: #8a1030;
  --red-bright: #e3264f;
  --dark: #0f1014;
  --dark-2: #191b21;
  --dark-line: #2b2e36;
  --on-dark: #f2f2f4;
  --on-dark-muted: #a4a7b0;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .06), 0 8px 24px rgba(20, 20, 30, .06);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Barlow Condensed", "Barlow", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--font);
  color: var(--ink);
  background: var(--bg-pattern), var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.05; margin: 0 0 .5em; letter-spacing: .01em; }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.1rem); text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); text-wrap: balance; }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(1160px, 100% - 2 * max(16px, env(safe-area-inset-left), env(safe-area-inset-right))); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--red); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 16px; }
#main:focus { outline: none; }
:focus-visible { outline: 3px solid var(--red-bright); outline-offset: 3px; border-radius: 6px; }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; }

/* ---------- yläpalkki ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 16, 20, .92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--dark-line);
  color: var(--on-dark);
}
.topbar__inner { display: flex; align-items: center; gap: 16px; min-height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand__mark {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none;
  border-radius: 11px; background: linear-gradient(160deg, var(--red-bright), var(--red-dark));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand__mark svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__text strong { font-family: var(--display); font-size: 1.35rem; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.brand__text small { color: var(--on-dark-muted); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; font-weight: 500; font-size: .98rem;
  padding: 9px 14px; border-radius: 999px; color: var(--on-dark-muted);
  transition: color .2s, background-color .2s;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .1); }
.nav a.nav__cta { background: var(--red); color: #fff; margin-left: 6px; }
.nav a.nav__cta:hover, .nav a.nav__cta[aria-current="page"] { background: var(--red-bright); }

.menu-btn { display: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .08); cursor: pointer; padding: 12px 11px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; border-radius: 2px; background: #fff; transition: transform .25s, opacity .2s; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 820px) {
  .menu-btn { display: flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 12px 16px 18px; background: var(--dark); border-bottom: 1px solid var(--dark-line);
    display: none;
  }
  .menu-open .nav { display: flex; }
  .nav a { padding: 13px 14px; border-radius: 10px; font-size: 1.05rem; }
  .nav a.nav__cta { margin: 6px 0 0; text-align: center; }
  .brand__text small { display: none; }
}

/* ---------- painikkeet ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  padding: 14px 22px; min-height: 50px; border-radius: 999px; border: 1px solid transparent;
  transition: background-color .2s, border-color .2s, transform .15s, box-shadow .2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 6px 20px rgba(179, 23, 63, .3); }
.btn--primary:hover { background: var(--red-bright); }
.btn--primary .icon { transition: transform .2s; }
.btn--primary:hover .icon { transform: translateX(3px); }
.btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .06); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: #f1e7ea; }
.btn--light .icon, .btn--phone .icon { color: var(--red); width: 1.3em; height: 1.3em; }
.btn--light span, .btn--phone span { display: flex; flex-direction: column; text-align: left; font-size: 1.1rem; }
.btn--light small, .btn--phone small { font-weight: 500; font-size: .78rem; opacity: .7; }
.btn--phone { background: rgba(255, 255, 255, .06); border-color: var(--dark-line); color: #fff; border-radius: var(--radius-sm); justify-content: flex-start; padding: 12px 18px; }
.btn--phone:hover { border-color: var(--red-bright); background: rgba(227, 38, 79, .1); }
.btn--phone .icon { color: var(--red-bright); }
.btn:disabled { opacity: .6; cursor: progress; }

.link { color: var(--red); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: currentColor; }
.eyebrow--dark { color: var(--red-bright); }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.28rem); color: var(--muted); max-width: 40em; }

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 560px at 85% 40%, rgba(196, 24, 68, .46), transparent 66%),
    radial-gradient(700px 420px at 0% 100%, rgba(179, 23, 63, .14), transparent 70%),
    var(--dark);
  color: var(--on-dark);
}
.hero::after { /* hienovarainen viivoitus */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .018) 0 2px, transparent 2px 14px);
}
.hero__inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 40px; padding: clamp(56px, 9vw, 110px) 0; }
.hero h1 { color: #fff; text-transform: uppercase; }
.hero .lead { color: var(--on-dark-muted); }
.hero__hours { display: flex; align-items: center; gap: 10px; margin-top: 28px; color: var(--on-dark-muted); font-size: .98rem; }
.hero__hours .icon { color: var(--red-bright); }
.hero__gauge { display: grid; place-items: center; }

.gauge { width: min(100%, 440px); height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .55)); overflow: visible; }
.gauge__rim { fill: none; stroke: #3a3d46; stroke-width: 6; }
.gauge__red { fill: none; stroke: var(--red-bright); stroke-width: 6; opacity: .85; }
.gauge .tick { stroke: #8d909a; stroke-width: 2; }
.gauge .tick--major { stroke: #e8e8ec; stroke-width: 4; }
.gauge .tick[data-hot] { stroke: var(--red-bright); }
.gauge .num { fill: #e8e8ec; font: 600 22px var(--display); text-anchor: middle; dominant-baseline: central; }
.gauge .unit { fill: #8d909a; font: 500 16px var(--font); text-anchor: middle; letter-spacing: .1em; }
.gauge__needle { fill: var(--red-bright); transform-box: view-box; transform-origin: 200px 200px; transform: rotate(135deg); transition: transform 1.8s cubic-bezier(.2, .9, .25, 1); filter: drop-shadow(0 0 8px rgba(227, 38, 79, .6)); }
.gauge.is-on .gauge__needle { transform: rotate(var(--to)); }
.gauge.is-static .gauge__needle { transition: none; }
.gauge__hub { fill: #23252c; stroke: #4a4d57; stroke-width: 2; }
.gauge__dot { fill: var(--red-bright); }
@media (prefers-reduced-motion: reduce) { .gauge__needle { transition: none; } html { scroll-behavior: auto; } }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: 8px; }
  .hero__gauge { order: -1; }
  .gauge { width: min(70%, 300px); }
}

/* ---------- osiot ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0 0; }
.section--tight { padding-top: clamp(40px, 5vw, 64px); }
.view > :last-child { margin-bottom: clamp(56px, 8vw, 96px); }
.section__head { max-width: 46em; margin-bottom: 28px; }
.section__head p { color: var(--muted); }

.intro { max-width: 44em; margin-bottom: 32px; }
.intro p { font-size: 1.15rem; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow);
}
.card p { color: var(--muted); }
.card__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: #f6e6ea; color: var(--red); margin-bottom: 20px; }
.card__icon .icon { width: 26px; height: 26px; }
.card--accent { background: linear-gradient(150deg, var(--dark-2), var(--dark)); border-color: var(--dark); color: var(--on-dark); }
.card--accent p { color: var(--on-dark-muted); }
.card--accent .card__icon { background: var(--red); color: #fff; }
.brands {
  list-style: none; margin: 24px 0 0; padding: 22px 0 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; align-items: center; flex-wrap: wrap; row-gap: 6px;
}
/* Merkkien nimet tekstinä (ei logoja – tavaramerkkisyistä) */
.card--accent { container-type: inline-size; }
.brands li {
  /* Koko skaalautuu kortin leveyden mukaan, jotta nimet mahtuvat yhdelle riville */
  font: 700 clamp(.8rem, calc((100cqi - 72px) / 15), 1.4rem)/1.2 var(--display);
  letter-spacing: .1em; text-transform: uppercase; color: #fff; white-space: nowrap;
}
.brands li:not(:last-child)::after {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red-bright); vertical-align: middle; margin: -3px 10px 0 9px;
}
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } .card { padding: 26px; } }

.band {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 28px;
  padding: clamp(28px, 4vw, 48px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
}
.band h2 { margin-bottom: .3em; }
.band__text { max-width: 34em; }
.band__text p { color: rgba(255, 255, 255, .85); }
.band__hours { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 500; }
.band__actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 560px) { .band__actions, .band__actions .btn { width: 100%; } .band__actions .btn { justify-content: flex-start; } }

/* ---------- alasivut ---------- */
.page-head { background: var(--dark); color: var(--on-dark); padding: clamp(48px, 7vw, 84px) 0; position: relative; overflow: hidden; }
.page-head::before { content: ""; position: absolute; inset: 0; background: radial-gradient(800px 400px at 90% 0%, rgba(196, 24, 68, .46), transparent 70%); }
.page-head .wrap { position: relative; }
.page-head h1 { color: #fff; text-transform: uppercase; }
.page-head .eyebrow { color: var(--red-bright); }
.page-head .lead { color: var(--on-dark-muted); }

.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: stretch; }
.split--form { grid-template-columns: 1.4fr .6fr; align-items: start; }
@media (max-width: 860px) { .split, .split--form { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); }
.panel--dark { background: linear-gradient(160deg, var(--dark-2), var(--dark)); border-color: var(--dark); color: var(--on-dark); }

.checklist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.checklist li { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 1.08rem; }
.checklist li:last-child { border-bottom: 0; }
.checklist .icon { width: 26px; height: 26px; padding: 4px; border-radius: 50%; background: var(--red); color: #fff; stroke-width: 3; margin-top: 1px; }

.photo { margin: 0; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--dark); min-height: 260px; box-shadow: var(--shadow); }
/* Alkuperäisissä kuvissa on valkoinen kehys – rajataan se pois. */
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.photo figcaption {
  position: absolute; left: 14px; bottom: 14px; right: 14px; width: fit-content;
  display: flex; align-items: center; gap: 8px;
  background: rgba(15, 16, 20, .82); color: #fff; padding: 9px 14px; border-radius: 999px; font-size: .92rem; font-weight: 500;
  backdrop-filter: blur(6px);
}
.photo figcaption .icon { color: var(--red-bright); }

.people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.person { display: flex; gap: 20px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.person h3 { margin-bottom: .25em; }
.person p { color: var(--muted); margin-bottom: 12px; }
.person__avatar { display: grid; place-items: center; flex: none; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(150deg, var(--red), var(--red-dark)); color: #fff; font: 700 1.5rem var(--display); letter-spacing: .04em; }
.person__phone { display: inline-flex; align-items: center; gap: 8px; color: var(--red); font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.person__phone:hover { text-decoration: underline; }
@media (max-width: 760px) { .people { grid-template-columns: 1fr; } .person { padding: 22px; } }

.info-list { list-style: none; margin: 18px 0 26px; padding: 0; display: grid; gap: 18px; }
.info-list li { display: flex; gap: 14px; align-items: flex-start; }
.info-list .icon { width: 22px; height: 22px; color: var(--red-bright); margin-top: 3px; }
.info-list strong { font-weight: 600; }
.panel--dark .link { color: #ff7d98; margin-top: 6px; }
.phones { display: grid; gap: 10px; }
.split--contact .photo { min-height: 320px; }

/* ---------- lomake ---------- */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 38px); box-shadow: var(--shadow); display: grid; gap: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }
.field { display: grid; gap: 7px; }
.field label { font-weight: 600; font-size: .95rem; }
.req { color: var(--red); }
.field input, .field textarea {
  font: inherit; color: inherit; width: 100%;
  padding: 13px 15px; border: 1px solid #cfd0cc; border-radius: var(--radius-sm); background: #fbfbfa;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); background: #fff; box-shadow: 0 0 0 4px rgba(179, 23, 63, .14); }
.field input::placeholder { color: #9a9ca3; }
/* Rekisterinumerokenttä suomalaisen rekisterikilven näköisenä */
.plate {
  position: relative; display: flex; width: min(100%, 270px); height: 62px; padding: 4px;
  background: #fff; border: 2px solid #15161b; border-radius: 10px;
  transition: box-shadow .2s;
}
.plate:focus-within { box-shadow: 0 0 0 4px rgba(179, 23, 63, .18); }
.plate__eu {
  flex: none; width: 34px; border-radius: 4px 0 0 4px;
  background: #003399; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 5px 0 4px;
}
.plate__eu svg { width: 21px; height: 21px; fill: #ffcc00; }
.plate__eu b { font: 700 .74rem/1 var(--font); letter-spacing: .04em; }
.field .plate input, .field .plate input:focus {
  flex: 1; min-width: 0; height: 100%; padding: 0 10px; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  font: 700 2.1rem/1 var(--display); letter-spacing: .1em; text-align: center; text-transform: uppercase; color: #111;
}
.field .plate input::placeholder { color: #c3c5ca; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__error { margin: 0; padding: 12px 16px; border-radius: var(--radius-sm); background: #fdecef; color: #8a1030; font-weight: 500; }
.form__note { margin: 0; font-size: .88rem; color: var(--muted); }
.form .btn { justify-self: start; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after { content: ""; position: absolute; width: 20px; height: 20px; border: 2.5px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.thanks { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; box-shadow: var(--shadow); font-size: 1.15rem; }
.thanks__icon { width: 60px; height: 60px; padding: 14px; border-radius: 50%; background: var(--red); color: #fff; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto 16px; display: block; }
.aside h2 { font-size: 1.6rem; }
.aside__hours { display: flex; gap: 10px; color: var(--on-dark-muted); }
.aside__hours .icon { color: var(--red-bright); margin-top: 4px; }

/* ---------- alatunniste ---------- */
.footer { background: var(--dark); color: var(--on-dark-muted); font-size: .96rem; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 32px; padding: 56px 0 36px; }
.footer__name { display: block; font: 700 1.5rem var(--display); color: #fff; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 6px; }
.footer h3 { font-family: var(--font); font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #fff; margin-bottom: 12px; }
.footer p { margin-bottom: .7em; }
.footer a { color: #fff; text-decoration: none; }
.footer a:hover { color: var(--red-bright); }
.footer__bottom { border-top: 1px solid var(--dark-line); padding: 18px 0 26px; font-size: .86rem; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 22px; padding-top: 40px; } }

/* ---------- soittopalkki (vain puhelinnäkymä) ---------- */
.callbar { display: none; }
@media (max-width: 760px) {
  .call-open .callbar:not(:empty) {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px max(12px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    background: rgba(15, 16, 20, .94);
    backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-top: 1px solid var(--dark-line);
  }
  .callbar__btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px;
    border-radius: 12px; background: var(--red); color: #fff; text-decoration: none;
    box-shadow: 0 4px 14px rgba(179, 23, 63, .35);
  }
  .callbar__btn:active { background: var(--red-bright); transform: translateY(1px); }
  .callbar__btn .icon { width: 1.3em; height: 1.3em; }
  .callbar__btn span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 600; font-size: 1.1rem; }
  .callbar__btn small { font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
  /* jätetään tilaa, ettei palkki peitä alatunnisteen sisältöä */
  .call-open .footer { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }
}
