/* ---------- fonts ---------- */
/* Inter 4.1 variable (OFL, see fonts/OFL.txt), self-hosted: wght 400-700 + opsz,
   subset to Latin, Latin-1, general punctuation and the few symbols the site uses.
   Rename the file (v2, v3...) when it changes: it is cached as immutable. */
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var-latin-v1.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2264-2265;
}
/* Arial scaled to Inter's metrics, so the swap to Inter does not shift the layout */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 107.5%;
  ascent-override: 90.1%;
  descent-override: 22.4%;
  line-gap-override: 0%;
}

/* ---------- tokens ---------- */
:root {
  --font-sans: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #0d1117;
  --bg-alt: #11161f;
  --surface: #161d29;
  --border: #26303f;
  --text: #dbe2ec;
  --text-dim: #93a0b4;
  --accent: #9d7dff;
  --accent-strong: #8560f5;
  --accent-ink: #14082e;
  --max: 1080px;
  /* type scale: 7 steps, nothing else sets a font-size (SVG diagram labels excepted) */
  --t-xs: .8125rem;   /* 13px labels, meta, footer */
  --t-sm: .9375rem;   /* 15px secondary and card text */
  --t-base: 1rem;     /* 16px body, buttons */
  --t-lg: 1.125rem;   /* 18px lede, card titles */
  --t-xl: 1.375rem;   /* 22px case h2, figures */
  --t-2xl: 1.75rem;   /* 28px section h2, stats */
  --t-3xl: clamp(min(2rem, 10.5vw), 1rem + 3vw, 2.875rem); /* h1, 32-46px */
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #fafaf8; --bg-alt: #f1f2ef; --surface: #ffffff; --border: #dfe3da;
    --text: #1c2430; --text-dim: #5b6674;
    --accent: #5B2BD6; --accent-strong: #4a21b8; --accent-ink: #ffffff;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #fafaf8; --bg-alt: #f1f2ef; --surface: #ffffff; --border: #dfe3da;
  --text: #1c2430; --text-dim: #5b6674;
  --accent: #5B2BD6; --accent-strong: #4a21b8; --accent-ink: #ffffff;
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
/* 100% = the user's browser/OS text size (16px by default) */
html { font-size: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--t-base)/1.6 var(--font-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
/* inline SVG icons inside buttons (theme toggle, menu) */
.icon { display: block; flex: none; width: 1.15em; height: 1.15em; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: var(--t-3xl); line-height: 1.12; letter-spacing: -.022em; }
h1, h2, .brief-title { text-wrap: balance; }
/* anchor jumps: about 20px of air between the sticky header (61px) and the heading */
.section[id] { scroll-margin-top: 18px; }
h2[id] { scroll-margin-top: 80px; }
p { margin: 0 0 1em; }
a { color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; height: 60px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: var(--t-base); color: var(--text);
  text-decoration: none; letter-spacing: .01em;
}
.brand img { width: 36px; height: 36px; display: block; }
.brand .logo-light { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .brand .logo-light { display: block; }
  :root:not([data-theme="dark"]) .brand .logo-dark { display: none; }
}
:root[data-theme="light"] .brand .logo-light { display: block; }
:root[data-theme="light"] .brand .logo-dark { display: none; }
.site-nav { display: flex; gap: 18px; align-items: center; margin-left: auto; }
.site-nav a { color: var(--text-dim); text-decoration: none; font-size: var(--t-sm); min-height: 40px; display: inline-flex; align-items: center; }
.site-nav a:hover { color: var(--text); }
.site-nav .lang, .site-nav .theme-toggle {
  border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 12px; color: var(--accent);
  background: none; font: inherit; font-size: var(--t-sm); font-weight: 600; cursor: pointer; line-height: 1.5;
  min-height: 40px; display: inline-flex; align-items: center;
}
.site-nav .lang:hover, .site-nav .theme-toggle:hover { border-color: var(--accent); }
.site-nav .nav-cta {
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; padding: 5px 14px; font-weight: 700;
  min-height: 40px; display: inline-flex; align-items: center;
}
.site-nav .nav-cta:hover { background: var(--accent-strong); color: var(--accent-ink); }
.nav-burger {
  display: none; width: 44px; height: 44px; padding: 0;
  place-items: center; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font: inherit; font-size: var(--t-base); line-height: 1; cursor: pointer; margin-left: 10px;
}
.nav-burger:hover { border-color: var(--accent); }

/* ---------- focus and screen-reader helpers ---------- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}
.cta:focus-visible, .site-nav .nav-cta:focus-visible { outline-color: var(--text); }
.site-nav .lang:focus-visible, .site-nav .theme-toggle:focus-visible,
.site-nav .nav-cta:focus-visible { border-radius: 999px; }
.nav-burger:focus-visible { border-radius: 10px; }
.aud-card:focus-visible, .teaser:focus-visible { border-radius: 14px; }
/* skip link: hidden like .sr-only until it gets keyboard focus */
.skip { position: absolute; top: 8px; left: 16px; z-index: 20; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip:focus { width: auto; height: auto; min-height: 44px; overflow: visible; clip: auto; display: inline-flex; align-items: center; background: var(--accent); color: var(--accent-ink); padding: 0 16px; border-radius: 8px; font-weight: 700; text-decoration: none; }
#main, #top { scroll-margin-top: 80px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- hero ---------- */
.hero { padding: 84px 0 60px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 300px at 85% 10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(500px 260px at 8% 90%, color-mix(in srgb, var(--accent) 8%, transparent), transparent 70%);
}
.hero .container { position: relative; }
.kicker {
  color: var(--accent); font-weight: 600; font-size: var(--t-xs); margin-bottom: 14px;
}
.kicker .rotator { border-right: 2px solid var(--accent); padding-right: 2px; }
.lede { color: var(--text-dim); font-size: var(--t-lg); max-width: 46rem; text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }
.hero-cta .cta { margin-top: 0; font-size: var(--t-base); padding: 11px 22px; }
.cta.ghost { background: none; border: 1px solid color-mix(in srgb, var(--text) 35%, var(--border)); color: var(--text); font-weight: 600; }
.cta.ghost:hover { background: none; border-color: var(--accent); color: var(--text); }
.audience { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 34px 0 0; scroll-margin-top: 80px; }
.audience.two { grid-template-columns: 1fr 1fr; }
.aud-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 24px;
  text-decoration: none; color: var(--text);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.aud-card:hover {
  transform: translateY(-3px); border-color: var(--accent);
  box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--accent) 45%, transparent);
}
.aud-tag { color: var(--accent); font-size: var(--t-xs); font-weight: 600; }
.aud-card h3, .aud-card h2 { margin: 0; font-size: var(--t-lg); }
.aud-card p { color: var(--text-dim); font-size: var(--t-sm); margin: 0; flex: 1; }
.aud-card .go { color: var(--accent); font-weight: 600; font-size: var(--t-sm); margin-top: 8px; display: inline-flex; align-items: center; min-height: 40px; }
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border);
}
.stat strong { display: block; font-size: var(--t-2xl); color: var(--accent); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--text-dim); font-size: var(--t-xs); line-height: 1.4; display: block; }

/* ---------- sections ---------- */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section h2 { font-size: var(--t-2xl); letter-spacing: -.012em; margin-bottom: 16px; }
.section-intro { color: var(--text-dim); max-width: 44rem; margin-bottom: 34px; }

/* ---------- featured teasers (home) ---------- */
.teasers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.teaser {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px;
  text-decoration: none; color: var(--text);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.teaser:hover {
  transform: translateY(-4px); border-color: var(--accent);
  box-shadow: 0 10px 30px -14px color-mix(in srgb, var(--accent) 45%, transparent);
}
.teaser .case-meta { margin-bottom: 2px; }
.teaser h3 { font-size: var(--t-lg); margin: 0; }
.teaser p { color: var(--text-dim); font-size: var(--t-sm); margin: 0; flex: 1; }
.teaser .metric {
  color: var(--accent); font-weight: 700; font-size: var(--t-sm); margin-top: 10px;
}
.teaser .go { color: var(--accent); font-weight: 600; font-size: var(--t-sm); margin-top: 2px; display: inline-flex; align-items: center; min-height: 40px; }
.case-meta {
  color: var(--accent); font-size: var(--t-xs); font-weight: 600; margin-bottom: 8px;
}

/* ---------- more-work list (home) ---------- */
.more-list {
  list-style: none; margin: 26px 0 0; padding: 0; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: max-content 1fr;
}
/* subgrid: every description starts at the same x, after the longest title */
.more-list li {
  grid-column: 1 / -1; display: grid; grid-template-columns: subgrid;
  column-gap: 24px; align-items: baseline;
  padding: 13px 4px; border-bottom: 1px solid var(--border);
  color: var(--text-dim); font-size: var(--t-sm);
}
.more-list strong { color: var(--text); font-weight: 600; white-space: nowrap; }
.more-list a { font-weight: 600; text-decoration: none; white-space: nowrap; }

/* ---------- themes / services ---------- */
.themes, .services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.theme, .service {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px;
}
.theme h3, .service h3 { font-size: var(--t-base); }
.theme p, .service p { color: var(--text-dim); font-size: var(--t-sm); margin: 0; }
.services { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ---------- stack ---------- */
.stack { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.stack li {
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: 5px 14px; font-size: var(--t-sm); color: var(--text-dim);
}
.stack-groups { display: grid; }
.stack-group {
  display: flex; gap: 18px; align-items: baseline;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.stack-group:first-child { padding-top: 0; }
.stack-group:last-child { border-bottom: none; padding-bottom: 0; }
.stack-group h3 {
  flex: 0 0 160px; margin: 0; font-size: var(--t-xs); font-weight: 600; color: var(--text-dim);
}
.stack-group .stack { flex: 1; }

/* ---------- contact / footer ---------- */
.contact { text-align: center; }
.contact .lede { margin-inline: auto; }
.contact .cta { margin: 10px 6px 0; }
.contact-email { margin: 18px 0 8px; font-size: var(--t-xl); font-weight: 600; }
.contact-email a { color: var(--accent); text-decoration: none; overflow-wrap: anywhere; }
.contact-email a:hover { text-decoration: underline; }
.cta {
  display: inline-block; margin-top: 10px;
  background: var(--accent); color: var(--accent-ink);
  font-weight: 700; text-decoration: none; border: 1px solid transparent;
  padding: 13px 28px; border-radius: 10px; font-size: var(--t-base);
}
.cta:hover { background: var(--accent-strong); }

/* footer: brand column + three link groups, then a bottom bar (legal, privacy, language) */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-alt);
  padding: 48px 0 28px; color: var(--text-dim); font-size: var(--t-sm); line-height: 1.55;
}
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.site-footer p { margin: 0; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.footer-brand .brand { display: inline-flex; margin-bottom: 14px; color: var(--text); }
.footer-brand .brand:hover { color: var(--text); text-decoration: none; }
.footer-brand p { max-width: 34ch; }
.footer-brand p + p { margin-top: 12px; }
.footer-brand p a { color: var(--accent); font-weight: 600; }
.footer-title { font-size: var(--t-sm); font-weight: 600; color: var(--text); margin: 0 0 12px; line-height: 1.4; text-wrap: initial; }
.footer-links, .footer-meta { list-style: none; margin: 0; padding: 0; }
.footer-links { display: grid; gap: 6px; }
.footer-links a { display: inline-block; padding-block: 2px; min-height: 24px; }
.site-footer a[aria-current="page"] { color: var(--text); font-weight: 600; }
.footer-bottom {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: var(--t-xs);
}
.footer-meta { display: flex; flex-wrap: wrap; gap: 0 20px; }
.footer-meta a { display: inline-block; padding-block: 2px; min-height: 24px; }
.footer-bottom .footer-note { margin-left: auto; }

/* ---------- case detail pages ---------- */
.case-hero { padding: 64px 0 30px; }
.case-hero h1 { max-width: 50rem; }
.crumb { color: var(--text-dim); font-size: var(--t-sm); text-decoration: none; display: inline-flex; align-items: center; min-height: 40px; margin-bottom: 10px; }
.crumb:hover { color: var(--text); }
.glance {
  display: flex; flex-wrap: wrap; gap: 30px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 22px 26px; margin: 8px 0 26px;
}
.glance div strong { display: block; font-size: var(--t-xl); color: var(--accent); letter-spacing: -.02em; }
.glance div span { color: var(--text-dim); font-size: var(--t-xs); }
.case-hero:has(> .container > .glance:last-child) { padding-bottom: 32px; }
.case-hero > .container > .glance:last-child { margin-bottom: 0; }
.case-body { padding-bottom: 64px; }
.case-body h2 { font-size: var(--t-xl); letter-spacing: -.012em; margin: 34px 0 12px; }
.case-body h2:first-child { margin-top: 0; }
.case-body p, .case-body li { color: var(--text-dim); }
/* reading measure: body text lines stay readable on wide screens */
.case-body p, .case-body li, .faq p { max-width: 68ch; }
.case-body ul { padding-left: 1.15em; margin: 0 0 1em; }
.case-body li { margin-bottom: .5em; }
.case-body li strong, .case-body p strong { color: var(--text); }

/* diagrams */
.diagram {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px; margin: 10px 0 6px;
  overflow-x: auto;
}
.diagram svg { display: block; width: 100%; height: auto; min-width: 560px; }
.diagram .box { fill: var(--surface); stroke: var(--border); stroke-width: 1.5; rx: 10; }
.diagram .box-accent { fill: color-mix(in srgb, var(--accent) 14%, var(--surface)); stroke: var(--accent); }
.diagram .lbl { fill: var(--text); font: 600 var(--t-xs) var(--font-sans); }
.diagram .sub { fill: var(--text-dim); font: 11.5px var(--font-sans); }
.diagram .flow { stroke: var(--text-dim); stroke-width: 1.6; fill: none; }
.diagram .flow-accent { stroke: var(--accent); stroke-width: 1.8; fill: none; }
.diagram .flow-dashed { stroke-dasharray: 5 4; }
.diagram .arrow { fill: var(--text-dim); }
.diagram .arrow-accent { fill: var(--accent); }
.diagram-caption { color: var(--text-dim); font-size: var(--t-xs); margin-bottom: 20px; }
.diagram-hint { display: none; }
@media (max-width: 620px) { .diagram-hint { display: block; color: var(--text-dim); font-size: var(--t-xs); text-align: right; margin: 0 0 4px; } }

/* ---------- offer pages ---------- */
.offer-start {
  background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 14px; padding: 22px 26px; margin: 4px 0 8px;
}
.offer-start p:last-child, .offer-start ul:last-child { margin-bottom: 0; }
.direct-line { color: var(--text-dim); font-size: var(--t-sm); margin: 12px 0 0; }
.direct-line a { color: var(--accent); font-weight: 600; text-decoration: none; }
.direct-line a:hover { text-decoration: underline; }
.case-hero .hero-cta { margin-top: 22px; }
.glance-cases { display: grid; grid-template-columns: repeat(4, 1fr); align-items: start; gap: 18px; margin: 26px 0 0; padding: 18px 24px; }
.glance-cases a { display: flex; flex-direction: column; text-decoration: none; color: var(--text); }
.glance-cases strong { display: block; font-size: var(--t-xl); color: var(--accent); letter-spacing: -.02em; }
.glance-cases span { color: var(--text-dim); font-size: var(--t-xs); }
.glance-cases .go { color: var(--accent); font-weight: 600; margin-top: 4px; }
.glance-cases a:hover .go { text-decoration: underline; }
.first-step { color: var(--text-dim); font-size: var(--t-sm); margin: 16px 0 0; }
.first-step strong { color: var(--text); }
.first-step a { font-weight: 600; text-decoration: none; }
.first-step a[href="#come-si-parte"] { white-space: nowrap; }
.first-step a, .offer-cases a, .direct-line a, .site-footer p a { display: inline-block; padding-block: 2px; min-height: 24px; }
.case-body h2[id] { scroll-margin-top: 80px; }
.glance-cases a[hidden] { display: none; }
.case-body .glance-cases:first-child { margin: 0; }
.case-tag { align-self: flex-start; color: var(--accent); font-size: var(--t-xs); font-weight: 600; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); border-radius: 999px; padding: 1px 8px; margin-bottom: 4px; }
.case-hero.tight { padding: 34px 0 26px; }
.case-hero.tight .crumb { margin-bottom: 10px; }
.case-hero.tight .lede { margin-bottom: 0; }
.brief-invite { margin: 18px 0 0; }
.brief-title { font-size: var(--t-lg); margin: 0 0 4px; letter-spacing: -.01em; }
.brief-invite p { margin: 0; }
.brief-invite > p:not(.hero-cta) { color: var(--text-dim); max-width: 46rem; }
.brief-invite .hero-cta { margin-top: 14px; align-items: center; }
.brief-invite .hero-cta .cta { margin: 0; }
.cta-text { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; color: var(--accent); font-weight: 600; text-decoration: none; }
.cta-text:hover { text-decoration: underline; }
.contact .brief-invite { text-align: center; }
.contact .brief-invite > p:not(.hero-cta) { margin-inline: auto; }
.contact .brief-invite .hero-cta { justify-content: center; margin-top: 18px; }
.contact .brief-title { font-size: var(--t-2xl); }
.contact .brief-invite ~ .contact-email { margin: 22px 0 0; }
.contact .brief-invite ~ .direct-line { margin: 10px 0 0; }
.offer-cases li strong { color: var(--text); }
.offer-cases a { font-weight: 600; text-decoration: none; white-space: nowrap; }
.faq h3 { font-size: var(--t-base); margin: 24px 0 6px; padding-top: 24px; border-top: 1px solid var(--border); }
.faq h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.faq p { margin-bottom: 0; }
/* plain two-column definition list (home: method and skills, no card chrome) */
.plain-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 40px; margin: 0; }
.plain-list > div { border-top: 1px solid var(--border); padding: 14px 0 12px; }
.plain-list dt { font-weight: 600; margin-bottom: 2px; }
.plain-list dd { margin: 0; color: var(--text-dim); font-size: var(--t-sm); }
.subsection { margin-top: 44px; }
.subsection h3 { font-size: var(--t-xl); letter-spacing: -.012em; margin-bottom: 12px; }
.section-outro { margin: 26px 0 0; }

/* case page prev/next */
.case-nav { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; margin: 40px 0 -10px; border-top: 1px solid var(--border); padding-top: 12px; }
.case-nav-step { display: flex; gap: 24px; }
.case-nav a { text-decoration: none; font-weight: 600; font-size: var(--t-sm); display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }

/* ---------- studio (RiverDevStudio) ---------- */
.studio-card {
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  border-radius: 18px; padding: 34px 36px;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 9%, var(--surface)), var(--surface) 55%);
}
.studio-card h2 { font-size: var(--t-2xl); margin-bottom: 10px; letter-spacing: -.012em; }
.studio-card h2 .accent { color: var(--accent); }
.studio-card > p { color: var(--text-dim); max-width: 48rem; }
.studio-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 20px 0 4px; padding: 0; list-style: none; }
.studio-points li { color: var(--text-dim); font-size: var(--t-sm); }
.studio-points strong { display: block; color: var(--text); margin-bottom: 2px; }
.studio-cta-row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 20px; }
.studio-cta-row .cta { margin-top: 0; }
.studio-cta-row.centered { justify-content: center; }
.studio-cta-row .flagship { font-weight: 600; font-size: var(--t-sm); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- reveal on scroll ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-bottom .footer-note { margin-left: 0; flex-basis: 100%; }
  .themes, .teasers { grid-template-columns: 1fr 1fr; }
  .audience { grid-template-columns: 1fr; }
  .glance-cases { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 620px) {
  .brand span { display: none; }
  .brand img { width: 32px; height: 32px; }
  .brand { flex-shrink: 0; }
  .hero { padding: 28px 0 40px; }
  .kicker { margin-bottom: 8px; }
  /* home: the three audience cards fit in the first screen of a 390x844 phone */
  .hero .hero-cta { margin-top: 18px; }
  .hero .audience { margin-top: 20px; gap: 10px; }
  .hero .aud-card { padding: 12px 16px; gap: 0; }
  .hero .aud-card p, .hero .aud-tag { display: none; }
  .hero .aud-card .go { margin-top: 0; }
  .themes, .teasers, .audience, .audience.two, .studio-points, .plain-list { grid-template-columns: 1fr; }
  .studio-card { padding: 26px 22px; }
  .site-nav { gap: 10px; }
  .site-nav > a:not(.lang):not(.nav-cta) { display: none; }
  .site-nav .theme-toggle { display: none; }
  .site-nav .nav-cta, .site-nav .lang { padding: 8px 14px; font-size: var(--t-sm); }
  .nav-burger { display: inline-grid; }
  .site-header.open .nav-burger { margin-left: auto; }
  .site-header.open .site-nav .theme-toggle { display: inline-flex; }
  .stack { gap: 8px; }
  .stack li { font-size: var(--t-xs); padding: 4px 10px; }
  .stack-group { padding: 12px 0; gap: 8px; }
  .stack-group h3 { flex: none; }
  .site-header.open .site-nav {
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: row; flex-wrap: wrap; align-items: center;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 6px 24px 20px; gap: 0 10px;
    box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .45);
  }
  .site-header.open .site-nav > a:not(.lang):not(.nav-cta) {
    display: flex; flex: 1 0 100%; padding: 12px 0; font-size: var(--t-base); color: var(--text);
    border-bottom: 1px solid var(--border);
  }
  /* actions on one row: Contatti fills, theme and language sit beside it */
  .site-header.open .site-nav .nav-cta,
  .site-header.open .site-nav .lang,
  .site-header.open .site-nav .theme-toggle { margin-top: 16px; min-height: 48px; justify-content: center; }
  .site-header.open .site-nav .nav-cta { flex: 1 1 auto; font-size: var(--t-base); }
  .site-header.open .site-nav .theme-toggle,
  .site-header.open .site-nav .lang { flex: 0 0 48px; width: 48px; padding: 0; }
  .stack-group { flex-direction: column; gap: 8px; }
  .glance { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; padding: 18px 20px; }
  .glance > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .glance-cases { grid-template-columns: 1fr; gap: 0; padding: 4px 18px; }
  .glance-cases a { padding: 14px 0; }
  .glance-cases a + a { border-top: 1px solid var(--border); }
  .glance-cases strong { line-height: 1.2; }
  .glance-cases .go { margin-top: 6px; }
  .lede-more { display: none; }
  /* buttons: equal width side by side when both labels fit, otherwise full-width stacked */
  .hero-cta { gap: 10px; }
  .hero-cta .cta { flex: 1 1 0; min-width: max-content; text-align: center; padding-inline: 14px; }
  .brief-invite .cta-text { flex-basis: 100%; padding: 0; justify-content: flex-start; }
  .brief-invite + .direct-line { margin-top: 2px; }
  .contact .brief-invite .cta-text { justify-content: center; }
  .studio-cta-row { gap: 10px; }
  .studio-cta-row .cta, .contact .studio-cta-row .cta { flex: 1 1 100%; margin: 0; text-align: center; padding-inline: 14px; }
  .offer-start { padding: 18px 20px; }
  .more-list { display: block; }
  .more-list li { display: flex; flex-direction: column; gap: 2px; }
  /* long labels and links reflow instead of running off the screen */
  .more-list strong, .more-list a, .offer-cases a { white-space: normal; }
  .contact .container > .cta { display: block; margin: 10px 0 0; padding-inline: 14px; text-align: center; }
  .studio-cta-row .cta { min-width: 0; overflow-wrap: anywhere; }
  /* case page end nav: stacked */
  .case-nav { flex-direction: column; align-items: stretch; gap: 0; }
  .case-nav-step { justify-content: space-between; }
  /* tap targets >= 44px; negative margins keep the visual spacing */
  .brand { min-width: 44px; min-height: 44px; justify-content: center; }
  .site-nav .nav-cta, .site-nav .lang, .site-nav .theme-toggle { min-height: 44px; }
  .crumb { min-height: 44px; margin: -2px 0 8px; }
  .aud-card .go, .teaser .go { min-height: 44px; margin-block: -2px; }
  .first-step a, .offer-cases a, .direct-line a, .site-footer p a, .more-list a {
    display: inline; min-height: 0; padding-block: 14px; margin-block: 0;
  }
  /* footer: the name stays next to the mark; link rows are 44px tall, the gaps shrink to keep the rhythm */
  .site-footer { padding-top: 40px; }
  .site-footer .brand span { display: inline; }
  .footer-brand .brand { margin-bottom: 8px; }
  .footer-title { margin-bottom: 2px; }
  .footer-links { gap: 0; }
  .footer-links a, .footer-meta a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; }
  .footer-bottom { margin-top: 32px; padding-top: 8px; gap: 0 24px; }
  .footer-legal, .footer-note { padding-block: 6px; }
}
@media (max-width: 420px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-cta .cta { flex: 1 1 100%; min-width: 0; }
  /* home hero: the two buttons side by side when they fit, so the audience cards stay in the first screen */
  .hero .hero-cta .cta { flex: 1 1 0; min-width: max-content; padding-inline: 10px; font-size: var(--t-sm); }
  .studio-card { padding-inline: 16px; }
  .studio-cta-row .cta, .contact .container > .cta { font-size: var(--t-sm); padding-inline: 12px; }
}
@media (max-width: 360px) {
  .container { padding: 0 16px; }
  .studio-card { padding-inline: 12px; }
  /* full-width buttons: the side padding only has to keep the label off the border */
  .studio-cta-row .cta, .contact .container > .cta { padding-inline: 8px; }
}
.case-body code { white-space: nowrap; }
