/* Fontit ladataan sivuston omasta kansiosta (ei Googlen palvelimilta) */
@font-face { font-family: "Saira"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("fonts/saira-latin.woff2") format("woff2"); }
@font-face { font-family: "Saira Condensed"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/saira-condensed-600-latin.woff2") format("woff2"); }
@font-face { font-family: "Saira Condensed"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/saira-condensed-800-latin.woff2") format("woff2"); }

:root {
  --bg: #121417;
  --surface: #1b1e22;
  --deep: #0b0c0e;
  --text: #e9ecef;
  --muted: #9ba2a9;
  --line: #2e3338;
  --plate: #f7f8f9;
  --ink: #1d2023;
  --eu: #2f55d4;
  --eu-dark: #2445b3;
  --eu-light: #8aa5ff;
  --display: "Saira Condensed", "Arial Narrow", sans-serif;
  --body: "Saira", system-ui, sans-serif;
  --wrap: 1440px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--body); font-size: 17px; line-height: 1.55; color: var(--text); background: var(--bg); overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--eu-light); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; letter-spacing: -0.01em; color: #fff; }
.h2 { font-size: clamp(34px, 4.6vw, 56px); max-width: 16ch; }

/* Buttons */
.btn { display: inline-block; font-family: var(--body); font-weight: 600; font-size: 16px; text-decoration: none; padding: 13px 24px; border-radius: 4px; background: var(--eu); color: #fff; border: 2px solid var(--eu); transition: background .15s, color .15s; }
.btn:hover { background: var(--eu-dark); border-color: var(--eu-dark); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--text); }
.btn--ghost:hover { background: var(--text); color: var(--ink); border-color: var(--text); }
.btn--light { background: var(--plate); color: var(--ink); border-color: var(--plate); }
.btn--light:hover { background: transparent; color: var(--plate); border-color: var(--plate); }

/* Header */
.header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 6px var(--gutter); background: rgba(18, 20, 23, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { display: block; line-height: 0; margin-right: auto; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.lang__btn { background: none; border: 0; color: var(--muted); font: 600 14px/1 var(--body, inherit); letter-spacing: .5px; padding: 9px 10px; cursor: pointer; }
.lang__btn:hover { color: var(--text); }
.lang__btn[aria-pressed="true"] { background: var(--text); color: var(--ink); }
.logo__svg { height: 46px; width: auto; display: block; margin: 10px 0; }
.logo__word { font-family: var(--display); font-weight: 800; font-size: 34px; letter-spacing: 2px; fill: var(--ink); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; font-weight: 500; font-size: 16px; }
.nav a:not(.nav__cta):hover { color: var(--eu-light); }
.nav__cta { padding: 8px 16px; border: 2px solid var(--text); border-radius: 4px; }
.nav__cta:hover { background: var(--text); color: var(--ink); }
.menu-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; width: 44px; height: 44px; place-items: center; }

/* Hero: before / after */
.hero { position: relative; background: var(--surface); width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--wrap) - 2 * var(--gutter)); margin: 0 auto; border-radius: 0 0 6px 6px; overflow: hidden; display: grid; grid-template-columns: minmax(340px, 5fr) 6fr; }
.compare { position: relative; order: 2; height: min(82vh, 46vw); min-height: 480px; overflow: hidden; user-select: none; }
.compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 50%; }
.compare__top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--plate); transform: translateX(-50%); pointer-events: none; }
.compare__handle span { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--eu); border: 2px solid var(--plate); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.compare__handle span::before, .compare__handle span::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; border-top: 2px solid #fff; border-left: 2px solid #fff; }
.compare__handle span::before { left: 12px; transform: translateY(-50%) rotate(-45deg); }
.compare__handle span::after { right: 12px; transform: translateY(-50%) rotate(135deg); }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; z-index: 2; }
.compare:has(.compare__range:focus-visible) .compare__handle span { outline: 3px solid #fff; outline-offset: 3px; }
.compare__tag { position: absolute; top: 20px; z-index: 1; font-weight: 600; font-size: 14px; color: var(--ink); background: var(--plate); padding: 4px 10px; border-radius: 3px; pointer-events: none; }
.compare__tag--left { left: var(--gutter); }
.compare__tag--right { right: var(--gutter); }

.hero__text { order: 1; align-self: center; padding: 48px var(--gutter); container-type: inline-size; }
/* Koko palstan leveyden mukaan, jotta slogan pysyy kahdella rivillä */
.hero__text h1 { font-size: clamp(36px, 15cqi, 84px); text-transform: uppercase; margin-bottom: 16px; }
html[lang="fi"] .hero__text h1 { font-size: clamp(30px, 11.5cqi, 72px); } /* suomenkielinen slogan on pidempi */
.hero__text p { max-width: 44ch; margin-bottom: 22px; }
.hero__lead { min-height: 3.1em; }
.switch { display: inline-flex; padding: 3px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--deep); }
.switch__btn { font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: .04em; color: var(--muted); background: transparent; border: 0; border-radius: 4px; padding: 6px 22px; cursor: pointer; transition: background .15s, color .15s; }
.switch__btn:hover { color: var(--text); }
.switch__btn[aria-pressed="true"] { background: var(--plate); color: var(--ink); }
.compare__img { transition: opacity .25s; }
.compare.is-swapping .compare__img { opacity: 0; }
.hero__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hero__hint { font-size: 15px; color: var(--muted); }

/* Products */
.products { max-width: var(--wrap); margin: 0 auto; padding: 96px var(--gutter); }
.products .h2 { margin-bottom: 40px; }
.products__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.product__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--deep); }
.product__media img, .product__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.product__body { padding: 28px; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.product__body > p { max-width: 46ch; }
.product__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product__price { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; color: #fff; text-align: right; }
.product__price small { display: block; margin-top: 6px; font-family: var(--body, inherit); font-weight: 600; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; color: #7fd49a; }
.product .btn { align-self: flex-start; margin-top: auto; }

/* License plate element */
.plate { display: inline-flex; align-items: stretch; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 5px; overflow: hidden; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3px rgba(29,32,35,.25), 0 0 0 1px #3a3f44; }
.plate__eu { display: grid; place-items: end center; background: var(--eu); color: #fff; font-size: 10px; font-weight: 600; letter-spacing: .04em; padding: 4px 6px 5px; }
.plate__text { font-family: var(--display); font-weight: 800; font-size: 34px; line-height: 1; padding: 6px 16px 4px 12px; letter-spacing: .04em; }

.specs { display: grid; gap: 0; border-top: 1px solid var(--line); }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 500; text-align: right; color: #fff; }

/* Made in Finland */
.made { background: var(--surface); display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 480px); align-items: center; justify-content: center; column-gap: 56px; padding: 40px; width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--wrap) - 2 * var(--gutter)); margin: 0 auto 96px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
/* Sama kuvasuhde kuin videolla (9:16), jotta koko video näkyy rajaamatta */
.made__photo { position: relative; aspect-ratio: 9 / 16; border-radius: 6px; overflow: hidden; }
.made__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.made__text { padding: 24px 0; }
.made__text .h2 { margin-bottom: 18px; }
.made__text > p { max-width: 46ch; margin-bottom: 28px; }

/* Installation */
.install { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter) 96px; display: grid; grid-template-columns: 1.1fr 1fr; grid-template-areas: "intro photo" "steps photo" "videos photo"; column-gap: 56px; row-gap: 40px; }
.install__intro { grid-area: intro; }
.install__intro .h2 { margin-bottom: 16px; }
.install__intro p { max-width: 48ch; color: var(--muted); }
.steps { grid-area: steps; list-style: none; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; padding: 20px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); grid-row: span 2; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: .9; color: var(--eu-light); }
.steps h3 { font-size: 26px; margin-bottom: 4px; }
.steps p { color: var(--muted); max-width: 46ch; }
.install__videos { grid-area: videos; align-self: start; display: flex; gap: 20px; align-items: center; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.install__videos img { width: 120px; height: 120px; flex-shrink: 0; border-radius: 6px; background: #fff; }
.install__videos h3 { font-size: 24px; margin-bottom: 4px; }
.install__videos p { color: var(--muted); margin-bottom: 10px; }
.install__photo { grid-area: photo; align-self: start; position: sticky; top: 110px; }
.install__photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; }
.install__photo figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }

/* FAQ */
.faq { max-width: var(--wrap); margin: 0 auto; padding: 96px var(--gutter); border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: start; }
.faq__list { border-top: 1px solid var(--text); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-weight: 600; font-size: 18px; color: #fff; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding: 0 0 20px; max-width: 60ch; color: var(--muted); }

/* Footer */
.footer { background: var(--deep); padding: 88px var(--gutter) 32px; border-top: 1px solid var(--line); }
.footer__main { max-width: var(--wrap); margin: 0 auto; }
.footer__title { font-size: clamp(40px, 6vw, 80px); text-transform: uppercase; max-width: 14ch; margin-bottom: 16px; }
.footer__main > p { max-width: 50ch; margin-bottom: 32px; color: var(--muted); }
.footer__contacts { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 32px; }
.footer__link { color: var(--plate); text-decoration: none; border-bottom: 1px solid #5b6168; padding-bottom: 2px; }
.footer__link:hover { border-color: var(--plate); }
.footer__copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; max-width: var(--wrap); margin: 72px auto 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: #7d848b; }

.footer__policy { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.footer__policy:hover { color: var(--text); }

/* Hyvityskäytäntö-ikkuna */
.policy { margin: auto; width: min(680px, calc(100% - 2 * var(--gutter))); max-height: min(86vh, 900px); padding: 0; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.policy[open] { display: flex; flex-direction: column; }
.policy::backdrop { background: rgba(5, 6, 8, .72); backdrop-filter: blur(3px); }
.policy__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.policy__head h2 { font-size: 30px; text-transform: uppercase; }
.policy__close { background: none; border: 0; color: var(--muted); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; border-radius: 4px; }
.policy__close:hover { color: var(--text); background: var(--deep); }
.policy__body { overflow-y: auto; padding: 8px 28px 28px; color: var(--muted); }
.policy__body h3 { font-size: 21px; color: var(--text); margin: 24px 0 6px; }
.policy__body ol { padding-left: 20px; display: grid; gap: 6px; }
.policy__body a { color: var(--eu-light); }
.policy__body ul { padding-left: 20px; display: grid; gap: 8px; list-style: disc; }
.policy__body strong, .policy__body th { color: var(--text); }
.policy__body p + p, .policy__body table + p, .policy__body ul + p, .policy__body ol + p { margin-top: 10px; }
.policy__lead { margin-top: 16px; }
.policy__body table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 6px 0 4px; }
.policy__body th, .policy__body td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--line); }
.policy__body tr:first-child th { background: var(--deep); }
.policy__body td:nth-child(2):not(:last-child) { white-space: nowrap; }
.footer__policies { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.install__links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
button.footer__link { background: none; border-width: 0 0 1px; border-style: solid; font: inherit; cursor: pointer; padding: 0 0 2px; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--eu-light); text-decoration: underline; cursor: pointer; }
.form-text { margin-top: 18px; padding: 18px 20px; background: var(--deep); border: 1px solid var(--line); border-radius: 6px; color: var(--text); line-height: 1.9; }
.form-text p + p { margin-top: 12px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.policy__contact { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* Mobile */
@media (max-width: 860px) {
  .menu-toggle { display: grid; order: 2; }
  .header { gap: 12px; }
  .logo__svg { height: 38px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .nav.is-open { display: flex; }
  .nav a { padding: 8px 0; font-size: 18px; }
  .nav__cta { padding: 8px 16px !important; margin-top: 8px; }

  .hero { grid-template-columns: 1fr; }
  .compare { order: 1; height: 56vh; min-height: 340px; }
  .hero__text { order: 2; padding: 28px var(--gutter) 40px; }

  .products { padding: 64px var(--gutter); }
  .products__grid { grid-template-columns: 1fr; }
  .product__body { padding: 22px; }

  .made { grid-template-columns: 1fr; width: auto; max-width: none; margin: 0 var(--gutter) 64px; padding: 24px var(--gutter); }
  .made__photo { width: min(100%, 300px); margin: 0 auto; }
  .made__text { padding: 28px 0 16px; }
  .install { grid-template-columns: 1fr; grid-template-areas: "intro" "photo" "steps" "videos"; padding-bottom: 64px; row-gap: 28px; }
  .install__photo { position: static; }
  .install__photo img { aspect-ratio: 4 / 3; }

  .faq { grid-template-columns: 1fr; gap: 28px; padding: 64px var(--gutter); }
  .footer { padding-top: 64px; }
}
