/* WHY: shared by /, /it/ and /es/ so a design change is made once, not three times. */
:root {
  /* WHY: the photo backdrop is oklch(0.763 0.122 280); the hero sits one step deeper so the arch-framed
     portrait reads as a deliberate shape. Blending them showed a seam (the JPEG backdrop drifts a few %). */
  --hero: oklch(0.70 0.14 280);
  --ink: oklch(0.21 0.05 276);
  --ink-soft: oklch(0.33 0.05 276);
  --bg: oklch(1 0 0);
  --surface: oklch(0.965 0.012 280);
  --muted: oklch(0.47 0.03 276);
  --line: oklch(0.89 0.02 280);
  --accent: oklch(0.93 0.18 118);
  --on-dark: oklch(0.97 0.01 280);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 74rem;
  --loop: 9s;
  --bar: 4rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--ink-soft) var(--surface); accent-color: var(--ink); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  caret-color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-optical-sizing: auto;
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--ink); }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; text-wrap: balance; font-weight: 750; letter-spacing: -0.03em; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; transition: text-underline-offset .3s var(--ease); }
a:hover { text-underline-offset: 0.32em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--on-dark); padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 3rem; padding: .8rem 1.4rem;
  border-radius: 999px; font-weight: 650; font-size: 1rem; text-decoration: none;
  background: var(--ink); color: var(--on-dark);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease);
}
.btn:hover { background: var(--accent); color: var(--ink); transform: translateY(-2px); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
/* WHY: email is the second way in, so it gets a box of the same size but no fill; LinkedIn stays the loudest.
   Inset shadow instead of a border keeps both pills the exact same height. */
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.ghost:hover { background: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- hero ---------- */
/* tucked 1px under the sticky bar: fractional bar heights left a white hairline of body between them */
.hero { background: var(--hero); overflow: hidden; margin-top: -1px; }
.hero-grid {
  /* WHY: the copy sets the height, no min-height: it left empty space under the badges and a huge photo (user, 2026-11-05).
     The gap stays wider than the part of the seal that hangs into it (4.25rem), or the seal covers the buttons */
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 5.5rem; align-items: end;
  padding-top: 2rem;
}
/* WHY: the menu used to sit inside the hero and scrolled away; the user wants it always on top.
   Same violet as the hero so the bar reads as part of it at the top and stays legible over white and ink. */
/* WHY: top -1px, padding-top 1px: at a fractional scroll position the dark photo showed as a hairline above the bar. Measured against a clean render: the other fixes tried did not remove it */
/* WHY: the shadow is always on, not only after scrolling: same violet as the hero, so at the top of the page the bar did not read as a bar (user, 2026-11-05) */
.sitebar { position: sticky; top: -1px; z-index: 20; padding-top: 1px; background: var(--hero); box-shadow: 0 .6rem 1.5rem -1rem oklch(0.21 0.05 276 / 0.55); }
.topbar {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  height: var(--bar); font-weight: 650;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; white-space: nowrap; }
.brand img { width: 2.4rem; height: 2.4rem; }
/* WHY: same cut as the titles (user, 2026-11-05). Auto optical size gave small text a wider, softer cut of the same font.
   No negative spacing as in the titles: this cut is already tight, at this size the letters touched */
.brand span { font-size: 1.3rem; font-weight: 750; letter-spacing: .012em; word-spacing: .06em; font-variation-settings: "opsz" 96; }
.nav { display: flex; gap: clamp(1rem, 2.5vw, 2rem); font-weight: 550; white-space: nowrap; }
/* WHY: the only menu link, so it sits in the middle of the bar, whatever the width of the name and the language menu (user, 2026-11-05) */
.nav .opt { position: absolute; left: 50%; translate: -50% 0; }
.hero-copy { padding-block: 1.5rem clamp(2.5rem, 4.5vw, 3.75rem); align-self: center; }
.hero h1 { font-size: clamp(2.5rem, 5vw, 4.6rem); max-width: 14ch; letter-spacing: -0.035em; }
.mark {
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 88% / 100% 0.32em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding-inline: .06em;
}
.hero .lede { margin-top: 1.3rem; max-width: 40ch; font-size: clamp(1.1rem, 0.6vw + 1rem, 1.3rem); }
.hero .actions { margin-top: 1.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
/* WHY: the email button shows the full address, so both pills only share a row when a bit tighter than the default .btn.
   Below 68rem two pills never fit next to each other in any language: they stack full width (see responsive). */
.actions .btn { font-size: .9rem; padding-inline: 1.05rem; }
/* WHY: official Credly badge, not plain text; recognisable at a glance and verifiable in one click */
/* WHY: always three badges in one row (user, 2026-10-19 and 2026-11-05): icon beside the text where it fits, icon on top below that (see 68rem) */
/* WHY: the text list of projects under the buttons was removed (2026-10-26, the projects section shows them); the badges keep its divider */
.awss { display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-top: 1.8rem; padding-top: 1rem; border-top: 1px solid oklch(0.21 0.05 276 / 0.2); max-width: 36rem; }
.aws { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-size: .82rem; line-height: 1.3; }
.aws img { width: 48px; height: 48px; flex: none; }
.aws b { display: block; font-weight: 700; white-space: nowrap; }
/* visible "View" cue: the hover underline alone did not say the badge opens the credential */
.aws i { display: block; font-style: normal; font-weight: 600; font-size: .78rem; opacity: .75; }
.aws span { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: transparent; }
.aws:hover span, .aws:focus-visible span { text-decoration-color: currentColor; }
/* WHY: bottom-anchored, the arch started wherever the copy column ended; on short screens (575px tall)
   only the head showed, cut off by the fold. Stretched over the whole copy row, the top of the arch lines
   up with the headline on every screen and the body runs down to the hero's bottom edge. */
.portrait { align-self: stretch; justify-self: end; margin: 0; position: relative; width: clamp(15rem, 30vw, 25rem); min-height: 24rem; }
.portrait img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 0;
  border-radius: 999px 999px 0 0;
}
/* An ink outline of the same arch, offset up-left: gives the photo a second plane without a box shadow. */
.portrait::before {
  content: ""; position: absolute; inset: 0; translate: -1.4rem -1.4rem;
  border: 2px solid oklch(0.21 0.05 276 / 0.55); border-bottom: 0; border-radius: 999px 999px 0 0;
}
.badge { position: absolute; left: -4.25rem; top: 46%; width: 8.5rem; aspect-ratio: 1; z-index: 1; }
.badge svg { display: block; width: 100%; height: 100%; }
.badge .ring, .tag .ring { fill: var(--accent); }
.badge text, .tag text { font-size: 10.4px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; fill: var(--ink); }
/* WHY: a robot head, not an arrow: pointing down said nothing (user, 2026-11-05) */
.badge .bot { fill: none; stroke: var(--ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.badge .bot circle { fill: var(--ink); stroke: none; }

/* ---------- sections ---------- */
/* WHY: compact rhythm (user asked): sections breathe through colour changes, not through tall padding */
section { padding-block: clamp(3rem, 6vw, 5rem); }
/* WHY: menu links landed with a strip of the previous section above and the title far down. The section top now
   hides behind the sticky bar and its heading stops 1.5rem under it. */
section[id] { scroll-margin-top: calc(var(--bar) + 1.5rem - clamp(3rem, 6vw, 5rem)); }
/* NOTE: scroll-margin keeps jumps landing with the title 1.5rem under the bar */
/* WHY: a title sits closer to what it introduces than to the section before it: the same gap on both sides pushed the buttons too far down (user, 2026-11-05) */
#work, .contact { --head-gap: clamp(2.75rem, 5vw, 4rem); --title-gap: clamp(1.5rem, 2.6vw, 2.25rem); padding-top: var(--head-gap); }
/* WHY: same white band above the title and under the panel, and wider, so the section sits clearly apart from the violet on both sides (user, 2026-11-05) */
#work { --head-gap: clamp(3.5rem, 7.6vw, 6rem); padding-bottom: var(--head-gap); }
/* WHY: same white space above the title as between the title and the buttons (user, 2026-11-09), so both come from --title-gap */
#work { scroll-margin-top: calc(var(--bar) + var(--title-gap) - var(--head-gap)); }
.section-head { margin-bottom: var(--title-gap); }
/* WHY: the empty top of the line box added 5px of white above the title: without it the space above the title matches the space under the box (measured, user 2026-11-05) */
.section-head h2 { margin-top: -.12em; font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.section-head p { margin-top: .75rem; max-width: 62rem; font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem); }
/* WHY: building is modular: training before and after it is optional (dashed); only the build itself is solid */
/* WHY: the build step is a tab joined to a frame around the solutions, like the selected button and its panel: a pill in a row above did not say
   that "I build" meant the solutions under it (user, 2026-11-05). Top to bottom is the order of the work; it reads the same on every width */
/* WHY: the three steps are phases of one path, so their boxes share one width: the middle column takes the widest label, in any language, and each box fills it (user, 2026-11-06). Subgrid, because the frame under the tab spans the whole row and must not widen that column */
.steps { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); list-style: none; margin: 0; padding: 0; text-align: center; }
.steps > li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; }
.steps .maybe span, .steps-tab { grid-column: 2; }
.steps .bento { grid-column: 1 / -1; }
.steps > li + li { position: relative; padding-top: 1.6rem; }
.steps > li + li::before { content: ""; position: absolute; top: 0; left: calc(50% - 1px); width: 2px; height: 1.6rem; background: oklch(0.21 0.05 276 / 0.35); }
.steps .maybe span, .steps-tab { padding: .7rem 1.6rem; font-size: clamp(1.1rem, 0.5vw + 1rem, 1.35rem); font-weight: 650; line-height: 1.3; }
.steps .maybe span { border: 2px dashed oklch(0.21 0.05 276 / 0.45); border-radius: 1.6rem; padding-block: calc(.7rem - 2px); }
.steps-tab { margin: 0; border-radius: 1.1rem 1.1rem 0 0; background: var(--ink); color: var(--on-dark); }
.steps .bento { padding: clamp(.6rem, 1.6vw, 1.25rem); border: 2px solid var(--ink); border-radius: 1.25rem; text-align: left; }
/* group labels inside a section (the two training paths, the video heading of each project) */
.group { font-size: clamp(1.2rem, 1.6vw, 1.4rem); margin-bottom: clamp(.75rem, 1.5vw, 1rem); }

/* ---------- what I do: one tile per service, each one a looping demo instead of a paragraph ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(.75rem, 1.6vw, 1.25rem); }
.tile { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 1.1rem; padding: clamp(1.2rem, 2.2vw, 1.75rem); border-radius: 1.5rem; background: var(--surface); }
.tile :is(h3, h4) { font-size: clamp(1.4rem, 2vw, 1.75rem); }
.tile .say { margin-top: .25rem; color: var(--muted); font-size: 1rem; }
.tile .demo { margin-top: auto; }
/* WHY: light, not the hero violet: the dark box took all the attention away from the words (user, 2026-11-05) */
.t-flow { grid-column: 1 / -1; background: radial-gradient(oklch(0.21 0.05 276 / 0.14) 1px, transparent 1.5px) 0 0 / 18px 18px, var(--surface); }
.t-flow .say { color: var(--ink); }
/* WHY: two cards, not five: too much smoke in this panel, automations, the chat assistant and data extraction went (user, 2026-11-05) */
.t-chat { grid-column: span 6; }
/* WHY: same background as the agents card: violet on one of two made it look highlighted (user, 2026-11-05) */
.t-web { grid-column: span 6; }

/* workflow */
.nodes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2.75rem; }
.node {
  --n: 0; position: relative; display: grid; gap: .15rem; align-content: start;
  padding: 1.1rem 1.1rem 1.2rem; border-radius: 1.1rem; background: var(--bg);
  box-shadow: 0 .75rem 1.5rem -1rem oklch(0.21 0.05 276 / 0.45);
}
.ic { width: 2.6rem; height: 2.6rem; flex: none; border-radius: .75rem; display: grid; place-items: center; background: var(--surface); }
.ic svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.node .ic { margin-bottom: .7rem; }
.node .t { font-weight: 700; line-height: 1.25; }
.node .s { font-size: .9rem; color: var(--muted); }
.node + .node::before { content: ""; position: absolute; left: -2.75rem; top: 2.4rem; width: 2.75rem; height: 2px; background: oklch(0.21 0.05 276 / 0.35); }
.node + .node::after { content: ""; position: absolute; left: -2.75rem; top: calc(2.4rem - 4px); width: 10px; height: 10px; border-radius: 50%; background: var(--ink); opacity: 0; }

/* chat with an agent */
.chat { display: grid; gap: .6rem; align-content: end; min-height: 13rem; font-size: .95rem; line-height: 1.4; }
.msg { max-width: 80%; padding: .7rem 1rem; border-radius: 1.1rem; }
.msg.in { justify-self: start; background: var(--bg); border-bottom-left-radius: .3rem; }
.msg.out { justify-self: end; background: var(--ink); color: var(--on-dark); border-bottom-right-radius: .3rem; }
/* the typing dots and the reply share one cell, so the reply lands exactly where the dots were */
.chat .typing, .chat .s3 { grid-row: 2; grid-column: 1; }
/* align-self: it shares a grid row with the reply that replaces it, and stretched to the reply's height in a narrow card */
.typing { display: none; justify-self: end; align-self: start; gap: .3rem; padding: .9rem 1rem; border-radius: 1.1rem; background: var(--ink); }
.typing i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--on-dark); }
.booked { justify-self: end; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: .85rem; font-weight: 650; }
.booked svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }



/* site assembling itself */
.browser { border-radius: .9rem; overflow: hidden; background: var(--bg); box-shadow: 0 1.25rem 2.5rem -1.5rem oklch(0.21 0.05 276 / 0.6); }
.browser .bar { display: flex; align-items: center; gap: .35rem; padding: .55rem .8rem; background: var(--surface); font-size: .75rem; color: var(--muted); }
.browser .bar i { width: .55rem; height: .55rem; border-radius: 50%; background: var(--line); }
.browser .bar span { margin-left: .5rem; }
.build { display: grid; gap: .8rem; padding: 1rem 1.1rem 1.2rem; }
.w-nav { display: flex; justify-content: space-between; align-items: center; }
.w-nav i, .w-hero i, .w-cards i { display: block; border-radius: .4rem; background: var(--line); }
.w-nav i:first-child { width: 22%; height: .7rem; background: var(--ink); }
.w-nav i:last-child { width: 14%; height: 1.2rem; border-radius: 1rem; background: var(--accent); }
.w-hero { display: grid; gap: .45rem; padding-block: .4rem; }
.w-hero i { height: 1rem; width: 70%; background: var(--ink); }
.w-hero i:nth-child(2) { width: 50%; }
.w-hero i:nth-child(3) { height: .45rem; width: 60%; background: var(--line); margin-top: .3rem; }
.w-btn { justify-self: start; display: inline-flex; padding: .45rem .9rem; border-radius: 1rem; background: var(--ink); color: var(--on-dark); font-size: .75rem; font-weight: 650; }
.w-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.w-cards i { aspect-ratio: 5 / 2; background: var(--surface); }

/* ---------- projects: one panel at a time ---------- */
/* WHY: light section, not the old dark .work: the moved .steps and .tile content is written for a light background.
   Same markup for both layouts, each button right before its panel. Phones: full-width rows that open in place, because
   horizontal tabs get overlooked there (Baymard). Desktop: the grid pulls the buttons into one row with the open panel below. */
.picker { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: .5rem; }
/* the rows are spaced by their own margin, and the last one would add it to the end of the section */
@media (max-width: 68rem) { .picker { margin-bottom: -.5rem; } }
.picker > button {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  min-height: 3.5rem; margin-bottom: .5rem; padding: .7rem 1.1rem; border: 0; border-radius: 1.1rem;
  background: var(--bg); box-shadow: inset 0 0 0 2px var(--ink); color: var(--ink); font: inherit; font-size: 1rem; font-weight: 650; line-height: 1.25; text-align: left; cursor: pointer;
  transition: background .35s var(--ease), color .35s var(--ease);
}
/* WHY: pale pills with no arrow did not read as buttons, and visitors missed the projects behind them (user, 2026-11-05):
   outlined like the other buttons on the site, with an arrow and a line above that says to click */
/* hover: hover, because on a phone a tap leaves :hover on and a closed button stayed lime */
@media (hover: hover) { .picker > button:hover { background: var(--accent); } }
/* WHY: the content is about the selected project only, so button and panel read as one object: the ink button runs straight
   into the ink frame around the panel, with no gap and no bottom corners. A notch under the button read as a speech bubble (user, 2026-11-05).
   This shape also keeps the selected state from relying on colour alone (WCAG 1.4.1). */
/* white words on the open tab: yellow words were tried and did not fit (user, 2026-11-05) */
.picker > button[aria-expanded="true"] { margin-bottom: 0; border-radius: 1.1rem 1.1rem 0 0; background: var(--ink); box-shadow: none; color: var(--on-dark); }
.picker > button { text-transform: uppercase; letter-spacing: .02em; }
.picker > button svg { width: 1.1rem; height: 1.1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: rotate .35s var(--ease); }
.picker > button[aria-expanded="true"] svg { rotate: 180deg; }
/* WHY: a panel class sets display, which would otherwise beat the hidden attribute and show every panel */
[hidden] { display: none !important; }
.panel { --pad: clamp(.75rem, 2.4vw, 1.75rem); display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); margin-bottom: .5rem; padding: var(--pad); border: 2px solid var(--ink); border-radius: 0 0 1.5rem 1.5rem; }
/* section[id] does not match these divs; needed for the no-JS view, where the button row is hidden.
   The <noscript> rule raises it: without JS nothing corrects the jump when the web font swaps in on a first visit */
.panel { scroll-margin-top: calc(var(--bar) + 1rem); }
/* WHY: panels take focus after a #build jump but are not controls; the ring would draw around the whole tall panel */
.panel:focus-visible { outline: 0; }
.panel h3 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); }
/* WHY: panel titles show only in the one-row desktop layout (user, 2026-11-05). In the stacked rows the open row sits right above and already says it.
   Hidden on screen only: screen readers still get the heading, and without JS the rows are gone and the titles show (scripting: enabled) */
@media (scripting: enabled) and (max-width: 68rem) {
  .panel h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* the training title stays hidden on desktop too: there the panel opens on its own sentence in the violet box, and two headings in a row read as a repeat (user, 2026-11-05) */
@media (scripting: enabled) {
  #training h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* WHY: whoever clicks "Sito web personalizzato" expects that service explained, not one client's project.
   So the panel explains the service on white (title = button label, text, diagram), then the real case sits on a violet tint, edge to edge,
   so the two parts read as different things and not as one long explanation. Ink was too heavy here (user, 2026-11-05) */
.panel-intro { display: grid; gap: .75rem; }
/* WHY: no 68ch limit here: a narrow text in a wide box looked cut off (user, 2026-11-05). The bigger size keeps the two-line text readable at full width */
.panel-intro p { font-size: clamp(1.1rem, 0.6vw + 1rem, 1.3rem); line-height: 1.5; text-wrap: pretty; }
/* WHY: on regular-weight text the hero's underline read as a thin scratch; the heavier phrase carries it like the headline does */
.panel .mark { padding-inline: .06em; font-weight: 700; letter-spacing: -0.015em; }
/* the goal says why, right after the diagram says how: a pale lime box with a bulb, so it stands apart from the violet diagram and the violet case (user, 2026-11-05) */
.goal { display: flex; align-items: center; gap: .75rem; padding: .45rem 1rem; border-radius: 1.1rem; background: oklch(0.97 0.06 118); line-height: 1.45; text-wrap: pretty; }
.goal .ic { width: 2rem; height: 2rem; border-radius: .6rem; background: var(--accent); }
.goal .ic svg { width: 1.15rem; height: 1.15rem; }
.goal b { font-weight: 750; letter-spacing: -0.02em; }
/* WHY: yellow frame, same yellow as the seal: it marks the whole zone as what the seal is about (user, 2026-11-05). A shadow, not a border, so the seal position and the padding stay the same */
.case { position: relative; --inset: max(var(--pad), 1rem); --top: clamp(1.5rem, 3vw, 2.25rem); display: grid; gap: 1.25rem; margin: 0 calc(-1 * var(--pad)) calc(-1 * var(--pad)); padding: var(--top) var(--inset); border-radius: 1.25rem 1.25rem calc(1.5rem - 2px) calc(1.5rem - 2px); background: oklch(0.88 0.055 280); box-shadow: inset 0 0 0 4px var(--accent); }
/* WHY: top, not centred: the seal sat at a different height in each case (56 to 139px from the top). Now the same top-left spot in all of them (user, 2026-11-05) */
.case-text { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; }
/* the benefits of each case. WHY: small and bright green, as tight as its text: a dark box across the whole column was too much green (user, 2026-11-05). Dark text: white on a bright green can't be read. Yellow is already the goal box */
.gain { align-self: flex-start; margin-top: .25rem; padding: .5rem .85rem .6rem; border-radius: .9rem; background: oklch(0.82 0.22 148); }
.gain ul { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.gain li { display: flex; align-items: center; gap: .4rem; font-size: .95rem; font-weight: 700; line-height: 1.25; text-wrap: pretty; }
.gain .up { flex: none; display: grid; place-items: center; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: var(--ink); }
.gain svg { width: .75rem; height: .75rem; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
/* where the title shares the row with the seal (stacked layout): it starts after it, and what follows starts below it */
.case h4 { --seal: 6rem; min-height: calc(var(--seal) - 1.25rem - var(--top)); padding-left: calc(var(--seal) - var(--inset)); font-size: clamp(1.6rem, 2.6vw, 2.1rem); line-height: 1.15; }
.tag.soon + h4 { --seal: 7rem; }
/* inline in the heading, not a label above it: the words are the heading ("Caso reale MM Active") */
/* WHY: same underline as the hero headline. A full yellow block looked heavy and foreign to the site (user, 2026-11-05) */
/* WHY: the same seal as the one on the photo, ring text included (user, 2026-11-05). The words in the middle stay still, only the ring turns (see motion) */
/* WHY: a quality seal stamped on the top left corner of the violet zone, over its edges, so it reads as being about the whole zone (user, 2026-11-05). Left and not right (user, 2026-11-06): in the stacked layout the title indents to clear it. */
.tag { position: absolute; top: -1.25rem; left: -.75rem; rotate: -8deg; pointer-events: none; isolation: isolate; flex: none; display: grid; place-items: center; width: 6rem; aspect-ratio: 1; font-size: .84rem; font-weight: 750; letter-spacing: -0.01em; line-height: 1.05; text-align: center; }
.tag > span { text-transform: uppercase; }
.tag svg { position: absolute; inset: 0; z-index: -1; display: block; width: 100%; height: 100%; }
/* bigger: "construcción" is the longest word in the seal and touched its edge */
/* "PROGETTO" and "PROYECTO" are wider than "CASO REALE" and touched the ring */
.tag.own { font-size: .66rem; }
.tag.soon { width: 7rem; font-size: .6rem; }
.tag.soon .ring { fill: var(--hero); }
/* WHY: max-height keeps the controls on screen on short laptop displays */
.panel video { display: block; width: 100%; height: auto; max-height: calc(100svh - var(--bar) - 2rem); border-radius: 1.1rem; background: var(--ink); }
/* WHY: a website needs no sound or player: one long capture moves inside a frame the size of the video, lighter than a clip and it stays in git (user, 2026-11-09) */
.site-scroll { container-type: inline-size; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 1.1rem; background: var(--ink); }
.site-scroll img { display: block; width: 100%; height: auto; }
/* WHY: every demo has the same size, a tall one looked wrong beside the others (user, 2026-11-09). The portrait tutorial shows here as a poster with dark side bars and opens large over the page */
.video-open { display: block; position: relative; }
/* WHY: under 40rem the Lince dialog plays its 4:5 cut with its own 4:5 poster (lince-phone.jpg, the centre of lince.jpg): a 16:9 poster cropped by CSS showed the logo cut on a phone (user, 2026-11-18). Sized like Brivido's, by width and screen height */
#p-leads .tall { display: none; }
@media (max-width: 40rem) { #p-leads .wide { display: none; } #p-leads .tall { display: block; } }
#p-leads .video-box video { height: auto; width: min(calc(100vw - 1.5rem), calc(92svh * 16 / 9)); aspect-ratio: 16 / 9; }
#p-leads .video-box .tall { width: min(calc(100vw - 1.5rem), calc(92svh * 4 / 5)); aspect-ratio: 4 / 5; }
#p-brivido .site-scroll img { aspect-ratio: 16 / 9; object-fit: contain; }
.video-open .play { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--accent); }
.video-open .play svg { width: 1.8rem; fill: var(--ink); }
/* WHY: the height is limited by the width too, or a tall phone would cut the sides of the video */
.video-box { padding: 0; border: 0; background: none; overflow: visible; margin: auto; max-width: none; max-height: none; }
.video-box::backdrop { background: oklch(0.21 0.05 276 / 0.85); }
.video-box video { width: auto; height: min(92svh, calc((100vw - 1.5rem) * 16 / 9)); max-height: none; aspect-ratio: 9 / 16; }
.video-close { position: absolute; top: .6rem; right: .6rem; z-index: 1; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%; background: var(--ink); color: var(--on-dark); cursor: pointer; }
.video-close svg { width: 1.2rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
/* WHY: last word and arrow share a nowrap span: when a long label wraps on a phone the arrow never sits alone on a line (&nbsp; alone did not hold) */
.visit { font-weight: 650; }
.visit span { white-space: nowrap; }
.visit svg { width: .9em; height: .9em; vertical-align: -.05em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: translate .35s var(--ease); }
.visit:hover svg { translate: 2px -2px; }
/* WHY: measured: below 68rem the columns push the longest labels to four lines */
@media (min-width: 68.01rem) {
  .picker { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  /* tight, or the arrow pushes two-line labels to three. An arrow placed over the free end of the last line hit one-line labels */
  .picker > button { justify-content: center; text-align: center; gap: .2rem; padding-inline: .6rem .4rem; font-size: .72rem; }
  .picker > button svg { width: .85rem; height: .85rem; }
  .panel { grid-column: 1 / -1; grid-row: 2; margin-bottom: 0; border-radius: 1.5rem; }
  /* the corner under the first or last button stays square, or the join with the frame shows a notch */
  .picker > button:first-child[aria-expanded="true"] + .panel { border-top-left-radius: 0; }
  .picker > button[aria-controls="build"][aria-expanded="true"] + .panel { border-top-right-radius: 0; }
  /* the selected button grows by the margin it dropped; the extra padding keeps its label level with the others */
  .picker > button[aria-expanded="true"] { padding-bottom: 1.2rem; }
  /* text beside the video: the panel gets shorter, and the text column has no empty right side */
  /* WHY: on desktop the panel title was barely bigger than the text and too close to it (user, 2026-11-05). In the stacked rows the open row is the title, so this is desktop only */
  .panel-intro { gap: 1.1rem; padding-top: .5rem; }
  .panel-intro h3 { font-size: clamp(1.8rem, 2.8vw, 2.4rem); }
  .case { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
  /* WHY: the left column should be as tall as the video, title level with its top and no hole above the benefits (user, 2026-11-05). Spare height is shared out between the blocks, so it never collects into one hole. Short texts get a narrower video (--v): 30% would match them exactly but a screen recording cannot be read that small */
  .case { grid-template-columns: minmax(0, 1fr) var(--v, 48%); }
  #p-mmactive .case { --v: 42%; }
  .case-video { align-self: start; }
  .case-text { justify-content: space-between; gap: .5rem; }
  .case-text p { font-size: 1.05rem; line-height: 1.5; }
  /* the longest text: at 1.05rem it takes one line more than the video allows */
  #p-bandi .case-text p { font-size: 1rem; }
  .case h4 { min-height: 0; padding-left: 0; font-size: clamp(1.45rem, 2vw, 1.7rem); }
  /* WHY: as a mirror of the old right position the seal touched the title at 1100px (measured). More room on top moves the title and the video together, so they stay level, and the seal does not reach further over the goal box */
  .case { padding-top: calc(var(--top) + .5rem); }
  .tag { top: -2.375rem; left: -1.875rem; width: 5rem; font-size: .72rem; }
  .tag.own { font-size: .56rem; }
  .tag.soon { top: -2.75rem; left: -2.25rem; width: 5.5rem; font-size: .48rem; }
  /* WHY: vertically centred in the case box, whatever the text height: at the top it left a gap under it with long text (user, 2026-11-05) */
}

/* ---------- training: one shared start, then two paths ---------- */
/* WHY: training is the first offer (2026-10-26), so it is the first button, open on load (moved into the section 2026-11-05) */
.paths { --gap: clamp(.75rem, 1.6vw, 1.25rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.paths .start, .paths .group { grid-column: 1 / -1; }
/* WHY: the fork drawn under the start card says "one start, then one path or both" (label "whatever you need", 2026-10-26: the paths are not exclusive) */
/* WHY: static lines. Drawing them on scroll always left a half-open bracket at some stopping point, with the cards already in view (removed 2026-11-09) */
.paths .group { position: relative; margin: 0; padding: 2.25rem 0 1.5rem; text-align: center; }
.paths .group::before, .paths .group::after { content: ""; position: absolute; border: 0 solid oklch(0.21 0.05 276 / 0.35); }
.paths .group::before { left: 50%; top: calc(-1 * var(--gap)); height: calc(2rem + var(--gap)); border-left-width: 2px; }
.paths .group::after { left: 25%; right: 25%; bottom: calc(-1 * var(--gap)); height: calc(1.1rem + var(--gap)); border-width: 2px 2px 0; border-radius: .9rem .9rem 0 0; }
/* two dots share the stem, hide behind the label, then split along the bracket into each card (see motion) */
.pulse, .pulse i { position: absolute; inset: 0; }
.pulse i { inset: auto; width: 10px; height: 10px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--ink); opacity: 0; }
.paths .tile:not(.start)::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px var(--hero); opacity: 0; pointer-events: none; }
/* WHY: no "it always starts here" title (it read as the only way in); the first sentence is the headline */
/* WHY: title only and low (asked 2026-11-05: too much text here). Centred, so it sits on the axis of the fork below it */
.paths .start { display: block; padding-block: clamp(.8rem, 1.4vw, 1.1rem); background: var(--hero); text-align: center; }
.paths .start h4 { font-size: clamp(1.15rem, 1.7vw, 1.5rem); }
.paths .start .mark { font-weight: inherit; letter-spacing: inherit; }
/* WHY: logos make the tools recognisable at a glance (asked 2026-10-26). Mono SVGs from LobeHub icons (MIT, @lobehub/icons-static-svg),
   the only set with OpenAI and OpenClaw; one ink colour to stay in the palette. */
.logos { display: flex; flex-wrap: wrap; gap: .35rem; margin: auto 0 0; padding: 0; list-style: none; }
.logos li { white-space: nowrap; display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 999px; background: var(--bg); font-size: .85rem; font-weight: 650; line-height: 1.2; }
.logos svg { width: 1.05rem; height: 1.05rem; flex: none; fill: currentColor; }
.logos img { width: 1.05rem; height: 1.05rem; flex: none; }

/* ---------- contact ---------- */
.contact { background: var(--hero); }
/* WHY: one headline with the offer in it: the section title plus a smaller "free call" title competed and neither stood out (user, 2026-11-05) */
.contact h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
.contact h2 + p { margin: var(--title-gap) auto 0; max-width: 46ch; font-size: clamp(1.1rem, 0.6vw + 1rem, 1.3rem); }
.contact .actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .75rem; }
/* WHY: no fake chat beside the text: it was filler (user, 2026-11-05), so the closing message sits alone in the centre */
.contact { text-align: center; }
footer { background: var(--hero); border-top: 1px solid oklch(0.21 0.05 276 / 0.15); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.5rem; font-size: .95rem; }

/* ---------- language menu ---------- */
/* WHY: needs no JS: the menu is a <details>, it opens on tap and picking a language navigates away. */
.lang { position: relative; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: .38em; height: .38em; border: solid currentColor; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -.15em; transition: rotate .3s var(--ease), translate .3s var(--ease); }
.lang[open] summary::after { rotate: 225deg; translate: 0 .1em; }
.lang ul { position: absolute; right: 0; top: calc(100% + .75rem); margin: 0; padding: .35rem; list-style: none; min-width: 9rem; background: var(--bg); border-radius: .9rem; box-shadow: 0 1rem 2rem -1rem oklch(0.21 0.05 276 / 0.55); }
.lang li a { display: flex; align-items: center; gap: .6rem; padding: .45rem .75rem; border-radius: .6rem; text-decoration: none; }
/* WHY: SVG flags, not emoji: Windows shows flag emoji as two letters. Same box for all, so the UK flag (2:1) is cropped to 3:2. */
.lang img { width: 1.25rem; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px oklch(0.21 0.05 276 / 0.15); }
.lang li a:hover { background: var(--surface); }
.lang a[aria-current] { font-weight: 750; background: var(--surface); }

/* ---------- motion. Every element's resting state is fully visible: with reduced motion the demos
   show their final frame (the whole chat, the built page). ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 1s var(--ease) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
  .mark { animation: wipe 1.1s var(--ease) 650ms both; }
  .panel .mark { animation-delay: .2s; }
  /* WHY: these two load off screen, so an entrance would never be seen. No scroll-driven version: on a phone it flashed the highlights while scrolling (user, 2026-11-05) */
  .contact .mark, .section-head .mark { animation: none; }
  /* the arrows nudge in turn until the first click (tabs.js adds .used), then stop: by then the visitor has understood */
  .picker:not(.used) > button[aria-expanded="false"] svg { animation: nudge 3.5s var(--ease) infinite; }
  .picker:not(.used) > button:nth-of-type(3) svg { animation-delay: .25s; }
  .picker:not(.used) > button:nth-of-type(4) svg { animation-delay: .5s; }
  .picker:not(.used) > button:nth-of-type(5) svg { animation-delay: .75s; }
  .picker:not(.used) > button:nth-of-type(6) svg { animation-delay: 1s; }
  @keyframes nudge { 0%, 20%, 100% { translate: 0 0; } 10% { translate: 0 4px; } }
  .portrait img { animation: lift 1.4s var(--ease) 150ms both; }
  .portrait::before { animation: trace 1.6s var(--ease) 400ms both; }
  .badge { animation: pop .9s var(--ease) 900ms both; }
  .badge .spin, .tag .spin { transform-origin: 50% 50%; animation: spin 26s linear infinite; }
  @keyframes rise { from { opacity: 0; transform: translateY(1.2rem); filter: blur(6px); } }
  @keyframes wipe { from { background-size: 0% 0.32em; } }
  @keyframes lift { from { opacity: 0; transform: translateY(8%) scale(1.03); } }
  @keyframes trace { from { opacity: 0; translate: 0 0; } }
  @keyframes pop { from { opacity: 0; scale: .6; rotate: -40deg; } }
  @keyframes spin { to { rotate: 1turn; } }
  /* WHY: 56.25cqw is the frame height (16:9), so the end lands the bottom of the capture on the bottom of the frame at any size and for any capture length. Short rests at both ends, then back to the top like a GIF */
  #p-mmactive .site-scroll img { animation: site-pan 18s linear infinite; }
  @keyframes site-pan { 0%, 6% { translate: 0 0; } 94%, 100% { translate: 0 calc(56.25cqw - 100%); } }

  /* WHY: one 6s loop, each node lights 1.5s after the previous one, so the workflow reads left to right
     (top to bottom on phones) as a run, the way n8n highlights executed nodes. */
  .node { animation: lit 6s var(--ease) infinite; animation-delay: calc(var(--n) * 1.5s); }
  .node .ic { animation: lit-ic 6s var(--ease) infinite; animation-delay: inherit; }
  .node + .node::after { animation: travel-x 6s linear infinite; animation-delay: calc(var(--n) * 1.5s - .7s); }
  @keyframes lit {
    0%, 3% { translate: 0 0; box-shadow: 0 .75rem 1.5rem -1rem oklch(0.21 0.05 276 / 0.45); }
    8%, 26% { translate: 0 -6px; box-shadow: 0 1.5rem 2.5rem -1.2rem oklch(0.21 0.05 276 / 0.6); }
    36%, 100% { translate: 0 0; box-shadow: 0 .75rem 1.5rem -1rem oklch(0.21 0.05 276 / 0.45); }
  }
  @keyframes lit-ic { 0%, 3% { background: var(--surface); } 8%, 26% { background: var(--accent); } 36%, 100% { background: var(--surface); } }
  @keyframes travel-x { 0% { opacity: 1; translate: 0 0; } 11% { opacity: 1; translate: calc(2.75rem - 10px) 0; } 12%, 100% { opacity: 0; translate: calc(2.75rem - 10px) 0; } }
  @keyframes travel-y { 0% { opacity: 1; translate: 0 0; } 11% { opacity: 1; translate: 0 calc(1.25rem - 10px); } 12%, 100% { opacity: 0; translate: 0 calc(1.25rem - 10px); } }

  /* WHY: the demos share one 9s clock and five entry beats (s1..s5), so the chat and
     the page build all tell their story in the same rhythm, then clear and start again. */
  .s1, .s2, .s3, .s4, .s5 { animation: var(--loop) var(--ease) infinite both; }
  .s1 { animation-name: s1; } .s2 { animation-name: s2; } .s3 { animation-name: s3; } .s4 { animation-name: s4; } .s5 { animation-name: s5; }
  @keyframes s1 { 0% { opacity: 0; translate: 0 .6rem; } 4%, 90% { opacity: 1; translate: 0 0; } 96%, 100% { opacity: 0; } }
  @keyframes s2 { 0%, 15% { opacity: 0; translate: 0 .6rem; } 19%, 90% { opacity: 1; translate: 0 0; } 96%, 100% { opacity: 0; } }
  @keyframes s3 { 0%, 30% { opacity: 0; translate: 0 .6rem; } 34%, 90% { opacity: 1; translate: 0 0; } 96%, 100% { opacity: 0; } }
  @keyframes s4 { 0%, 45% { opacity: 0; translate: 0 .6rem; } 49%, 90% { opacity: 1; translate: 0 0; } 96%, 100% { opacity: 0; } }
  @keyframes s5 { 0%, 60% { opacity: 0; translate: 0 .6rem; scale: .9; } 64%, 90% { opacity: 1; translate: 0 0; scale: 1; } 96%, 100% { opacity: 0; } }
  .typing { display: inline-flex; animation: typing var(--loop) linear infinite both; }
  .typing i { animation: hop .9s ease-in-out infinite; }
  .typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
  @keyframes typing { 0%, 6% { opacity: 0; } 8%, 28% { opacity: 1; } 30%, 100% { opacity: 0; } }
  @keyframes hop { 0%, 60%, 100% { translate: 0 0; opacity: .5; } 30% { translate: 0 -3px; opacity: 1; } }


  /* WHY: the fork runs like the workflow wire: one dot down the stem, then one per path; each card lights up when its dot lands */
  .pulse i { animation: fork-l 4.5s var(--ease) infinite; }
  .pulse i + i { animation-name: fork-r; }
  .paths .tile:not(.start)::after { animation: landed 4.5s ease-out infinite; }
  @keyframes fork-l {
    0% { left: 50%; top: calc(-1 * var(--gap)); opacity: 0; }
    4%, 26% { opacity: 1; }
    30% { left: 50%; top: 2rem; opacity: 0; }
    38% { left: 50%; top: calc(100% - 1.1rem); opacity: 0; }
    42% { opacity: 1; }
    62% { left: 25%; top: calc(100% - 1.1rem); }
    76% { left: 25%; top: calc(100% + var(--gap)); opacity: 1; }
    80%, 100% { left: 25%; top: calc(100% + var(--gap)); opacity: 0; }
  }
  @keyframes fork-r {
    0% { left: 50%; top: calc(-1 * var(--gap)); opacity: 0; }
    4%, 26% { opacity: 1; }
    30% { left: 50%; top: 2rem; opacity: 0; }
    38% { left: 50%; top: calc(100% - 1.1rem); opacity: 0; }
    42% { opacity: 1; }
    62% { left: 75%; top: calc(100% - 1.1rem); }
    76% { left: 75%; top: calc(100% + var(--gap)); opacity: 1; }
    80%, 100% { left: 75%; top: calc(100% + var(--gap)); opacity: 0; }
  }
  @keyframes landed { 0%, 74% { opacity: 0; } 79% { opacity: 1; } 100% { opacity: 0; } }

  @supports (animation-timeline: view()) {
    .tile { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes reveal { from { opacity: 0; translate: 0 2.5rem; scale: .97; } }
  }
}

/* ---------- responsive ---------- */
/* WHY: measured: in English the hero pills share a row from ~1010px; below that they stack full width instead of wrapping ragged */
@media (max-width: 63rem) {
  .hero .actions .btn { flex: 1 1 100%; justify-content: center; }
}
/* WHY: icon beside the text does not fit in a third of the copy column, so the icon goes on top */
@media (max-width: 68rem) {
  .awss { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
  .aws { flex-direction: column; align-items: center; gap: .3rem; font-size: .72rem; line-height: 1.25; text-align: center; }
  .aws img { width: 44px; height: 44px; }
  .aws b { white-space: normal; }
  .aws i { font-size: .8rem; }
}
@media (max-width: 64rem) {
  .nodes { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.5rem; }
  /* the wire would cross the row break; in a 2x2 grid only same-row wires make sense */
  .node:nth-child(3)::before, .node:nth-child(3)::after { display: none; }
}
/* WHY: on short laptop screens (575px tall) the full-size headline pushed the LinkedIn button below the fold. */
/* WHY: between phone and desktop the photo frame is tall and narrow, so only 36-54% of the photo's width shows and the head, left of centre in the photo, lost its left side (user, 2026-11-05). The head spans 31-57% of the width: at 41% it stays whole in that whole range */
@media (min-width: 46.01rem) and (max-width: 68rem) { .portrait img { object-position: 41% 0; } }
@media (min-width: 46.01rem) and (max-height: 720px) {
  .hero h1 { font-size: clamp(2.4rem, 4.4vw, 3.6rem); }
  .hero-copy { padding-block: 1rem 2.5rem; }
  .hero .lede, .hero .actions { margin-top: 1.2rem; }
  .awss { margin-top: 1.4rem; }
}
/* WHY: measured with three section links (ES, longest), so two fit too; below 63rem the section title is right under the hero */
@media (max-width: 63rem) {
  .nav .opt { display: none; }
}
@media (max-width: 46rem) {
  /* WHY: a full frame took 24px from the tiles; here the line under the tab is enough */
  .steps .bento { padding: .6rem 0 0; border-width: 2px 0 0; border-radius: 0; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-grid { padding-top: 0; }
  :root { --bar: 3.5rem; }
  /* two stacked pills of different widths looked ragged; full width they read as one pair */
  .actions .btn { flex: 1 1 100%; justify-content: center; }
  /* WHY: the arch stays the first thing on the phone, big enough to recognise him. At 14rem it pushed the LinkedIn button off the first
     screen and the page felt oversized (user, 2026-11-05); at this size photo, headline, text and buttons fit about 664px of phone screen. */
  /* margin-top larger than the outline's upward shift below: .hero clips overflow and it cut the top of the arch (user, 2026-11-05) */
  /* WHY: 75px left of centre on phones, tuned by eye (user, 2026-11-05). translate, not margin-right: at 150px of margin the column grew past the 320px screen and pushed the buttons off the edge */
  .portrait { order: -1; justify-self: center; width: min(10.5rem, 44vw); height: auto; aspect-ratio: 10 / 11; min-height: 0; margin: 1.2rem 0 0; translate: -4.6875rem 0; }
  .portrait::before { translate: -.7rem -.7rem; }
  /* Zoom onto head and shoulders: the img is 120% of the arch and clipped back to it. clip-path, not
     overflow, so the badge can still hang outside the arch. */
  .portrait img { inset: 0 auto auto -10%; width: 120%; height: 120%; border-radius: 0; clip-path: inset(0 8.333% 16.667% round 999px 999px 0 0); }
  /* WHY: small (108px was too big), on the photo's right edge, just biting into it (user, 2026-11-05) */
  .badge { left: calc(100% - .75rem); top: 50%; translate: 0 -50%; width: 4.5rem; }
  .hero-copy { padding-block: .9rem 2.5rem; }
  /* WHY: at most two lines on a phone (user, 2026-11-05): a tighter box, and goal texts kept under about 55 characters */
  .goal { gap: .6rem; padding: .55rem .7rem; font-size: .95rem; line-height: 1.35; }
  .goal .ic { width: 2.1rem; height: 2.1rem; }
  /* WHY: on phones the goal comes right after the text, before the diagram (user, 2026-11-05); the training panel has no text, so its goal stays last. order, not a move in the HTML: on desktop it stays under the diagram; nothing in it takes focus, so keyboard order is unaffected */
  .panel-intro { order: -2; }
  .panel-intro ~ .goal { order: -1; }
  /* WHY: the chips stay on one line: Kimi drops and the others tighten (still wraps at 320px, where three do not fit) */
  .logos .wide-only { display: none; }
  .logos { gap: .3rem; }
  .logos li { gap: .3rem; padding: .3rem .55rem; font-size: .8rem; }
  .logos svg { width: .95rem; height: .95rem; }
  /* WHY: two lines at most on phones, using the full width (user, 2026-11-05). The size follows the text width: .08 is the largest ratio that keeps the longest headline on two lines in EN, IT and ES (measured) */
  .hero h1 { font-size: min(2.5rem, calc((100vw - 2rem) * .08)); max-width: none; }
  /* the smaller headline must stay the largest title on the page: at their old fixed sizes these were bigger than it */
  .contact h2 { font-size: min(1.9rem, calc((100vw - 2rem) * .072)); }
  /* WHY: one line on phones, using the full width (user, 2026-11-05). The Italian title fills the width at .063, measured at the real size: the font's optical size makes letters wider when small, so a measure at a large size and scaled down is wrong. .062 leaves a margin for other devices */
  .section-head h2 { font-size: min(1.9rem, calc((100vw - 2rem) * .062)); }
  .hero .lede { margin-top: .7rem; font-size: 1.0625rem; line-height: 1.45; }
  .hero .actions { margin-top: 1rem; gap: .55rem; }
  .t-chat, .t-web { grid-column: 1 / -1; }
  .chat { min-height: 0; }
  .nodes { grid-template-columns: 1fr; row-gap: 1.25rem; }
  .node { grid-template-columns: auto 1fr; column-gap: 1rem; align-items: center; }
  .node .ic { grid-row: span 2; margin: 0; }
  .node:nth-child(3)::before, .node:nth-child(3)::after { display: block; }
  .node + .node::before { left: calc(1.1rem + 1.3rem - 1px); top: -1.25rem; width: 2px; height: 1.25rem; }
  .node + .node::after { left: calc(1.1rem + 1.3rem - 5px); top: -1.25rem; animation-name: travel-y; }
  /* WHY: no violet box on phones and no title under the open row: the sentence and "then, whatever you need" are plain text, like the intro of the other panels (user, 2026-11-05) */
  /* block, so the two sentences can flow as one paragraph: "then, whatever you need" stays on the same line (user, 2026-11-05) */
  .paths { display: block; }
  .paths .start, .paths .start h4, .paths .group { display: inline; }
  .paths .start { padding: 0; background: none; border-radius: 0; text-align: left; animation: none; }
  .paths .start .mark { font-weight: 700; letter-spacing: -0.015em; }
  .paths .tile:not(.start) { margin-top: .75rem; }
  .paths .start h4, .paths .group { font-size: 1rem; font-weight: 400; letter-spacing: normal; line-height: 1.5; text-wrap: pretty; }
  /* WHY: the open row is the title of its panel, so nothing inside may read bigger than it (user, 2026-11-05) */
  .picker > button { gap: .5rem; padding-inline: .95rem; font-size: .9rem; }
  .panel-intro p, .case-text p, .case-text .visit, .node .t { font-size: 1rem; }
  .tag { top: -.9rem; left: -.4rem; width: 5.25rem; font-size: .74rem; }
  .case h4 { --seal: 5.25rem; min-height: calc(var(--seal) - .9rem - var(--top)); }
  .tag.soon + h4 { --seal: 6.25rem; }
  .tag.own { font-size: .58rem; }
  .tag.soon { width: 6.25rem; font-size: .54rem; }
  .tile :is(h3, h4), .case h4, .steps-tab, .steps .maybe span { font-size: 1.0625rem; line-height: 1.25; letter-spacing: -0.015em; }
  .case h4 { font-size: 1.35rem; }
  /* on phones the steps stack and read top to bottom, each arrow under its step.
     WHY arrows sit after each step, not before the next: a wrapped row then ends on an arrow instead of starting with one */
  /* stacked cards: no fork. A vertical line with a moving dot was tried and took too much width from the cards (user, 2026-11-05) */
  .paths .group { padding: 0; text-align: left; }
  .paths .group::before, .pulse, .paths .tile:not(.start)::after { display: none; }
  /* the bracket's pseudo-element becomes the colon that leads into the cards: as plain text the sentence needs an ending */
  .paths .group::after { content: ":"; position: static; border: 0; }
}
/* WHY: measured: on phones up to 400px name + LinkedIn + language ran into the side margin (30-39px past the edge at 320).
   Tighter gaps, a slightly smaller name, no flag in the closed language button (the flags stay in the open menu). */
/* WHY: under about 368px the bulb takes the room the goal needs to stay on two lines */
@media (max-width: 23rem) {
  .goal .ic { display: none; }
}
@media (max-width: 25rem) {
  .topbar, .nav { gap: .6rem; }
  .brand { gap: .5rem; }
  .brand span { font-size: 1.15rem; }
  .brand img { width: 2rem; height: 2rem; }
  .lang > summary img { display: none; }
  /* WHY: the chips must stay on one row on phones (user, 2026-11-05) */
  .logos li { padding-inline: .45rem; font-size: .75rem; }
  .logos svg { width: .85rem; height: .85rem; }
}
