:root {
  --vh: 100vh;
  --bg: #f4f7f1;
  --surface: #ffffff;
  --mint: #e6f4dc;
  --text: #16302a;
  --muted: #4b625a;
  --accent: #2f5a4b;
  --accent-text: #ffffff;
  --line: rgba(22, 48, 42, .12);
  --hero-1: #1d352f;
  --hero-2: #2f5a4b;
  --radius: 20px;
  color-scheme: light dark;
}
/* The visible viewport height: on iOS Safari 100vh also covers the area behind the toolbars. */
@supports (height: 100dvh) { :root { --vh: 100dvh; } }
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1a17;
    --surface: #16251f;
    --mint: #1b2f28;
    --text: #e6f0e9;
    --muted: #a7bbb2;
    --accent: #9fd8b4;
    --accent-text: #0e1a17;
    --line: rgba(230, 240, 233, .12);
    --hero-1: #12231e;
    --hero-2: #224237;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* The visitor's own system font only: no font is named, embedded, or downloaded. */
  font: 17px/1.55 system-ui, -apple-system, sans-serif;
}
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h2 { font-size: clamp(26px, 3.5vw, 34px); margin-bottom: 8px; }
section { padding: 48px 0 0; }

/* Hero: a top bar (section links and language menu), then the icon beside the name and a
   phone that rises from the bottom edge. */
.hero {
  background: linear-gradient(168deg, var(--hero-1), var(--hero-2));
  color: #fff;
  padding: 16px 0 36px;
  overflow: hidden;
}
.hero .hero-main { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero .app-icon { width: 120px; height: 120px; border-radius: 27px; box-shadow: 0 10px 28px rgba(0,0,0,.3); flex: none; }
.hero .intro { flex: 1 1 360px; min-width: 0; }
.hero h1 { font-size: clamp(30px, 4.4vw, 40px); font-weight: 800; margin: 0; }
.hero .sub { color: rgba(255,255,255,.86); margin: 8px 0 0; font-size: 17px; max-width: 600px; }
.hero .store { display: inline-block; margin-top: 18px; border-radius: 10px; }
/* Badges are sized by height: Apple's localized badges differ in width but share a height. */
.hero .store img { display: block; width: auto; height: 50px; }
.hero .store:focus-visible { outline: 3px solid #9fd8b4; outline-offset: 3px; }
/* Section links: quiet text links, so the App Store badge stays the one strong action. */
.hero .sections { display: flex; gap: 4px; flex-wrap: wrap; }
.hero .sections a {
  color: rgba(255,255,255,.86); text-decoration: none; font-weight: 600; font-size: 15px;
  padding: 7px 12px; border-radius: 999px;
}
.hero .sections a:hover { color: #fff; background: rgba(255,255,255,.12); }
.hero .sections a:focus-visible { outline: 3px solid #9fd8b4; outline-offset: 0; }
/* A decorative phone, cut off by the hero's bottom edge. Wide screens only. */
.hero .hero-shot {
  --bwf: 220px; --bhf: 480px;
  flex: none; align-self: flex-end; height: 250px; margin: 8px 24px -36px auto;
  transform: rotate(4deg); transform-origin: bottom center;
}
/* The frame is an inline <span>; as a block it wraps the screenshot in one piece. */
.hero .hero-shot .device { display: block; }
@media (max-width: 860px) { .hero .hero-shot { display: none; } }

/* Language menu: a small dropdown above the hero content (a <details> disclosure, so it works
   without scripts). Each option links to that language's page and is named in its own language. */
.hero .topbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-bottom: 20px; }
.lang { position: relative; background: none; border: 0; border-radius: 0; margin: 0; }
.lang summary {
  display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px;
  min-height: 36px; padding: 6px 14px 6px 10px; border-radius: 999px;
  color: #fff; font-weight: 600; font-size: 14px; line-height: 1;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
}
.lang summary:hover, .lang[open] > summary { background: rgba(255,255,255,.22); }
.lang summary:focus-visible { outline: 3px solid #9fd8b4; outline-offset: 2px; border-radius: 999px; }
.lang summary svg { width: 16px; height: 16px; flex: none; color: rgba(255,255,255,.85); }
/* The chevron points down when closed and up when open. */
.lang summary::after {
  width: 6px; height: 6px; margin: -3px 0 0 2px;
  border-color: rgba(255,255,255,.85); transform: rotate(45deg);
}
.lang[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 10;
  margin: 0; padding: 6px; list-style: none; min-width: 168px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 32px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.12);
}
.lang li a {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 40px; padding: 8px 12px; border-radius: 9px;
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
}
.lang li a:hover { background: var(--mint); }
.lang li a:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.lang li a[aria-current="page"] { color: var(--accent); font-weight: 700; }
/* A check mark beside the current language. */
.lang li a[aria-current="page"]::after {
  content: ""; flex: none; width: 5px; height: 10px; margin: -3px 2px 0 0;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}

/* Strengths: compact cards, icon beside the heading. */
.features { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.feature {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 18px;
}
.feature .head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.feature .ico {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--mint); color: var(--accent);
}
.feature .ico svg { width: 18px; height: 18px; }
.feature h3 { font-size: 16px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* Device switch */
.switch {
  display: inline-flex; padding: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}
.switch button {
  font: inherit; font-weight: 600; font-size: 15px; color: var(--text);
  border: 0; background: transparent; padding: 9px 18px; border-radius: 999px; cursor: pointer;
  min-height: 40px;
}
.switch button[aria-selected="true"] { background: var(--accent); color: var(--accent-text); }
.switch button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Gallery */
/* Viewer: one large framed screenshot in a fixed-size stage (so switching between
   portrait and landscape never moves the page), its caption, and a wrapping row of
   thumbnails to pick from. */
.viewer {
  --bwf: min(760px, calc(100vw - 164px));
  --bhf: min(460px, calc(var(--vh) * .56), calc(var(--bwf) * 1.6));
  max-width: 1120px; margin: 0 auto; padding: 24px 20px 0;
}
.stage-row { display: flex; align-items: center; justify-content: center; gap: 20px; }
.stage {
  width: calc(var(--bwf) + 28px); height: calc(var(--bhf) + 28px);
  display: flex; align-items: center; justify-content: center;
}
.nav {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font-size: 22px; line-height: 1; cursor: pointer;
}
.nav:disabled { opacity: .35; cursor: default; }
.nav:focus-visible, .thumb:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.caption { text-align: center; margin: 18px auto 0; max-width: 520px; min-height: 72px; }
.caption strong { display: block; font-size: 20px; letter-spacing: -.01em; }
.caption span { display: block; color: var(--muted); font-size: 16px; }
.caption .count { font-size: 14px; margin-top: 4px; }
.zoom { position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 24px; }
.zoom .device { display: block; }
.zoom:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }

/* Zoomed view: the framed screenshot as large as the window allows. */
.lightbox {
  width: 100vw; height: var(--vh); max-width: none; max-height: none; margin: 0; padding: 56px 64px 24px;
  border: 0; background: rgba(8, 14, 12, .97); color: #fff;
  flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.lightbox[open] { display: flex; }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox::backdrop { background: transparent; }
/* The framed device fills the space left by the buttons and caption. */
.lightbox { --bwf: calc(100vw - 168px); --bhf: calc(var(--vh) - 150px); }
/* Sideways drags belong to the gallery's swipe; vertical scrolling and pinch zoom stay with the browser. */
.stage, .lightbox { touch-action: pan-y pinch-zoom; }
.stage img, .lightbox img { -webkit-user-drag: none; user-select: none; }
.lightbox .device { cursor: zoom-out; flex: none; }
.lb-caption { margin: 0; text-align: center; font-weight: 600; }
.lb-btn {
  position: absolute; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff; font-size: 22px; line-height: 1;
}
.lb-btn:hover { background: rgba(255,255,255,.22); }
.lb-btn:disabled { opacity: .3; cursor: default; }
.lb-btn:focus-visible { outline: 3px solid #9fd8b4; outline-offset: 2px; }
.lb-close { top: 12px; right: 12px; font-size: 18px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

.thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.thumb {
  padding: 4px; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer;
  opacity: .7;
}
.thumb:hover { opacity: 1; }
.thumb[aria-current="true"] { border-color: var(--accent); opacity: 1; }
.thumb img { display: block; height: 56px; width: auto; border-radius: 6px; background: var(--line); }
.viewer[data-set="iphone"] .thumb img { height: 76px; }

/* Device frames (drawn around the raw simulator captures). --a is width / height,
   --r the screen corner radius as a share of the width, --b the bezel. */
.device {
  --a: .46; --r: .12; --b: 10px;
  --sw: min(var(--bwf), calc(var(--bhf) * var(--a)));
  padding: var(--b); background: #0b0b0c;
  border-radius: calc(var(--sw) * var(--r) + var(--b));
  box-shadow: 0 0 0 2px #8d8f8c, 0 0 0 3.5px #3b3d3b, 0 24px 48px rgba(0,0,0,.26), 0 8px 16px rgba(0,0,0,.16);
}
.device img {
  display: block; width: var(--sw); height: auto; aspect-ratio: var(--a);
  border-radius: calc(var(--sw) * var(--r)); background: #000;
}
.phone { --a: .46; --r: .125; --b: 9px; }
.duo-folded { --a: .687; --r: .08; --b: 9px; }
.duo-portrait { --a: .703; --r: .05; --b: 10px; }
.duo-landscape { --a: 1.42; --r: .036; --b: 10px; }
.ipad-portrait { --a: .75; --r: .045; --b: 13px; }
.ipad-landscape { --a: 1.333; --r: .034; --b: 13px; }

/* FAQ */
.faq-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; margin-top: 16px; }
details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 10px;
}
/* A custom summary: the question on the leading side, a chevron on the trailing side
   that turns down when open (the default triangle marker is hidden). */
summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 16px; line-height: 1.35;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 8px; height: 8px; margin-inline-end: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s ease;
}
details[open] > summary::after { transform: rotate(45deg); }
summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 14px; }
details p { margin: 0; padding: 0 18px 16px; color: var(--muted); font-size: 15px; }

/* Second App Store badge, for visitors who scrolled through the page. */
.get-app { display: flex; align-items: center; justify-content: center; gap: 12px 20px; flex-wrap: wrap; margin-top: 22px; }
.get-app p { margin: 0; font-weight: 600; font-size: 18px; }
.get-app .store { display: block; border-radius: 10px; }
.get-app .store img { display: block; width: auto; height: 50px; }
.get-app .store:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* Contact */
.contact {
  background: var(--mint); border-radius: 16px; padding: 16px 20px; margin-top: 14px;
  display: flex; gap: 16px 24px; align-items: center; flex-wrap: wrap;
  scroll-margin-top: 24px;
}
.contact-copy { flex: 1 1 28rem; min-width: 0; }
.contact h3 { font-size: 18px; margin-bottom: 6px; }
.contact p { margin: 0; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.contact p + p { margin-top: 4px; }
.button {
  display: inline-block; background: var(--accent); color: var(--accent-text);
  text-decoration: none; font-weight: 600; padding: 12px 22px; border-radius: 999px;
}
footer { padding: 32px 0 28px; color: var(--muted); font-size: 14px; text-align: center; }
@media (max-width: 600px) {
  section { padding-top: 40px; }
  .hero { padding: 12px 0 24px; }
  .hero .topbar { justify-content: space-between; margin-bottom: 16px; }
  .hero .sections { flex-wrap: nowrap; gap: 0; margin-left: -10px; }
  .hero .sections a { white-space: nowrap; font-size: 14px; padding: 7px 10px; }
  /* Phones: the icon beside the title only; subtitle and badge take the full width below. */
  .hero .hero-main { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 0 16px; }
  .hero .intro { display: contents; }
  .hero .app-icon { grid-area: 1 / 1; width: 72px; height: 72px; border-radius: 16px; }
  .hero h1 { grid-area: 1 / 2; text-wrap: balance; }
  .hero .sub { grid-column: 1 / -1; font-size: 15px; margin-top: 14px; }
  .hero .store { grid-column: 1 / -1; justify-self: start; margin-top: 14px; }
  .hero .store img { width: auto; height: 45px; }
  .features { grid-template-columns: 1fr 1fr; gap: 10px; }
  .faq-cols { grid-template-columns: 1fr; }
  .feature { padding: 12px 14px; }
  .feature .head { flex-direction: column; align-items: flex-start; gap: 8px; }
  .feature p { font-size: 14px; }
  .switch { display: flex; width: 100%; }
  .switch button { flex: 1 1 0; padding: 9px 8px; white-space: nowrap; }
  .viewer { --bwf: calc(100vw - 72px); padding-top: 28px; }
  /* A shorter stage for sets that mix orientations, so landscape shots don't float in empty space. */
  .viewer[data-set="duo"], .viewer[data-set="ipad"] { --bhf: min(calc(var(--vh) * .64), calc(var(--bwf) * 1.1)); }
  .nav { display: none; }
  .lightbox { padding: 60px 12px 20px; --bwf: calc(100vw - 52px); --bhf: calc(var(--vh) - 190px); }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }
}
/* The narrowest phones: one feature card per row, so long words (often in Finnish) fit. */
@media (max-width: 420px) {
  .lang summary { padding: 6px 12px 6px 10px; }
  .lang summary span { display: none; }
}
@media (max-width: 360px) {
  .hero .sections a { font-size: 13px; padding: 7px 6px; }
  .hero .sections { margin-left: -6px; }
  .features { grid-template-columns: 1fr; }
  .feature .head { flex-direction: row; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { summary::after { transition: none; } }
