/* STELENO NETTISIVU – Revontuli-paletti, Familjen Grotesk */
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/familjen-grotesk-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/familjen-grotesk-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #EEF7F5;
  --ink: #071A2B;
  --muted: #4F6170;
  --soft: #7D8E9B;
  --line: rgba(7, 26, 43, 0.12);
  --line-strong: rgba(7, 26, 43, 0.22);
  --field: rgba(255, 255, 255, 0.72);
  --g1: #4DFFB0;
  --g2: #38C6FF;
  --g3: #7A5CFF;
  --aurora: linear-gradient(45deg, var(--g1), var(--g2) 50%, var(--g3));
  --pink: #FF2E88;
  --focus: #38C6FF;
  --radius: 22px;
  --font: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Tausta: hiljaiset tähdet (canvas) + revontulihehku */
.sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.glow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow::before, .glow::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .32;
}
.glow::before {
  width: 46vw; height: 46vw; left: -14vw; bottom: -18vw;
  background: radial-gradient(circle, var(--g1), transparent 65%);
}
.glow::after {
  width: 44vw; height: 44vw; right: -12vw; top: -16vw;
  background: radial-gradient(circle, var(--g3), transparent 65%);
  opacity: .22;
}

/* Yläpalkki */
.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1180px; width: 100%; margin: 0 auto; padding: 28px 28px 0;
}
.logo { display: block; line-height: 0; }
.logo svg { height: 30px; width: auto; }
.top-mail {
  font-size: 15px; color: var(--muted); text-decoration: none;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.5);
  transition: color .2s, border-color .2s, background .2s;
}
.top-mail:hover { color: var(--ink); border-color: var(--line-strong); background: rgba(255,255,255,.8); }

/* Asettelu */
.wrap {
  position: relative; z-index: 1; flex: 1;
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 56px 28px 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
  gap: clamp(40px, 5vw, 72px); align-items: start;
}

.intro { position: sticky; top: 56px; padding-top: 12px; }
.eyebrow {
  margin: 0 0 22px; display: flex; align-items: center; gap: 12px;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.dash { width: 34px; height: 3px; border-radius: 3px; background: var(--aurora); }
h1 {
  margin: 0; font-weight: 700; letter-spacing: -0.03em;
  font-size: clamp(44px, 5vw, 76px); line-height: .98;
  max-width: 9.5em; text-wrap: balance;
}
.lede { margin: 26px 0 0; font-size: 20px; line-height: 1.45; color: var(--muted); max-width: 25em; }

.steps { list-style: none; margin: 44px 0 0; padding: 0; display: grid; gap: 4px; max-width: 26em; }
.steps li {
  display: grid; grid-template-columns: 44px 1fr; gap: 6px; align-items: baseline;
  padding: 14px 0; border-top: 1px solid var(--line);
}
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps .n { font-size: 13px; font-weight: 600; color: var(--soft); font-variant-numeric: tabular-nums; }
.steps strong { display: block; font-size: 17px; font-weight: 600; }
.steps div span { display: block; color: var(--muted); font-size: 15px; }
.services { margin: 28px 0 0; font-size: 14px; color: var(--soft); }

/* Lomakekortti */
.card {
  position: relative; overflow: hidden;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset, 0 30px 60px -30px rgba(7, 26, 43, .25), 0 2px 6px rgba(7, 26, 43, .04);
  backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px);
  scroll-margin-top: 24px;
}
.card-line { height: 4px; background: var(--aurora); }
.brief { padding: 36px 40px 40px; display: grid; gap: 26px; }

.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 9px; }
label, legend { font-size: 15px; font-weight: 600; padding: 0; }
legend { margin-bottom: 9px; }
.opt { font-weight: 400; color: var(--soft); font-size: 13px; margin-left: 4px; }

input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--field); border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { resize: vertical; min-height: 132px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #93A2AD; }
input:hover, textarea:hover { border-color: var(--line-strong); }
input:focus, textarea:focus { border-color: var(--focus); background: #fff; box-shadow: 0 0 0 4px rgba(56, 198, 255, .18); }
.field.invalid input, .field.invalid textarea { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255, 46, 136, .12); }
.err { margin: 0; font-size: 14px; color: #C2125F; min-height: 0; }
.err:empty { display: none; }

/* Valintanapit */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; font-weight: 500; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; font-size: 15px;
  background: var(--field); border: 1px solid var(--line);
  transition: background .15s, border-color .15s, color .15s, transform .15s;
  user-select: none;
}
.chip:hover span { border-color: var(--line-strong); background: #fff; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #EEF7F5; }
.chip input:checked + span::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--aurora);
}
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(56, 198, 255, .3); border-color: var(--focus); }
.chip:active span { transform: scale(.97); }

.reveal { animation: reveal .25s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Lähetys */
.send { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding-top: 6px; }
.btn {
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; gap: 12px;
  font: inherit; font-size: 17px; font-weight: 600; color: #EEF7F5;
  background: var(--ink); border: 0; border-radius: 999px;
  padding: 16px 26px 16px 28px; cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 10px 24px -10px rgba(7, 26, 43, .55);
}
.btn::before {
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: inherit;
  background: var(--aurora); opacity: 0; transition: opacity .25s;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--ink);
}
.btn:hover::before, .btn:focus-visible::before { opacity: 1; }
.btn:hover { box-shadow: 0 14px 30px -12px rgba(56, 198, 255, .7); }
.btn:hover .btn-arrow { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn:focus-visible { outline: none; }
.btn-arrow { width: 20px; height: 20px; transition: transform .2s; }
.btn[disabled] { cursor: progress; opacity: .75; }
.btn.loading .btn-arrow { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fine { margin: 0; font-size: 13px; color: var(--soft); max-width: 22em; line-height: 1.45; }
.form-error {
  margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 15px;
  background: rgba(255, 46, 136, .08); border: 1px solid rgba(255, 46, 136, .25); color: #A30F50;
}

/* Kiitos-näkymä */
.done { padding: 64px 40px 72px; text-align: center; outline: none; }
.done-star { width: 54px; height: auto; margin: 0 auto 22px; display: block; animation: pop .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.done h2 { margin: 0; font-size: 40px; letter-spacing: -0.02em; line-height: 1.05; }
.done-text { margin: 14px 0 0; font-size: 19px; color: var(--muted); }
.done-sub { margin: 26px auto 0; font-size: 15px; color: var(--soft); max-width: 26em; }

/* Alapalkki */
.foot {
  position: relative; z-index: 1;
  width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 28px 30px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 14px; color: var(--soft); border-top: 1px solid var(--line);
}
.foot-links { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* 404-sivu */
.nf { grid-template-columns: 1fr; text-align: center; place-items: center; min-height: 80vh; }
.nf .eyebrow { justify-content: center; }
.nf h1 { margin: 0 auto; }
.nf .lede { margin-left: auto; margin-right: auto; }
.nf-cta { margin: 32px 0 0; }
.nf .btn { text-decoration: none; }

/* Puhelin ja tabletti */
@media (max-width: 960px) {
  .wrap { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
  .intro { position: static; padding-top: 0; }
  h1 { max-width: 11em; }
  .steps { margin-top: 32px; }
}
@media (max-width: 560px) {
  .top { padding: 20px 18px 0; }
  .logo svg { height: 25px; }
  .top-mail { font-size: 13px; padding: 7px 12px; }
  .wrap { padding: 32px 14px 48px; }
  .intro { padding: 0 6px; }
  .lede { font-size: 18px; }
  .steps { display: none; }
  .services { margin-top: 18px; }
  .brief { padding: 28px 20px 30px; gap: 24px; }
  .row.two { grid-template-columns: 1fr; gap: 24px; }
  .chip span { padding: 9px 14px; font-size: 15px; }
  .send { flex-direction: column; align-items: stretch; gap: 14px; }
  .btn { justify-content: center; }
  .fine { max-width: none; text-align: center; }
  .done { padding: 52px 22px 58px; }
  .foot { padding: 20px 20px 26px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
