/*
Theme Name: IPNOS Corporation
Theme URI: https://ipnoscorporation.it
Author: IPNOS Corporation
Author URI: https://ipnoscorporation.it
Description: Tema custom IPNOS Corporation — agenzia digitale (siti, video, automazioni) con brand musicale.
Version: 2.0.0
License: GNU General Public License v2 or later
Text Domain: ipnos
*/

:root {
  --black: #000;
  --deep: #030914;
  --panel: #071229;
  --line: rgba(0, 200, 255, .14);
  --cyan: #00c8ff;
  --cyan-soft: #7fe4ff;
  --cyan-dim: rgba(0, 200, 255, .45);
  --text: #e6eefb;
  --muted: #8fa3bf;
  --display: 'Orbitron', system-ui, sans-serif;
  --body: 'Rajdhani', system-ui, sans-serif;
  --wrap: 1120px;
  --pad: clamp(20px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: #000 !important; color-scheme: dark; }
body {
  background: #000 !important; color: var(--text);
  font-family: var(--body); font-size: 18px; font-weight: 500; line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan-soft); text-decoration: none; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 1000; padding: 8px 14px; background: var(--cyan); color: #000; font-weight: 700; }
.skip:focus { left: 8px; }

#bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: #000; }
.site-main { position: relative; z-index: 1; }

/* ---------- Header ---------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--pad);
  background: linear-gradient(180deg, rgba(0,0,0,.92), rgba(0,0,0,.55));
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.brand { color: var(--cyan); font-family: var(--display); font-weight: 900; font-size: 13px; letter-spacing: 4px; text-shadow: 0 0 20px var(--cyan); }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: .04em; position: relative; }
.nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 1px; background: var(--cyan); transform: scaleX(0); transform-origin: left; transition: transform .25s; }
.nav a:hover::after { transform: scaleX(1); }
.nav__cta { padding: 9px 18px; border: 1px solid var(--cyan-dim); border-radius: 3px; color: var(--cyan) !important; }
.nav__cta::after { display: none; }
.nav__cta:hover { background: rgba(0,200,255,.1); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 40px; height: 40px; justify-content: center; align-items: center; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--cyan); transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay decorativi (leggeri, solo CSS) */
.scanlines { position: fixed; inset: 0; z-index: 998; pointer-events: none; background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(0,0,0,.035) 3px 4px); }
.corner { position: fixed; z-index: 50; width: 56px; height: 56px; pointer-events: none; border: 0 solid rgba(0,200,255,.3); }
.corner--tl { top: 92px; left: 14px; border-top-width: 1px; border-left-width: 1px; }
.corner--tr { top: 92px; right: 14px; border-top-width: 1px; border-right-width: 1px; }
.corner--bl { bottom: 14px; left: 14px; border-bottom-width: 1px; border-left-width: 1px; }
.corner--br { bottom: 14px; right: 14px; border-bottom-width: 1px; border-right-width: 1px; }
.status { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--cyan-dim); font-weight: 600; margin-left: auto; margin-right: 28px; }
.status i, .site-foot__status i { width: 7px; height: 7px; border-radius: 50%; background: #00ff88; box-shadow: 0 0 8px #00ff88; animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; }
.wrap--narrow { max-width: 760px; }
.section { position: relative; padding: clamp(64px, 9vw, 120px) var(--pad); }
.section--first { padding-top: clamp(120px, 16vw, 170px); }
.section--alt { background: linear-gradient(180deg, rgba(7,18,41,.55), rgba(7,18,41,.15)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section__cta { text-align: center; margin-top: 64px; }
.section__cta p { color: var(--muted); margin-bottom: 16px; }

/* ---------- Tipografia ---------- */
.h2 { font-family: var(--display); font-weight: 900; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.12; color: #fff; margin-bottom: 28px; }
.lead { font-size: 20px; color: var(--muted); max-width: 640px; margin-bottom: 40px; }
.kicker { color: var(--cyan); font-weight: 600; letter-spacing: .08em; margin-bottom: 10px; }
.link { color: var(--cyan); font-weight: 600; border-bottom: 1px solid var(--cyan-dim); }
.link:hover { border-color: #fff; }
.prose { font-size: 19px; }
.prose p, .prose ul, .prose ol { margin-bottom: 1.2em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose h2 { font-family: var(--display); font-size: 22px; margin: 2em 0 .7em; color: #fff; }
.prose h3 { font-size: 20px; font-weight: 700; margin: 1.6em 0 .5em; }
.prose a { border-bottom: 1px solid var(--cyan-dim); }
.prose__cover { border-radius: 8px; margin: 0 0 32px; border: 1px solid var(--line); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--display); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  padding: 16px 32px; border-radius: 2px; border: 1px solid transparent; cursor: pointer; transition: transform .2s, box-shadow .2s, background .2s;
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}
.btn--primary { background: var(--cyan); color: #000; }
.btn--primary:hover { background: #fff; color: #000; box-shadow: 0 0 36px rgba(0,200,255,.45); transform: translateY(-2px); }
.btn--ghost { color: var(--cyan); border-color: var(--cyan-dim); background: rgba(0,200,255,.03); }
.btn--ghost:hover { color: #fff; border-color: var(--cyan); background: rgba(0,200,255,.1); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  padding: 130px var(--pad) 80px;
}
.hero__eyebrow { font-family: var(--display); font-size: 10px; letter-spacing: 8px; text-transform: uppercase; color: var(--cyan); margin-bottom: 32px; padding-left: 8px; opacity: 0; animation: fadeUp 1s .3s forwards; }
.hero__logo-wrap { position: relative; z-index: 2; margin-bottom: 48px; opacity: 0; animation: fadeUp 1.2s .5s forwards; }
.hero__tagline { font-family: var(--body); font-size: clamp(14px, 2vw, 20px); font-weight: 400; letter-spacing: 6px; text-transform: uppercase; color: rgba(200,216,240,.7); max-width: 600px; margin-bottom: 56px; padding-left: 6px; opacity: 0; animation: fadeUp 1.2s .8s forwards; }
.hero__ctas { opacity: 0; animation: fadeUp 1.2s 1.1s forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
.scroll-hint { position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0; animation: fadeUp 1s 1.8s forwards; }
.scroll-hint span { font-size: 11px; letter-spacing: .35em; text-transform: uppercase; color: var(--cyan-dim); padding-left: .35em; }
.scroll-hint i { width: 1px; height: 40px; background: linear-gradient(180deg, var(--cyan), transparent); animation: scrollPulse 2s ease-in-out infinite; }
@keyframes scrollPulse { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform: scaleY(1); transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.ticker { position: relative; z-index: 1; overflow: hidden; padding: 12px 0; background: rgba(0,200,255,.05); border-top: 1px solid rgba(0,200,255,.2); border-bottom: 1px solid rgba(0,200,255,.2); }
.ticker__track { display: flex; gap: 72px; width: max-content; animation: ticker 28s linear infinite; }
.ticker__track span { font-family: var(--display); font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--cyan-dim); white-space: nowrap; }
.ticker__track span::before { content: '//'; color: var(--cyan); margin-right: 16px; }
@keyframes ticker { to { transform: translateX(-50%); } }
.about { text-align: center; }
.about .btn { margin-top: 8px; }
.lead--center { margin-inline: auto; }
.cta-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(700px, 90vw); height: 320px; background: radial-gradient(ellipse, rgba(0,200,255,.09), transparent 70%); pointer-events: none; }
.hero__logo { width: min(700px, 90vw); filter: drop-shadow(0 0 60px rgba(0,200,255,.5)); animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.hero__ctas { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* ---------- Servizi ---------- */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.services--single { grid-template-columns: 1fr; max-width: 720px; }
.service { background: rgba(7,18,41,.75); border: 1px solid var(--line); padding: 36px 32px; }
.service h3 { font-family: var(--display); font-size: 15px; letter-spacing: .06em; color: #fff; margin-bottom: 16px; line-height: 1.4; }
.service p { color: var(--muted); margin-bottom: 20px; }
.service ul { list-style: none; }
.service li { padding: 8px 0 8px 18px; border-top: 1px solid var(--line); position: relative; font-weight: 600; }
.service li::before { content: ''; position: absolute; left: 0; top: 17px; width: 8px; height: 8px; background: var(--cyan); clip-path: polygon(0 0, 100% 50%, 0 100%); }

/* ---------- Metodo ---------- */
.steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.steps li { counter-increment: step; padding-top: 18px; border-top: 1px solid var(--cyan-dim); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--display); color: var(--cyan); font-size: 13px; letter-spacing: .1em; margin-bottom: 14px; }
.steps strong { display: block; font-size: 20px; color: #fff; margin-bottom: 8px; }
.steps span { color: var(--muted); }

/* ---------- Lavori ---------- */
.works { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 900px; }
#lavori .section__head { max-width: 900px; }
.works--full { max-width: none; grid-template-columns: repeat(4, 1fr); }
.work {
  position: relative; aspect-ratio: 9/16; border-radius: 12px; overflow: hidden; cursor: pointer; padding: 0; width: 100%;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(0,0,0,.5);
  transition: border-color .25s, box-shadow .25s; -webkit-tap-highlight-color: transparent; text-align: left; color: inherit; font: inherit;
}
.work:hover, .work:focus-visible { border-color: rgba(0,200,255,.6); box-shadow: 0 18px 44px rgba(0,0,0,.6), 0 0 34px rgba(0,200,255,.18); }
.work__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.work::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.9), rgba(0,0,0,.25) 40%, transparent 65%); pointer-events: none; }
.work__play { position: absolute; z-index: 2; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); border: 1.5px solid var(--cyan); backdrop-filter: blur(4px); transition: transform .25s, background .25s; }
.work__play svg { width: 26px; height: 26px; margin-left: 3px; fill: var(--cyan); }
.work:hover .work__play { transform: translate(-50%, -50%) scale(1.08); background: rgba(0,200,255,.18); }
.work__meta { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.work__tag { font-size: 12px; letter-spacing: .12em; color: var(--cyan-soft); font-weight: 600; }
.work__name { font-size: 16px; font-weight: 700; color: #fff; line-height: 1.25; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,3,8,.88); backdrop-filter: blur(8px); }
.lb[hidden] { display: none; }
.lb__inner { position: relative; width: min(420px, 100%); border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 0 60px rgba(0,200,255,.22); }
.lb__frame { width: 100%; aspect-ratio: 9/16; max-height: 88vh; border: 0; display: block; background: #000; }
.lb__close { position: absolute; top: 8px; right: 8px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--cyan-dim); background: #050b12; color: var(--cyan); font-size: 22px; cursor: pointer; display: grid; place-items: center; }
.lb__close:hover { background: rgba(0,200,255,.15); }

/* ---------- Partner (Works) ---------- */
.partner { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin: 0 0 56px; padding: 32px 36px; border: 1px solid rgba(0,200,255,.3); border-left: 3px solid var(--cyan); background: linear-gradient(90deg, rgba(0,200,255,.08), rgba(7,18,41,.5)); border-radius: 4px; }
.partner__title { font-family: var(--display); font-size: clamp(17px, 2vw, 22px); color: #fff; line-height: 1.3; margin-bottom: 10px; }
.partner__body p:last-child { color: var(--muted); max-width: 620px; }
.partner .btn { flex-shrink: 0; text-transform: none; letter-spacing: .06em; font-family: var(--body); font-size: 16px; }
@media (max-width: 760px) { .partner { flex-direction: column; align-items: flex-start; padding: 24px; } .partner .btn { width: 100%; } }

/* ---------- Musica ---------- */
.music { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: center; }
.music__cover { width: 100%; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.7); }
.music__kicker { color: var(--cyan); font-weight: 600; letter-spacing: .08em; margin-bottom: 8px; }
.music__body .h2 { margin-bottom: 14px; }
.music__body p { color: var(--muted); max-width: 540px; margin-bottom: 26px; }

/* ---------- Contatti ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
.contact__intro p { color: var(--muted); margin-bottom: 18px; max-width: 420px; }
.contact__alt a { border-bottom: 1px solid var(--cyan-dim); }
.cform { display: flex; flex-direction: column; gap: 18px; background: rgba(7,18,41,.6); border: 1px solid var(--line); padding: 32px; border-radius: 6px; }
.cform label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; letter-spacing: .04em; color: var(--muted); }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cform input[type="text"], .cform input[type="email"], .cform select, .cform textarea {
  width: 100%; background: #030914; border: 1px solid var(--line); border-radius: 3px; color: var(--text);
  font: inherit; font-size: 17px; padding: 12px 14px; transition: border-color .2s;
}
.cform select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--cyan) 50%), linear-gradient(135deg, var(--cyan) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.cform input:focus, .cform select:focus, .cform textarea:focus { border-color: var(--cyan); outline: none; }
.cform textarea { resize: vertical; min-height: 130px; }
.cform__consent { flex-direction: row !important; align-items: center; gap: 10px !important; }
.cform__consent input { accent-color: var(--cyan); width: 18px; height: 18px; }
.cform__hp { position: absolute; left: -9999px; }
.cform__ok, .cform__err { padding: 12px 16px; border-radius: 3px; font-weight: 600; }
.cform__ok { background: rgba(0,255,150,.1); border: 1px solid rgba(0,255,150,.4); color: #9dffd4; }
.cform__err { background: rgba(255,60,90,.1); border: 1px solid rgba(255,60,90,.4); color: #ffb3c0; }
.cform .btn { align-self: flex-start; }
.cform--sent { align-items: center; text-align: center; padding: 48px 32px; border-color: rgba(0,255,136,.35); background: rgba(0,255,136,.05); }
.cform--sent h3 { font-family: var(--display); color: #fff; font-size: 20px; margin-top: 8px; }
.cform--sent p { color: var(--muted); max-width: 420px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); z-index: 9999; padding: 14px 26px; border-radius: 4px; background: rgba(0,200,255,.95); color: #000; font-family: var(--display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; opacity: 0; transition: opacity .4s, transform .4s; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Blog ---------- */
.posts { display: flex; flex-direction: column; }
.post { display: grid; gap: 4px; padding: 22px 0; border-top: 1px solid var(--line); color: var(--text); }
.post:last-child { border-bottom: 1px solid var(--line); }
.post__date { color: var(--cyan); font-size: 14px; letter-spacing: .08em; }
.post__title { font-size: 22px; font-weight: 700; color: #fff; }
.post__excerpt { color: var(--muted); }
.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; gap: 16px; flex-wrap: wrap; }
.pagination a, .pagination .current { padding: 8px 14px; border: 1px solid var(--line); border-radius: 3px; }
.pagination .current { border-color: var(--cyan); color: var(--cyan); }

/* ---------- Footer ---------- */
.site-foot { position: relative; z-index: 1; border-top: 1px solid var(--line); background: rgba(0,0,0,.6); padding: 56px var(--pad) 28px; }
.site-foot__grid { max-width: var(--wrap); margin: 0 auto 40px; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; font-size: 16px; }
.site-foot__grid p { color: var(--muted); }
.site-foot__grid a { color: var(--muted); line-height: 1.9; }
.site-foot__grid a:hover { color: var(--cyan); }
.site-foot__brand { font-family: var(--display); color: var(--cyan); font-size: 13px; letter-spacing: .2em; margin-bottom: 12px; }
.site-foot__title { font-weight: 700; color: #fff; margin-bottom: 8px; }
.site-foot__bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: var(--wrap); margin: 0 auto; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; letter-spacing: .08em; }

.site-foot__status { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .services { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .works--full { grid-template-columns: repeat(3, 1fr); }
  .contact { grid-template-columns: 1fr; gap: 36px; }
  .site-foot__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .nav-toggle { display: flex; }
  .status, .corner { display: none; }
  .scroll-hint { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(2,8,20,.97); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav.is-open { max-height: 360px; }
  .nav a { padding: 16px var(--pad); border-top: 1px solid var(--line); font-size: 18px; }
  .nav a::after { display: none; }
  .nav__cta { border: 0; border-radius: 0; }
  .hero { padding-top: 110px; }
  .hero__eyebrow { font-size: 9px; letter-spacing: 3px; padding-left: 3px; white-space: nowrap; margin-bottom: 24px; }
  .hero__tagline { letter-spacing: 4px; padding-left: 4px; text-wrap: balance; }
  .hero__logo { width: min(420px, 78vw); }
  .hero__ctas { flex-direction: column; width: 100%; max-width: 320px; }
  .hero__ctas .btn { width: 100%; }
  .works { grid-template-columns: 1fr 1fr; gap: 14px; }
  .works--full { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .music { grid-template-columns: 1fr; gap: 28px; }
  .music__cover { max-width: 280px; }
  .cform { padding: 22px; }
  .cform__row { grid-template-columns: 1fr; }
  .site-foot__grid { grid-template-columns: 1fr; gap: 28px; }
}
@media (max-width: 400px) {
  .works, .works--full { grid-template-columns: 1fr; max-width: 300px; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__eyebrow, .hero__logo-wrap, .hero__tagline, .hero__ctas, .scroll-hint { opacity: 1; animation: none; }
  .hero__logo, .ticker__track, .scroll-hint i, .status i, .site-foot__status i { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
