/* ========================================================
   ENDIWEB • STILI GLOBALI
   MODIFICA QUI i colori, i font e le spaziature principali.
   ======================================================== */
:root {
  --bg: #0a0c14;
  --bg-soft: #131622;
  --bg-lighter: #1b1f2c;
  --white: #fdfcfb;
  --ink: #171a25;
  --text: #bfc3d1;
  --muted: #878c9f;
  --accent: #bca8ff; /* COLORE PRINCIPALE • Cambialo qui */
  --accent-2: #8ce7d1;
  --cream: #f5f3ef;
  --border: rgba(255,255,255,.12);
  --radius: 22px;
  --max: 1170px;
  --font: 'Inter', 'Arial', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--white); font-family: var(--font); font-size: 15px; line-height: 1.72; overflow-x: hidden; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button { cursor: pointer; }
::selection { color: var(--ink); background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.container { width: min(var(--max), calc(100% - 64px)); margin: 0 auto; }
.section { padding: 108px 0; }
.section-sm { padding: 76px 0; }
.section-light { color: var(--ink); background: var(--cream); }
.section-light .lede, .section-light .muted { color: #626675; }
.section-alt { background: var(--bg-soft); }
.section-head { margin: 0 0 46px; max-width: 800px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-size: 11px; letter-spacing: .19em; text-transform: uppercase; font-weight: 800; margin-bottom: 20px; }
.kicker::before { content: ''; width: 28px; height: 1px; background: currentColor; }
.section-light .kicker { color: #755ad5; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.14; letter-spacing: -.045em; }
h1 { font-size: clamp(50px, 6.3vw, 88px); font-weight: 800; }
h2 { font-size: clamp(36px, 4.1vw, 56px); font-weight: 800; margin-bottom: 22px; }
h3 { font-size: 23px; font-weight: 750; margin-bottom: 15px; }
p { color: var(--text); margin-bottom: 17px; }
.section-light p { color: #626674; }
.lede { font-size: 17px; line-height: 1.85; max-width: 700px; }
.gradient-text { background: linear-gradient(115deg, var(--accent) 10%, #e2d5ff 48%, var(--accent-2)); color: transparent; background-clip: text; -webkit-background-clip: text; }
.dot-accent { color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 51px; border-radius: 100px; padding: 0 24px; border: 1px solid transparent; font-size: 13px; font-weight: 750; letter-spacing: .01em; transition: background .25s, transform .25s, border-color .25s, color .25s; }
.btn:hover { transform: translateY(-3px); }
.btn-primary { color: #171326; background: var(--accent); }
.btn-primary:hover { background: #d3c5ff; color: #171326; }
.btn-outline { border-color: rgba(255,255,255,.29); color: var(--white); background: transparent; }
.btn-outline:hover { color: #fff; border-color: var(--accent); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { color: #fff; background: #3d3659; }
.arrow { font-size: 17px; font-weight: 400; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 85px; align-items: center; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
/* TESTATA • menu presente su tutte le pagine */
.site-header { height: 94px; position: absolute; z-index: 50; inset: 0 0 auto; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header.is-scrolled { position: fixed; height: 78px; background: rgba(10,12,20,.94); backdrop-filter: blur(18px); box-shadow: 0 6px 30px rgba(0,0,0,.19); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; }
.brand img { width: 147px; height: 73px; object-fit: contain; }
.site-header.is-scrolled .brand img { height: 65px; }
.main-nav { display: flex; gap: 33px; align-items: center; }
.main-nav a { color: #e9eaf1; font-size: 13px; font-weight: 650; transition: color .2s; }
.main-nav a:hover, .main-nav a[aria-current='page'] { color: var(--accent); }
.header-cta { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.15); padding: 11px 19px; border-radius: 100px; font-weight: 750; color: white; white-space: nowrap; font-size: 12px; }
.header-cta:hover { color: #16111f; background: var(--accent); }
.mobile-toggle { display: none; color: white; border: 1px solid var(--border); background: rgba(255,255,255,.06); border-radius: 10px; width: 44px; height: 44px; align-items: center; justify-content: center; font-size: 22px; }
/* HOME • HERO */
.hero { min-height: 790px; position: relative; padding: 188px 0 125px; display: flex; align-items: center; overflow: hidden; background: radial-gradient(ellipse at 83% 42%, rgba(151,122,230,.13), transparent 45%), var(--bg); }
.hero::before { content: ''; position: absolute; width: 650px; height: 650px; border: 1px solid rgba(205,191,255,.12); border-radius: 50%; right: -170px; top: 90px; box-shadow: 0 0 0 95px rgba(165,133,255,.015), 0 0 0 200px rgba(165,133,255,.012); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 58px; }
.hero-copy { position: relative; z-index: 3; }
.hero h1 { margin-bottom: 26px; }
.hero p { max-width: 560px; font-size: 17px; line-height: 1.9; color: #b5b7c9; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin-top: 36px; }
.hero-socials { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 41px; font-size: 12px; color: #c9c7d2; }
.hero-socials a { color: #dee0e8; }
.hero-socials .sep { width: 3px; height: 3px; border-radius: 50%; background: #86879c; }
.hero-visual { position: relative; min-height: 485px; perspective: 950px; }
.visual-glow { position: absolute; background: radial-gradient(circle, rgba(174,131,255,.35), transparent 67%); inset: 12% -18% 0 -18%; filter: blur(33px); }
.browser-mockup { position: absolute; right: -4%; top: 8%; width: 98%; aspect-ratio: 1.1; background: #202236; padding: 10px; border-radius: 19px; box-shadow: 0 48px 100px rgba(0,0,0,.45); transform: rotateY(-12deg) rotateX(5deg) rotateZ(3deg); border: 1px solid rgba(255,255,255,.13); }
.browser-top { height: 35px; display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.browser-top i { display: block; width: 8px; height: 8px; background: #696b7e; border-radius: 50%; }
.browser-top i:first-child { background: #ff7f86; }
.browser-top i:nth-child(2) { background: #ffd386; }
.browser-top i:nth-child(3) { background: #8fe6b4; }
.browser-top span { margin: 0 auto; color: #888aa6; font-size: 10px; }
.browser-screen { height: calc(100% - 35px); padding: 34px; border-radius: 10px; background: radial-gradient(ellipse at 80% 50%, #483a87, #141727 65%); overflow: hidden; position: relative; }
.browser-brand { font-size: 13px; font-weight: 800; color: white; letter-spacing: -.04em; }
.browser-nav { position: absolute; right: 23px; top: 38px; display: flex; gap: 11px; }
.browser-nav i { width: 26px; height: 3px; border-radius: 5px; background: #8785a5; }
.browser-headline { margin-top: 62px; font-size: clamp(27px, 3.1vw, 43px); color: #fff; line-height: 1.06; font-weight: 850; letter-spacing: -.06em; }
.browser-headline b { color: #cdb8ff; }
.browser-caption { margin-top: 17px; height: 7px; width: 50%; border-radius: 20px; background: #626782; }
.browser-caption.short { margin-top: 8px; width: 38%; }
.browser-button { margin-top: 23px; width: 97px; height: 29px; border-radius: 30px; background: #bca8ff; }
.browser-pill { position: absolute; bottom: -20px; right: -15px; width: 160px; height: 140px; background: linear-gradient(145deg, #bda8ff, #6cc5cf); border-radius: 35px 35px 12px 12px; transform: rotate(18deg); opacity: .93; }
.floating-label { position: absolute; background: rgba(253,253,255,.96); color: #181924; border-radius: 14px; box-shadow: 0 15px 35px rgba(0,0,0,.2); padding: 14px 18px; font-size: 11px; font-weight: 800; letter-spacing: .03em; }
.float-top { top: 10px; left: 1%; transform: rotate(-7deg); }
.float-bottom { bottom: 26px; left: -8%; transform: rotate(5deg); }
.floating-label .small { font-size: 10px; color: #666878; font-weight: 600; display: block; letter-spacing: normal; }
.scroll-note { position: absolute; bottom: 42px; left: max(32px, calc((100vw - var(--max)) / 2)); color: #8d8f9d; text-transform: uppercase; font-size: 10px; font-weight: 700; letter-spacing: .23em; }
/* COMPETENZE */
.image-frame { position: relative; border-radius: var(--radius); overflow: hidden; background: #c7c5d9; min-height: 430px; }
.image-frame img { width: 100%; height: 100%; min-height: 430px; object-fit: cover; }
.image-frame::after { content: ''; position: absolute; inset: 0; border: 1px solid rgba(0,0,0,.08); border-radius: inherit; pointer-events: none; }
.image-sticker { position: absolute; left: 20px; bottom: 20px; background: rgba(255,255,255,.96); color: var(--ink); padding: 14px 21px; border-radius: 14px; font-weight: 800; line-height: 1.3; box-shadow: 0 7px 30px #16161622; }
.check-list { padding: 0; margin: 22px 0 27px; list-style: none; display: grid; gap: 11px; }
.check-list li { display: flex; align-items: start; gap: 13px; font-weight: 550; font-size: 14px; }
.check-list li::before { content: '✓'; background: #e8e0ff; color: #6651ae; border-radius: 50%; width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 24px; font-weight: 900; }
.skill-wrap { margin-top: 28px; }
.skill-row { display: flex; justify-content: space-between; margin: 18px 0 8px; color: #2d2d36; font-size: 13px; font-weight: 750; }
.skill-track { height: 7px; width: 100%; border-radius: 40px; background: #dfdce2; overflow: hidden; }
.skill-track div { height: 100%; background: linear-gradient(90deg, #927bdf, #bfa8ff); border-radius: inherit; }
/* SERVIZI */
.service-card { background: #1b1e2b; border: 1px solid rgba(255,255,255,.09); padding: 37px 30px; border-radius: var(--radius); transition: transform .25s, border-color .25s; }
.service-card:hover { transform: translateY(-7px); border-color: rgba(194,176,255,.5); }
.service-card .number { display: inline-block; color: #a9abc1; letter-spacing: .1em; font-size: 11px; font-weight: 800; margin-bottom: 36px; }
.service-card .service-icon { width: 54px; height: 54px; display: grid; place-items: center; background: rgba(188,168,255,.13); color: #d6c8ff; border-radius: 13px; font-size: 25px; margin-bottom: 25px; }
.service-card p { font-size: 13px; line-height: 1.85; margin-bottom: 0; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-top: 58px; }
.metric { padding: 30px 0; border-right: 1px solid var(--border); text-align: center; }
.metric:last-child { border: 0; }
.metric strong { font-size: 38px; display: block; line-height: 1.1; letter-spacing: -.04em; color: #fff; }
.metric small { display: block; margin-top: 11px; color: #a7aabe; font-size: 12px; }
/* PORTFOLIO */
.portfolio-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 25px; }
.project-card { min-width: 0; }
.project-thumb { overflow: hidden; border-radius: 15px; aspect-ratio: 1.1; background: #e4e3e8; position: relative; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s; }
.project-card:hover img { transform: scale(1.055); }
.project-category { color: #9c86ed; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; display: block; margin: 23px 0 8px; }
.project-title { color: var(--ink); font-size: 20px; margin: 0 0 5px; line-height: 1.3; }
.project-card a:hover .project-title { color: #7c60cc; }
.project-link { font-size: 12px; font-weight: 800; display: inline-block; padding-top: 8px; color: #7c60cc; }
.portfolio-filters { display: flex; gap: 11px; flex-wrap: wrap; margin: 0 0 32px; }
.portfolio-filter { border: 1px solid #d6d3df; border-radius: 100px; background: transparent; color: #777589; padding: 9px 22px; font-size: 12px; font-weight: 750; }
.portfolio-filter.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
/* ESPERIENZA */
.timeline { border-left: 1px solid rgba(255,255,255,.16); margin: 44px 0 0 7px; padding-left: 36px; display: grid; gap: 30px; }
.timeline-item { position: relative; padding: 0 0 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.timeline-item::before { content: ''; width: 11px; height: 11px; position: absolute; top: 7px; left: -42px; border-radius: 50%; border: 3px solid var(--accent); background: var(--bg); }
.timeline-item .time { color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .12em; }
.timeline-item h3 { margin-top: 7px; margin-bottom: 11px; font-size: 19px; }
.timeline-item p { max-width: 850px; font-size: 13px; margin-bottom: 0; }
/* CTA & FOOTER */
.cta-block { padding: 81px 0; background: radial-gradient(circle at 85% 60%, rgba(166,134,252,.24), transparent 47%), linear-gradient(110deg, #28203e, #161622); border-top: 1px solid rgba(255,255,255,.07); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 42px; }
.cta-inner h2 { font-size: clamp(32px, 4vw, 50px); max-width: 760px; margin-bottom: 0; }
.footer { background: #080a10; border-top: 1px solid var(--border); padding: 72px 0 25px; }
.footer-grid { display: grid; grid-template-columns: 1.45fr 1fr .8fr .75fr; gap: 47px; }
.footer-logo { width: 155px; height: 90px; object-fit: contain; }
.footer h4 { letter-spacing: -.01em; font-size: 13px; margin: 16px 0 23px; }
.footer p { color: #9396a6; font-size: 12px; line-height: 1.9; }
.footer a { display: inline-block; color: #aeb0bd; font-size: 12px; line-height: 2.1; }
.footer a:hover { color: var(--accent); }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.10); margin-top: 48px; padding-top: 21px; color: #73778b; font-size: 11px; display: flex; justify-content: space-between; gap: 20px; }
/* PAGINE INTERNE */
.page-hero { padding: 194px 0 86px; background: radial-gradient(ellipse at 80% 30%,rgba(149,116,252,.15),transparent 47%), var(--bg); border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(47px, 5.1vw, 69px); margin: 0 0 20px; }
.page-hero p { max-width: 775px; color: #aeb1c2; font-size: 17px; }
.breadcrumb { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #9c9eaf; margin-bottom: 26px; }
.breadcrumb a { color: #bfaaff; }
.inset-card { border-radius: 21px; background: #181b29; padding: 34px; border: 1px solid rgba(255,255,255,.09); }
.inset-card p, .inset-card li { color: #afb3c4; }
.label-top { font-size: 11px; font-weight: 800; letter-spacing: .15em; color: var(--accent); text-transform: uppercase; }
.extra-row { display: grid; grid-template-columns: 1fr 1fr; gap: 65px; align-items: center; padding: 58px 0; border-bottom: 1px solid var(--border); }
.extra-row:nth-child(even) .extra-photo { order: 2; }
.extra-photo { aspect-ratio: 1.56; overflow: hidden; border-radius: 18px; background: #282b37; }
.extra-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.extra-row h3 { font-size: clamp(25px, 3vw, 37px); }
.extra-row ul, .feature-list { padding-left: 20px; color: var(--text); font-size: 14px; }
.extra-row li { margin: 5px 0; }
.package-layout { display: grid; grid-template-columns: 1fr 320px; gap: 58px; align-items: start; }
.package-body p { font-size: 15px; }
.package-body h2 { font-size: 31px; margin-top: 42px; }
.package-aside { position: sticky; top: 105px; background: #191d2c; padding: 25px; border: 1px solid var(--border); border-radius: 18px; }
.package-aside h3 { font-size: 18px; }
.package-aside p { font-size: 13px; }
.package-aside img { border-radius: 10px; margin-bottom: 20px; aspect-ratio: 1.15; object-fit: cover; }
.package-aside .btn { width: 100%; }
.contact-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; }
.contact-detail { margin: 36px 0; display: grid; gap: 18px; }
.contact-detail div { border-bottom: 1px solid rgba(255,255,255,.11); padding-bottom: 16px; }
.contact-detail small { display: block; text-transform: uppercase; letter-spacing: .15em; color: var(--accent); font-size: 10px; font-weight: 800; margin-bottom: 5px; }
.contact-detail a { font-size: 20px; font-weight: 730; }
.contact-form { padding: 40px; background: #171a28; border-radius: 23px; border: 1px solid var(--border); }
.contact-form h2 { font-size: 30px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 20px; }
.field label { display: block; color: #e9eaf1; font-size: 12px; font-weight: 700; margin-bottom: 8px; }
.field input, .field textarea { border: 1px solid #3c3f50; background: #10131e; color: #fff; display: block; border-radius: 9px; width: 100%; padding: 14px 16px; outline: none; transition: border-color .2s; }
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: #7e8193; }
.consent { display: flex; align-items: flex-start; gap: 11px; color: #b7bbcb; font-size: 11px; line-height: 1.6; margin-bottom: 23px; }
.consent input { accent-color: #a18aeb; margin-top: 3px; }
.consent a { text-decoration: underline; }
.form-status { display: block; margin-top: 14px; font-size: 12px; color: #aeb2c3; }
.legal { max-width: 850px; }
.legal h2 { font-size: 26px; margin: 41px 0 12px; }
.legal p, .legal li { color: #b8bbca; }
.legal ul { padding-left: 22px; }
/* REVEAL (non nasconde il contenuto se JavaScript disabilitato) */
@media (prefers-reduced-motion: no-preference) {
  .js-ready .reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
  .js-ready .reveal.in-view { opacity: 1; transform: translateY(0); }
}
/* RESPONSIVE */
@media (max-width: 1050px) {
  .main-nav { gap: 18px; }
  .header-cta { display: none; }
  .hero-grid { gap: 24px; }
  .two-col { gap: 45px; }
  .footer-grid { gap: 27px; }
}
@media (max-width: 780px) {
  .container { width: min(100% - 36px, var(--max)); }
  .section { padding: 73px 0; }
  .section-sm { padding: 54px 0; }
  .site-header, .site-header.is-scrolled { height: 76px; }
  .brand img { width: 126px; height: 68px; }
  .mobile-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: #121420; border-bottom: 1px solid var(--border); padding: 20px 26px 28px; flex-direction: column; align-items: stretch; gap: 0; box-shadow: 0 30px 35px #0005; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
  .hero { min-height: initial; padding: 145px 0 93px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 390px; margin-top: 30px; }
  .browser-mockup { width: min(90%, 490px); right: 4%; top: 0; }
  .scroll-note { display: none; }
  .two-col, .three-col, .contact-layout, .extra-row, .package-layout { grid-template-columns: 1fr; }
  .extra-row:nth-child(even) .extra-photo { order: initial; }
  .extra-row { gap: 25px; padding: 37px 0; }
  .three-col { gap: 17px; }
  .service-card { padding: 31px; }
  .portfolio-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: repeat(2,1fr); }
  .cta-inner { align-items: flex-start; flex-direction: column; }
  .page-hero { padding: 145px 0 69px; }
  .package-aside { position: static; }
  .contact-layout { gap: 35px; }
  .contact-form { padding: 28px; }
}
@media (max-width: 500px) {
  .container { width: calc(100% - 32px); }
  h1 { font-size: 46px; }
  h2 { font-size: 34px; }
  .hero h1 { font-size: clamp(42px, 12vw, 60px); }
  .hero p { font-size: 15px; }
  .hero-visual { min-height: 300px; }
  .browser-screen { padding: 18px; }
  .browser-headline { margin-top: 34px; font-size: 31px; }
  .browser-nav { display: none; }
  .float-bottom { bottom: 4px; left: 0; }
  .portfolio-grid, .metrics, .footer-grid, .form-row { grid-template-columns: 1fr; }
  .metric { border-right: none; border-bottom: 1px solid var(--border); }
  .metric:last-child { border: 0; }
  .footer-bottom { flex-direction: column; }
  .btn { min-height: 48px; }
  .contact-form { padding: 21px; }
  .image-frame, .image-frame img { min-height: 300px; }
}
