@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #13213c;
  --ink-2: #1d3054;
  --text: #1c2433;
  --muted: #4d5666;
  --on-ink: #ffffff;
  --on-ink-muted: #c3cbdb;
  --line: #e2e0db;
  --line-ink: rgba(255, 255, 255, 0.18);
  --bg: #ffffff;
  --soft: #f5f4f1;
  --accent: #245f8f;
  --accent-hover: #1a4a71;
  --focus: #f0b429;
  --terra: #b4532f;
  --terra-hover: #9f4727;
  --terra-mark: #c2603f;
  --terra-ink: #9c4426;
  --terra-light: #e39a7b;
  --warm: #f6e7df;
  --warm-hover: #f1dccf;

  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-sm: 0.9375rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-h3: 1.25rem;
  --fs-h2: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 3.2vw, 3.5rem);

  --wrap: 72.5rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
  --section: clamp(3.5rem, 2.5rem + 5vw, 6.5rem);
  --radius: 8px;
  --header-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

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

html { accent-color: var(--accent); scrollbar-color: #9aa3b2 var(--soft); }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  font-variant-numeric: lining-nums;
  text-rendering: optimizeLegibility;
}

::selection { background: #cfe0ef; color: var(--ink); }

img, svg { display: block; max-width: 100%; }

h1, h2, h3 {
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: 1.08; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; line-height: 1.3; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}
.skip:focus, .skip:hover { top: 1rem; color: #fff; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-decoration: none;
  color: var(--ink);
  margin-right: auto;
}
.logo strong { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.02em; }
.logo > span { font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 480px) { .sub-long { display: none; } }
.logo:hover { color: var(--ink); }

.nav ul {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav ul a {
  display: block;
  white-space: nowrap;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: 6px;
}
.nav ul a:hover { background: var(--soft); color: var(--ink); }
.nav ul a[aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

.header-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.header-call:hover { color: var(--accent); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.875rem;
  font: inherit;
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

@media (max-width: 1140px) {
  .header-call { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    background: var(--bg);
    padding: 1rem var(--gutter) 2rem;
    overflow-y: auto;
    border-top: 1px solid var(--line);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav ul a {
    font-size: 1.375rem;
    font-weight: 600;
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }
  .nav ul a[aria-current="page"] { box-shadow: none; color: var(--accent); }
  .nav-contact {
    margin-top: 1.5rem;
    display: grid;
    gap: 0.75rem;
  }
  body.menu-open { overflow: hidden; }
}
@media (min-width: 961px) {
  .nav-contact { display: none; }
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  min-height: 3.25rem;
  padding: 0.75rem 1.5rem;
  font: inherit;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  font-variant-numeric: tabular-nums;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #e6ecf5; color: var(--ink); }

.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--soft); color: var(--ink); }

.on-ink .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.on-ink .btn-ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; color: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Hero and page heads */

.on-ink { background: var(--ink); color: var(--on-ink-muted); }
.on-ink h1, .on-ink h2, .on-ink h3 { color: #fff; }
.on-ink a:not(.btn), .on-ink a:not(.btn):hover { color: #fff; }
.on-ink a:not(.btn):hover { text-decoration-thickness: 2px; }

.hero { padding-block: clamp(3.5rem, 2rem + 7vw, 7.5rem) clamp(3rem, 2rem + 4vw, 5rem); }
.hero h1 { max-width: 18ch; }
.hero .lead { max-width: 40rem; margin-top: 1.5rem; color: var(--on-ink-muted); }
.hero .actions { margin-top: 2.25rem; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  list-style: none;
  margin: clamp(2.5rem, 2rem + 2vw, 4rem) 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line-ink);
  font-size: var(--fs-sm);
  color: var(--on-ink-muted);
}
.facts strong { color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }

.page-head { padding-block: clamp(2.75rem, 2rem + 4vw, 5rem); }
.page-head h1 { max-width: 22ch; }
.page-head .lead { max-width: 42rem; margin-top: 1.25rem; }

.lead { font-size: var(--fs-lead); line-height: 1.55; }

/* Sections */

.section { padding-block: var(--section); }
.section-soft { background: var(--soft); }

.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 1.5rem + 2vw, 3rem); }
.section-head p { margin-top: 1rem; color: var(--muted); }

.prose { max-width: 42rem; }
.prose p, .prose li { color: var(--text); }
.prose h2 { margin-bottom: 1.25rem; }
.prose h3 { margin: 2rem 0 0.5rem; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 1rem + 5vw, 6rem);
  align-items: start;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Row lists: services, audiences */

.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows > li { border-bottom: 1px solid var(--line); }
.row-link {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr) auto;
  gap: 0.5rem 2.5rem;
  align-items: baseline;
  padding: 1.5rem 0;
  text-decoration: none;
  color: var(--text);
}
.row-link h3 { transition: color 0.2s ease; }
.row-link p { color: var(--muted); }
.row-link .icon { color: var(--accent); transition: transform 0.2s ease; align-self: center; }
.row-link:hover { color: var(--text); }
.row-link:hover h3 { color: var(--accent); }
.row-link:hover .icon { transform: translateX(4px); }
@media (max-width: 760px) {
  .row-link { grid-template-columns: 1fr auto; }
  .row-link p { grid-column: 1 / -1; grid-row: 2; }
}

/* Method steps */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 2rem 2.5rem;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--ink);
}
.steps--plain li::before { content: ""; padding-bottom: 0; }
.steps h3 { font-size: 1.125rem; margin-bottom: 0.5rem; }
.steps p { color: var(--muted); font-size: var(--fs-sm); }

/* Cases */

.cases { display: grid; gap: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.case {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 1rem 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.case p { color: var(--muted); }
.case .result {
  margin-top: 1rem;
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 760px) { .case { grid-template-columns: 1fr; } }

/* Bullet lists */

.list { list-style: none; margin: 1.25rem 0 0; padding: 0; }
.list li {
  position: relative;
  padding-left: 1.25rem;
  margin-top: 0.5rem;
}
.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.5rem;
  height: 1.5px;
  background: var(--accent);
}

.cols-2 { columns: 2 18rem; column-gap: 2.5rem; }
.cols-2 li { break-inside: avoid; margin-top: 0; padding-bottom: 0.5rem; }

/* In-page index for long pages */

.with-index {
  display: grid;
  grid-template-columns: 14rem minmax(0, 1fr);
  gap: clamp(2rem, 1rem + 4vw, 5rem);
  align-items: start;
}
.page-index {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  font-size: var(--fs-sm);
}
.page-index p { font-weight: 700; color: var(--ink); margin-bottom: 0.75rem; }
.page-index ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.page-index a {
  display: block;
  padding: 0.375rem 0 0.375rem 1rem;
  margin-left: -1px;
  color: var(--muted);
  text-decoration: none;
  border-left: 1px solid transparent;
}
.page-index a:hover { color: var(--ink); border-left-color: var(--ink); }
.page-index a.is-active { color: var(--ink); font-weight: 600; border-left-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
@media (max-width: 960px) {
  .with-index { grid-template-columns: 1fr; }
  .page-index { position: static; }
  .page-index ul { display: flex; flex-wrap: wrap; gap: 0.5rem; border: 0; }
  .page-index a {
    margin: 0;
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .page-index a:hover { border-color: var(--ink); }
  .page-index a.is-active { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
}

.with-index { counter-reset: topic; }
.topic { counter-increment: topic; padding-bottom: clamp(3rem, 2rem + 3vw, 4.5rem); }
.topic + .topic { padding-top: clamp(3rem, 2rem + 3vw, 4.5rem); border-top: 1px solid var(--line); }
.topic h2 { margin-bottom: 1rem; }
.topic h2::before {
  content: counter(topic, decimal-leading-zero);
  content: counter(topic, decimal-leading-zero) / "";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1.25rem;
  border-radius: 8px;
  background: var(--terra);
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.topic-panel {
  margin-top: 2rem;
  padding: clamp(1.25rem, 0.75rem + 2vw, 2.25rem);
  background: var(--soft);
  border-radius: 24px;
}
.topic-panel-h { font-weight: 700; color: var(--ink); }
.topic-panel .list { margin-top: 1rem; }
.topic-panel .list li::before { top: 0.55em; width: 0.4375rem; height: 0.4375rem; border-radius: 2px; }
.topic > p { max-width: 42rem; }
.topic .note { margin-top: 1.5rem; color: var(--muted); font-size: var(--fs-sm); max-width: 42rem; }
.topic .more { margin-top: 1.75rem; }

/* People */

.people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0 2.5rem;
  border-top: 1px solid var(--line);
}
.people li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.people strong { display: block; color: var(--ink); font-size: 1.0625rem; }
.people span { display: block; color: var(--muted); font-size: var(--fs-sm); }

/* Contact blocks */

.contact-big {
  display: grid;
  gap: 0.25rem;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.contact-big a { text-decoration: none; color: var(--ink); }
.contact-big a:hover { color: var(--accent); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }
.on-ink .contact-big a { color: #fff; }
.on-ink .contact-big a:hover { color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.15em; }

.places {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2rem 2.5rem;
}
.place h3 { margin-bottom: 0.125rem; }
.place address { font-style: normal; }
.place .tag { display: block; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 0.75rem; }
.place a { display: inline-block; margin-top: 0.75rem; font-size: var(--fs-sm); }
.on-ink .place .tag { color: var(--on-ink-muted); }

.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 0.875rem; padding: 0.875rem 0; border-bottom: 1px solid var(--line); }
.info-list li:first-child { border-top: 1px solid var(--line); }
.info-list .icon { color: var(--accent); margin-top: 0.2em; }
.info-list b { display: block; color: var(--ink); }

/* Close band */

.close { padding-block: var(--section); }
.close h2 { max-width: 20ch; }
.close .lead { margin-top: 1rem; max-width: 36rem; }
.close-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 2.5rem clamp(2rem, 1rem + 5vw, 6rem);
  align-items: end;
}
.close .contact-big { margin-top: 0; }
@media (max-width: 860px) { .close-grid { grid-template-columns: 1fr; } }

/* Calculator */

.calc {
  background: var(--soft);
  border-radius: 24px;
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
}
.calc h3 { margin-bottom: 0.5rem; }
.calc > p { color: var(--muted); font-size: var(--fs-sm); }
.field { margin-top: 1.25rem; }
.field label { display: block; font-weight: 600; color: var(--ink); margin-bottom: 0.375rem; }
.field .hint { display: block; font-size: 0.875rem; color: var(--muted); margin-top: 0.375rem; }
.input {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid #c9c6bf;
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}
.input:focus-within { border-color: var(--accent); outline: 3px solid var(--focus); outline-offset: 2px; }
.input span { padding-left: 1rem; color: var(--muted); font-weight: 600; }
.input input {
  flex: 1;
  min-width: 0;
  min-height: 3.25rem;
  padding: 0.5rem 1rem 0.5rem 0.5rem;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
  border: 0;
  background: transparent;
  font-variant-numeric: tabular-nums;
}
.input input:focus { outline: none; }
.input input { caret-color: var(--accent); }
.field-error { color: #a1251b; font-size: var(--fs-sm); margin-top: 0.375rem; }

.calc-out { margin-top: 1.5rem; }
.calc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calc-table caption { text-align: left; font-weight: 700; color: var(--ink); padding-bottom: 0.5rem; }
.calc-table th, .calc-table td { padding: 0.75rem 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.calc-table td { white-space: nowrap; text-align: right; font-weight: 600; color: var(--ink); }
.calc-table tr.total th, .calc-table tr.total td { border-bottom: 0; padding-top: 1rem; font-weight: 700; color: var(--ink); }
.calc-table tr.total td { font-size: 1.5rem; color: var(--accent); }
.calc-note { margin-top: 1rem; font-size: 0.875rem; color: var(--muted); }

/* Deadlines */

.deadlines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.deadlines > li { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.deadlines time { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.deadlines time span { display: block; font-size: 2rem; letter-spacing: -0.02em; }
.deadlines .when { display: block; font-size: 0.875rem; color: var(--muted); margin-top: 0.25rem; font-weight: 500; }
.deadlines .when.soon { color: #a1251b; font-weight: 700; }
.deadlines ul { list-style: none; margin: 0.5rem 0 0; padding: 0; font-size: var(--fs-sm); }
.deadlines ul li { padding: 0.25rem 0; }
.deadlines .muted { color: var(--muted); }
.month-nav { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.month-nav strong { min-width: 10rem; text-align: center; color: var(--ink); font-size: 1.125rem; }
.month-nav button {
  min-height: 44px;
  padding: 0 1rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.month-nav button:hover { border-color: var(--ink); }
.status { color: var(--muted); padding: 1.5rem 0; }

.callout {
  background: var(--soft);
  border-radius: 12px;
  padding: clamp(1.5rem, 1rem + 2vw, 2.25rem);
  max-width: 44rem;
}
.callout h2, .callout h3 { margin-bottom: 0.75rem; }
.callout .actions { margin-top: 1.5rem; }

/* Footer */

.site-footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  font-size: var(--fs-sm);
  padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 2rem;
  border-top: 1px solid var(--line-ink);
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 3fr));
  gap: 2rem;
}
.footer-h { font-weight: 700; color: #fff; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { padding: 0.25rem 0; }
.footer-grid address { font-style: normal; }
.footer-legal {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-ink);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* Mobile action bar */

.callbar { display: none; }
@media (max-width: 760px) {
  .callbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.625rem var(--gutter) calc(0.625rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(19, 33, 60, 0.08);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
  }
  .callbar.is-hidden { transform: translateY(110%); visibility: hidden; }
  .hero .actions .btn, .page-head .actions .btn { flex: 1 1 100%; }
  .callbar .btn { min-height: 3rem; padding-inline: 0.75rem; font-size: 1rem; }
  body { padding-bottom: calc(4.25rem + env(safe-area-inset-bottom)); }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Hero lines: ledger rules, columns and trend lines drawn behind the navy field */

.hero, .page-head { position: relative; overflow: hidden; isolation: isolate; }
.hero > .wrap, .page-head > .wrap { position: relative; z-index: 1; }

.hero-lines {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: 0;
  width: min(52%, 48rem);
  height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 35%);
  mask-image: linear-gradient(to right, transparent, #000 35%);
  fill: none;
  stroke-linecap: round;
}
.hl-rule { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; vector-effect: non-scaling-stroke; }
.hl-bar { fill: rgba(255, 255, 255, 0.05); stroke: none; }
.hl-trend { stroke: rgba(195, 203, 219, 0.32); stroke-width: 1.1; }
.hl-accent { stroke: #6fa3cf; stroke-width: 1.5; }
.hl-dot { fill: #6fa3cf; stroke: none; }


@media (max-width: 860px) {
  .hero-lines { width: 100%; height: 55%; opacity: 0.5; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 40%); mask-image: linear-gradient(to bottom, transparent, #000 40%); }
}

/* Lines stay hidden until the script draws them; without the script they never hide */
.js-motion .hero-lines { visibility: hidden; }

.hl-cursor { visibility: hidden; }
.hl-cursor-line { stroke: rgba(255, 255, 255, 0.22); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.hl-cursor-dot { fill: var(--ink); stroke: #9cc3e4; stroke-width: 2; vector-effect: non-scaling-stroke; }
.hl-cursor-label { fill: #fff; stroke: none; font-family: var(--font); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }

/* Entrance: hidden only while the script is about to animate; a timeout in <head> restores it */
.js-motion .hero h1,
.js-motion .hero .lead,
.js-motion .hero .actions, .js-motion .hero .facts { visibility: hidden; }
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.split-word > span { display: inline-block; }

/* Services index (home): big names on the left, the hovered service explained on the right */

/* Method chart: the hero's accent curve continues through the steps, drawn with scroll */

.steps-wrap { position: relative; }
.steps-chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  fill: none;
}
.steps-chart .sc-line { stroke: var(--terra-mark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.steps-chart .sc-base { stroke: var(--line); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 6; }
.steps-chart .sc-node { fill: var(--bg); stroke: var(--line); stroke-width: 2; transition: stroke 0.3s, fill 0.3s; }
.section-soft .steps-chart .sc-node { fill: var(--soft); }
.steps-chart .sc-node.is-on { stroke: var(--terra-mark); fill: var(--terra-mark); }

.steps-wrap.chart-band { padding-top: 7.5rem; }
.steps-wrap.chart-rail .steps { padding-left: 2.25rem; }

.chart-ready .steps li::before { border-bottom-color: var(--line); transition: border-color 0.4s; }
.chart-ready .steps li h3, .chart-ready .steps li p { transition: color 0.4s, opacity 0.4s; }
.chart-ready .steps li:not(.is-on) h3 { color: var(--muted); }
.chart-ready .steps li.is-on::before { border-bottom-color: var(--ink); }
.chart-rail .steps li::before { display: none; }

/* Home: servizi a riquadri compatti, navy e Warm Stone alternati */

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}
.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  padding-bottom: 5.5rem;
  border-radius: 24px;
  background: var(--soft);
  color: var(--muted);
  text-decoration: none;
  transition: background-color 0.3s;
}
.bento-card:hover { background: #eeece7; text-decoration: none; }
.bento-card.b1, .bento-card.b2 { grid-column: span 3; }
.bento-card.b3, .bento-card.b4, .bento-card.b5 { grid-column: span 2; }
.bento-title { display: block; font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; color: var(--ink); }
.bento-desc { display: block; max-width: 34rem; margin-top: 0.625rem; font-size: var(--fs-sm); line-height: 1.55; }
.bento-list { list-style: none; margin: 1.5rem 0 0; padding: 1.25rem 0 0; border-top: 1px solid var(--line); color: var(--text); font-size: var(--fs-sm); line-height: 1.45; }
.bento-list li { position: relative; padding-left: 1.125rem; }
.bento-list li + li { margin-top: 0.5rem; }
.bento-list li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 0.4375rem; height: 0.4375rem; border-radius: 2px; background: var(--accent); }
.bento-go {
  position: absolute;
  right: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  bottom: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  transition: background-color 0.3s, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.bento-go .icon { width: 1.125rem; height: 1.125rem; transform: rotate(-45deg); }
.bento-card:hover .bento-go { background: var(--accent); transform: translate(2px, -2px); }

.bento-card.is-ink { background: var(--ink); color: var(--on-ink-muted); }
.bento-card.is-ink:hover { background: var(--ink-2); }
.bento-card.is-ink .bento-title { color: #fff; }
.bento-card.is-ink .bento-list { color: #fff; border-top-color: var(--line-ink); }
.bento-card.is-ink .bento-list li::before { background: #6fa3cf; }
.bento-card.is-ink .bento-go { background: #fff; color: var(--ink); }
.bento-card.is-ink:hover .bento-go { background: #6fa3cf; color: var(--ink); }

@media (max-width: 960px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-card.b1 { grid-column: 1 / -1; }
  .bento-card.b2, .bento-card.b3, .bento-card.b4, .bento-card.b5 { grid-column: span 1; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .bento-card.b1, .bento-card.b2, .bento-card.b3, .bento-card.b4, .bento-card.b5 { grid-column: 1 / -1; }
}

/* Home: casi su sezione scura */

.section-ink .section-head p { color: var(--on-ink-muted); }
.case-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.case-card {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  border-radius: 24px;
  background: var(--ink-2);
  border: 1px solid var(--line-ink);
}
.case-card h3 { font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1.2; }
.case-card p { margin-top: 1rem; color: var(--on-ink-muted); font-size: var(--fs-sm); }
.case-card .result { margin-top: auto; padding-top: 1.5rem; color: #fff; font-weight: 600; font-size: 1.0625rem; line-height: 1.45; }
.case-card .result::before { content: ""; display: block; width: 2rem; height: 3px; border-radius: 2px; background: var(--terra-light); margin-bottom: 1rem; }
@media (max-width: 960px) { .case-cards { grid-template-columns: 1fr; } }

/* Home: team e sedi, pronti per le foto */

.ph { position: relative; display: block; overflow: hidden; border-radius: 24px; background: var(--soft); }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph-initials { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(2rem, 1.5rem + 1.5vw, 2.75rem); font-weight: 700; letter-spacing: -0.02em; color: var(--terra-ink); }
.team-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.team-cards .ph { aspect-ratio: 4 / 5; margin-bottom: 1rem; }
.team-cards strong { display: block; color: var(--ink); font-size: 1rem; line-height: 1.3; }
.team-cards li > span:last-child { display: block; margin-top: 0.25rem; color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
@media (max-width: 960px) { .team-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2rem; } }
@media (max-width: 560px) { .team-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.sedi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); }
.sede { position: relative; border-radius: 24px; overflow: hidden; min-height: 17rem; display: flex; align-items: flex-end; background: var(--ink); }
.sede .ph { position: absolute; inset: 0; border-radius: 0; background: linear-gradient(135deg, var(--ink-2), var(--ink)); }
.sede .ph:has(img)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(19, 33, 60, 0.85), rgba(19, 33, 60, 0) 65%); }
.sede-text { position: relative; padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem); color: var(--on-ink-muted); }
.sede-text h3 { color: #fff; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); letter-spacing: -0.02em; }
.sede-text span { display: block; margin-top: 0.25rem; font-weight: 600; color: #fff; }
.sede-text address { font-style: normal; margin-top: 0.5rem; font-size: var(--fs-sm); }
@media (max-width: 760px) { .sedi { grid-template-columns: 1fr; } .sede { min-height: 13rem; } }
.sede-text a { display: inline-block; margin-top: 1rem; color: #fff; font-weight: 600; font-size: var(--fs-sm); }
.sede-text a:hover { color: #fff; text-decoration-thickness: 2px; }

/* Pagine interne: riquadri a due toni */

.topic:nth-of-type(even) .topic-panel { background: var(--ink); color: var(--on-ink-muted); }
.topic:nth-of-type(even) .topic-panel-h { color: #fff; }
.topic:nth-of-type(even) .topic-panel .list { color: #fff; }
.topic:nth-of-type(even) .topic-panel .list li::before { background: #6fa3cf; }

.tiles { display: grid; gap: 1rem; }
.tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile {
  padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem);
  border-radius: 24px;
  background: var(--soft);
  color: var(--muted);
}
.tile > .icon { width: 1.75rem; height: 1.75rem; color: var(--accent); margin-bottom: 1.25rem; }
.tile h3 { font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.25; }
.tile > div { margin-top: 0.625rem; font-size: var(--fs-sm); line-height: 1.55; }
.tile-lg { display: flex; flex-direction: column; padding: clamp(1.75rem, 1.2rem + 2vw, 3rem); }
.tile-lg h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.tile-lg p { margin-top: 0.875rem; max-width: 30rem; }
.tile-lg .actions { margin-top: auto; padding-top: 2rem; }
.tile.is-ink { background: var(--ink); color: var(--on-ink-muted); }
.tile.is-ink h2, .tile.is-ink h3 { color: #fff; }
.tile.is-ink > .icon { color: #6fa3cf; }
.tile a:not(.btn) { overflow-wrap: anywhere; }
@media (max-width: 960px) { .tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tiles-4, .tiles-2 { grid-template-columns: 1fr; } }

.stat-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; list-style: none; margin: 0; padding: 0; }
.stat-tiles li { padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem); border-radius: 24px; background: var(--soft); color: var(--muted); }
.stat-tiles b { display: block; font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-tiles span { display: block; margin-top: 0.75rem; font-size: var(--fs-sm); }
.stat-tiles li.is-ink { background: var(--ink); color: var(--on-ink-muted); }
.stat-tiles li.is-ink b { color: #fff; }
@media (max-width: 960px) { .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.section-soft .team-cards .ph { background: #fff; }
.remote-card { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 1rem; padding: clamp(1.5rem, 1.1rem + 1.2vw, 2.25rem); border-radius: 24px; background: #fff; color: var(--muted); }
.remote-card > .icon { width: 1.75rem; height: 1.75rem; flex: none; color: var(--accent); }
.remote-card h3 { font-size: 1.25rem; }
.remote-card p { margin-top: 0.5rem; font-size: var(--fs-sm); max-width: 44rem; }
.tile.is-ink a:not(.btn), .tile.is-ink a:not(.btn):hover { color: #fff; }
.prose .tiles { margin-top: 1rem; }
.prose .tile h3 { margin: 0; font-size: 1.125rem; }
.prose .tile p { margin: 0; }
.prose .tile p { color: var(--muted); }
.prose .tile.is-ink p { color: var(--on-ink-muted); }

/* Secondo colore: terracotta (piena, chiara, marcatori) */

.list li::before, .bento-list li::before, .topic-panel .list li::before { background: var(--terra-mark); }
.bento-card.is-ink .bento-list li::before, .topic:nth-of-type(even) .topic-panel .list li::before { background: var(--terra-light); }
.topic:nth-of-type(odd) .topic-panel { background: var(--warm); }

.bento-card.is-terra { background: var(--terra); color: #fff; }
.bento-card.is-terra:hover { background: var(--terra-hover); }
.bento-card.is-terra .bento-title, .bento-card.is-terra .bento-list { color: #fff; }
.bento-card.is-terra .bento-list { border-top-color: rgba(255, 255, 255, 0.3); }
.bento-card.is-terra .bento-list li::before { background: #fff; }
.bento-card.is-terra .bento-go { background: #fff; color: var(--terra); }
.bento-card.is-terra:hover .bento-go { background: var(--ink); color: #fff; }
.bento-card.is-warm { background: var(--warm); }
.bento-card.is-warm:hover { background: var(--warm-hover); }
.bento-card.is-warm .bento-list { border-top-color: #ead2c5; }
.bento-card.is-warm .bento-go { background: var(--terra); }
.bento-card.is-warm:hover .bento-go { background: var(--ink); }

.tile.is-terra, .stat-tiles li.is-terra { background: var(--terra); color: #fff; }
.tile.is-terra h2, .tile.is-terra h3, .stat-tiles li.is-terra b { color: #fff; }
.tile.is-terra > .icon { color: #fff; }
.tile.is-terra a:not(.btn), .tile.is-terra a:not(.btn):hover { color: #fff; }
.prose .tile.is-terra p { color: #fff; }
.tile.is-warm, .stat-tiles li.is-warm { background: var(--warm); }
.tile.is-warm > .icon { color: var(--terra-ink); }
.stat-tiles li.is-warm b { color: var(--terra-ink); }
