/* ========================================
   MAV-Italia - Professional Stylesheet
   ======================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --accent: #0ea5e9;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --gray-lighter: #cbd5e1;
    --light: #f1f5f9;
    --light-2: #e2e8f0;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    --gradient-text: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
    line-height: 1.6;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

ul {
    list-style: none;
}

/* ========================================
   Typography
   ======================================== */

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: 1.25rem;
}

.gradient-text {
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.lead {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #334155;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-full {
    width: 100%;
}

/* ========================================
   Navbar
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    padding: 10px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.logo-mav {
    color: #ffffff;
}

.logo-sep {
    color: #94a3b8;
}

.logo-italia {
    color: #0ea5e9;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.75);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-cta {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%) !important;
    color: #ffffff !important;
    padding: 10px 24px !important;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Hero
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: #0f172a;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 50px;
    color: #0ea5e9;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.hero h1 {
    color: #ffffff;
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 700;
    color: #0ea5e9;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 4px;
    font-weight: 500;
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.hero-scroll a {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    position: relative;
}

.hero-scroll span {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 10px;
    background: #0ea5e9;
    border-radius: 4px;
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% { opacity: 1; top: 10px; }
    100% { opacity: 0; top: 30px; }
}

/* ========================================
   Sections
   ======================================== */

.section {
    padding: 100px 0;
}

.section-dark {
    background: #0f172a;
    color: #ffffff;
}

.section-alt {
    background: #f1f5f9;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 50px;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-dark .section-tag {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.3);
    color: #0ea5e9;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.7;
}

.section-dark .section-desc {
    color: #94a3b8;
}

/* ========================================
   About (Chi Siamo)
   ======================================== */

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    margin-bottom: 20px;
    color: #334155;
    line-height: 1.8;
}

.about-text strong {
    color: #0f172a;
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.about-card:hover {
    border-color: #2563eb;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.about-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-card-icon svg {
    width: 24px;
    height: 24px;
    color: #2563eb;
}

.about-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.about-card p {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
}

/* ========================================
   Solutions
   ======================================== */

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.solution-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 36px 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.solution-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.solution-card:hover::before {
    opacity: 1;
}

.solution-card.featured {
    border-color: rgba(37, 99, 235, 0.4);
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08) 0%, #1e293b 100%);
}

.solution-card.featured::before {
    opacity: 1;
}

.solution-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
}

.solution-icon {
    width: 56px;
    height: 56px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.solution-icon svg {
    width: 28px;
    height: 28px;
    color: #0ea5e9;
}

.solution-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #ffffff;
}

.solution-card > p {
    font-size: 0.925rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 20px;
}

.solution-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.solution-features li {
    font-size: 0.85rem;
    color: #94a3b8;
    padding-left: 20px;
    position: relative;
}

.solution-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
}

/* ========================================
   Deployment / Distribution
   ======================================== */

.deploy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.deploy-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 36px 30px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.deploy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.deploy-card:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.deploy-card:hover::before {
    opacity: 1;
}

.deploy-icon {
    width: 56px;
    height: 56px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.deploy-icon svg {
    width: 28px;
    height: 28px;
    color: #0ea5e9;
}

.deploy-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #ffffff;
}

.deploy-card > p {
    font-size: 0.925rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ========================================
   Real Estate Sectors
   ======================================== */

.re-sectors {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.re-sector {
    padding: 36px 30px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.re-sector:hover {
    border-color: #2563eb;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.re-sector-number {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
}

.re-sector h3 {
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.re-sector p {
    font-size: 0.925rem;
    color: #64748b;
    line-height: 1.7;
}

/* ========================================
   Technology
   ======================================== */

.tech-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tech-card {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 32px 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tech-card:hover {
    border-color: rgba(37, 99, 235, 0.3);
    transform: translateY(-3px);
}

.tech-card-large {
    grid-column: 1 / -1;
    display: grid;
    gap: 20px;
}

.tech-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tech-icon {
    width: 40px;
    height: 40px;
    color: #0ea5e9;
    flex-shrink: 0;
}

.tech-card h3 {
    color: #ffffff;
    margin-bottom: 12px;
}

.tech-card-large h3 {
    margin-bottom: 0;
}

.tech-card p {
    font-size: 0.925rem;
    color: #94a3b8;
    line-height: 1.7;
}

/* Tech cards in light section */
.section-alt .tech-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.section-alt .tech-card:hover {
    border-color: #2563eb;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

.section-alt .tech-card h3 {
    color: #0f172a;
}

.section-alt .tech-card p {
    color: #64748b;
}

.section-alt .tech-icon {
    color: #2563eb;
}

.section-alt .tech-features-inline span {
    background: rgba(37, 99, 235, 0.06);
    color: #2563eb;
}

.tech-features-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.tech-features-inline span {
    padding: 6px 14px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    color: #0ea5e9;
    font-weight: 500;
}

/* ========================================
   Benefits
   ======================================== */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.benefit {
    text-align: center;
    padding: 40px 28px;
    border-radius: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.benefit:hover {
    border-color: #e2e8f0;
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
    background: #ffffff;
}

.benefit-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: rgba(37, 99, 235, 0.08);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon svg {
    width: 30px;
    height: 30px;
    color: #2563eb;
}

.benefit h3 {
    margin-bottom: 12px;
}

.benefit p {
    font-size: 0.925rem;
    color: #64748b;
    line-height: 1.7;
}

/* ========================================
   Process
   ======================================== */

.process-timeline {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.process-step {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 48px;
    position: relative;
}

.process-step:last-child {
    margin-bottom: 0;
}

.process-number {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    position: relative;
    z-index: 2;
    font-family: 'JetBrains Mono', monospace;
}

.process-content h3 {
    color: #ffffff;
    margin-bottom: 8px;
    margin-top: 4px;
}

.process-content p {
    color: #94a3b8;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   CTA & Contact
   ======================================== */

.cta-section {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.cta-content h2 {
    margin-bottom: 16px;
}

.cta-content > p {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 40px;
    line-height: 1.7;
}

.contact-form {
    text-align: left;
    margin-bottom: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
    margin-top: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #64748b;
}

.footer-links h4 {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    letter-spacing: 0.02em;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.875rem;
    color: #64748b;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-links a:hover {
    color: #0ea5e9;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: #64748b;
}

.footer-legal {
    display: flex;
    gap: 24px;
}

.footer-legal a {
    font-size: 0.8rem;
    color: #64748b;
}

.footer-legal a:hover {
    color: #0ea5e9;
}

/* ========================================
   Animations
   ======================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
        min-width: 48px;
    }

    .nav-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        min-height: 48px;
    }

    .solution-card:hover,
    .about-card:hover,
    .re-sector:hover,
    .tech-card:hover,
    .benefit:hover,
    .deploy-card:hover,
    .btn-primary:hover {
        transform: none;
    }
}

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }

    .hero-content {
        max-width: 1000px;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .solutions-grid {
        gap: 28px;
    }
}

/* Small Desktop / Large Tablet Landscape */
@media (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }

    .solutions-grid,
    .re-sectors,
    .tech-grid,
    .benefits-grid,
    .deploy-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-card-large {
        grid-column: 1 / -1;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-stats {
        gap: 24px;
    }

    .section {
        padding: 80px 0;
    }

    .section-header {
        margin-bottom: 48px;
    }
}

/* Tablet Portrait — Mobile nav */
@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
        z-index: 1002;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        max-width: 80vw;
        height: 100vh;
        background: #0f172a;
        flex-direction: column;
        padding: 100px 24px 40px;
        gap: 4px;
        transition: right 0.3s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
        z-index: 1001;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        display: block;
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .nav-cta {
        margin-top: 16px;
        text-align: center;
    }

    .nav-links.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 300px;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .section {
        padding: 64px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-badge {
        font-size: 0.8rem;
        padding: 6px 16px;
    }

    .hero-subtitle {
        font-size: 1.05rem;
        margin-bottom: 32px;
    }

    .hero-actions {
        flex-direction: column;
        margin-bottom: 40px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding-top: 40px;
    }

    .stat-number {
        font-size: 2.2rem;
    }

    .stat-suffix {
        font-size: 1.6rem;
    }

    .hero-scroll {
        display: none;
    }

    .solutions-grid,
    .re-sectors,
    .tech-grid,
    .deploy-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .benefit {
        padding: 28px 20px;
    }

    .solution-card,
    .deploy-card {
        padding: 28px 24px;
    }

    .re-sector {
        padding: 28px 24px;
    }

    .tech-card {
        padding: 24px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .cta-content {
        max-width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px;
    }

    .process-timeline {
        max-width: 100%;
    }

    .process-timeline::before {
        left: 28px;
    }

    .process-step {
        gap: 20px;
    }

    .process-number {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }

    .about-card {
        padding: 20px;
    }
}

/* Large Phone */
@media (max-width: 600px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-brand {
        grid-column: auto;
    }

    .process-timeline::before {
        display: none;
    }

    .process-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
        margin-bottom: 36px;
    }

    .process-number {
        width: 52px;
        height: 52px;
        font-size: 1.15rem;
    }

    .tech-features-inline {
        justify-content: center;
    }

    .tech-card-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Phone */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .section {
        padding: 48px 0;
    }

    .section-header {
        margin-bottom: 32px;
    }

    h1 {
        font-size: 1.85rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .navbar {
        padding: 12px 0;
    }

    .navbar.scrolled {
        padding: 8px 0;
    }

    .logo {
        font-size: 1.3rem;
    }

    .hero {
        padding: 90px 0 50px;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 5px 12px;
        margin-bottom: 16px;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 24px;
        line-height: 1.6;
    }

    .hero-actions {
        margin-bottom: 32px;
        gap: 12px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        padding-top: 32px;
    }

    .stat-number {
        font-size: 1.85rem;
    }

    .stat-suffix {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .section-tag {
        font-size: 0.7rem;
        padding: 5px 12px;
    }

    .section-desc {
        font-size: 0.95rem;
    }

    .about-text .lead {
        font-size: 1rem;
    }

    .about-card {
        flex-direction: column;
        gap: 12px;
        padding: 20px 16px;
    }

    .about-card-icon {
        width: 40px;
        height: 40px;
    }

    .about-card-icon svg {
        width: 20px;
        height: 20px;
    }

    .solution-card,
    .deploy-card {
        padding: 24px 20px;
    }

    .solution-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        margin-bottom: 16px;
    }

    .solution-icon svg {
        width: 24px;
        height: 24px;
    }

    .solution-card h3 {
        font-size: 1.1rem;
    }

    .solution-card > p,
    .re-sector p,
    .tech-card p,
    .benefit p {
        font-size: 0.875rem;
    }

    .solution-features li {
        font-size: 0.8rem;
    }

    .re-sector {
        padding: 24px 20px;
    }

    .re-sector-number {
        font-size: 2.25rem;
        margin-bottom: 12px;
    }

    .tech-card {
        padding: 20px 16px;
    }

    .tech-icon {
        width: 32px;
        height: 32px;
    }

    .tech-features-inline span {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .benefit {
        padding: 24px 16px;
    }

    .benefit-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .benefit-icon svg {
        width: 24px;
        height: 24px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 16px;
        border-radius: 8px;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .footer {
        padding: 40px 0 0;
    }

    .footer-links h4 {
        font-size: 0.85rem;
        margin-bottom: 12px;
    }

    .footer-links a {
        font-size: 0.8rem;
    }

    .footer-bottom {
        padding: 20px 0;
    }

    .footer-bottom p {
        font-size: 0.7rem;
    }

    .footer-legal a {
        font-size: 0.7rem;
    }

    .footer-legal {
        gap: 12px;
    }
}

/* Very Small Phone */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    .hero {
        padding: 80px 0 40px;
    }

    .hero-badge {
        font-size: 0.7rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .hero-stats {
        gap: 12px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-suffix {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .nav-links {
        width: 260px;
    }

    .section {
        padding: 40px 0;
    }

    .solution-badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
}

/* Landscape orientation on phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        padding-top: 24px;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .hero-scroll {
        display: none;
    }

    .section {
        padding: 48px 0;
    }
}

/* Safe area support for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
    .navbar {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .footer-bottom {
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .nav-links {
        padding-bottom: calc(40px + env(safe-area-inset-bottom));
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }

    .hero-scroll span {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .solution-card,
    .tech-card {
        border-width: 2px;
    }

    .about-card {
        border-width: 2px;
    }

    .btn-outline {
        border-width: 2px;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-scroll,
    .hero-bg-grid,
    .nav-toggle,
    .contact-form,
    .hero-actions {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 40px 0;
        background: #fff !important;
        color: #000 !important;
    }

    .hero h1,
    .hero-subtitle,
    .stat-number,
    .stat-label {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }

    .section-dark {
        background: #f5f5f5 !important;
        color: #000 !important;
    }

    .section-dark h2,
    .section-dark h3,
    .section-dark p,
    .section-dark li {
        color: #000 !important;
    }

    .section {
        padding: 30px 0;
    }

    body {
        font-size: 12pt;
    }

    .gradient-text {
        -webkit-text-fill-color: #2563eb !important;
    }
}
