/* Citylounas – app page (/sovellus/). Tokens follow /app.css: sign pink, ink, paper. */
@font-face { font-family: "Finlandica"; src: url("/fonts/finlandica-var.woff2") format("woff2-variations"), url("/fonts/finlandica-var.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  --sign: #F71884; --on-sign: #0B0B0B; --sign-text: #781B56; --sign-soft: #FDE7F1;
  --bg: #F1F0EE; --surface: #FFFFFF; --ink: #0B0B0B; --ink-2: #333333; --muted: #595959;
  --line: #E1E0DC; --line-strong: #8A8A8A; --btn: #0B0B0B; --on-btn: #FFFFFF;
  --bar: #F71884; --bar-ink: #0B0B0B; --app-bg: #F1F0EE;
  --font: "Finlandica", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pill: 999px; --r-m: 16px; --r-l: 24px;
  --sh: 0 30px 60px -30px rgba(11, 11, 11, .45), 0 10px 20px -12px rgba(11, 11, 11, .25);
  --s: .7;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --sign-text: #FF8CC0; --sign-soft: #2C1A23;
  --bg: #0B0B0B; --surface: #151515; --ink: #F4F2F0; --ink-2: #CFCBC7; --muted: #A3A09C;
  --line: #2A2A2A; --line-strong: #6E6E6E; --btn: #F4F2F0; --on-btn: #0B0B0B;
  --bar: #151515; --bar-ink: #F4F2F0; --app-bg: #0B0B0B;
  --sh: 0 0 0 1px rgba(255, 255, 255, .08), 0 30px 60px -30px rgba(0, 0, 0, .9);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--font); font-feature-settings: "tnum" 1, "lnum" 1; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; letter-spacing: -.01em; }
:where(a, button, summary, iframe):focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 6px var(--sign); border-radius: 10px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--btn); color: var(--on-btn); padding: 10px 16px; border-radius: var(--pill); text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.inl { width: 18px; height: 18px; vertical-align: -3px; margin-left: 2px; }

/* header */
.hdr { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1360px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) clamp(16px, 4vw, 40px) 8px; }
.logo { display: inline-flex; padding: 8px 0; }
.logo svg { height: 30px; width: auto; }
.langs { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--pill); padding: 3px; }
.langs button { font: 600 .9rem/1 var(--font); min-width: 44px; height: 38px; border: 0; border-radius: var(--pill); background: transparent; color: var(--ink); cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--btn); color: var(--on-btn); }

/* hero */
.hero { max-width: 1360px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 40px; display: grid; gap: 28px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 8px 0 14px; font-weight: 600; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.eyebrow .dot { width: 10px; height: 10px; border-radius: 3px; background: var(--sign); box-shadow: 0 0 0 2px var(--ink); }
h1 { font-weight: 700; font-size: clamp(2.5rem, 7.5vw, 4.6rem); line-height: .98; letter-spacing: -.02em; max-width: 12ch; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); max-width: 36rem; margin: 16px 0 22px; }
.ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--pill); border: 1px solid transparent; font: 600 1rem/1.1 var(--font); text-decoration: none; cursor: pointer; transition: transform .14s, box-shadow .14s; }
.btn small { font-weight: 500; opacity: .75; font-size: .8rem; }
.btn.ink { background: var(--btn); color: var(--on-btn); }
.btn.pink { background: var(--sign); color: var(--on-sign); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -14px rgba(11, 11, 11, .6); }
.btn:active { transform: scale(.97); }
.hint { margin: 12px 0 0; font-size: .92rem; color: var(--muted); max-width: 34rem; }

.qr-card { display: flex; gap: 18px; align-items: center; margin-top: 28px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); max-width: 30rem; }
.qr-card img { width: 132px; height: 132px; border-radius: 12px; background: #fff; flex: none; }
.qr-card h2 { font-size: 1.25rem; margin-bottom: 4px; }
.qr-card p { margin: 0; font-size: .92rem; color: var(--ink-2); }
.qr-card .url { margin-top: 8px; font-weight: 600; color: var(--sign-text); word-break: break-all; }

/* device stage */
.stage { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.tabs { display: inline-flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--pill); padding: 3px; }
.tabs [role="tab"] { font: 600 .95rem/1 var(--font); min-width: 104px; height: 40px; border: 0; border-radius: var(--pill); background: transparent; color: var(--ink); cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { background: var(--btn); color: var(--on-btn); }
.devices { display: flex; justify-content: center; align-items: flex-end; gap: clamp(20px, 3vw, 48px); width: 100%; }
.device { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.device:not(.on) { display: none; }
.device figcaption { font-size: .92rem; color: var(--muted); text-align: center; }
.device figcaption b { color: var(--ink); margin-right: 4px; }

/* device geometry in real CSS px; --s scales the whole body */
.device.ios { --w: 418; --h: 872; --sw: 390; --sh: 844; --bz: 14px; --rad: 62px; --srad: 48px; --sb: 47px; --nb: 22px; }
.device.and { --w: 432; --h: 912; --sw: 412; --sh: 892; --bz: 10px; --rad: 46px; --srad: 36px; --sb: 32px; --nb: 22px; }
.dev-box { width: calc(var(--w) * var(--s) * 1px); height: calc(var(--h) * var(--s) * 1px); position: relative; }
.dev-body { position: absolute; left: 0; top: 0; width: calc(var(--w) * 1px); height: calc(var(--h) * 1px); transform: scale(var(--s)); transform-origin: 0 0;
  padding: var(--bz); border-radius: var(--rad); background: #0B0B0B; box-shadow: 0 0 0 1.5px #55524f, inset 0 0 0 2px #3a3a3a, inset 0 0 0 4px #0B0B0B, var(--sh); }
.device.and .dev-body { background: #161616; box-shadow: 0 0 0 1.5px #45423f, inset 0 0 0 2px #2c2c2c, var(--sh); }
.dev-screen { position: relative; width: 100%; height: 100%; border-radius: var(--srad); overflow: hidden; background: var(--app-bg); display: flex; flex-direction: column; isolation: isolate; }
.dev-screen iframe { flex: 1; width: 100%; border: 0; display: block; background: var(--app-bg); }
.sbar { height: var(--sb); flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 30px 0 34px; background: var(--bar); color: var(--bar-ink); font: 600 16px/1 -apple-system, "SF Pro Text", system-ui, sans-serif; }
.device.ios .sbar { padding-top: 6px; }
.device.and .sbar { padding: 0 20px; font: 500 14px/1 Roboto, system-ui, sans-serif; }
.sys { display: inline-flex; gap: 6px; align-items: center; }
.sys i { display: block; background: currentColor; }
.sig { width: 17px; height: 11px; clip-path: polygon(0 100%, 100% 0, 100% 100%); border-radius: 1px; }
.wifi { width: 15px; height: 11px; clip-path: polygon(50% 100%, 0 25%, 20% 0, 80% 0, 100% 25%); }
.bat { width: 24px; height: 11px; border-radius: 3px; }
.device.and .bat { width: 9px; height: 14px; border-radius: 2px; }
.homebar, .navbar { height: var(--nb); flex: none; display: grid; place-items: center; background: var(--app-bg); }
.homebar span { width: 134px; height: 5px; border-radius: 3px; background: var(--ink); }
.navbar span { width: 108px; height: 4px; border-radius: 2px; background: var(--ink); opacity: .7; }
.island { position: absolute; top: calc(var(--bz) + 11px); left: 50%; width: 122px; height: 35px; margin-left: -61px; border-radius: 20px; background: #000; }
.punch { position: absolute; top: calc(var(--bz) + 10px); left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px #1d1d1d; }
.try { margin: 0; font-size: .9rem; color: var(--muted); text-align: center; max-width: 34rem; }

/* install cards */
.install, .faq { max-width: 1360px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px); }
.install h2, .faq h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 20px; }
.cards { display: grid; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 22px 20px; position: relative; }
.card.is-mine { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--sign); }
.mine { display: inline-block; margin: 0 0 10px; padding: 4px 10px; border-radius: var(--pill); background: var(--sign); color: var(--on-sign); font-weight: 600; font-size: .8rem; }
.card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; }
.card h3 svg.i { width: 26px; height: 26px; }
.card h4 { margin: 20px 0 0; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; align-items: start; }
.steps li::before { counter-increment: s; content: counter(s); grid-row: span 2; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--btn); color: var(--on-btn); font-weight: 700; }
.steps b { font-weight: 600; padding-top: 4px; }
.steps b a { color: var(--sign-text); text-underline-offset: 3px; }
.steps li > span { color: var(--muted); font-size: .92rem; grid-column: 2; }

/* faq */
.qa { display: grid; gap: 10px; max-width: 54rem; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 18px; }
summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .2s; flex: none; }
details[open] summary::after { transform: rotate(-135deg) translateX(-2px); }
details p { margin: 0 0 18px; color: var(--ink-2); max-width: 46rem; }

.ftr { max-width: 1360px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) max(32px, env(safe-area-inset-bottom)); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.ftr a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; min-height: 44px; display: inline-flex; align-items: center; }

/* small screens: one device at a time */
@media (max-width: 979px) {
  .ctas .btn { flex: 1 1 auto; }
  .qr-card { order: 3; }
}
@media (max-width: 520px) {
  .ctas { flex-direction: column; }
  .qr-card img { width: 112px; height: 112px; }
  .qr-card { gap: 14px; padding: 14px; }
}
/* wide screens: text left, both phones right */
@media (min-width: 980px) {
  .hero { grid-template-columns: minmax(340px, 440px) 1fr; align-items: center; gap: clamp(32px, 4vw, 72px); padding-top: 16px; }
  .tabs { display: none; }
  .device:not(.on) { display: flex; }
  .cards { grid-template-columns: 1fr 1fr; }
}
