@import url('https://fonts.googleapis.com/css?family=VT323&display=swap');

/* =========================
   VARIABILI GLOBALI COLORI
   ========================= */

:root {
    --color-deep-midnight: #341B5F;
    --color-vivid-magenta: #EC13A4;
    --color-electric-yellow: #F5E612;
    --color-neon-indigo: #6839EB;
    --color-bright-cyan: #5ED9F2;
    --color-text: #ffffff;
    --color-link: #ffff00;
    --color-link-hover: #00ffff;
    --color-black: #000000;

    /* filtro base per le foto duotone */
    --photo-filter-duotone: grayscale(100%) contrast(250%) brightness(90%) saturate(220%);
}

/* =========================
   RESET & BASE
   ========================= */

html, button, input, select, textarea,
.pure-g [class *= "pure-u"] {
    font-family: 'VT323', monospace;
}

*, *::after, *::before {
    box-sizing: border-box;
}

html,
body {
    font-size: 25px; /* base, lascio in px come da tua scelta */
    font-family: 'VT323', monospace;
    color: var(--color-text);
    scroll-behavior: smooth;
    width: 100%;
    margin: 0;
    padding: 0;
}

@media screen and (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

*::selection {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.9) !important;
}

*::-moz-selection {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.9) !important;
}

/* =========================
   TYPOGRAFIA
   ========================= */

h1 {
    display: block;
    font-size: 2.2rem;
    margin: 0;
    font-weight: 500;
    line-height: 2rem;
}

h2 {
    display: block;
    font-size: 1.9rem;
    margin: 0;
    font-weight: 500;
}

h3 {
    display: block;
    font-size: 1.6rem;
    margin: 0;
    font-weight: 500;
}

h4 {
    display: block;
    font-size: 1.3rem;
    margin: 1rem 0 0 0;
    font-weight: 500;
}

h5 {
    display: block;
    font-size: 1rem;
    margin: 1.67rem 0;
    font-weight: 500;
}

h6 {
    display: block;
    font-size: 0.8rem;
    margin: 0;
    font-weight: 500;
}

p {
    display: block;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 500;
}

a {
    color: var(--color-link);
    text-decoration: none;
    transition-duration: 0.3s;
    position: relative;
}

a:hover {
    color: var(--color-link-hover);
}

figure {
    margin: 0;
}

/* =========================
   LAYOUT GENERALE
   ========================= */

.hero {
    height: 100vh;
    color: var(--color-text);
}

.hero .pure-g {
    padding-top: 30vh;
}

.half-height {
    min-height: 60vh;
}

.pure-g > div {
    box-sizing: border-box;
}

.boxed1280 {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    overflow: auto;
}

.boxed1024 {
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    overflow: auto;
}

.boxed800 {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    overflow: auto;
}

.boxed720 {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    overflow: auto;
}

.no-box {
    width: 100%;
    margin: 0;
    overflow: hidden;
}

.no-box div {
    box-sizing: border-box;
}

/* =========================
   BACKGROUND COLOR UTILITIES
   ========================= */

/* Deep Midnight - viola molto scuro e profondo */
.bg-deep-midnight {
    background-color: var(--color-deep-midnight);
}

/* Vivid Magenta - fucsia acceso */
.bg-vivid-magenta {
    background-color: var(--color-vivid-magenta);
}

/* Electric Yellow - giallo brillante */
.bg-electric-yellow {
    background-color: var(--color-electric-yellow);
}

/* Neon Indigo - viola bluastro intenso + texture */
.bg-neon-indigo {
    background-color: var(--color-neon-indigo);
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(0, 0, 0, 0.18) 0px,
            rgba(0, 0, 0, 0.18) 1px,
            transparent 1px,
            transparent 4px
        );
    background-size: 4px 4px;
    background-repeat: repeat;
    background-position: 0 0;
}

/* Bright Cyan - azzurro chiaro saturo + texture */
.bg-bright-cyan {
    background-color: var(--color-bright-cyan);
    color: var(--color-black);
    background-image:
        repeating-linear-gradient(
            45deg,
            rgba(255, 255, 255, 0.2) 0px,
            rgba(255, 255, 255, 0.2) 1px,
            transparent 1px,
            transparent 4px
        );
    background-size: 4px 4px;
    background-repeat: repeat;
    background-position: 0 0;
}

/* =========================
   GLOBAL VIBE RETRO
   ========================= */

body {
    background: radial-gradient(
        circle at top,
        var(--color-deep-midnight) 0,
        var(--color-black) 55%,
        var(--color-black) 100%
    );
}

/* titoli senza ombre, uppercase */
h1,
h2,
h3 {
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    text-shadow: none;
}

/* testo pulito */
p,
ul li {
    text-shadow: none;
}

/* underline neon gradient */
a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.15rem;
    width: 0;
    height: 0.125rem;
    background: linear-gradient(
        90deg,
        var(--color-electric-yellow),
        var(--color-vivid-magenta),
        var(--color-bright-cyan)
    );
    transition: width 0.25s ease-out;
}

a:hover::after {
    width: 100%;
}

/* =========================
   HERO
   ========================= */

.hero .pure-g > div {
    max-width: 37.5rem; /* 600px / 16 ≈ 37.5, ma qui è relativo alla base 25px, comunque ok come proporzione */
}

.hero h1 {
    font-size: 2.6rem;
    margin-bottom: 0.2rem;
    position: relative;
    display: inline-block;
    transition: transform 0.1s ease-out;
}

.hero p {
    margin-bottom: 0.2rem;
}

/* BOTTONI SOLIDI ARCADE */

.hero p a[href*="arkeid.pdf"],
.hero p a[href^="tel:"],
.hero p a[href^="mailto:"] {
    display: inline-block;
    padding: 0.35rem 1rem;
    margin-top: 0.25rem;
    margin-right: 0.4rem;
    border-radius: 0.1875rem; /* 3px */
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    font-size: 0.85rem;
    font-weight: 700;
    background: var(--color-black);
    cursor: pointer;
}

/* brochure (giallo) */
.hero p a[href*="arkeid.pdf"] {
    border: 0.1875rem solid var(--color-electric-yellow); /* 3px */
    color: var(--color-electric-yellow);
}

.hero p a[href*="arkeid.pdf"]:hover {
    border-color: var(--color-electric-yellow);
    background: var(--color-electric-yellow);
}

/* telefono (cyan) */
.hero p a[href^="tel:"] {
    border: 0.1875rem solid var(--color-bright-cyan);
    color: var(--color-bright-cyan);
}

.hero p a[href^="tel:"]:hover {
    border-color: var(--color-bright-cyan);
    background: var(--color-bright-cyan);
}

/* mail (magenta) */
.hero p a[href^="mailto:"] {
    border: 0.1875rem solid var(--color-vivid-magenta);
    color: var(--color-vivid-magenta);
}

.hero p a[href^="mailto:"]:hover {
    border-color: var(--color-vivid-magenta);
    background: var(--color-vivid-magenta);
}

/* hover: inversione solida */
.hero p a:hover {
    color: var(--color-black);
}
.hero-title {
    position: relative;
    display: inline-block;
    font-size: 2.6rem;
    line-height: 1;
}

.hero-title .hero-sub {
    position: absolute;
    top: -0.5rem;
    background: black;
    color: white;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    transform: rotate(90deg);
    transform-origin: left center;
    border: 2px solid #000;
    image-rendering: pixelated;
    left: -2.5rem;
    width: 11rem;
}

/* =========================
   SEZIONI / TITOLI
   ========================= */

.above > div {
    position: relative;
}

.bg-neon-indigo h1,
.bg-bright-cyan h1 {
    margin-bottom: 0.4rem;
}

/* =========================
   LISTE / PACCHETTI
   ========================= */

/* reset liste */
ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.4rem;
}

ul li {
    position: relative;
    padding-left: 1.4rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* bullet pixel */
ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.32rem;
    width: 0.6rem;
    height: 0.6rem;
    background: var(--color-electric-yellow);
    border: 0.125rem solid var(--color-black); /* 2px */
    box-sizing: border-box;
}

/* Pacchetti */
.bg-neon-indigo h2 {
    margin-top: 0.9rem;
    margin-bottom: 0.4rem;
}

.bg-neon-indigo ul li {
    margin-bottom: 0.75rem;
}

.bg-neon-indigo ul li strong {
    font-size: 1.05rem;
}

/* =========================
   CONTATTI
   ========================= */

.bg-neon-indigo:last-of-type h1 {
    margin-bottom: 0.4rem;
}

.bg-neon-indigo:last-of-type p {
    margin-bottom: 0.4rem;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {
    html,
    body {
        font-size: 20px;
    }

    .hero h1 {
        font-size: 2.1rem;
    }

    .hero .pure-g > div {
        max-width: 100%;
    }

    .bg-neon-indigo .boxed1280 > .pure-u-1,
    .bg-bright-cyan .boxed1280 > .pure-u-1,
    .bg-neon-indigo .boxed1280 .pure-u-lg-2-3,
    .bg-bright-cyan .boxed1280 .pure-u-lg-1-2 {
        padding: 1.3rem 1rem;
    }
}

@media (max-width: 480px) {
    html,
    body {
        font-size: 18px;
    }

    .hero {
        height: auto;
    }

    .hero .pure-g {
        min-height: auto;
        padding: 3.5rem 0 2.5rem;
    }

    .hero p a[href*="arkeid.pdf"],
    .hero p a[href^="tel:"],
    .hero p a[href^="mailto:"] {
        display: block;
        margin-right: 0;
        margin-bottom: 0.3rem;
        text-align: center;
    }
}

/* =========================
   EFFETTO CRT + SCANLINE
   ========================= */

body.crt {
    position: relative;
    background: radial-gradient(
        circle at top,
        var(--color-deep-midnight) 0,
        var(--color-black) 55%,
        var(--color-black) 100%
    );
}

/* scanline + flicker leggero */
body.crt::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
    background-image:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.06) 0px,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px,
            transparent 3px
        );
    mix-blend-mode: soft-light;
    opacity: 0.3;
    animation: crt-flicker 2.5s infinite steps(2, end);
}

/* vignetta laterale, tipo bordo monitor */
body.crt::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 998;
    background:
        radial-gradient(circle at center,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 55%,
            rgba(0, 0, 0, 0.35) 100%);
}

/* flicker molto leggero */
@keyframes crt-flicker {
    0%   { opacity: 0.28; }
    10%  { opacity: 0.33; }
    20%  { opacity: 0.27; }
    35%  { opacity: 0.31; }
    50%  { opacity: 0.30; }
    65%  { opacity: 0.34; }
    80%  { opacity: 0.29; }
    100% { opacity: 0.30; }
}

/* =========================
   GLITCH LEGGERO SUL TITOLO HERO
   ========================= */

.hero h1:hover {
    animation: hero-glitch 0.35s linear 1;
}

@keyframes hero-glitch {
    0%   { transform: translate(0, 0); }
    15%  { transform: translate(-1px, 1px); }
    30%  { transform: translate(2px, -1px); }
    45%  { transform: translate(-2px, 0); }
    60%  { transform: translate(1px, 1px); }
    75%  { transform: translate(-1px, -1px); }
    100% { transform: translate(0, 0); }
}

/* =========================
   NAVBAR STICKY
   ========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    border-bottom: 0.125rem solid var(--color-electric-yellow);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 1rem;
}

.nav-logo a {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.12rem;
    color: var(--color-electric-yellow);
}

.nav-logo a::after {
    display: none; /* niente underline neon sul logo */
}

.nav-links {
    display: flex;
    gap: 1rem;
}

.nav-links a {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08rem;
    color: var(--color-text);
    opacity: 0.85;
}

.nav-links a::after {
    height: 0.08rem;
}

.nav-links a:hover {
    opacity: 1;
}

/* versione mobile: nav centrata e su due righe se serve */
@media (max-width: 600px) {
    .nav-bar {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.4rem 0.8rem;
        gap: 0.3rem;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 0.6rem;
    }
}

/* FOTO DI SEZIONE */
.section-photo {
    width: 100%;
    max-width: 30rem;
    display: block;
    border: 0.3rem solid var(--color-electric-yellow);
    background: #000;
    image-rendering: pixelated; /* effetto retro */
    margin: 0 auto;
}

/* Foto laterale nella sezione */
.left-photo {
    margin-right: auto;
}

/* Foto a metà sezione */
.mid-photo-wrapper {
    text-align: center;
    padding: 4rem 0;
}

/* Foto finale */
.final-photo-wrapper {
    text-align: center;
    padding: 4rem 0;
}

.mid-photo,
.final-photo {
    max-width: 35rem;
}

/* Responsive */
@media (max-width: 768px) {
    .section-photo {
        max-width: 100%;
        border-width: 0.2rem;
    }
}

/* =========================
   FULL-WIDTH PHOTO SECTIONS
   ========================= */

.photo-section {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.photo-section img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* =========================
   DUOTONE AGGRESSIVO
   ========================= */

/* Filtro a 2 toni molto spinto:
   – altissimo contrasto
   – gamma schiacciata
   – palette ciano/magenta/viola (stile Arkeid)
*/

.photo-duotone img {
    filter: var(--photo-filter-duotone);
    mix-blend-mode: screen;
    opacity: 0.9;
}

/* Fondo nascosto sotto l'immagine per creare il duotone */
.photo-duotone::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            135deg,
            var(--color-neon-indigo) 0%,
            var(--color-vivid-magenta) 50%,
            var(--color-electric-yellow) 100%
        );
    z-index: -1;
}


/* =============================
   FOTO A SINISTRA (HALF / SPLIT)
   ============================= */

.photo-split-left {
    padding: 0; /* nessun margine interno */
    display: flex;
    align-items: stretch;
}

.photo-duotone-split {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.photo-duotone-split img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: var(--photo-filter-duotone);
    mix-blend-mode: screen;
    opacity: 0.9;
}

/* gradient duotone aggressivo sotto */
.photo-duotone-split::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;

    background: linear-gradient(
        135deg,
        var(--color-neon-indigo) 0%,
        var(--color-vivid-magenta) 50%,
        var(--color-electric-yellow) 100%
    );
}

/* Mobile: foto sopra al testo */
@media (max-width: 768px) {
    .photo-split-left {
        height: 60vh; /* mantiene impatto forte */
    }
}

/* =========================
   GLITCH RGB SULLE FOTO
   ========================= */

.photo-duotone-split.glitch-once img,
.photo-section.photo-duotone.glitch-once img {
    animation: rgb-glitch 0.45s steps(3, end) 1;
}

@keyframes rgb-glitch {
    0% {
        transform: translate(0, 0);
        filter: var(--photo-filter-duotone);
    }
    20% {
        transform: translate(-0.1rem, 0.05rem);
        filter: var(--photo-filter-duotone)
            drop-shadow(0.12rem 0px 0px #ff0040)
            drop-shadow(-0.12rem 0px 0px #00f0ff);
    }
    40% {
        transform: translate(0.12rem, -0.08rem);
        filter: var(--photo-filter-duotone)
            drop-shadow(-0.15rem 0px 0px #ff0040)
            drop-shadow(0.15rem 0px 0px #00f0ff);
    }
    60% {
        transform: translate(-0.08rem, -0.04rem);
        filter: var(--photo-filter-duotone)
            drop-shadow(0.1rem 0px 0px #ff0040)
            drop-shadow(-0.1rem 0px 0px #00f0ff);
    }
    80% {
        transform: translate(0.06rem, 0.03rem);
        filter: var(--photo-filter-duotone)
            drop-shadow(-0.1rem 0px 0px #ff0040)
            drop-shadow(0.1rem 0px 0px #00f0ff);
    }
    100% {
        transform: translate(0, 0);
        filter: var(--photo-filter-duotone);
    }
}