/* Aiutant website. Light by default; dark only when the visitor picks
   it with the footer switch (data-theme="dark" on <html>). */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --soft: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --line: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --link: #0066cc;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --tile: #ffffff;
  --max: 1024px;
  --nav-h: 52px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --soft: #101012;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #86868b;
  --line: #424245;
  --accent: #0071e3;
  --link: #2997ff;
  --tile: #1d1d1f;
}
:root[data-theme="dark"] { color-scheme: dark; --nav-bg: rgba(22, 22, 23, 0.8); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0; font-family: var(--font); font-size: 17px; line-height: 1.47;
  letter-spacing: -0.022em; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

/* Nav */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}
.nav-shell { max-width: var(--max); margin: 0 auto; padding: 0 22px; height: var(--nav-h); display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand svg { width: 26px; height: 26px; flex: none; }
.logo-bg { fill: var(--ink); }
.logo-fg { stroke: var(--bg); }
.top-nav { margin-left: auto; }
.top-nav ul { list-style: none; display: flex; align-items: center; gap: 26px; margin: 0; padding: 0; }
.nav-link { font-size: 0.76rem; letter-spacing: -0.01em; color: var(--ink); opacity: 0.8; transition: opacity 0.2s; }
.nav-link:hover, .nav-link[aria-current] { opacity: 1; }
.nav-link[aria-current] { font-weight: 600; }
.nav-cta { opacity: 1; background: var(--accent); color: #fff; padding: 5px 13px; border-radius: 980px; }
.nav-cta:hover { background: var(--accent-hover); }
.nav-burger { display: none; margin-left: auto; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; position: relative; }
.nav-burger::before, .nav-burger::after { content: ""; position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--ink); transition: transform 0.25s; }
.nav-burger::before { top: 18px; }
.nav-burger::after { top: 25px; }
.nav-burger[aria-expanded="true"]::before { transform: translateY(3.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"]::after { transform: translateY(-3.5px) rotate(-45deg); }

/* Type */
.headline { font-size: clamp(2.8rem, 9vw, 6rem); line-height: 1.05; font-weight: 600; letter-spacing: -0.04em; }
.title { font-size: clamp(2rem, 4.6vw, 3.25rem); line-height: 1.07; font-weight: 600; letter-spacing: -0.03em; }
.intro { font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.2; color: var(--muted); margin-top: 14px; }
.links { margin-top: 34px; }
.btn { display: inline-block; background: var(--accent); color: #fff; padding: 11px 22px; border-radius: 980px; transition: background 0.2s; }
.btn:hover { background: var(--accent-hover); }

/* Sections */
.hero { text-align: center; padding: 120px 0 0; }
.hero-page { padding: 110px 0 64px; }
.more { color: var(--link); }
.more::after { content: " ›"; }
.more:hover { text-decoration: underline; }

/* Mockups and schemas: drawn, never screenshots. */
.mock { background: var(--soft); border-radius: 22px; padding: 30px; max-width: 860px; margin: 0 auto; text-align: left; font-size: 0.88rem; line-height: 1.35; letter-spacing: -0.01em; }
.mock + .mock { margin-top: 20px; }
.mock-note { text-align: center; color: var(--faint); font-size: 0.72rem; margin-top: 16px; }
.mock-cap { color: var(--muted); font-weight: 600; margin-bottom: 18px; }
.showcase { padding: 0 0 88px; }
.pill { display: inline-block; background: var(--accent); color: #fff; border-radius: 980px; padding: 6px 14px; font-size: 0.82rem; }
.chips { display: flex; gap: 6px; }
.chip { border: 1px solid var(--line); border-radius: 980px; padding: 2px 11px; color: var(--muted); font-size: 0.76rem; }
.chip.on { border-color: var(--ink); color: var(--ink); }

/* Flow: numbered steps joined by a line. */
.flow { list-style: none; margin: 0; padding: 0; display: flex; }
.flow li { flex: 1; text-align: center; padding: 0 8px; position: relative; }
.flow li + li::before { content: ""; position: absolute; top: 17px; right: calc(50% + 24px); width: calc(100% - 48px); height: 1.5px; background: var(--line); }
.flow i { display: block; width: 36px; height: 36px; line-height: 33px; margin: 0 auto 12px; border: 1.5px solid var(--ink); border-radius: 50%; font-style: normal; font-weight: 600; }
.flow li:first-child i { background: var(--link); border-color: var(--link); color: #fff; }
.flow b { display: block; font-size: 1.06rem; font-weight: 600; letter-spacing: -0.02em; }
.flow span { display: block; color: var(--muted); margin-top: 2px; }

/* Warm-up bars */
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: end; height: 190px; text-align: center; }
.bars > div { display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.bars i { display: block; background: var(--link); border-radius: 8px 8px 0 0; min-height: 6px; order: 2; }
.bars b { order: 1; font-size: 1.24rem; margin-bottom: 6px; }
.bars span { order: 3; color: var(--muted); margin-top: 8px; }

/* Kanban */
.kan { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.kan h3 { font-size: 0.82rem; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.kan h3 em { font-style: normal; font-weight: 400; color: var(--faint); margin-left: 6px; }
.kan-card { background: var(--tile); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.kan-card b { display: block; font-weight: 600; }
.kan-card span { color: var(--muted); }
.kan-card.won { box-shadow: inset 3px 0 0 var(--link); }

/* Workflow */
.wf { display: flex; flex-direction: column; align-items: center; }
.wf-step { background: var(--tile); border-radius: 12px; padding: 12px 18px; width: 100%; max-width: 300px; position: relative; margin-top: 26px; }
.wf-step::before { content: ""; position: absolute; left: 50%; top: -26px; height: 26px; width: 1.5px; background: var(--line); }
.wf-step.first { margin-top: 0; box-shadow: inset 0 3px 0 var(--link); }
.wf-step.first::before { display: none; }
.wf-step span { display: block; color: var(--faint); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.wf-step b { font-weight: 600; font-size: 1rem; }

/* Post composer */
.post { background: var(--tile); border-radius: 14px; padding: 22px; max-width: 460px; margin: 0 auto; }
.post-head b { display: block; font-size: 1.06rem; }
.post-head span, .post-foot > span:last-child { color: var(--muted); }
.post .chips { margin: 14px 0 18px; }
.lines i { display: block; height: 9px; border-radius: 5px; background: var(--line); margin-bottom: 9px; }
.lines i.short { width: 55%; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }

/* Map: dots, with markers that fade in and out. */
.geo { position: relative; max-width: 520px; margin: 0 auto; }
.geo svg:first-child { display: block; width: 100%; height: auto; }
.geo svg:first-child path { fill: none; stroke: var(--line); stroke-width: 4.6; stroke-linecap: round; }
:root[data-theme="dark"] .geo svg:first-child path { stroke: #48484a; }
.vid .geo { max-width: 380px; }
.mk { position: absolute; transform: translate(-50%, -50%); }
.mk i { display: block; width: 20px; height: 20px; line-height: 20px; border-radius: 50%; background: var(--ink); color: var(--bg); font-style: normal; font-weight: 700; font-size: 0.76rem; text-align: center; transition: box-shadow 0.3s; }
.mk.done i { width: 11px; height: 11px; background: var(--link); }
.mk.hit i { box-shadow: 0 0 0 6px rgba(128, 128, 128, 0.28); }
.mk.done.hit i { box-shadow: 0 0 0 6px rgba(41, 151, 255, 0.28); }
.tip { position: absolute; z-index: 2; left: 0; top: 0; background: var(--tile); border-radius: 12px; padding: 9px 14px; white-space: nowrap; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14); opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.tip.show { opacity: 1; }
.tip b { display: block; font-weight: 600; }
.tip span { color: var(--muted); font-size: 0.8rem; }
.cursor { position: absolute; z-index: 3; left: 85%; top: 88%; width: 22px; height: 22px; margin: -2px 0 0 -3px; transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1), top 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.12s; pointer-events: none; display: none; }
.js .cursor { display: block; }
.cursor path { fill: var(--ink); stroke: var(--bg); stroke-width: 1.4; stroke-linejoin: round; }
.cursor.down { transform: scale(0.82); }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; margin-top: 18px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { display: inline-block; font-style: normal; text-align: center; border-radius: 50%; }
.lg-hot { width: 18px; height: 18px; line-height: 18px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 0.72rem; }
.lg-done { width: 10px; height: 10px; background: var(--link); }

/* Mail schema (same picture as in the product). */
.mock-wide { max-width: 980px; padding: 24px; }
.md-scroll { overflow-x: auto; }
.md { display: block; width: 100%; min-width: 780px; height: auto; font-family: var(--font); }
.md-h { fill: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; }
.md-a { fill: none; stroke-width: 2; }
.md-gray { stroke: #86868b; } .md-f-gray { fill: #86868b; } .md-t-gray { fill: var(--muted); }
.md-red { stroke: #d70015; } .md-f-red { fill: #d70015; } .md-t-red { fill: #d70015; }
.md-green { stroke: #1a8f4c; } .md-f-green { fill: #1a8f4c; } .md-t-green { fill: #1a8f4c; }
.md-blue { stroke: var(--link); } .md-f-blue { fill: var(--link); }
.md-l { font-size: 13px; font-weight: 600; paint-order: stroke; stroke: var(--soft); stroke-width: 5px; }
.md-sep { stroke: var(--line); stroke-dasharray: 4 6; }
.md-zone { fill: none; stroke: var(--link); stroke-dasharray: 6 5; }
.md-zone-tag { fill: var(--link); }
.md-zone-t { fill: #fff; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; }
.md-box { box-sizing: border-box; height: 100%; display: flex; flex-direction: column; justify-content: center; border-radius: 14px; padding: 12px 16px; font-size: 13.5px; line-height: 1.32; letter-spacing: -0.01em; color: var(--muted); }
.md-box b { color: var(--ink); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.md-box span, .md-box small { display: block; }
.md-box em { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; border: 1px solid currentColor; border-radius: 980px; padding: 1px 8px; margin-left: 6px; vertical-align: 2px; white-space: nowrap; }
.md-card { background: var(--tile); }
.md-orange { box-shadow: inset 4px 0 0 #e8590c; } .md-orange em { color: #e8590c; }
.md-purple { box-shadow: inset 4px 0 0 #8944ab; } .md-purple em { color: #8944ab; }
.md-dark { background: #1d1d1f; color: #a1a1a6; } .md-dark b { color: #fff; } .md-dark .md-sky { color: #64b5ff; }
.md-bad { background: rgba(215, 0, 21, 0.08); box-shadow: inset 0 0 0 1px rgba(215, 0, 21, 0.3); }
.md-good { background: #1a8f4c; color: rgba(255, 255, 255, 0.85); } .md-good b { color: #fff; }
:root[data-theme="dark"] .md-dark { background: #2c2c2e; }

/* Simulated video on the home: one scene at a time. */
.vid { max-width: 860px; margin: 84px auto 0; background: var(--soft); border-radius: 22px; text-align: left; overflow: hidden; }
.vid-top { display: flex; align-items: center; gap: 18px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.vid-steps { flex: 1; display: flex; gap: 8px; }
.vid-step { flex: 1; background: none; border: 0; padding: 0; font: inherit; font-size: 0.76rem; font-weight: 600; color: var(--faint); text-align: left; cursor: pointer; }
.vid-step span { display: block; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid-step i { display: block; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.vid-step i::after { content: ""; display: block; height: 100%; width: 0; background: var(--ink); }
.vid-step.done i::after { width: 100%; }
.vid-step.on { color: var(--ink); }
.vid-step.on i::after { animation: vid-bar var(--vid-ms, 6000ms) linear forwards; }
.is-paused .vid-step.on i::after { animation-play-state: paused; }
@keyframes vid-bar { to { width: 100%; } }
.vid-pause { flex: none; background: none; border: 1px solid var(--line); border-radius: 980px; padding: 3px 12px; font: inherit; font-size: 0.76rem; color: var(--muted); cursor: pointer; }
.vid-pause:hover { color: var(--ink); border-color: var(--ink); }
.vid-stage { display: grid; padding: 26px 30px 32px; }
.vid-scene { grid-area: 1 / 1; display: flex; flex-direction: column; min-width: 0; }
.js .vid-scene { visibility: hidden; opacity: 0; }
.js .vid-scene.on { visibility: visible; opacity: 1; transition: opacity 0.5s ease; }
.vid-line { font-size: 1.24rem; line-height: 1.25; letter-spacing: -0.02em; color: var(--muted); margin-bottom: 24px; }
.vid-line b { color: var(--ink); font-weight: 600; }
.vid-scene > .mock { margin: auto 0; width: 100%; max-width: none; }
.mock.bare { background: none; padding: 0; border-radius: 0; }
html:not(.js) .vid-scene { grid-area: auto; margin-bottom: 40px; }
html:not(.js) .vid-top { display: none; }

/* Report */
.rep { background: var(--tile); border-radius: 14px; padding: 22px; max-width: 560px; margin: 0 auto; }
.rep-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.rep-head b { font-size: 1.06rem; }
.rep-row { display: grid; grid-template-columns: 6.5em 1fr 2em; gap: 12px; align-items: center; margin-bottom: 12px; }
.rep-row span { color: var(--muted); }
.rep-row i { display: block; height: 10px; border-radius: 5px; background: var(--line); }
.rep-row i b { display: block; height: 100%; border-radius: 5px; background: var(--link); }
.rep-row em { font-style: normal; font-weight: 600; text-align: right; }

/* Home: the six areas */
.areas { padding: 110px 0 130px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.areas .title { text-align: center; margin-bottom: 56px; }
.card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 26px 26px 22px; transition: border-color 0.2s; }
.card:hover { border-color: var(--ink); }
.card h3 { font-size: 1.41rem; line-height: 1.15; font-weight: 600; letter-spacing: -0.025em; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.card ul { list-style: none; margin: 0; padding: 16px 0; flex: 1; }
.card li { position: relative; padding-left: 26px; color: var(--muted); margin-bottom: 8px; line-height: 1.35; }
.card li::before { content: ""; position: absolute; left: 3px; top: 0.3em; width: 11px; height: 6px; border-left: 2px solid var(--link); border-bottom: 2px solid var(--link); transform: rotate(-45deg); }
.card-more { padding-top: 16px; border-top: 1px dashed var(--line); font-weight: 600; font-size: 0.94rem; }
.card-more::after { content: " →"; }

/* Area page */
.narrow { max-width: 692px; }
.detail { padding: 0 0 130px; }
.rows > div { display: grid; grid-template-columns: 11em 1fr; gap: 0 24px; padding: 15px 0; border-top: 1px solid var(--line); }
.rows > div:last-child { border-bottom: 1px solid var(--line); }
.rows dt { font-weight: 600; }
.rows dd { color: var(--muted); }
.next { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 56px; }

/* Close + footer */
.site-footer { color: var(--faint); font-size: 0.72rem; padding: 20px 0 24px; border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; align-items: center; }
.theme-switch:hover { color: var(--ink); }
.theme-switch { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }

/* Reveal on scroll (only when JavaScript runs and motion is welcome). */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .nav-burger { display: block; }
  .top-nav { display: none; position: absolute; left: 0; right: 0; top: var(--nav-h); background: var(--bg); padding: 10px 22px 26px; border-bottom: 1px solid var(--line); }
  .top-nav.open { display: block; }
  .top-nav ul { flex-direction: column; align-items: flex-start; gap: 0; }
  .nav-link { display: block; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; opacity: 1; padding: 9px 0; }
  .nav-cta { display: inline-block; font-size: 1.06rem; font-weight: 400; margin-top: 14px; padding: 10px 20px; }
}
@media (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 734px) {
  .hero { padding-top: 84px; }
  .hero-page { padding: 84px 0 44px; }
  .mock { padding: 22px 18px; border-radius: 18px; }
  .vid { margin-top: 56px; border-radius: 18px; }
  .vid-top { padding: 14px 16px; gap: 12px; }
  .vid-step span { display: none; }
  .vid-stage { padding: 20px 16px 22px; }
  .vid-line { font-size: 1.06rem; margin-bottom: 18px; }
  .mock-wide { padding: 16px; }
  .tip { padding: 6px 10px; border-radius: 10px; font-size: 0.76rem; }
  .tip span { font-size: 0.68rem; }
  .mk i { width: 16px; height: 16px; line-height: 16px; font-size: 0.66rem; }
  .mk.done i { width: 9px; height: 9px; }
  .showcase { padding-bottom: 56px; }
  .flow { flex-direction: column; }
  .flow li { text-align: left; padding: 0 0 22px 52px; min-height: 58px; }
  .flow li:last-child { padding-bottom: 0; min-height: 0; }
  .flow i { position: absolute; left: 0; top: 0; margin: 0; text-align: center; }
  .flow li + li::before { top: auto; bottom: 100%; right: auto; left: 17px; width: 1.5px; height: calc(100% - 36px); transform: translateY(100%); display: none; }
  .flow li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 1.5px; background: var(--line); }
  .kan { grid-template-columns: 1fr 1fr; gap: 18px 12px; }
  .bars { height: 150px; gap: 10px; }
  .areas { padding: 72px 0 88px; }
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .areas .title { margin-bottom: 36px; }
  .detail { padding-bottom: 88px; }
  .rows > div { grid-template-columns: 1fr; padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .cursor { display: none; }
}

/* Language switch: IT is the default, EN from en.js. Beside the menu on phones. */
.lang-switch { order: 3; margin-left: 18px; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 980px; padding: 3px 10px; font: inherit; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; cursor: pointer; opacity: 0.85; }
.lang-switch:hover { opacity: 1; }
@media (max-width: 860px) {
  .lang-switch { order: 0; margin-left: auto; }
  .lang-switch + .nav-burger { margin-left: 4px; }
}

/* Aiutant mark: the ant (ant.svg) in the text colour, so it follows the theme. */
.brand-mark { width: 34px; height: 26px; flex: none; background: currentColor; -webkit-mask: url(ant.svg) center / contain no-repeat; mask: url(ant.svg) center / contain no-repeat; }
.brand-name { font-weight: 700; letter-spacing: -0.03em; }
.brand-name .tld { color: #6366F1; }
