/* ==========================================================
   Axentia Lean Automation — Main Stylesheet
   ========================================================== */

/* --- Custom Properties --- */
:root {
  --ink: #0A0A0A;
  --ink-soft: #3D3D3D;
  --muted: #666666;
  --subtle: #8A8A8A;
  --faint: #B4B4B4;
  --nav-idle: #707070;
  --border: #E3E3E3;
  --border-light: #EDEDED;
  --surface: #FFFFFF;
  --surface-gray: #F5F5F4;
  --font-sans: 'General Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --max-w: 1200px;
  --px: clamp(24px, 5vw, 48px);
  --section-py: clamp(72px, 10vw, 130px);
  --btn-gradient: linear-gradient(180deg, #2E2E2E 0%, #0A0A0A 55%);
  --btn-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 1px 2px rgba(10,10,10,0.2);
  --btn-light-gradient: linear-gradient(180deg, #FFFFFF 0%, #E8E8E6 100%);
  --glass-bg: rgba(255,255,255,0.5);
  --glass-blur: blur(14px);
  --glass-border: 1px solid rgba(10,10,10,0.08);
  --ease-out: cubic-bezier(.22,1,.36,1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); -webkit-font-smoothing: antialiased; background: var(--surface); color: var(--ink); }
::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--muted); }
h1, h2, h3, p { margin: 0; }
button { font-family: inherit; }

/* --- Container --- */
.container { max-width: var(--max-w); margin: 0 auto; padding-left: var(--px); padding-right: var(--px); }

/* --- Section --- */
.section { padding: var(--section-py) 0; }
.section--sm { padding: clamp(64px,8vw,100px) 0; }
.section--dark { background: var(--ink); color: #FFFFFF; }
.section--gray { background: var(--surface-gray); position: relative; overflow: hidden; }
.section--gray::before { content:''; position:absolute; inset:0; background:radial-gradient(600px 400px at 18% 30%,#E4E4E2 0%,transparent 70%),radial-gradient(700px 500px at 85% 75%,#DCDCDA 0%,transparent 70%); pointer-events:none; }
.section--gray > .container { position: relative; }
.section--gray-3::before { background:radial-gradient(600px 400px at 18% 30%,#E4E4E2 0%,transparent 70%),radial-gradient(700px 500px at 85% 75%,#DCDCDA 0%,transparent 70%),radial-gradient(500px 380px at 55% 110%,#E8E8E6 0%,transparent 70%); }

/* --- Eyebrow --- */
.eyebrow { font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:0.14em; text-transform:uppercase; color:var(--subtle); margin-bottom:28px; }
.eyebrow--dot { display:flex; align-items:center; gap:12px; margin-bottom:36px; }
.eyebrow--dot::before { content:''; width:6px; height:6px; background:var(--ink); border-radius:50%; flex-shrink:0; }
.section--dark .eyebrow { color:#7A7A7A; }
.section--dark .eyebrow--dot::before { background:#FFFFFF; }

/* --- Headings --- */
.heading-xl { font-size:clamp(52px,9vw,112px); line-height:0.96; letter-spacing:-0.045em; font-weight:500; max-width:14ch; text-wrap:balance; }
.heading-hero { font-size:clamp(48px,8vw,96px); line-height:0.98; letter-spacing:-0.045em; font-weight:500; max-width:14ch; text-wrap:balance; }
.heading-lg { font-size:clamp(36px,5vw,64px); font-weight:500; letter-spacing:-0.04em; line-height:1.02; }
.heading-md { font-size:clamp(32px,4.4vw,54px); font-weight:500; letter-spacing:-0.04em; line-height:1.05; }
.heading-case { font-size:clamp(40px,6.4vw,80px); line-height:1; letter-spacing:-0.045em; font-weight:500; max-width:16ch; text-wrap:balance; }
.heading-case-lg { font-size:clamp(44px,7vw,88px); line-height:0.98; letter-spacing:-0.045em; font-weight:500; max-width:16ch; text-wrap:balance; }
.heading-cta { font-size:clamp(36px,5.4vw,72px); font-weight:500; letter-spacing:-0.045em; line-height:0.98; max-width:18ch; text-wrap:balance; }
.heading-cta-lg { font-size:clamp(40px,6vw,84px); font-weight:500; letter-spacing:-0.045em; line-height:0.98; max-width:16ch; text-wrap:balance; color:#FFFFFF; }
.heading-legal { font-size:clamp(40px,6vw,72px); line-height:1; letter-spacing:-0.045em; font-weight:500; max-width:16ch; text-wrap:balance; }

/* --- Body text --- */
.text-intro { font-size:clamp(17px,1.8vw,20px); line-height:1.55; color:var(--muted); max-width:560px; font-weight:400; }
.text-intro--wide { max-width:640px; }
.text-body { font-size:16px; line-height:1.7; color:var(--muted); font-weight:400; }
.text-body-sm { font-size:14.5px; line-height:1.7; color:var(--muted); font-weight:400; }
.text-narrative { font-size:16.5px; line-height:1.7; color:var(--ink-soft); font-weight:400; max-width:680px; }
.text-legal { font-size:15.5px; line-height:1.75; color:var(--ink-soft); font-weight:400; max-width:680px; }
.text-cta { font-size:16px; line-height:1.65; color:#9A9A9A; max-width:480px; font-weight:400; }
.text-cta a { color:#FFFFFF; text-decoration:underline; }

/* --- Header --- */
.header { position:sticky; top:0; z-index:50; background:rgba(255,255,255,0.78); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); border-bottom:1px solid var(--border-light); }
.header__inner { max-width:var(--max-w); margin:0 auto; padding:18px var(--px); display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; }
.header__logo { display:flex; align-items:center; }
.header__logo img { height:34px; width:auto; }
.header__nav { display:flex; align-items:center; gap:clamp(16px,3vw,32px); flex-wrap:wrap; }
.header__link { font-size:14px; font-weight:500; color:var(--nav-idle); padding-bottom:3px; background-image:linear-gradient(var(--ink),var(--ink)); background-size:0% 1.5px; background-repeat:no-repeat; background-position:0 100%; transition:color .25s ease, background-size .35s var(--ease-out); }
.header__link:hover { color:var(--ink) !important; background-size:100% 1.5px !important; }
.header__link--active { color:var(--ink); background-size:100% 1.5px; }
.header__actions { display:flex; align-items:center; gap:20px; }
.header__login { font-size:14px; font-weight:500; color:var(--nav-idle); transition:color .2s ease; }
.header__login:hover { color:var(--ink); }

/* --- Buttons --- */
.btn { display:inline-flex; align-items:center; gap:8px; border-radius:999px; font-weight:500; font-family:var(--font-sans); text-decoration:none; cursor:pointer; border:none; transition: box-shadow .35s var(--ease-out), transform .35s var(--ease-out), filter .35s var(--ease-out), border-color .35s var(--ease-out), background .35s var(--ease-out); }
.btn:active { transform:translateY(0) scale(0.97); }
.btn--primary { background:var(--btn-gradient); color:#FFFFFF; padding:14px 30px; font-size:15px; letter-spacing:0.01em; box-shadow:inset 0 1px 0 rgba(255,255,255,0.14), 0 2px 6px rgba(10,10,10,0.18); }
.btn--primary:hover { color:#FFFFFF; transform:translateY(-2px); filter:brightness(1.25); box-shadow:inset 0 1px 0 rgba(255,255,255,0.2), 0 12px 28px rgba(10,10,10,0.28); }
.btn--primary-sm { background:var(--btn-gradient); color:#FFFFFF; padding:10px 22px; font-size:13.5px; letter-spacing:0.01em; box-shadow:var(--btn-shadow); }
.btn--primary-sm:hover { color:#FFFFFF; transform:translateY(-1px); filter:brightness(1.25); box-shadow:inset 0 1px 0 rgba(255,255,255,0.2), 0 6px 16px rgba(10,10,10,0.25); }
.btn--secondary { color:var(--ink); padding:13px 26px; border:1px solid #D9D9D9; font-size:15px; background:rgba(255,255,255,0.6); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.btn--secondary:hover { border-color:var(--ink); color:var(--ink); background:var(--surface); transform:translateY(-2px); box-shadow:0 8px 20px rgba(10,10,10,0.08); }
.btn--primary-light { background:var(--btn-light-gradient); color:var(--ink); padding:16px 38px; font-size:16px; letter-spacing:0.01em; box-shadow:inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 8px rgba(0,0,0,0.35); }
.btn--primary-light:hover { color:var(--ink); transform:translateY(-2px); box-shadow:inset 0 1px 0 rgba(255,255,255,0.9), 0 14px 34px rgba(0,0,0,0.5); }
.btn--ghost-dark { color:#FFFFFF; padding:15px 32px; border:1px solid #3A3A3A; font-size:15px; background:rgba(255,255,255,0.03); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.btn--ghost-dark:hover { border-color:#FFFFFF; color:#FFFFFF; background:rgba(255,255,255,0.08); transform:translateY(-2px); }
.btn--submit { background:var(--btn-gradient); color:#FFFFFF; padding:15px 36px; font-size:15px; letter-spacing:0.01em; box-shadow:inset 0 1px 0 rgba(255,255,255,0.14), 0 2px 6px rgba(10,10,10,0.18); }
.btn--submit:hover { transform:translateY(-2px); filter:brightness(1.25); box-shadow:inset 0 1px 0 rgba(255,255,255,0.2), 0 12px 28px rgba(10,10,10,0.28); }

/* --- Steps --- */
.steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:clamp(32px,4vw,48px); }
.step { border-top:1px solid var(--border); padding-top:32px; transition:border-color .3s ease; }
.step:hover { border-color:var(--ink); }
.step__num { font-family:var(--font-mono); font-size:12px; font-weight:500; color:var(--subtle); margin-bottom:24px; transition:color .3s ease; }
.step:hover .step__num { color:var(--ink); }
.step__title { font-size:19px; font-weight:500; letter-spacing:-0.01em; margin-bottom:12px; }
.step__text { font-size:14.5px; line-height:1.7; color:var(--muted); font-weight:400; }

/* --- Glass card --- */
.card { background:var(--glass-bg); backdrop-filter:var(--glass-blur); -webkit-backdrop-filter:var(--glass-blur); border:var(--glass-border); border-radius:14px; transition:border-color .3s ease, transform .3s ease, background .3s ease, box-shadow .3s ease; color:var(--ink); text-decoration:none; display:flex; flex-direction:column; overflow:hidden; }
.card:hover { border-color:rgba(10,10,10,0.16); transform:translateY(-3px); background:rgba(255,255,255,0.82); box-shadow:0 16px 40px rgba(10,10,10,0.08); color:var(--ink); }
.card--row { flex-direction:row; }
.card__img { width:100%; object-fit:cover; background:#EBEBE9; display:block; }
.card__img--h { height:190px; }
.card--row .card__img { width:40%; }
.card__body { padding:24px; flex:1; display:flex; flex-direction:column; }
.card__body--lg { padding:30px; }
.card__tag { font-family:var(--font-mono); font-size:10.5px; font-weight:500; letter-spacing:0.1em; text-transform:uppercase; color:var(--subtle); margin-bottom:14px; }
.card__tag--lg { margin-bottom:16px; }
.card__title { font-size:18px; font-weight:500; letter-spacing:-0.01em; margin-bottom:8px; }
.card__title--lg { font-size:20px; letter-spacing:-0.02em; line-height:1.25; }
.card__text { font-size:14px; line-height:1.65; color:var(--muted); font-weight:400; }
.card__arrow { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:50%; border:1px solid #E0E0DE; color:var(--muted); transition:background .2s ease, color .2s ease, border-color .2s ease; margin-top:auto; align-self:flex-end; }
.card:hover .card__arrow { background:var(--ink); color:#FFFFFF; border-color:var(--ink); }
.card__body, .card__body--lg { margin:0; }
.card__arrow--sm { width:28px; height:28px; }

/* --- Dashboard card (servizi) --- */
.dash-card { overflow:hidden; }
.dash-card__preview { padding:20px 20px 0; }
.dash-card__preview img { width:100%; border-radius:8px; border:1px solid rgba(10,10,10,0.06); }
.dash-card__body { padding:22px 24px 26px; }
.dash-card__title { font-size:17px; font-weight:500; letter-spacing:-0.01em; margin-bottom:8px; }
.dash-card__text { font-size:14px; line-height:1.65; color:var(--muted); font-weight:400; }

/* --- Rows (narrative / legal / case detail) --- */
.rows { border-top:1px solid var(--border); }
.section--gray .rows { border-color:rgba(10,10,10,0.12); }
.row { display:flex; gap:clamp(24px,4vw,40px); padding:clamp(32px,4vw,44px) 0; border-bottom:1px solid var(--border); flex-wrap:wrap; }
.section--gray .row { border-color:rgba(10,10,10,0.12); }
.row__label { flex:0 0 240px; }
.row__label--wide { flex:0 0 260px; }
.row__label h2, .row__label h3 { font-family:var(--font-mono); font-size:11px; font-weight:500; color:var(--subtle); text-transform:uppercase; letter-spacing:0.14em; margin:0; }
.row__label h2 { line-height:1.6; }
.row__num { color:var(--faint); margin-right:10px; }
.row__content { flex:1 1 420px; }

/* --- Summary grid --- */
.summary-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:clamp(28px,4vw,40px); }
.summary-item { border-top:1px solid var(--border); padding-top:24px; transition:border-color .3s ease; }
.summary-item:hover { border-color:var(--ink); }
.summary-item__label { font-family:var(--font-mono); font-size:12px; font-weight:500; color:var(--subtle); margin-bottom:16px; }

/* --- FAQ Accordion --- */
.faq { border-top:1px solid var(--border); }
.faq__item { border-bottom:1px solid var(--border); }
.faq__question { width:100%; background:none; border:none; padding:24px 0; display:flex; align-items:center; justify-content:space-between; gap:20px; cursor:pointer; text-align:left; color:var(--ink); }
.faq__question:hover { color:var(--muted); }
.faq__q-text { font-size:17px; font-weight:500; letter-spacing:-0.01em; line-height:1.4; }
.faq__q-num { font-family:var(--font-mono); font-size:12px; font-weight:500; color:var(--faint); flex:0 0 30px; }
.faq__q-row { display:flex; align-items:baseline; gap:18px; flex:1; }
.faq__toggle { flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border-radius:50%; border:1px solid #D9D9D9; transition:transform .3s ease; }
.faq__item--open .faq__toggle { transform:rotate(45deg); }
.faq__answer { display:grid; grid-template-rows:0fr; transition:grid-template-rows .35s ease; }
.faq__item--open .faq__answer { grid-template-rows:1fr; }
.faq__answer-inner { overflow:hidden; }
.faq__answer-text { font-size:15px; line-height:1.7; color:var(--muted); padding:0 48px 28px 0; font-weight:400; }
.faq__answer-text--indented { padding:0 48px 28px 48px; max-width:680px; }

/* --- CTA (dark) --- */
.cta { background:var(--ink); color:#FFFFFF; }
.cta__inner { max-width:var(--max-w); margin:0 auto; padding:clamp(90px,13vw,170px) var(--px); display:flex; flex-direction:column; align-items:center; text-align:center; }
.cta__inner--sm { padding:clamp(90px,12vw,150px) var(--px); }
.cta__actions { display:flex; gap:14px; align-items:center; flex-wrap:wrap; justify-content:center; margin-top:48px; }

/* --- Footer --- */
.footer { border-top:1px solid var(--border-light); background:var(--surface); }
.footer__inner { max-width:var(--max-w); margin:0 auto; padding:32px var(--px); display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; }
.footer__copy { font-family:var(--font-mono); font-size:12px; color:var(--subtle); }
.footer__links { display:flex; gap:28px; flex-wrap:wrap; }
.footer__link { font-size:13px; color:var(--subtle); font-weight:400; transition:color .2s ease; }
.footer__link:hover { color:var(--ink); }
.footer__link--active { color:var(--ink); font-weight:500; }

/* --- Breadcrumb --- */
.breadcrumb { font-family:var(--font-mono); font-size:12px; color:var(--subtle); margin-bottom:32px; }
.breadcrumb a { color:var(--subtle); transition:color .2s ease; }
.breadcrumb a:hover { color:var(--ink); }
.breadcrumb__sep { margin:0 6px; }

/* --- Related links --- */
.related { font-size:14.5px; color:var(--muted); font-weight:400; margin-top:36px; }
.related__label { font-family:var(--font-mono); font-size:11px; font-weight:500; letter-spacing:0.14em; text-transform:uppercase; color:var(--subtle); margin-right:14px; }
.related a { text-decoration:underline; text-underline-offset:3px; }

/* --- Case hero image --- */
.case-hero-img { width:100%; max-height:440px; object-fit:cover; border-radius:14px; background:var(--surface-gray); }

/* --- Grids --- */
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.grid-auto { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:12px; }
.grid-auto-sm { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px; }
.grid-dash { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:12px; }

/* --- Marquee --- */
@keyframes axentia-marquee { from{transform:translateX(0)} to{transform:translateX(-50%)} }
.marquee-wrap { overflow:hidden; border-top:1px solid var(--border); border-bottom:1px solid var(--border); padding:22px 0; -webkit-mask-image:linear-gradient(to right,transparent,#000 8%,#000 92%,transparent); mask-image:linear-gradient(to right,transparent,#000 8%,#000 92%,transparent); }
.marquee-track { display:flex; width:max-content; gap:clamp(40px,6vw,80px); align-items:baseline; animation:axentia-marquee 22s linear infinite; }
.marquee-track:hover { animation-play-state:paused; }
.marquee-item { font-family:var(--font-mono); font-size:15px; color:var(--subtle); letter-spacing:0.04em; white-space:nowrap; }

/* --- Quote glass --- */
.quote-glass { display:inline-block; background:rgba(255,255,255,0.05); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); border:1px solid rgba(255,255,255,0.10); border-radius:14px; padding:28px 32px; max-width:560px; }
.quote-glass__text { font-size:16px; line-height:1.55; font-style:italic; color:#D6D6D6; font-weight:400; }
.quote-glass__author { font-family:var(--font-mono); font-size:12px; color:#7A7A7A; margin-top:10px; }

/* --- Pixel canvas --- */
.pixel-canvas { position:absolute; right:0; top:0; height:100%; width:min(46%,560px); image-rendering:pixelated; pointer-events:none; user-select:none; opacity:0.75; -webkit-mask-image:linear-gradient(to left,#000 30%,transparent); mask-image:linear-gradient(to left,#000 30%,transparent); }

/* --- Form --- */
.form-label { font-family:var(--font-mono); display:block; font-size:11px; font-weight:500; letter-spacing:0.1em; text-transform:uppercase; color:var(--subtle); margin-bottom:8px; }
.form-control { width:100%; padding:13px 16px; border:1px solid var(--border); border-radius:10px; font-size:15px; font-family:var(--font-sans); background:var(--surface); color:var(--ink); outline:none; transition:border-color .2s ease; }
.form-control:focus { border-color:var(--ink); }
textarea.form-control { resize:vertical; }
.form-field { margin-bottom:20px; }
.form-field--lg { margin-bottom:24px; }
.form-optional { opacity:0.6; }
.checkbox-wrapper { display:flex; align-items:flex-start; gap:10px; }
.checkbox-wrapper input[type="checkbox"] { margin-top:4px; accent-color:var(--ink); }
.checkbox-wrapper label { font-size:13.5px; color:var(--muted); line-height:1.5; }

/* --- Inline CTA (chi-siamo style) --- */
.inline-cta { display:flex; justify-content:space-between; align-items:center; gap:48px; flex-wrap:wrap; }
.inline-cta__text { flex:1 1 420px; }
.inline-cta__text h2 { font-size:clamp(32px,4.4vw,54px); font-weight:500; letter-spacing:-0.04em; line-height:1.05; margin-bottom:20px; }
.inline-cta__text p { font-size:16px; line-height:1.65; color:var(--muted); max-width:520px; font-weight:400; }
.inline-cta__text a { text-decoration:underline; }

/* --- Utility --- */
.flex-end { display:flex; justify-content:flex-end; }
.flex-between { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; flex-wrap:wrap; }
.flex-actions { display:flex; gap:14px; align-items:center; flex-wrap:wrap; }
.mt-12 { margin-top:12px; }
.mb-10 { margin-bottom:10px; }
.mb-16 { margin-bottom:16px; }
.mb-20 { margin-bottom:20px; }
.mb-28 { margin-bottom:28px; }
.mb-36 { margin-bottom:36px; }
.mb-48 { margin-bottom:48px; }
.mb-section { margin-bottom:clamp(48px,6vw,72px); }
.max-w-480 { max-width:480px; }
.max-w-520 { max-width:520px; }
.max-w-560 { max-width:560px; }
.max-w-600 { max-width:600px; }
.max-w-640 { max-width:640px; }
.max-w-760 { max-width:760px; }
.max-w-1000 { max-width:1000px; margin-left:auto; margin-right:auto; }

/* Arrow icon helper */
.icon-arrow { display:inline-flex; }

/* --- Responsive --- */
@media (max-width:1024px) {
  .header__actions { display:none !important; }
}
@media (max-width:768px) {
  .grid-3 { grid-template-columns:1fr; }
  .card--row { flex-direction:column; }
  .card--row .card__img { width:100%; height:190px; }
}
