/* Enjinia home — "officina di prodotti": the logo gears drive the whole page.
   Standalone (no Bootstrap): own nav, sections and footer. */
:root {
  --ink: #121318; --ink-2: #1b1d24; --ink-3: #262933; --line: #2e3240;
  --paper: #f6f4ef; --paper-2: #ece8df; --text: #1b1d24; --muted: #5c6070; --muted-d: #9aa0ae;
  --blue: #27aae1; --red: #ed1c24; --green: #2bb673; --yellow: #ffd23f;
  --display: "Bricolage Grotesque", "Instrument Sans", sans-serif;
  --body: "Instrument Sans", "Helvetica Neue", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --wrap: 1200px; --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--body); font-size: 18px; line-height: 1.6;
       -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.02; margin: 0; letter-spacing: -.02em; }
h2 { font-size: clamp(38px, 5.4vw, 72px); font-weight: 800; }
h3 { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.mono { font-family: var(--mono); }
.kick { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 13px; letter-spacing: .12em;
        text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.kick svg { width: 18px; height: 18px; fill: var(--red); animation: hm-spin 6s linear infinite; }
.lead { font-size: 21px; color: var(--muted); max-width: 36em; }
.skip { position: absolute; left: -9999px; top: 10px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 10px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 26px; border-radius: 999px; border: 0;
       font: 700 17px var(--body); text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 12px 28px rgba(237,28,36,.35); }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px #fff; }
.btn-ink { background: var(--ink); color: #fff; }

@keyframes hm-spin { to { transform: rotate(360deg); } }
@keyframes hm-spin-rev { to { transform: rotate(-360deg); } }

/* ---------------- nav ---------------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .25s, box-shadow .25s; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 20px; }
.nav-logo { position: relative; display: block; }
.nav-logo img { height: 46px; width: auto; transition: opacity .25s; }
.nav-logo .on-light { position: absolute; left: 0; top: 0; opacity: 0; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: #fff; text-decoration: none; font-weight: 600; font-size: 16px; transition: color .15s; }
.nav-links a:hover { color: var(--blue); }
.nav-links .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
.nav.is-solid { background: rgba(246,244,239,.94); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.nav.is-solid .nav-logo .on-dark, .nav.open .nav-logo .on-dark { opacity: 0; }
.nav.is-solid .nav-logo .on-light, .nav.open .nav-logo .on-light { opacity: 1; }
.nav.is-solid .nav-links a:not(.btn) { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; width: 46px; height: 46px; cursor: pointer; padding: 10px; }
.nav-toggle span { display: block; height: 3px; border-radius: 2px; background: #fff; margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav.is-solid .nav-toggle span { background: var(--ink); }

/* ---------------- hero ---------------- */
.hero { position: relative; background: var(--ink); color: #fff; padding: 140px 0 0; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none;
                background: radial-gradient(700px 420px at 78% 30%, rgba(39,170,225,.20), transparent 65%),
                            radial-gradient(500px 360px at 95% 80%, rgba(43,182,115,.16), transparent 65%),
                            radial-gradient(600px 400px at 10% 100%, rgba(237,28,36,.14), transparent 65%); }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .35;
               background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
               background-size: 44px 44px; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero .kick { color: var(--muted-d); }
.hero h1 { font-size: clamp(48px, 7vw, 100px); font-weight: 800; margin-bottom: 26px; letter-spacing: -.035em; }
.hero h1 .c-b { color: var(--blue); } .hero h1 .c-r { color: var(--red); } .hero h1 .c-g { color: var(--green); }
.hero .lead { color: #c3c7d2; }
.hero h1.claim { font-size: clamp(44px, 5.6vw, 82px); }
.promises { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0 0 26px; padding: 0;
  font-weight: 800; font-size: clamp(20px, 1.9vw, 27px); letter-spacing: -.02em; }
.promises li { display: inline-flex; align-items: center; gap: 10px; }
.promises svg { width: .9em; height: .9em; animation: hm-spin 8s linear infinite; }
.promises .p-b { color: var(--blue); } .promises .p-b svg { fill: var(--blue); }
.promises .p-r { color: var(--red); }  .promises .p-r svg { fill: var(--red); animation-direction: reverse; }
.promises .p-g { color: var(--green); } .promises .p-g svg { fill: var(--green); }
@media (max-width: 480px) { .promises { gap: 6px 12px; font-size: clamp(14px, 4.1vw, 18px); } .promises li { gap: 5px; } }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.workshop { position: relative; }
.hm-logo-gears { width: 100%; max-width: 520px; margin: 0 auto; display: block; overflow: visible; }
.hm-logo-gears .gear { transform-box: fill-box; transform-origin: center; }
.hm-logo-gears .g-blue { animation: hm-spin 26s linear infinite; }
.hm-logo-gears .g-red { animation: hm-spin-rev 20s linear infinite; }
.hm-logo-gears .g-green { animation: hm-spin-rev 23s linear infinite; }
.hm-logo-gears .scrollrot { transform-box: fill-box; transform-origin: center; }

/* conveyor belt: modules go in, products come out */
.belt { position: relative; margin: 10px auto 0; max-width: 560px; height: 64px; border-radius: 14px; overflow: hidden;
        background: repeating-linear-gradient(90deg, #22252e 0 18px, #1b1d24 18px 36px); background-size: 36px 100%;
        animation: hm-belt 1.2s linear infinite; box-shadow: inset 0 0 0 1px var(--line); }
@keyframes hm-belt { to { background-position: 36px 0; } }
.belt .chip { position: absolute; top: 14px; left: -190px; white-space: nowrap; font: 500 13px var(--mono); color: #fff;
              background: var(--ink-3); border: 1px solid #3a3f4d; border-radius: 999px; padding: 6px 12px;
              animation: hm-chip 14s linear infinite; }
.belt .chip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--blue)); margin-right: 8px; }
@keyframes hm-chip { 0% { left: -190px; opacity: 0; } 8% { opacity: 1; } 70% { opacity: 1; } 82% { left: 78%; opacity: 0; } 100% { left: 78%; opacity: 0; } }
.out { position: absolute; right: 0; bottom: 74px; display: flex; align-items: center; gap: 12px; background: #fff; color: var(--ink);
       border-radius: 16px; padding: 12px 16px; box-shadow: 0 18px 40px rgba(0,0,0,.4); min-width: 230px; }
.out .tick { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 15px; }
.out small { display: block; color: var(--muted); font-size: 12px; font-family: var(--mono); }
.out strong { display: block; font-size: 16px; transition: opacity .3s; }
.out.swap strong, .out.swap small { opacity: 0; }

/* ticker */
.ticker { position: relative; z-index: 1; margin-top: 70px; border-top: 1px solid var(--line); background: #0d0e12; overflow: hidden; }
.ticker-track { display: flex; width: max-content; animation: hm-ticker 40s linear infinite; }
.ticker span { font: 500 15px var(--mono); color: #c3c7d2; padding: 18px 28px; white-space: nowrap; display: flex; align-items: center; gap: 28px; }
.ticker span b { color: #fff; font-weight: 500; }
.ticker span::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--blue)); }
@keyframes hm-ticker { to { transform: translateX(-50%); } }

/* ---------------- products ---------------- */
.products { padding: 120px 0; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 44px; flex-wrap: wrap; }
.sec-head .lead { margin: 0; max-width: 28em; text-wrap: pretty; }   /* no lonely last word */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: auto; grid-auto-rows: 260px; gap: 18px; }
/* first row (inparafarmacia, Rajio): as tall as its content, never empty space */
.prod { position: relative; border-radius: 28px; padding: 30px; overflow: hidden; text-decoration: none; display: flex; flex-direction: column;
        justify-content: space-between; transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s; }
.prod:hover { transform: translateY(-6px); box-shadow: 0 26px 50px rgba(18,19,24,.18); }
.prod .p-logo { height: 54px; width: auto; max-width: 70%; object-fit: contain; object-position: left; }
.prod h3 { font-size: 28px; margin-bottom: 8px; }
.prod p { margin: 0; font-size: 16.5px; opacity: .85; max-width: 26em; }
.prod .badge { align-self: flex-start; font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; border-radius: 999px;
               padding: 6px 12px; background: rgba(255,255,255,.18); }
.prod .go { position: absolute; right: 26px; bottom: 26px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
            font-size: 20px; transition: transform .3s; }
.prod:hover .go { transform: rotate(-45deg) scale(1.08); }
.prod .p-gear { position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; opacity: .12; animation: hm-spin 30s linear infinite; }
.prod .p-gear svg { width: 100%; height: 100%; fill: currentColor; }
.p-ipf { grid-column: span 7; min-height: 400px; background: #fbf6ee; color: #0b2e6b; box-shadow: inset 0 0 0 2px #0b2e6b; }
.p-ipf h3 { font-family: "Fraunces", Georgia, serif; font-size: clamp(32px, 3.2vw, 44px); }
.p-ipf > div { margin-top: 18px; }
.p-ipf h3 em { color: #f7841f; }
.p-ipf .badge { background: #f7841f; color: #fff; }
.p-ipf .go { background: #0b2e6b; color: #fff; }
.p-ipf .p-nums { display: flex; gap: 34px; margin: 22px 0 0; }
.p-ipf .p-nums b { display: block; font-family: "Fraunces", serif; font-size: 44px; line-height: 1; }
.p-ipf .p-nums span { font-size: 14px; color: #5d6475; }
.p-rajio { grid-column: span 5; min-height: 400px; background: #000; color: #e9ffe5; }
.p-rajio .p-logo { height: 92px; max-width: 90%; filter: drop-shadow(0 0 16px rgba(34,252,10,.5)); }
.p-rajio .badge { background: #22fc0a; color: #000; }
.p-rajio .go { background: #22fc0a; color: #000; }
.p-rajio .p-gear { color: #22fc0a; }
.p-rajio { justify-content: flex-start; }
.p-rajio .rj-top { margin-top: 20px; }
.rj-onair { margin: auto 74px 0 0; padding-top: 18px; }
.rj-now { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: #111; border: 1px solid #1f2a1d; }
.rj-live { flex: none; font: 700 11px var(--mono); letter-spacing: .1em; color: #000; background: #22fc0a; border-radius: 5px; padding: 3px 7px;
           box-shadow: 0 0 14px rgba(34,252,10,.6); }
.rj-now b { display: block; font-size: 16px; color: #fff; }
.rj-now small { display: block; font: 500 12px var(--mono); color: #8fbf88; }
.rj-vu { display: flex; align-items: flex-end; gap: 4px; height: 24px; margin-top: 10px; }
.rj-vu i { flex: 1; height: 30%; border-radius: 2px; background: linear-gradient(0deg, #22fc0a 60%, #d8ff3c); opacity: .85;
           animation: rj-vu 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--d) * -1); }
@keyframes rj-vu { 0% { height: 18%; } 40% { height: 85%; } 70% { height: 45%; } 100% { height: 100%; } }
@media (prefers-reduced-motion: reduce) { .rj-vu i { animation: none; height: 60%; } }
.p-tasky { grid-column: span 6; background: #fff; color: #10233a; box-shadow: inset 0 0 0 1px #dce9f4; }
.p-tasky .badge { background: #e3f5ff; color: #0277b6; }
.p-tasky .go { background: #02abfe; color: #fff; }
.p-tasky .p-gear { color: #02abfe; }
.p-cycle { grid-column: span 6; background: #E3242B; color: #fff; }
.p-cycle .p-logo { filter: brightness(0) invert(1); }
.p-cycle .go { background: #fff; color: #E3242B; }
/* the platforms behind the products */
.plat { margin-top: 26px; padding: 22px 24px; border-radius: 22px; background: var(--paper-2); }
.plat-head { display: flex; align-items: center; gap: 16px; }
.plat-head > svg { width: 30px; height: 30px; flex: none; fill: var(--green); animation: hm-spin 8s linear infinite; }
.plat-head p { margin: 0; font-size: 17px; }
.ct-cunce.plat-cta { margin: 0 0 0 auto; width: auto; flex: none; padding: 8px 20px 8px 8px; }
.plat-cta .cl-pic { width: 46px; height: 46px; }
.plat-cta .ct-cunce-t b { font-size: 18px; }
.plat-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.plat-chip { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 16px; background: #fff;
             color: var(--text); text-decoration: none; border: 1px solid transparent; transition: transform .2s, border-color .2s; }
.plat-chip:hover { transform: translateY(-2px); border-color: var(--c); }
.plat-chip .fa { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px;
                 background: var(--c); color: #fff; font-size: 20px; }
.plat-chip b { display: block; font-family: var(--display); font-size: 18px; line-height: 1.2; }
.plat-chip small { color: var(--muted); font-size: 14px; }
@media (max-width: 900px) {
  .plat-head { flex-wrap: wrap; } .plat-head > svg { display: none; } .ct-cunce.plat-cta { margin: 0; }
  .plat-links { grid-template-columns: 1fr; }
}

/* ---------------- workshop / toolbox ---------------- */
.officina { background: var(--ink); color: #fff; padding: 120px 0; position: relative; overflow: hidden; }
.officina .kick { color: var(--muted-d); }
.officina .lead { color: #c3c7d2; }
.of-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 60px; align-items: start; }
.toolbox { display: flex; flex-wrap: wrap; gap: 10px; }
.tool { display: inline-flex; align-items: center; gap: 9px; padding: 10px 14px; border-radius: 12px; background: var(--ink-2);
        border: 1px solid var(--line); font-size: 15px; color: #e3e6ee; transition: border-color .2s, transform .2s, background .2s; }
.tool svg { width: 16px; height: 16px; fill: var(--c, var(--blue)); transition: transform .6s; }
.tool:hover { border-color: var(--c, var(--blue)); transform: translateY(-2px); background: var(--ink-3); }
.tool:hover svg { transform: rotate(180deg); }
.tool:nth-child(3n+2) { --c: var(--red); } .tool:nth-child(3n) { --c: var(--green); }
.tb-label { font: 500 13px var(--mono); color: var(--muted-d); margin: 18px 0 0; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 80px; }
.step { border-top: 2px solid var(--c); padding-top: 22px; }
.step:nth-child(1) { --c: var(--blue); } .step:nth-child(2) { --c: var(--red); } .step:nth-child(3) { --c: var(--green); }
.step .n { font: 500 14px var(--mono); color: var(--c); }
.step h3 { margin: 8px 0 10px; font-size: 30px; }
.step p { color: #b9bdc9; font-size: 17px; }
.proof-kick { display: flex; margin: 70px 0 18px; }
.proof { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.proof div { display: flex; flex-direction: column; align-items: flex-start;
             background: var(--ink-2); border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.proof b { display: block; font-family: var(--display); font-weight: 800; font-size: 58px; line-height: 1; color: #fff; }
.oss { margin-top: 18px; display: flex; align-items: center; gap: 22px; padding: 24px 28px; border-radius: 20px;
       background: var(--ink-2); border: 1px solid var(--line); }
.oss > .fa { font-size: 44px; color: #fff; flex: none; }
.oss h3 { margin: 0 0 6px; font-size: 22px; }
.oss p { margin: 0; color: #b9bdc9; font-size: 15px; }
.oss p a { color: #fff; }
.oss-go { flex: none; margin-left: auto; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line);
          color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.oss-go:hover { border-color: #fff; }
@media (max-width: 700px) { .oss { flex-direction: column; align-items: flex-start; } .oss-go { margin-left: 0; } }
.proof b small { font-size: .4em; color: var(--muted-d); font-weight: 600; }
.proof span { display: block; margin-top: 10px; color: #b9bdc9; font-size: 15px; }
.proof a { color: #fff; }
.proof .who { margin-top: auto; padding-top: 14px; font: 500 13px var(--mono); letter-spacing: .08em;
              text-transform: uppercase; text-decoration: none; color: #fff; border-bottom: 1px solid var(--red); }

/* ---------------- crew: the agents ---------------- */
.crew { padding: 120px 0 40px; }
.crew-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.agent { background: #fff; border-radius: 26px; overflow: hidden; display: flex; flex-direction: column;
         box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 14px 34px rgba(18,19,24,.07); transition: transform .25s, box-shadow .25s; }
.agent:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: 0 24px 50px rgba(18,19,24,.14); }
.ag-pic { position: relative; background: var(--bg); aspect-ratio: 1 / .82; overflow: hidden; }
.ag-gear { position: absolute; right: -18%; top: -22%; width: 78%; opacity: .16; }
.ag-gear svg { width: 100%; height: auto; fill: #fff; animation: hm-spin 40s linear infinite; }
.agent:hover .ag-gear svg { animation-duration: 6s; }
.ag-char { position: absolute; left: 50%; bottom: 0; width: 78%; transform: translateX(-50%); transition: transform .35s cubic-bezier(.2,.8,.2,1.3); }
.agent:hover .ag-char { transform: translateX(-50%) translateY(-6px) scale(1.03); }
.ag-carlone .ag-char { width: 96%; }
.ag-no { position: absolute; left: 18px; top: 14px; font: 600 13px var(--mono); letter-spacing: .1em; color: rgba(255,255,255,.85); }
.ag-mezacapa .ag-no { color: rgba(27,29,36,.7); }
.ag-mezacapa .ag-gear svg { fill: var(--ink); }
.ag-body { padding: 22px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.ag-role { align-self: flex-start; font: 600 12px var(--mono); letter-spacing: .08em; text-transform: uppercase;
           padding: 5px 10px; border-radius: 999px; background: var(--paper); color: var(--muted); margin-bottom: 12px; }
.ag-body h3 { font-size: 32px; font-weight: 800; letter-spacing: -.03em; margin-bottom: 12px; }
.ag-body p { font-size: 15.5px; color: var(--muted); }
.ag-body blockquote { margin: 4px 0 18px; padding: 0 0 0 16px; border-left: 4px solid var(--bg);
                      font: 700 19px/1.3 var(--display); color: var(--text); font-style: italic; }
.ag-mezacapa blockquote { border-color: #e0b100; }
.ag-power { margin: auto 0 0; padding-top: 16px; border-top: 1px dashed #dcd8ce; font-size: 15px !important; color: var(--text) !important; }
.ag-power b { display: block; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.crew-note { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 24px 28px;
             border-radius: 22px; background: var(--ink); color: #c3c7d2; font-size: 16px; }
.crew-note strong { font: 800 24px var(--display); color: #fff; letter-spacing: -.02em; }
/* small life in the drawings */
.crew-steam { animation: crew-steam 2.4s ease-in-out infinite; }
@keyframes crew-steam { 0%,100% { transform: translateY(0); opacity: .85; } 50% { transform: translateY(-5px); opacity: .35; } }
.crew-waves { animation: crew-blink 1.2s steps(2) infinite; }
.crew-eyes { animation: crew-eyes 4s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes crew-eyes { 0%,92%,100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.led { animation: crew-blink 1.1s steps(2) infinite; } .led.l2 { animation-delay: .4s; } .led.l3 { animation-duration: .7s; }
@keyframes crew-blink { 50% { opacity: .25; } }
.dot { animation: crew-dot 1.2s ease-in-out infinite; } .dot.d2 { animation-delay: .2s; } .dot.d3 { animation-delay: .4s; }
@keyframes crew-dot { 0%,60%,100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.crew-bug { animation: crew-bug 3s ease-in-out infinite; }
@keyframes crew-bug { 0%,100% { transform: translateX(0); } 50% { transform: translateX(-8px); } }
.crew-hair { transform-box: fill-box; transform-origin: bottom center; }
.agent:hover .crew-hair { animation: crew-hair .5s ease-in-out 2; }
@keyframes crew-hair { 50% { transform: rotate(-4deg) scale(1.04); } }

/* ---------------- services ---------------- */
.services { padding: 120px 0; }
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.svc { background: #fff; border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 10px 30px rgba(18,19,24,.05);
       position: relative; overflow: hidden; transition: transform .2s; }
.svc:hover { transform: translateY(-4px); }
.svc .ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; margin-bottom: 18px;
            background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.svc:nth-child(1) { --c: var(--blue); } .svc:nth-child(2) { --c: var(--red); } .svc:nth-child(3) { --c: var(--green); } .svc:nth-child(4) { --c: #b88700; }
.svc h3 { margin-bottom: 10px; }
.svc p { color: var(--muted); font-size: 16px; margin: 0; }
.svc ul { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.svc li { font: 500 12px var(--mono); padding: 4px 9px; border-radius: 999px; background: var(--paper); color: var(--muted); }

/* ---------------- client work + logos ---------------- */
.work { padding: 0 0 120px; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.case { display: block; text-decoration: none; background: #fff; border-radius: var(--radius); overflow: hidden;
        box-shadow: 0 10px 30px rgba(18,19,24,.06); transition: transform .2s; }
.case:hover { transform: translateY(-4px); }
.case img { width: 100%; aspect-ratio: 900 / 650; object-fit: cover; }
.case div { padding: 20px 22px 24px; }
.case small { font: 500 12px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.case h3 { font-size: 21px; margin-top: 4px; }
.clients { margin-top: 80px; text-align: center; }
.clients p { font: 500 13px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 26px 56px; margin-top: 26px; }
.logos img { height: 34px; width: auto; filter: grayscale(1); opacity: .6; transition: filter .2s, opacity .2s; }
.logos img:hover { filter: none; opacity: 1; }
.logos .bit4 { height: 54px; }
.logos .txt { font-family: var(--display); font-weight: 800; font-size: 28px; color: #8a8e9a; letter-spacing: -.01em; }

/* ---------------- contact ---------------- */
.contact { padding: 120px 0; }
.ct-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; align-items: start; }
.ct-info p { color: var(--muted); }
.ct-info h2 { font-size: clamp(36px, 4vw, 56px); }
.ct-info h2 { margin-bottom: 22px; }
.ct-info a { font-weight: 700; color: var(--text); }
.ct-gears { display: block; width: 150px; margin-top: 34px; overflow: visible; }
.ct-gears .gear { transform-box: fill-box; transform-origin: center; }
.ct-gears .g-blue { animation: hm-spin 14s linear infinite; }
.ct-gears .g-red { animation: hm-spin-rev 11s linear infinite; }
.ct-gears .g-green { animation: hm-spin-rev 12.5s linear infinite; }
.form { background: #fff; border-radius: 28px; padding: 34px; box-shadow: 0 20px 50px rgba(18,19,24,.08); }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; font: 400 17px var(--body); padding: 14px 16px; border-radius: 14px; border: 2px solid var(--paper-2);
                                background: var(--paper); color: var(--text); transition: border-color .15s, background .15s; }
.field input:focus, .field textarea:focus { border-color: var(--blue); background: #fff; outline: none; }
.field textarea { min-height: 140px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -9999px; }
.form-note { font-size: 14px; color: var(--muted); margin: 14px 0 0; }
.form-title { font-size: 24px; margin: 0 0 6px; }
.form-sub { color: var(--muted); font-size: 16px; margin: 0 0 22px; }
.svc-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 700; text-decoration: none; color: var(--c); }
.svc-more:hover { gap: 12px; }
.ct-cunce { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 420px; margin: 8px 0 30px; padding: 12px 22px 12px 12px;
            border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; text-align: left; cursor: pointer;
            box-shadow: 0 14px 34px rgba(18,19,24,.18); transition: transform .2s, box-shadow .2s; }
.ct-cunce:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(18,19,24,.24); }
.ct-cunce .cl-pic { width: 56px; height: 56px; }
.ct-cunce-t { flex: 1; }
.ct-cunce-t b { display: block; font-family: var(--display); font-size: 21px; }
.ct-cunce-t small { color: rgba(255,255,255,.7); font: 500 13px var(--mono); }
.ct-cunce .fa { font-size: 20px; color: var(--red); transition: transform .2s; }
.ct-cunce:hover .fa { transform: translateX(4px); }
.form-msg { margin-top: 16px; padding: 14px 16px; border-radius: 14px; font-weight: 600; display: none; }
.form-msg.ok { display: block; background: #e5f7ee; color: #146b3f; }
.form-msg.err { display: block; background: #fde8e9; color: #9b1218; }
.btn[disabled] { opacity: .6; cursor: wait; }

/* ---------------- footer ---------------- */
.foot { background: var(--ink); color: #c3c7d2; padding: 70px 0 30px; font-size: 16px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.foot img { height: 40px; width: auto; margin-bottom: 16px; }
.foot h4 { font: 500 13px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: #fff; margin: 0 0 14px; }
.foot-claim { color: #fff; font-weight: 500; margin: 0 0 4px; }  /* Pedro's claim, 2026-11-11 */
.foot-since { margin: 0; }
.foot a { color: #c3c7d2; text-decoration: none; }
.foot a:hover { color: #fff; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-social { display: flex; gap: 10px; }
.foot-social a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); }
.foot-social a:hover { border-color: #fff; }
.foot-bottom { margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 20px;
               flex-wrap: wrap; font: 400 14px var(--mono); color: var(--muted-d); }
.linkbtn { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* ---------------- cookie consent ---------------- */
.consent { position: fixed; left: 20px; bottom: 20px; z-index: 60; max-width: 420px; background: #fff; color: var(--text); border-radius: 20px;
           padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); display: none; }
.consent.show { display: block; }
.consent p { font-size: 15px; margin: 0 0 14px; }
.consent .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.consent .btn { min-height: 44px; padding: 0 18px; font-size: 15px; }
.consent .btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 2px var(--paper-2); }

/* reveal (classes set by js/progetti.js) */
.pg-anim [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.pg-anim [data-reveal].is-in { opacity: 1; transform: none; }
.pg-anim [data-reveal="2"] { transition-delay: .12s; }
.pg-anim [data-reveal="3"] { transition-delay: .24s; }
.pg-anim [data-reveal="4"] { transition-delay: .36s; }

/* ---------------- responsive ---------------- */
/* Desktop: the same 120px between two light sections (their paddings no longer add up). Phones keep their own. */
@media (min-width: 901px) {
  .crew { padding-bottom: 120px; }
  .services, .contact { padding-top: 0; }
}
/* Sections with no top padding: a menu link stops where the padding would be, so the fixed menu never covers them */
.services, .contact, .home-bar, .work { scroll-margin-top: 120px; }
#open-source { scroll-margin-top: 110px; }
@media (max-width: 1100px) { .crew-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1060px) {
  .bento { grid-auto-rows: auto; }
  .p-ipf, .p-rajio, .p-tasky, .p-cycle { grid-column: span 12; grid-row: auto; min-height: 280px; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .proof { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links { position: fixed; inset: 78px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 0; padding: 10px 28px 26px;
               background: var(--paper); box-shadow: 0 20px 40px rgba(0,0,0,.15); display: none; }
  .nav.open .nav-links { display: flex; }
  .nav.open { background: var(--paper); }
  .nav.open .nav-toggle span { background: var(--ink); }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--paper-2); }
  .nav-links a, .nav.is-solid .nav-links a:not(.btn) { color: var(--text); display: block; padding: 14px 0; }
  .nav-links .btn { margin-top: 14px; display: inline-flex; color: #fff !important; }
  .nav-links li:last-child { border: 0; }
  .hero-grid, .of-grid, .ct-grid { grid-template-columns: 1fr; }
  .ct-gears { display: none; }
  .steps { grid-template-columns: 1fr; gap: 30px; }
  .work-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .wrap { padding: 0 18px; }
  .hero { padding-top: 110px; }
  .out { position: relative; bottom: auto; margin: 16px auto 0; }
  .products, .officina, .services, .contact { padding: 80px 0; }
  .work { padding-bottom: 80px; }
  .svc-grid, .proof { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .form { padding: 22px; }
  .p-ipf .p-nums { gap: 20px; }
  .foot-grid { grid-template-columns: 1fr; }
  .logos { gap: 22px 34px; }
  .logos img { height: 26px; }
  .consent { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
@media (max-width: 640px) { .crew-grid { grid-template-columns: 1fr; } .ag-body h3 { font-size: 30px; } }

/* ---------------- phones: shorter pages ---------------- */
.crew-tap, .tb-more { display: none; }
@media (max-width: 640px) {
  /* the crew: a compact grid, the full card is on each agent's page */
  .crew-tap { display: block; margin: -10px 0 18px; color: var(--muted); font-size: 16px; }
  .crew-grid { grid-template-columns: repeat(3, 1fr); gap: 18px 12px; }
  .agent { position: relative; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
  .agent:hover { transform: none; box-shadow: none; }
  .ag-pic { aspect-ratio: 1; border-radius: 20px; }
  .ag-no, .ag-gear { display: none; }
  .ag-char { width: 86%; }
  .ag-carlone .ag-char { width: 100%; }
  .ag-body { padding: 8px 2px 0; align-items: center; text-align: center; }
  .ag-body h3 { order: 1; font-size: 19px; margin: 0; }
  .ag-body h3 a::after { content: ""; position: absolute; inset: 0; }   /* the whole card opens the agent's page */
  .ag-role { order: 2; align-self: center; background: none; padding: 0; margin: 2px 0 0; font: 500 12px/1.3 var(--body);
             letter-spacing: 0; text-transform: none; }
  .ag-body > p, .ag-body blockquote, .ag-power, .ag-talk { display: none; }
  .crew-note { margin-top: 26px; padding: 20px; }
  /* the toolbox: the first modules, the rest on request */
  .tool { padding: 7px 11px; font-size: 14px; gap: 7px; }
  .tool svg { width: 13px; height: 13px; }
  .toolbox { gap: 7px; }
  .toolbox:not(.open) .tool:nth-child(n+9) { display: none; }
  .tb-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 9px 16px; border-radius: 999px;
             border: 1px solid var(--line); background: none; color: #fff; font: 600 15px var(--body); cursor: pointer; }
  .toolbox.open + .tb-more { display: none; }
  /* the footer: two columns */
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .foot-grid > div:first-child, .foot-grid > div:last-child { grid-column: 1 / -1; }
  .foot { padding-top: 54px; }
  .foot-bottom { margin-top: 34px; }
}

/* Phones: the same 80px between sections (sections are 80px top and bottom; two light ones don't add up) */
@media (max-width: 900px) {
  .crew { padding: 80px 0; }
  section.home-bar { padding-bottom: 80px; }
  .services, .contact { padding-top: 0; }
  .services, .contact, .home-bar, .work { scroll-margin-top: 80px; }
  #open-source { scroll-margin-top: 96px; }
}
