:root {
    --bg-main: #020202;
    --bg-darker: #000000;
    --bg-card: rgba(20, 20, 20, 0.4);
    
    --text-main: #ffffff;
    --text-muted: #999999;
    
    --accent-primary: #0066FF;
    --accent-secondary: #00D2FF;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    
    --border-glass: rgba(255, 255, 255, 0.05);
    --border-glass-hover: rgba(255, 255, 255, 0.15);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-fast: all 0.25s ease;
}

/* Base & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: initial; /* Lenis handles this */
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    overscroll-behavior-x: none;
}

html.lenis {
    height: auto;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-x: none;
}

#main-content {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

/* Hide Custom Cursor on Mobile */
@media (hover: hover) and (pointer: fine) {
    html { cursor: none !important; }
    .cursor {
        width: 8px; height: 8px; background: #fff;
        border-radius: 50%; position: fixed; top: 0; left: 0;
        pointer-events: none; z-index: 9999;
    }
    .cursor-follower {
        width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%; position: fixed; top: -16px; left: -16px;
        pointer-events: none; z-index: 9998;
        transition: transform 0.1s ease-out, border-color 0.3s ease, background-color 0.3s ease;
    }
}
@media (hover: none) {
    .cursor, .cursor-follower { display: none !important; }
}

/* Performance Optimized Background Elements */
.noise {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03; pointer-events: none; z-index: 9997;
}

/* Replaced expensive blur() with radial gradients for 60FPS on Mobile */
.ambient-glow {
    position: fixed;
    pointer-events: none;
    z-index: -2;
    max-width: 100%;
    box-sizing: border-box;
}
/* Avoid negative vw — causes horizontal “rubber-band” scroll on mobile */
.glow-1 {
    top: -8vh;
    left: 0;
    right: 0;
    width: 100%;
    height: min(78vh, 820px);
    margin: 0 auto;
    background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(0, 102, 255, 0.14) 0%, transparent 65%);
}
.glow-2 {
    bottom: -8vh;
    left: 0;
    right: 0;
    width: 100%;
    height: min(78vh, 820px);
    margin: 0 auto;
    background: radial-gradient(ellipse 80% 60% at 50% 80%, rgba(0, 210, 255, 0.11) 0%, transparent 65%);
}

.grid-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px; z-index: -1; pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
}

/* Preloader */
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-darker); display: flex; justify-content: center; align-items: center; z-index: 10000;
}
.preloader-inner { text-align: center; position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }
.preloader-text {
    font-family: var(--font-heading); font-size: clamp(1.5rem, 7vw, 4.25rem); font-weight: 800; letter-spacing: clamp(2px, 0.35vw, 8px);
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.02em 0.12em;
    margin-bottom: 20px; max-width: 100%; padding: 0 14px; box-sizing: border-box;
}
.p-char { opacity: 0; transform: translateY(30px); }
.p-char--gap {
    width: 0.42em;
    min-width: 6px;
    flex-shrink: 0;
    align-self: stretch;
    pointer-events: none;
}
.loader-count {
    font-family: var(--font-heading); font-size: 8rem; font-weight: 200;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    bottom: -80px;
    right: max(12px, env(safe-area-inset-right, 0px));
    max-width: calc(100% - 24px);
    text-align: right;
}
.loader-line { width: 0; height: 2px; background: var(--accent-gradient); max-width: min(280px, 92vw); }

/* Glassmorphism (Optimized) */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(15px); /* Reduced blur for performance */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    transition: var(--transition-smooth);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-top: max(22px, env(safe-area-inset-top, 0px));
    padding-bottom: 22px;
    z-index: 1000;
    transition: var(--transition-smooth);
    overflow-x: hidden;
}
.navbar.scrolled {
    padding-top: max(14px, env(safe-area-inset-top, 0px));
    padding-bottom: 14px;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
}
.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 max(20px, env(safe-area-inset-left, 0px)) 0 max(20px, env(safe-area-inset-right, 0px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
}
.logo {
    min-width: 0;
    flex: 1 1 auto;
}
.logo a.logo-mark {
    font-family: var(--font-heading); font-size: clamp(0.82rem, 1.1rem + 0.35vw, 1.55rem); font-weight: 800; letter-spacing: 0.5px;
    color: #fff; text-decoration: none; display: inline-flex; align-items: center; flex-wrap: wrap; line-height: 1.15;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}
.logo .dot { color: var(--accent-primary); }
.nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
}
.nav-item { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); text-decoration: none; transition: var(--transition-fast); }
.nav-item:hover { color: #fff; }
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Buttons */
.btn {
    padding: 14px 28px; border-radius: 100px; font-family: var(--font-heading); font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 10px;
    transition: var(--transition-smooth); font-size: 0.9rem; border: none; cursor: pointer;
}
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: var(--accent-primary); color: #fff; box-shadow: 0 8px 25px rgba(0, 102, 255, 0.4); transform: translateY(-2px); }
.btn-outline { background: rgba(255,255,255,0.03); border: 1px solid var(--border-glass); color: #fff; }
.btn-outline:hover { background: #fff; color: #000; }

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    padding: 10px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 12px;
    z-index: 1002;
    cursor: pointer;
    flex-shrink: 0;
    color: #fff;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}
.burger-line { width: 22px; height: 2px; background: #fff; transition: var(--transition-fast); }
.mobile-menu {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.55s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.45s ease;
}
.mobile-menu.active { transform: translateY(0); opacity: 1; pointer-events: all; }
.menu-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(18px, 4vh, 32px);
    width: 100%;
    max-width: 100%;
    padding: 8px 0;
}
.menu-items a {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 9vw, 3rem);
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    transition: var(--transition-fast);
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 100%;
    text-align: center;
}
.menu-items a:hover { color: var(--accent-primary); }

/* Typography */
.title-xl {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 20px;
    letter-spacing: -1px;
    overflow-wrap: break-word;
}
.section-tag {
    display: inline-block; color: var(--accent-secondary); text-transform: uppercase;
    letter-spacing: 2px; font-size: 0.75rem; font-weight: 700; margin-bottom: 15px;
}
.text-center { text-align: center; }

/* Container — min-width 0 allows grids to shrink inside flex layouts (prevents sideways scroll) */
.container {
    margin: 0 auto;
    padding: 0 max(20px, env(safe-area-inset-left, 0px)) 0 max(20px, env(safe-area-inset-right, 0px));
    width: 100%;
    max-width: min(1400px, 100%);
    box-sizing: border-box;
    min-width: 0;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 120px;
    padding-bottom: 80px;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
}
.hero-bg-wrapper { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.hero-img { width: 100%; height: 120%; object-fit: cover; filter: brightness(0.3) contrast(1.1); }
.hero-vignette { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, transparent 40%, var(--bg-main) 100%); }
.hero-content { max-width: 900px; }
.badge {
    display: inline-block; padding: 6px 16px; background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass); border-radius: 100px; font-size: 0.7rem; font-weight: 700;
    letter-spacing: 2px; margin-bottom: 30px; backdrop-filter: blur(10px); color: var(--accent-secondary);
}
.hero-title { font-size: 6.5rem; line-height: 0.9; font-weight: 800; margin-bottom: 30px; letter-spacing: -2px; }
.hero-title .line { display: block; overflow: hidden; }
.hero-title .reveal { display: block; }
.hero-title .accent { background: var(--accent-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { font-size: 1.15rem; color: var(--text-muted); max-width: 550px; margin-bottom: 40px; line-height: 1.6; }
.hero-actions { display: flex; gap: 15px; flex-wrap: wrap; }
.hero-footer { position: absolute; bottom: 40px; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 40px; }
.hero-stats { display: flex; gap: 40px; }
.h-stat span { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); letter-spacing: 1px; }

/* About Section */
.about { padding: 120px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.about-visual { position: relative; }
.img-reveal-wrapper { border-radius: 24px; overflow: hidden; height: 550px; position: relative; }
.reveal-img { width: 100%; height: 100%; object-fit: cover; }
.about-card {
    position: absolute; bottom: -30px; right: -30px; padding: 40px; width: 280px;
    background: rgba(15, 15, 15, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass); border-radius: 24px; z-index: 2;
}
.card-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-secondary); display: block; margin-bottom: 5px; }
.about-card h3 { font-size: 1.8rem; font-family: var(--font-heading); margin-bottom: 5px; }
.text-p { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 30px; line-height: 1.7; }
.about-features { display: grid; grid-template-columns: 1fr; gap: 20px; }
.a-feat { display: flex; align-items: flex-start; gap: 15px; }
.icon-wrap { width: 50px; height: 50px; border-radius: 16px; background: rgba(0, 102, 255, 0.1); border: 1px solid rgba(0, 102, 255, 0.2); display: flex; justify-content: center; align-items: center; font-size: 1.5rem; color: var(--accent-primary); }
.a-feat h4 { font-family: var(--font-heading); font-size: 1.1rem; margin-bottom: 5px; }
.a-feat p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* Bento Services */
.services { padding: 80px 0 28px; }
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 300px; gap: 20px; margin-top: 50px; }

/* Core domains — local images, dedicated layout */
.services-domains {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: minmax(300px, 340px) minmax(280px, 360px);
    gap: 20px;
    margin-top: 50px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.services-domains .bento-item {
    min-width: 0;
}
.services-domains .domain-masini { grid-column: 1 / 7; }
.services-domains .domain-ecom { grid-column: 7 / 13; }
.services-domains .domain-transport { grid-column: 1 / -1; }

/* No backdrop-blur on photo cards — blur() behind layers makes images look smeared after paint/GSAP */
#services .services-domains .bento-item.domain-panel {
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    transition: border-color 0.5s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
#services .services-domains .bento-item.domain-panel:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.bento-icon-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 2rem;
}
.bento-icon-row i { opacity: 0.95; }
.has-transport-tiles { background: #000; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.transport-tiles {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 0;
}
.transport-tile {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-width: 0;
}
.transport-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: transform 0.6s ease, opacity 0.6s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}
.domain-transport:hover .transport-tile img {
    transform: scale(1.06) translateZ(0);
    opacity: 0.65;
}

/* Core Business Domains — brighter imagery & readable type */
#services .services-domains .bento-img {
    opacity: 0.68;
}
#services .services-domains .bento-item:hover .bento-img {
    opacity: 0.85;
}
#services .services-domains .bento-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.88) 0%,
        rgba(0, 0, 0, 0.38) 38%,
        transparent 68%
    );
}
#services .services-domains .bento-content h3 {
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.85);
}
#services .services-domains .bento-content p {
    color: rgba(255, 255, 255, 0.94);
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.75);
}
#services .services-domains .bento-icon,
#services .services-domains .bento-icon-row i {
    color: #fff;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55));
}
#services .services-domains .transport-tile img {
    opacity: 0.64;
}
#services .services-domains .domain-transport:hover .transport-tile img {
    opacity: 0.82;
}

.bento-item { padding: 35px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; z-index: 1; }
.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
    transform: skewX(-25deg);
    transition: 0.8s;
    z-index: 2;
    pointer-events: none;
}
.bento-item:hover::before {
    left: 150%;
}
.bento-item:hover { border-color: rgba(255,255,255,0.3); transform: translateY(-4px); }
.b-large { grid-column: span 2; }
.bento-icon { font-size: 2.5rem; color: #fff; margin-bottom: 15px; position: relative; z-index: 2; }
.bento-content { position: relative; z-index: 2; }
.bento-content h3 { font-size: 1.5rem; font-family: var(--font-heading); margin-bottom: 8px; color: #fff; }
.bento-content p { color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; line-height: 1.5; }

/* Bento Image Styles */
.has-image { background: #000; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.bento-img { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    object-fit: cover; z-index: 0; opacity: 0.5; 
    transition: transform 0.6s ease;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}
.bento-item:hover .bento-img { transform: scale(1.05) translateZ(0); opacity: 0.7; }
.bento-overlay { 
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%); 
    z-index: 1; 
}

/* Gallery — tight to services; compact gap before Why Us */
.gallery { padding: 0 0 24px; }

/* Masonry: explicit grid on desktop — without it, tall images stack with huge blank bands */
.gallery-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
    grid-template-rows: minmax(220px, 30vh) minmax(220px, 30vh);
    gap: 18px;
    align-content: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}
.gallery-grid .g-tall {
    grid-column: 1;
    grid-row: 1 / -1;
}
.gallery-grid > .g-item:not(.g-tall):nth-child(2) {
    grid-column: 2;
    grid-row: 1;
}
.gallery-grid > .g-item:not(.g-tall):nth-child(3) {
    grid-column: 2;
    grid-row: 2;
}

.gallery .g-item.gallery-panel {
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    background: #060606;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}
.gallery .g-item.gallery-panel:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
}

/* Masonry Gallery Fixes */
.g-item {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    min-height: 0;
    min-width: 0;
}
.g-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, opacity 0.45s ease;
    opacity: 0.7;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}
.g-item:hover img { transform: scale(1.05) translateZ(0); opacity: 0.88; }
.g-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 28px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.25) 55%, transparent 100%);
    z-index: 2;
}
.g-overlay h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: #fff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}
.g-overlay p {
    color: rgba(0, 210, 255, 0.95);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.75);
}

/* Why Us */
.why-us { padding: 32px 0 80px; }
.why-wrapper {
    padding: 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 60px;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.why-items { display: flex; flex-direction: column; gap: 40px; }
.why-item { display: flex; gap: 20px; padding-bottom: 30px; border-bottom: 1px solid var(--border-glass); }
.why-item:last-child { border-bottom: none; padding-bottom: 0; }
.w-num { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--accent-primary); }
.w-content h3 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 10px; }
.w-content p { color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; }

/* Contact */
.contact { padding: 80px 0 100px; }
.contact-card {
    padding: 60px;
    background: var(--bg-card);
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.contact-header { text-align: center; max-width: 600px; margin: 0 auto 60px; }
.contact-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 60px;
    min-width: 0;
}
.contact-body > * {
    min-width: 0;
}
.c-info-box { margin-bottom: 30px; }
.c-info-box label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-secondary); display: block; margin-bottom: 10px; }
.c-info-box p, .email-link { font-size: 1.1rem; color: #fff; line-height: 1.6; }
.email-link {
    font-family: var(--font-heading); font-size: clamp(1rem, 4.5vw, 1.5rem); font-weight: 700;
    text-decoration: none; transition: color 0.3s ease; display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}
.email-link:hover { color: var(--accent-primary); }
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.input-wrap input, .input-wrap textarea {
    width: 100%; background: rgba(0,0,0,0.5); border: 1px solid var(--border-glass);
    padding: 18px 20px; border-radius: 16px; color: #fff; font-family: var(--font-body);
    font-size: 0.95rem; outline: none; transition: var(--transition-fast);
}
.input-wrap input:focus, .input-wrap textarea:focus { border-color: var(--accent-primary); background: rgba(0,0,0,0.8); }

.contact-success {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 18px;
    padding: 18px 20px;
    border-radius: 16px;
    border: 1px solid rgba(0, 210, 255, 0.35);
    background: rgba(0, 102, 255, 0.1);
}
.contact-success[hidden] { display: none !important; }
.contact-success .ph-check-circle {
    font-size: 1.75rem;
    color: var(--accent-secondary);
    flex-shrink: 0;
    margin-top: 2px;
}
.contact-success p {
    margin: 0;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.55;
}
.contact-success strong { font-weight: 600; }

/* Footer */
.footer { border-top: 1px solid var(--border-glass); padding: 80px 0 40px; background: #010101; }
.footer-top { margin-bottom: 40px; }
.footer-brand .footer-logo { font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: #fff; text-decoration: none; display: block; margin-bottom: 15px; }
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; max-width: 300px; }
.footer-bottom { padding-top: 30px; border-top: 1px solid var(--border-glass); }
.footer-bottom p { color: var(--text-muted); font-size: 0.85rem; }

/* Ultimate Mobile Optimization */
@media (max-width: 1024px) {
    .nav-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 10px;
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }
    .nav-links { display: none !important; }
    .mobile-menu-btn { display: flex; }
    .logo a.logo-mark {
        font-size: clamp(0.68rem, 2.2vw + 0.32rem, 1.2rem);
        line-height: 1.12;
    }
    .hero-title { font-size: clamp(2.5rem, 10vw, 4.5rem); }
    .about-grid { grid-template-columns: 1fr; gap: 60px; }
    .title-xl { font-size: 3rem; }
    .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .services-domains {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: none;
        grid-auto-rows: minmax(280px, 320px);
    }
    .services-domains .domain-masini { grid-column: 1; }
    .services-domains .domain-ecom { grid-column: 2; }
    .services-domains .domain-transport { grid-column: 1 / -1; }
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        grid-auto-rows: minmax(220px, 260px);
    }
    .gallery-grid .g-tall {
        grid-column: 1;
        grid-row: span 2;
        min-height: 0;
    }
    .gallery-grid > .g-item:not(.g-tall):nth-child(2),
    .gallery-grid > .g-item:not(.g-tall):nth-child(3) {
        grid-column: 1;
        grid-row: auto;
    }
    .why-wrapper { grid-template-columns: 1fr; gap: 40px; padding: 40px; }
    .contact-body { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding-top: 120px; }
    .preloader-text { letter-spacing: 3px; }
}

@media (max-width: 768px) {
    /* Tighten Layout for Mobile */
    .container {
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }
    .nav-actions .btn-primary {
        display: none;
    }
    .hero { min-height: 85vh; min-height: 85dvh; padding-top: 96px; padding-bottom: 50px; }
    .hero-title { font-size: clamp(1.85rem, 9.5vw, 3rem); margin-bottom: 20px; letter-spacing: -1px; }
    .hero-desc { font-size: 1rem; margin-bottom: 30px; }
    .btn { padding: 12px 24px; font-size: 0.85rem; width: 100%; justify-content: center; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }
    .hero-footer { position: relative; bottom: 0; padding: 0 20px; margin-top: 40px; justify-content: flex-start; }
    .hero-stats { flex-direction: column; gap: 10px; }
    .scroll-btn { display: none; /* Hide scroll indicator on mobile to save space */ }
    
    .title-xl { font-size: 2.2rem; }
    .about { padding: 60px 0; }
    .img-reveal-wrapper { height: 350px; }
    .about-card { position: relative; bottom: 0; right: 0; width: 100%; margin-top: -30px; padding: 25px; }
    
    .services { padding: 60px 0 24px; }
    .bento-grid { grid-template-columns: 1fr; grid-auto-rows: minmax(200px, auto); gap: 15px; margin-top: 30px; }
    .b-large { grid-column: span 1; }
    .bento-item { padding: 25px; }
    .services-domains {
        grid-template-columns: 1fr;
        grid-auto-rows: minmax(260px, auto);
        gap: 15px;
        margin-top: 30px;
    }
    .services-domains .domain-masini,
    .services-domains .domain-ecom,
    .services-domains .domain-transport { grid-column: 1 / -1; }
    .transport-tiles { flex-direction: column; }
    .transport-tile { min-height: 120px; flex: none; }
    .domain-transport { min-height: 420px; }
    
    .gallery { padding: 0 0 20px; }
    .gallery-grid { gap: 14px; grid-auto-rows: minmax(200px, 240px); }
    .gallery-grid .g-tall { grid-row: span 2; }
    
    .why-us { padding: 28px 0 60px; }
    .why-wrapper { padding: 25px 20px; gap: 30px; }
    .why-item { flex-direction: column; gap: 10px; }
    
    .contact { padding: 60px 0; }
    .contact-card { padding: 30px 20px; }
    .contact-header { margin-bottom: 30px; }
    .form-row { grid-template-columns: 1fr; gap: 15px; }
    
    .footer { padding: 60px 0 30px; }
    .footer-logo { font-size: clamp(1.2rem, 5.5vw, 1.75rem) !important; line-height: 1.15; word-break: break-word; }
    .menu-items a { font-size: 2.5rem; }
    .loader-count { font-size: 5rem; bottom: -50px; right: 20px; }
}

/* Very narrow phones */
@media (max-width: 380px) {
    .nav-container {
        padding-left: max(12px, env(safe-area-inset-left, 0px));
        padding-right: max(12px, env(safe-area-inset-right, 0px));
        column-gap: 6px;
    }
    .logo a.logo-mark {
        font-size: clamp(0.62rem, 3.8vw, 0.95rem);
    }
}
