:root {
  --ink: #14110d;
  --ink-mute: rgba(20, 17, 13, .55);
  --ink-soft: rgba(20, 17, 13, .72);
  --line: rgba(20, 17, 13, .12);
  --paper: #f1efe9;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(20, 17, 13, .04), 0 8px 24px rgba(20, 17, 13, .06);
  --shadow-hover: 0 1px 2px rgba(20, 17, 13, .05), 0 16px 32px rgba(20, 17, 13, .09);
  --toggle-track: #2b2823;
  --toggle-knob: #ffffff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 768px) { .container { padding: 0 2.5rem; } }

/* ── Nav ─────────────────────────────────────────────────── */
.nav { padding: 1.5rem 0; }
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 34px;   /* consistent row height so the nav doesn't jump between pages (the homepage eyebrow pill is taller than the lockup/links) */
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;      /* push the links + language picker to the right */
}
.nav-link {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
  text-decoration: none;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); font-weight: 600; }
@media (max-width: 599px) {
  .nav-links { display: none; }
  .lang-picker { margin-left: auto; }   /* keep the picker right when links hide */
  /* Shrink the eyebrow pill so the longer locales (fi "KOKO ELINKAARI, WEB JA
     MOBIILI") stay on one line next to the picker. Scoped to .nav-inner so it
     beats the base .hero-eyebrow rule that's defined later in the file. */
  .nav-inner .hero-eyebrow {
    font-size: .68rem;
    letter-spacing: .04em;
    padding: .38rem .68rem;
    white-space: nowrap;
  }
}

/* ── Language picker (injected by i18n.js) ─────────────────── */
.lang-picker { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .3rem .55rem;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: .8rem;
  line-height: 1;
}
.lang-btn:hover { color: var(--ink); border-color: var(--ink-mute); }
.lang-btn-flag { display: inline-flex; width: 20px; height: 14px; border-radius: 2px; overflow: hidden; }
.lang-btn-flag svg, .lang-opt-flag svg { display: block; width: 100%; height: 100%; }
.lang-caret { font-size: .7rem; opacity: .7; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .4rem);
  margin: 0;
  padding: .3rem;
  list-style: none;
  min-width: 9rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: none;
  z-index: 20;
}
.lang-picker.open .lang-menu { display: block; }
.lang-menu li { margin: 0; }
.lang-menu button {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .45rem .5rem;
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
}
.lang-menu button:hover { background: var(--paper); }
.lang-menu button[aria-selected="true"] { font-weight: 700; }
.lang-opt-flag { display: inline-flex; width: 22px; height: 15px; border-radius: 2px; overflow: hidden; flex: none; }

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: 4rem 0 3rem; }
@media (min-width: 768px) { .hero { padding: 6rem 0 5rem; } }
.hero-logo-wrap { margin-bottom: 1.75rem; }
.hero-eyebrow {
  display: inline-block;
  padding: .4rem .85rem;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 999px;
  margin-bottom: 2rem;
}
.hero-lede {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  color: var(--ink);
  max-width: 38rem;
  margin: 0 0 1.25rem;
  line-height: 1.45;
  font-weight: 500;
}
.hero-sub {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  color: var(--ink-soft);
  max-width: 38rem;
  margin: 0;
}
.home-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: underline;
}
.home-cta:hover { color: var(--ink-mute); }
.hero-divider {
  border: 0;
  border-top: 1px solid var(--line);
  max-width: 42rem;
  margin: 2rem 0 0;
}

/* ── Page header (sub-pages - smaller than hero) ───────── */
.page-header { padding: 3rem 0 2rem; }
@media (min-width: 768px) { .page-header { padding: 4rem 0 2.5rem; } }
.page-eyebrow {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 .75rem;
}
.page-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.01em;
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
.page-lede {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 42rem;
  line-height: 1.55;
  margin: 0;
}

/* ── Section shell (within a page) ─────────────────────── */
.section { padding: 2rem 0 3rem; }
@media (min-width: 768px) { .section { padding: 2rem 0 4rem; } }
.section-body {
  font-size: 1.05rem;
  color: var(--ink-soft);
  max-width: 42rem;
  line-height: 1.65;
}
.section-body p { margin: 0 0 1.1rem; }
.section-body p:last-child { margin-bottom: 0; }

/* ── Projects grid ─────────────────────────────────────── */
.projects {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 2rem;
}
@media (min-width: 768px) {
  .projects { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
.project {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}
.project:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}
.project-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin: 0 0 .35rem;
  line-height: 1;
}
.project-tag {
  font-family: 'Inter Tight', sans-serif;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 .9rem;
}
.project-desc {
  font-size: .98rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 1rem;
}
.project-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink);
  text-decoration: none;
}
.project-link:hover { text-decoration: underline; }
.project-status {
  display: inline-block;
  padding: .15rem .55rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-left: .5rem;
  vertical-align: middle;
}

/* ── Contact ───────────────────────────────────────────── */
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  max-width: 32rem;
  margin-top: 2rem;
}
.contact-line {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-line:last-child { border-bottom: 0; }
.contact-label {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  flex-shrink: 0;
  width: 6rem;
}
.contact-value {
  font-size: 1rem;
  color: var(--ink);
}
.contact-value a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.contact-value a:hover { border-bottom-color: var(--ink); }

/* ── Chips (capabilities, tags) ─────────────────────────── */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
}
.chip {
  display: inline-block;
  padding: .35rem .75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .01em;
  color: var(--ink-soft);
}

/* ── Pillars (punch-point cards) ────────────────────────── */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 640px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .pillars { grid-template-columns: repeat(4, 1fr); } }
.pillar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}
.pillar-num {
  display: inline-block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--ink-mute);
  margin-bottom: .5rem;
}
.pillar-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0 0 .65rem;
}
.pillar-body {
  font-size: .98rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}

/* ── About: "how we approach work" - compact cards (grid) ── */
.principles {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) { .principles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .principles { grid-template-columns: 1fr 1fr 1fr; } }
.principles li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}
.principle-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0 0 0.4rem;
}
.principle-body {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
}

/* ── Domain cards (what we've shipped) ──────────────────── */
.domain-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 768px) { .domain-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; } }
.domain {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.domain-eyebrow {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.domain-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}
.domain-body {
  font-size: .97rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}
.domain-meta {
  font-family: 'Inter Tight', sans-serif;
  font-size: .78rem;
  color: var(--ink-mute);
  margin-top: auto;
  padding-top: .5rem;
}

/* ── Subsection title (within a page) ───────────────────── */
.subsection { margin-top: 3rem; }
.subsection-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  letter-spacing: -0.01em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 .5rem;
}
.subsection-lede {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 42rem;
  line-height: 1.55;
  margin: 0;
}

/* ── Footer ────────────────────────────────────────────── */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-mute);
  font-size: .9rem;
  margin-top: 3rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ═══ BRAND LOCKUP - one self-contained SVG (hallitse-lockup.svg) ════
   The whole mark (cube + outlined "HALLITSE OY") is a single scalable SVG.
   font-size on the container is the size knob; the img height derives from
   it so the cap-height stays ~0.70em (the lockup viewBox is 71.6 tall for a
   70-unit cap). See docs/brand/hallitse-lockup.svg. */
.nav-brand, .hero-lockup {
  display: inline-block;
  line-height: 0;
  color: var(--ink);
  text-decoration: none;
}
.nav-brand  { font-size: 34px; }
.hero-lockup { font-size: clamp(46px, 10.5vw, 110px); }
.brand-lockup-img {
  display: block;
  height: 0.716em;            /* cap 0.70em × (71.6/70) lockup box height */
  width: auto;
}
.hero-tagline {
  display: block;
  margin-top: 0.9rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 500;
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  text-transform: uppercase;
  color: var(--ink-mute);
  line-height: 1;
}

/* Homepage: nav logo hidden; the "full-lifecycle" badge sits left in the
   header row, links right, so the hero starts straight with the lockup. */
.home .nav-brand { display: none; }
.home .section { padding-bottom: 1.5rem; }
.nav-inner .hero-eyebrow { margin-bottom: 0; }
.home .hero { padding-top: 1rem; padding-bottom: 1.5rem; }
@media (min-width: 768px) { .home .hero { padding-top: 3rem; padding-bottom: 2rem; } }

/* Concept-project screenshots (widescreen, under the text) */
.project-shot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin: 0.25rem 0 1.1rem;
  background: var(--paper);
}

/* ── Dark theme (opt-in; default is the warm-paper light identity) ── */
:root[data-theme="dark"] {
  --ink: #ece9e2;
  --ink-mute: rgba(236, 233, 226, 0.52);
  --ink-soft: rgba(236, 233, 226, 0.74);
  --line: rgba(236, 233, 226, 0.14);
  --paper: #181510;
  --card: #221f19;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 36px rgba(0, 0, 0, 0.62);
  --toggle-track: #ece9e2;
  --toggle-knob: #221f19;
}
body,
.nav-link,
.project,
.pillar,
.domain,
.contact-card,
.chip,
.hero-eyebrow,
.lang-btn,
.lang-menu,
.footer {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

/* Lockup: swap to the light-wordmark variant in dark */
.lockup-dark { display: none; }
:root[data-theme="dark"] .lockup-light { display: none; }
:root[data-theme="dark"] .lockup-dark { display: block; }

/* ── Theme toggle: Apple-style pill, footer bottom-right, no label ── */
.theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1.25rem;
}
/* Ships [hidden] and is revealed by theme.js; the class's display would
   otherwise beat the UA's [hidden] rule and show a dead control to no-JS. */
.theme-toggle-row[hidden] { display: none; }
.theme-toggle-label {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  transition: color 0.3s ease;
}
.theme-toggle-label.active { color: var(--ink); }
.theme-toggle {
  width: 46px;
  height: 26px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--toggle-track);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: background-color 0.3s ease;
}
.theme-toggle-knob {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--toggle-knob);
  transform: translateX(0);
  transition: transform 0.22s ease, background-color 0.3s ease;
}
:root[data-theme="dark"] .theme-toggle-knob { transform: translateX(20px); }
.theme-toggle:focus-visible {
  outline: 2px solid var(--ink-mute);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .theme-toggle-knob,
  body, .nav-link, .project, .pillar, .domain, .contact-card,
  .chip, .hero-eyebrow, .lang-btn, .lang-menu, .footer { transition: none; }
}

/* ── Cookie-consent banner (consent.js injects it; gates GTM) ──
   A fixed pale-green brand card (same on light + dark) so it reads as a
   deliberate, on-brand element and stays visible over both the paper and the
   dark grounds. */
.hcc {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1000;
  max-width: 30rem;
  margin-left: auto;   /* sit bottom-right on wider screens */
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(6, 46, 24, .35);
  padding: 1.15rem 1.25rem 1.1rem;
  color: #14532d;
}
.hcc-text {
  font-family: 'Inter', sans-serif;
  font-size: .92rem;
  line-height: 1.5;
  color: #14532d;
  margin-bottom: .9rem;
}
.hcc-row {
  display: flex;
  gap: .6rem;
  justify-content: flex-end;
}
.hcc-btn {
  font-family: 'Inter Tight', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  min-height: 44px;
  padding: 0 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid rgba(21, 128, 61, .35);
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.hcc-no {
  background: transparent;
  color: #15803d;
}
.hcc-no:hover { border-color: #15803d; background: rgba(21, 128, 61, .08); }
.hcc-yes {
  background: #15803d;
  color: #fff;
  border-color: #15803d;
}
.hcc-yes:hover { opacity: .9; }
.hcc-btn:focus-visible { outline: 2px solid #15803d; outline-offset: 3px; }
.cookie-settings-link { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; }
@media (max-width: 480px) {
  .hcc { left: .75rem; right: .75rem; bottom: .75rem; }
  .hcc-row { justify-content: stretch; }
  .hcc-btn { flex: 1; }
}
