/* --- 1. BASE & RESET --- */
:root {
    --accent: #4fcfeb;
    --accent-glow: rgba(79, 207, 235, 0.5);
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --bg-dark: #050505;
    --text: #ffffff;
    --text-dim: #b4c4d8;
    --font-display: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    line-height: 1.5;
}

/* --- 2. CANVAS 3D --- */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #000000 100%);
}

/* --- 3. UI OVERLAY --- */
.readability-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: -1;
    pointer-events: none;
}

/* --- 4. NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    transition: background 0.3s, padding 0.3s;
}

nav.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: white;
    z-index: 101;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 2px;
}

/* MENU TOGGLE (MOBILE) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 101;
}

.menu-toggle span {
    width: 30px;
    height: 2px;
    background: white;
    transition: all 0.3s ease;
    transform-origin: center;
}

.menu-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* LANGUAGE TOGGLE */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 40px;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
    font-family: var(--font-body);
    padding: 4px 8px;
}

.lang-btn:hover,
.lang-btn.active {
    color: white;
}

.lang-btn:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

.lang-separator {
    color: var(--text-dim);
    font-size: 0.85rem;
    opacity: 0.3;
}

/* --- 5. LAYOUT & SECTIONS --- */
section {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    padding: 15vh 10% 10vh;
    position: relative;
    justify-content: center;
}

.content-wrap {
    max-width: 900px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
    padding-right: 40px;
}

.content-wrap.wide-wrap {
    max-width: 1300px;
}

section.visible .content-wrap {
    opacity: 1;
    transform: translateY(0);
}

/* TYPOGRAPHY */
h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 5.5rem);
    /* Adjusted clamp */
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 25px;
    padding-right: 60px;
    letter-spacing: -2px;
    color: white;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-wrap: break-word;
}

h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 4rem);
    margin-bottom: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: white;
}

h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--accent);
}

.tagline {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 20px;
    padding: 6px 14px;
    border: 1px solid rgba(79, 207, 235, 0.3);
    border-radius: 50px;
    background: rgba(79, 207, 235, 0.05);
    backdrop-filter: blur(5px);
}

p {
    font-size: 1rem;
    color: var(--text-dim);
    margin-bottom: 20px;
    line-height: 1.6;
    max-width: 600px;
}

/* BUTTONS */
.hero-btns {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 12px 30px;
    background: white;
    color: black;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.btn-primary:hover {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-line {
    display: inline-flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 12px 30px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-line:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.btn-primary:focus,
.btn-line:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* CONTACT GRID */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 30px 0;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(79, 207, 235, 0.1);
    border: 1px solid rgba(79, 207, 235, 0.3);
    border-radius: 8px;
    color: var(--accent);
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    margin-bottom: 5px;
}

.contact-item p {
    margin: 0;
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-item a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: var(--accent);
}

.contact-item a:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 2px;
}

/* STATS ROW (ABOUT) */
.stats-row {
    display: flex;
    gap: 50px;
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0;
    color: white;
}

.stat-item span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
}

/* GRID SYSTEM (SERVICES & VISION) */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 16px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
}

.card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    color: var(--accent);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.card:hover .card-icon {
    opacity: 1;
    transform: scale(1.1);
}

.card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 15px 40px -10px var(--accent-glow), 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.card-desc {
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* TAGS IN CARDS */
.tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
}

.tags li {
    font-size: 0.75rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 4px;
}

/* VISION ICONS */
.value-card .icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.value-card:hover .icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

/* SCROLL INDICATOR */
.scroll-indicator {
    position: fixed;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

.scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s;
}

.scroll-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.scroll-dot:focus {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
}

/* --- ACCESSIBILITY: REDUCED MOTION --- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- RESPONSIVE TABLET (max 1024px) --- */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns on tablet */
        gap: 24px;
    }

    section {
        padding: 12vh 5% 8vh;
    }

    .content-wrap {
        padding-right: 0;
    }

    h1 {
        font-size: clamp(2.2rem, 4vw, 4rem);
    }

    h2 {
        font-size: clamp(1.8rem, 3.5vw, 3.2rem);
    }
}

/* --- RESPONSIVE MOBILE (max 768px) --- */
@media (max-width: 768px) {

    /* Navigation */
    nav {
        padding: 20px;
        background: rgba(0, 0, 0, 0.9);
    }

    .menu-toggle {
        display: flex;
        /* Show burger menu */
    }

    .lang-toggle {
        position: static;
        transform: none;
        margin-left: 0;
        margin-top: 24px;
        padding-top: 24px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        justify-content: center;
    }

    .lang-btn {
        font-size: 1rem;
        padding: 6px 12px;
    }

    .lang-separator {
        font-size: 1rem;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, #0a0a0a 0%, #050505 100%);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        padding: 0 32px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.1rem;
        font-weight: 500;
        letter-spacing: 0.5px;
        padding: 8px 0;
        /* Bigger links for touch */
    }

    /* Layout */
    section {
        padding: 100px 24px 60px;
        justify-content: flex-start;
        min-height: auto;
        /* Allow content to dictate height if needed */
    }

    .content-wrap {
        width: 100%;
        text-align: left;
        /* Keep left align for readability */
    }

    /* Typography */
    h1 {
        padding-right: 0;
        font-size: 2.5rem;
        line-height: 1.15;
        margin-bottom: 20px;
    }

    h2 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 20px;
    }

    p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 16px;
    }

    /* Grids & Flex */
    .grid-3 {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
        gap: 16px;
    }

    .stats-row {
        flex-wrap: wrap;
        gap: 24px;
        margin-top: 30px;
        padding-top: 24px;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .stat-item span {
        font-size: 0.75rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        margin-top: 24px;
    }

    .btn-primary,
    .btn-line {
        width: 100%;
        justify-content: center;
        padding: 14px 30px;
        font-size: 0.85rem;
    }

    .tagline {
        font-size: 0.65rem;
        letter-spacing: 2px;
        padding: 5px 12px;
        margin-bottom: 16px;
    }

    .card {
        padding: 24px;
        min-height: auto;
    }

    .card-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 16px;
    }

    .card-icon svg {
        width: 40px;
        height: 40px;
    }

    .value-card .icon {
        width: 40px;
        height: 40px;
        margin-bottom: 12px;
    }

    .value-card .icon svg {
        width: 40px;
        height: 40px;
    }

    .contact-grid {
        gap: 20px;
        margin: 30px 0;
        padding: 30px 0;
    }

    .contact-item {
        gap: 12px;
    }

    .contact-icon {
        width: 36px;
        height: 36px;
    }

    .contact-item h4 {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }

    .contact-item p,
    .contact-item a {
        font-size: 0.9rem;
    }

    /* Hide Scroll Indicator on Mobile */
    .scroll-indicator {
        display: none;
    }

    /* Adjust Overlay */
    .readability-overlay {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.85) 100%);
    }

    /* Tags in cards */
    .tags {
        gap: 8px;
        margin-top: 16px;
    }

    .tags li {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    /* Card descriptions */
    .card-desc {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    /* Section specific adjustments */
    #contact .btn-primary {
        margin-top: 16px;
    }
}

/* --- EXTRA SMALL MOBILE (max 480px) --- */
@media (max-width: 480px) {
    section {
        padding: 90px 20px 50px;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 16px;
    }

    h2 {
        font-size: 1.75rem;
        margin-bottom: 16px;
    }

    .tagline {
        font-size: 0.6rem;
        letter-spacing: 1.5px;
        padding: 4px 10px;
    }

    .stats-row {
        gap: 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .stat-item {
        width: 100%;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .nav-links a {
        font-size: 1rem;
    }
}