/* ---------- tokens ---------- */
:root {
  --font: 'Poppins', system-ui, sans-serif;
  --font-display: 'Big Shoulders Display', var(--font);
  --container: 1180px;
  --radius: 14px;

  --blue: #00847f; /* logo teal (#00b5b0), darkened to stay AA-legible as text/links on white */
  --blue-dark: #00615d;
  --blue-solid: #00847f; /* fixed regardless of theme — for button fills, which need to stay legible on white text even when --blue itself lightens for night-mode text contrast */
  --orange: #ff5a36;
  --orange-dark: #e14a26;
  --bg: #ffffff;
  --band: #eef0fb;
  --plate: #cfd3e6;
  --ink: #12142b;
  --ink-muted: #5c5f7d;
  --border: #e2e4f2;
  --footer-bg: #10122b;
  --footer-ink: #b7b9dd;
}

/* site-wide "lights off" mode: turn off the ambient light, let the signs glow */
:root[data-theme="night"] {
  --blue: #4dd9d3;
  --bg: #0d0e24;
  --band: #171a3c;
  --surface: #171a3c;
  --ink: #eceaf7;
  --ink-muted: #9d9dc4;
  --border: #2b2e57;
}

/* ---------- night sky: aurora + stars (decorative, "lights off" mode only) ---------- */
/* aurora canvas host — aurora.js mounts an OGL WebGL aurora into this when night mode
   is active (via MutationObserver on data-theme) and tears it down when it isn't */
.aurora-container {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

:root[data-theme="night"] body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* starfield — tiled dots, one 200x200 tile repeated */
:root[data-theme="night"] body::after {
  background-image:
    radial-gradient(1.6px 1.6px at 20px 30px, rgba(255, 255, 255, .9), transparent),
    radial-gradient(1.2px 1.2px at 90px 110px, rgba(255, 255, 255, .7), transparent),
    radial-gradient(1.8px 1.8px at 150px 60px, rgba(255, 255, 255, .85), transparent),
    radial-gradient(1px 1px at 60px 160px, rgba(255, 255, 255, .6), transparent),
    radial-gradient(1.4px 1.4px at 170px 180px, rgba(255, 255, 255, .75), transparent),
    radial-gradient(1px 1px at 110px 20px, rgba(255, 255, 255, .5), transparent);
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: .7;
}

@media (prefers-reduced-motion: no-preference) {
  :root[data-theme="night"] body::after { animation: star-twinkle 6s ease-in-out infinite alternate; }

  @keyframes star-twinkle {
    from { opacity: .55; }
    to   { opacity: .85; }
  }
}

:root[data-theme="night"] .nav { background: rgba(13, 14, 36, .9); }
:root[data-theme="night"] .drop,
:root[data-theme="night"] .work-card,
:root[data-theme="night"] .post-card { background: var(--surface); }
:root[data-theme="night"] .wave-band .wave path { fill: var(--bg); }
.work-card.lit .shot .shot-off { opacity: 0; }
.work-card.lit .shot .shot-on { opacity: 1; }
.work-card.lit .card-toggle { background: rgba(20, 23, 58, .85); }
.work-card.lit .card-toggle svg { stroke: #fff; }

:root[data-theme="night"] .work-card:not(.unlit) .shot .shot-off { opacity: 0; }
:root[data-theme="night"] .work-card:not(.unlit) .shot .shot-on { opacity: 1; }
:root[data-theme="night"] .card-toggle { background: rgba(20, 23, 58, .85); }
:root[data-theme="night"] .card-toggle svg { stroke: #fff; }
:root[data-theme="night"] .work-card.unlit .shot .shot-off { opacity: 1; }
:root[data-theme="night"] .work-card.unlit .shot .shot-on { opacity: 0; }
:root[data-theme="night"] .work-card.unlit .card-toggle { background: rgba(255, 255, 255, .9); }
:root[data-theme="night"] .work-card.unlit .card-toggle svg { stroke: #12142b; }

@media (hover: hover) and (pointer: fine) {
  .work-card:hover .shot .shot-off { opacity: 0; }
  .work-card:hover .shot .shot-on { opacity: 1; }
  :root[data-theme="night"] .work-card:hover .shot .shot-off { opacity: 1; }
  :root[data-theme="night"] .work-card:hover .shot .shot-on { opacity: 0; }
  .work-card:hover .card-toggle { background: rgba(20, 23, 58, .85); }
  .work-card:hover .card-toggle svg { stroke: #fff; }
  :root[data-theme="night"] .work-card:hover .card-toggle { background: rgba(255, 255, 255, .9); }
  :root[data-theme="night"] .work-card:hover .card-toggle svg { stroke: #12142b; }
}

/* language toggle cross-fade, driven by document.startViewTransition() in script.js */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: 84px; } /* clears the sticky nav on anchor jumps */
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
}

/* ---------- lang toggle mechanics ---------- */
:root[data-lang="fi"] [data-en] { display: none; }
:root[data-lang="en"] [data-fi] { display: none; }

/* ---------- site-wide light toggle mechanics ---------- */
[data-theme-night-label] { display: none; }
:root[data-theme="night"] [data-theme-day-label] { display: none; }
:root[data-theme="night"] [data-theme-night-label] { display: inline; }

/* ---------- motion: scroll-reveal + hero flicker ---------- */
/* progressive enhancement: script.js adds .reveal-ready and observes these
   elements, so nothing hides if JS never runs; reduced-motion users never
   get the hidden state at all since it lives entirely in this media query */
@media (prefers-reduced-motion: no-preference) {
  .reveal-ready .work-card,
  .reveal-ready .post-card,
  .reveal-ready .quote-card,
  .reveal-ready .stat {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .5s ease, transform .5s ease;
  }
  .reveal-ready .in-view { opacity: 1; transform: none; }

  @keyframes sign-flicker {
    0%, 3%, 6%, 9% { opacity: .2; }
    1%, 5% { opacity: 1; }
    10% { opacity: .5; }
    14% { opacity: 1; }
    100% { opacity: 1; }
  }
  .hero h1 { animation: sign-flicker 1.8s ease-out 1; }
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
a, button { -webkit-tap-highlight-color: transparent; } /* rely on our own :active/focus-visible states instead of the default gray flash */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}
h1 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: .01em;
}

.eyebrow {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
}

.lede { color: var(--ink-muted); font-size: 1.05rem; line-height: 1.6; max-width: 46ch; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  font-family: var(--font);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  padding: .85em 1.5em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, filter .2s ease;
}
.btn-blue { background: linear-gradient(135deg, var(--blue-solid), var(--blue-dark)); color: #fff; }
.btn-blue:hover { filter: brightness(1.08); }
.btn-orange { background: linear-gradient(135deg, var(--orange), var(--orange-dark)); color: #fff; }
.btn-orange:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue); color: #fff; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; padding-block: 14px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.logo span { font-weight: 800; font-size: 1.2rem; color: #00b5b0; }
.logo span em { font-style: normal; color: #00b5b0; }

.nav-links { display: flex; gap: 26px; margin: 0 auto; list-style: none; padding: 0; font-size: .92rem; font-weight: 500; }
.nav-links a { text-decoration: none; color: var(--ink); }
.nav-links a:hover { color: var(--blue); }
.has-drop { position: relative; }
.drop {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  /* no margin-top: a gap here would sit outside the hoverable .has-drop box
     and break :hover the instant the cursor crosses it (visibility has no
     transition delay) — padding-top gives the same visual breathing room
     without opening that dead zone */
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 8px 8px; min-width: 210px;
  box-shadow: 0 12px 30px rgba(18,20,43,.1);
  opacity: 0; visibility: hidden; transition: opacity .15s ease;
  list-style: none;
}
.has-drop:hover .drop { opacity: 1; visibility: visible; }
.drop li a { display: block; padding: 8px 10px; border-radius: 6px; font-size: .88rem; }
.drop li a:hover { background: var(--band); }

.nav-tools { display: flex; align-items: center; gap: 12px; }
.toggle {
  font-family: var(--font);
  font-weight: 600;
  font-size: .82rem;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-muted);
  border-radius: 999px;
  padding: .5em .9em;
  cursor: pointer;
}
.toggle:hover { border-color: var(--blue); color: var(--blue); }

.lang-toggle {
  display: inline-flex; gap: 2px;
  border: 1px solid var(--border); border-radius: 999px; padding: 2px;
  position: relative;
}
/* sliding highlight behind the active button — reads aria-pressed, no JS needed */
.lang-toggle::before {
  content: "";
  position: absolute; inset: 2px auto 2px 2px;
  width: calc(50% - 2px);
  background: var(--blue); border-radius: 999px;
}
/* transition only enabled once script.js has applied the persisted language
   (see .lang-ready in script.js) — otherwise it slides on every page load
   whenever the stored preference differs from the FI-first markup */
.lang-ready .lang-toggle::before { transition: transform .2s ease; }
.lang-toggle:has([data-lang-btn="en"][aria-pressed="true"])::before { transform: translateX(100%); }
.lang-btn {
  position: relative; z-index: 1;
  font-family: var(--font); font-weight: 600; font-size: .82rem;
  background: transparent; border: none; border-radius: 999px;
  padding: .4em .8em; color: var(--ink-muted); cursor: pointer;
  transition: color .2s ease;
}
.lang-btn:hover { color: var(--blue); }
.lang-btn[aria-pressed="true"] { color: #fff; }
.lang-btn[aria-pressed="true"]:hover { color: #fff; }

.theme-toggle { display: inline-flex; align-items: center; gap: 6px; }
.theme-toggle svg { width: 15px; height: 15px; flex: none; }
.theme-toggle .icon-on { display: none; }
:root[data-theme="night"] .theme-toggle { border-color: var(--orange); color: var(--orange); }
:root[data-theme="night"] .theme-toggle .icon-off { display: none; }
:root[data-theme="night"] .theme-toggle .icon-on {
  display: block; stroke: var(--orange); fill: var(--orange);
  filter: drop-shadow(0 0 4px var(--orange));
}

.nav-burger {
  display: none;
  background: none; border: none; cursor: pointer; padding: 6px;
  align-items: center; justify-content: center;
}
.nav-burger svg { width: 22px; height: 22px; stroke: var(--ink); }
.nav-burger .icon-close { display: none; }
.nav-burger.open .icon-menu { display: none; }
.nav-burger.open .icon-close { display: block; }
.nav-cta-item { display: none; } /* mobile-only copy of the header CTA, lives inside the menu panel */

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate; /* contain the video/scrim's negative z-index so aurora/daysky (fixed, z-index -1) can't paint over it */
  padding: 64px 0 90px; overflow: hidden;
}
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
/* uniform scrim so hero text stays legible over the video in both themes */
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(6, 8, 24, .78) 0%, rgba(6, 8, 24, .6) 45%, rgba(6, 8, 24, .35) 100%);
}
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
/* video backdrop is always dark, so hero text stays light regardless of the day/night toggle */
.hero .eyebrow { color: #4dd9d3; }
.hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.4rem); color: #fff; }
.hero .lede { color: #d3d5ea; margin: 20px 0 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero .badge { background: rgba(255, 255, 255, .12); color: #fff; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--band); border-radius: 999px;
  padding: .5em 1em; font-size: .8rem; font-weight: 600; color: var(--ink);
}
.badge b { color: var(--orange); }

/* hero mockup — the Gona logo mark rendered as a glowing neon sign (neon-sign.js, ogl/WebGL).
   Always dark, day or night site theme: neon reads best on a dark backdrop. */
.hero-shot {
  --bloom: 1; /* driven per-frame by neon-sign.js, synced to the sign's flicker */
  aspect-ratio: 4/3.4;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  /* the wall-glow behind the mark is painted by the canvas itself (a wide
     blur of the actual stroked shape, so it hugs the logo instead of a
     generic centered oval) — this stays a plain dark backdrop */
  background: linear-gradient(160deg, #050508, #0e0a1a);
  /* the sign's light spilling onto the page around the panel — box-shadow paints
     outside the box regardless of overflow:hidden, which only clips the content */
  box-shadow:
    0 24px 60px -20px rgba(20, 24, 70, .35),
    0 0 90px 24px rgba(236, 92, 226, calc(var(--bloom) * 0.5));
  display: flex; align-items: center; justify-content: center;
}
/* CSS-only fallback sign, visible until neon-sign.js confirms a working WebGL
   mount (then it hides this) — covers WebGL-restricted browsers, blocked/failed
   script loads, and any other mount failure so the panel never sits empty.
   Same logo outline as the WebGL version; text-shadow doesn't apply to SVG
   strokes, so the glow is done as layered drop-shadow filters instead. */
.neon-fallback {
  display: flex; align-items: center; justify-content: center;
  padding: 0 20px;
}
.neon-fallback svg {
  width: min(62%, 320px);
  height: auto;
  filter:
    drop-shadow(0 0 8px #fff)
    drop-shadow(0 0 18px rgba(176, 38, 255, .9))
    drop-shadow(0 0 40px rgba(176, 38, 255, .7))
    drop-shadow(0 0 70px rgba(176, 38, 255, .45));
}

/* ---------- wavy band ---------- */
.wave-band { position: relative; background: var(--band); padding: 70px 0 60px; }
.wave-band .wave { position: absolute; left: 0; width: 100%; line-height: 0; }
.wave-band .wave-top { top: -1px; transform: rotate(180deg); }
.wave-band .wave-bottom { bottom: -1px; }
.wave-band .wave svg { width: 100%; height: 48px; display: block; }

.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); }
.section-head .eyebrow { display: block; margin-bottom: 8px; }

.grid-cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.cat {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-decoration: none; text-align: center; color: var(--ink);
}
.cat-icon {
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease, background .2s ease;
}
.cat:nth-child(even) .cat-icon { background: var(--orange); }
.cat-icon svg { width: 30px; height: 30px; stroke: #fff; }
.cat span { font-size: .85rem; font-weight: 600; }

/* ---------- clients ---------- */
.clients { padding: 64px 0; }
.clients-row {
  display: flex; flex-wrap: wrap; gap: 20px 36px; align-items: center; justify-content: space-between;
}
.clients-row span {
  font-weight: 700; font-size: 1.05rem; color: var(--ink-muted); letter-spacing: .02em;
}

/* ---------- category rails ---------- */
.rail-section { padding: 56px 0; }
/* alternating tint so consecutive white sections (clients → 3 rails) get some
   rhythm; nth-of-type counts <section> siblings, so this lands on kirjainvalot
   and kyltit but skips neon, and matches the wave-band's tint above it */
.rail-section:nth-of-type(even) { background: var(--band); }
.rail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.rail-head h3 { font-size: 1.5rem; }
.rail-head p { margin: 6px 0 0; color: var(--ink-muted); max-width: 50ch; }

.rail-viewport { position: relative; }
.rail-btn {
  position: absolute; top: 50%; translate: 0 -50%;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -6px rgba(18, 20, 43, .3);
  z-index: 2;
}
.rail-btn svg { width: 18px; height: 18px; stroke: var(--ink); }
.rail-btn:disabled { opacity: .35; cursor: default; }
.rail-prev { left: -20px; }
.rail-next { right: -20px; }
:root[data-theme="night"] .rail-btn { background: rgba(20, 23, 58, .9); border-color: rgba(255, 255, 255, .15); }
:root[data-theme="night"] .rail-btn svg { stroke: #fff; }
@media (max-width: 860px) { .rail-btn { display: none; } } /* touch scroll covers it, and there's no room for the arrows */

.work-rail {
  display: flex; gap: 18px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin;
  scroll-snap-type: x proximity; /* settles on a card instead of stopping mid-swipe */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
}
.work-card {
  min-width: 220px; flex: 0 0 220px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
  scroll-snap-align: start;
}
.work-card .shot {
  position: relative;
  aspect-ratio: 1/.92;
  background: #d7dae8;
  overflow: hidden;
}
.work-card .shot .shot-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.work-card .shot .shot-on {
  opacity: 0;
  transition: opacity .4s ease;
}
.card-toggle {
  position: absolute; top: 10px; right: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.card-toggle svg { width: 16px; height: 16px; stroke: var(--ink); }
.card-toggle .sun { display: block; }
.card-toggle .moon { display: none; }
.work-card.lit .card-toggle .sun { display: none; }
.work-card.lit .card-toggle .moon { display: block; }

:root[data-theme="night"] .card-toggle .sun { display: none; }
:root[data-theme="night"] .card-toggle .moon { display: block; }
:root[data-theme="night"] .work-card.unlit .card-toggle .sun { display: block; }
:root[data-theme="night"] .work-card.unlit .card-toggle .moon { display: none; }

@media (hover: hover) and (pointer: fine) {
  .work-card:hover .card-toggle .sun { display: none; }
  .work-card:hover .card-toggle .moon { display: block; }
  :root[data-theme="night"] .work-card:hover .card-toggle .sun { display: block; }
  :root[data-theme="night"] .work-card:hover .card-toggle .moon { display: none; }
}
.work-card .cap { padding: 12px 14px 16px; }
.work-card h4 { margin: 0 0 4px; font-size: .95rem; font-weight: 600; }
.work-card .cap span { font-size: .78rem; color: var(--ink-muted); }

/* ---------- why / stats ---------- */
.why { background: var(--footer-bg); color: #fff; padding: 60px 0; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat b { display: block; font-size: 2.2rem; font-weight: 800; color: var(--orange); }
.stat span { font-size: .8rem; color: var(--footer-ink); letter-spacing: .03em; }

/* ---------- contact ---------- */
.hp-field { position: absolute; left: -9999px; } /* Netlify Forms honeypot — hidden from real visitors, still reachable to bots */
.contact { padding: 80px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact-info dl { font-size: .95rem; }
.contact-info dt { color: var(--ink-muted); margin-top: 16px; font-weight: 500; }
.contact-info dd { margin: 2px 0 0; font-weight: 600; }
.contact-info dt:first-child { margin-top: 0; }

form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
label { font-size: .8rem; font-weight: 600; color: var(--ink-muted); }
input, textarea, select {
  font-family: var(--font);
  font-size: .95rem;
  background: var(--band);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  padding: .8em .9em;
}
input:focus, textarea:focus, select:focus { border-color: var(--blue); background: var(--bg); }
textarea { resize: vertical; min-height: 100px; }
.form-note { font-size: .8rem; color: var(--ink-muted); }

/* ---------- footer ---------- */
footer { background: var(--footer-bg); color: var(--footer-ink); padding: 56px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo span { font-weight: 800; font-size: 1.15rem; color: #00b5b0; }
.footer-logo span em { font-style: normal; color: #00b5b0; }
footer address { font-style: normal; font-size: .88rem; line-height: 1.8; }
.footer-col h5 { color: #fff; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin: 0 0 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.footer-links a { text-decoration: none; color: var(--footer-ink); }
.footer-links a:hover { color: #fff; }
.newsletter { display: flex; flex-wrap: wrap; gap: 8px; }
.newsletter input {
  flex: 1; border-radius: 999px; border: 1px solid #383a63; background: #1a1d42; color: #fff; padding: .7em 1em; font-size: .85rem;
}
.newsletter button {
  border: none; border-radius: 999px; background: var(--blue); color: #fff; font-weight: 600; padding: .7em 1.2em; cursor: pointer; font-family: var(--font);
}
.footer-bottom {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid #262a55;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { margin: 0; font-size: .78rem; }
.social { display: flex; gap: 10px; list-style: none; padding: 0; margin: 0; }
.social a {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid #383a63;
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.social svg { width: 15px; height: 15px; stroke: var(--footer-ink); }

/* ---------- simple page hero (references / blog) ---------- */
.page-hero { padding: 56px 0 40px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--blue); }
.page-hero .lede { margin-top: 14px; }

/* ---------- references: case grid + testimonials ---------- */
.case-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.tag {
  display: inline-block; background: var(--band); color: var(--blue);
  font-size: .74rem; font-weight: 600; padding: .3em .8em; border-radius: 999px;
  margin-bottom: 10px;
}

.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quote-card {
  background: var(--band); border-radius: var(--radius); padding: 28px;
}
.quote-card p { margin: 0 0 16px; font-size: .98rem; line-height: 1.6; }
.quote-card cite { font-style: normal; font-size: .84rem; font-weight: 600; color: var(--ink-muted); }

/* ---------- blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.post-card {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg);
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card time { font-size: .78rem; color: var(--ink-muted); font-weight: 600; }
.post-card h3 { font-size: 1.15rem; line-height: 1.3; }
.post-card p { margin: 0; color: var(--ink-muted); font-size: .92rem; line-height: 1.55; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-shot { order: -1; max-width: 420px; margin: 0 auto; }
  .grid-cats { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-grid, .post-grid { grid-template-columns: 1fr; }

  /* nav becomes a burger-triggered dropdown panel; the services hover-submenu
     doesn't apply to touch, so it's dropped in favor of "Palvelut" just
     linking straight to the section (which lists all categories anyway) */
  .nav-burger { display: flex; }
  .nav-cta { display: none; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 6px 24px 18px;
    box-shadow: 0 16px 30px rgba(18, 20, 43, .12);
  }
  .nav-links.open { display: flex; }
  .nav-links > li { width: 100%; }
  .nav-links > li > a { display: block; padding: 14px 2px; border-bottom: 1px solid var(--border); }
  .has-drop .drop { display: none; }
  .nav-cta-item { display: block; margin-top: 14px; }
  .nav-cta-item a { display: flex; justify-content: center; }
}
@media (max-width: 520px) {
  .grid-cats { grid-template-columns: repeat(2, 1fr); }
  .case-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .theme-toggle .toggle-label { display: none; }
  .theme-toggle { padding: .5em; }
  /* iOS Safari auto-zooms the page when a focused field is under 16px */
  input, textarea, select { font-size: 16px; }
}
@media (max-width: 400px) {
  .nav .wrap { gap: 12px; }
  .logo span { font-size: 1.05rem; }
  .toggle { padding: .45em .7em; font-size: .78rem; }
  .lang-btn { padding: .4em .65em; font-size: .78rem; }
}
@media (max-width: 860px) {
  /* comfortable tap target — desktop keeps the smaller, denser 30px version */
  .card-toggle { width: 40px; height: 40px; }
}

/* hover-only affordances: on touch, tapping has no "unhover" so these would
   otherwise get stuck lifted/shadowed until the next tap lands elsewhere */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .cat:hover .cat-icon { transform: translateY(-4px); }
  .work-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -14px rgba(18, 20, 43, .3); }
  .post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px -14px rgba(18, 20, 43, .2); }
}

/* ---------- sticky mobile "get a quote" bar ---------- */
.mobile-cta-bar { display: none; }
@media (max-width: 860px) {
  body { padding-bottom: 70px; } /* keeps the footer clear of the fixed bar below */
  .mobile-cta-bar {
    display: flex; align-items: center; justify-content: center;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    color: #fff; font-family: var(--font); font-weight: 600; font-size: .95rem;
    text-decoration: none;
    box-shadow: 0 -8px 24px rgba(18, 20, 43, .15);
  }
  /* the open menu panel already ends in its own CTA — avoid showing two at once */
  body.menu-open .mobile-cta-bar { display: none; }
}
