/* ==========================================
   Digital Resistance - Main Styles
   ========================================== */

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

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

/* Animations */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Skeleton Loading Animation */
@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* ==========================================
   CSS Variables - TON Brand Colors
   ========================================== */
:root {
    --ton-dark: #1E2337;
    --ton-blue: #0098EA;
    --white: #FFFFFF;
    --primary: #0088cc;

    /* Typography */
    --font-primary: 'Inter', sans-serif;

    /* Spacing */
    --header-height-mobile: 52px;
    --header-height-desktop: 56px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 24px;

    /* Border Radius */
    --radius-button: 8px;
    --radius-card: 12px;
}

/* ==========================================
   Base Styles
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Focus styles for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--ton-blue);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--ton-blue);
    outline-offset: 2px;
}

body {
    margin: 0;
    padding: 0;
    background: linear-gradient(-45deg, #0a0e1a, #1a1f35, #0d1520, #1e2640);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    color: #fff;
    font-family: var(--font-primary);
    padding-top: var(--header-height-mobile);
}

main {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

/* ==========================================
   Header
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(10px);
    height: var(--header-height-mobile);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header.scrolled {
    background-color: rgba(10, 14, 26, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

/* Brand/Logo */
.header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.5px;
}

.brand-logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.brand-logo svg {
    width: 100%;
    height: 100%;
}

/* Navigation */
.header-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .nav-link:hover {
        color: var(--white);
    }
}

.nav-btn-cta {
    background: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-left: 8px;
}

@media (hover: hover) and (pointer: fine) {
    .nav-btn-cta:hover {
        background: #007ab8;
        transform: translateY(-1px);
    }
}

.nav-btn {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
    .nav-btn:hover {
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--white);
        text-decoration: none;
    }
}

.nav-btn:active {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Language Switcher */
.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-weight: 500;
    margin-left: 8px;
}

.lang-switcher:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.lang-switcher svg {
    transition: transform 0.2s ease;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: rgba(20, 25, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1002;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.lang-dropdown.active + .lang-switcher svg,
.lang-switcher:has(.lang-dropdown.active) svg {
    transform: rotate(180deg);
}

.lang-option {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.lang-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.lang-option.active {
    background: rgba(0, 152, 234, 0.2);
    color: var(--ton-blue);
}

/* Mobile Language Trigger Button */
.mobile-lang-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 20px;
    margin-top: 16px;
    background: linear-gradient(135deg, rgba(0, 152, 234, 0.15) 0%, rgba(0, 152, 234, 0.05) 100%);
    border: 1px solid rgba(0, 152, 234, 0.3);
    border-radius: 12px;
    color: #fff;
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-lang-trigger:hover,
.mobile-lang-trigger:active {
    background: linear-gradient(135deg, rgba(0, 152, 234, 0.25) 0%, rgba(0, 152, 234, 0.1) 100%);
    border-color: var(--ton-blue);
    transform: translateY(-1px);
}

.mobile-lang-trigger svg {
    flex-shrink: 0;
    opacity: 0.9;
}

.mobile-lang-trigger svg:last-child {
    opacity: 0.6;
}

/* Language Modal Overlay */
.lang-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s ease;
}

.lang-modal.active {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s ease;
}

.lang-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lang-modal-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    background: var(--bg-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
}

.lang-modal.active .lang-modal-content {
    transform: translateY(0);
}

.lang-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-modal-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.lang-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.lang-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.lang-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 16px 20px 32px;
    overflow-y: auto;
    max-height: calc(85vh - 80px);
}

@media (min-width: 400px) {
    .lang-modal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.lang-modal-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-modal-option:hover {
    background: rgba(0, 152, 234, 0.1);
    border-color: rgba(0, 152, 234, 0.3);
    transform: translateY(-2px);
}

.lang-modal-option.active {
    background: linear-gradient(135deg, rgba(0, 152, 234, 0.2) 0%, rgba(0, 152, 234, 0.1) 100%);
    border-color: var(--ton-blue);
    color: #fff;
    box-shadow: 0 0 20px rgba(0, 152, 234, 0.2);
}

.lang-modal-option.active::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--ton-blue);
    border-radius: 50%;
}

.lang-modal-option {
    position: relative;
}

.lang-native {
    font-size: 15px;
    font-weight: 500;
    text-align: center;
}

/* Desktop: hide modal trigger, show dropdown */
@media (min-width: 769px) {
    .mobile-lang-trigger {
        display: none;
    }
    .lang-modal {
        display: none;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 0;
    flex-direction: column;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.mobile-nav-link.highlight {
    color: var(--primary);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
}

.hero-pretitle {
    font-size: 48px;
    font-weight: 700;
    color: white;
    margin-bottom: 0;
    line-height: 1.2;
}

.rotating-text-wrapper {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 48px;
    font-weight: 700;
    margin-right: 2px;
    position: relative;
    overflow: hidden;
    vertical-align: middle;
}

.rotating-text {
    display: inline;
}

.rotating-text::after {
    content: '|';
    animation: blink 0.7s infinite;
    margin-left: 2px;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero-title {
    font-size: 80px;
    font-weight: 700;
    margin: 0 0 32px 0;
    color: var(--primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================
   Buttons
   ========================================== */
.btn-primary {
    background: white;
    color: var(--primary);
    padding: 16px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

@media (hover: hover) and (pointer: fine) {
    .btn-primary:hover {
        background: rgba(255, 255, 255, 0.9);
        transform: scale(1.02);
    }
}

.btn-secondary {
    background: transparent;
    color: white;
    padding: 16px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

@media (hover: hover) and (pointer: fine) {
    .btn-secondary:hover {
        border-color: rgba(255, 255, 255, 0.4);
        background: rgba(255, 255, 255, 0.05);
    }
}

.btn-secondary-mobile {
    display: none;
}

.btn-secondary-desktop {
    display: inline-block;
}

/* ==========================================
   Projects Grid
   ========================================== */
.projects {
    padding: 40px 0 80px;
}

/* Gateways Section - Network Theme */
.section-gateways {
    position: relative;
    background: linear-gradient(180deg, rgba(0, 152, 234, 0.03) 0%, transparent 100%);
}

.section-gateways::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(0, 152, 234, 0.15) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
    opacity: 0.5;
}

.projects-title {
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 48px;
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* ==========================================
   Glass Cards
   ========================================== */
.glass-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.glass-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
}

.glass-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    border-radius: 16px;
}

@media (hover: hover) and (pointer: fine) {
    .glass-card:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(0, 136, 204, 0.3);
        transform: translateY(-4px);
    }
}

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

.card-icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card-icon img {
    filter: brightness(1.3);
    transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
    .glass-card:hover .card-icon svg {
        stroke: #0099dd;
    }

    .glass-card:hover .card-icon img {
        filter: brightness(1.5);
        transform: scale(1.05);
    }
}

.card-text-content {
    flex: 1;
    min-width: 0;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 2px;
    color: white;
    line-height: 1.3;
}

.card-subtitle {
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 0;
    font-weight: 500;
}

.card-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    margin-bottom: 16px;
}

.card-link {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.15);
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    transition: all 0.3s ease;
    width: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .card-link:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.35);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.4),
            inset 0 -1px 0 rgba(255, 255, 255, 0.15),
            0 4px 12px rgba(0, 0, 0, 0.2);
        transform: translateY(-2px);
    }
}

.card-link::after {
    content: '';
    width: 16px;
    height: 16px;
    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='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

/* Card icon size override */
.card-icon--large {
    width: 84px;
    height: 84px;
}

.card-icon--large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ==========================================
   About Section
   ========================================== */
.about {
    padding: 60px 0;
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    color: white;
    margin-bottom: 24px;
}

.about-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

/* ==========================================
   Features Section
   ========================================== */
.features {
    padding: 60px 0 80px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.feature-card {
    padding: 20px 16px;
    text-align: center;
}

.feature-icon {
    width: 160px;
    height: 160px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.feature-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
    margin-bottom: 12px;
}

.feature-description {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
}

/* ==========================================
   CTA Section
   ========================================== */
.cta-section {
    padding: 80px 0;
    background: #0098EA;
    margin-top: 40px;
}

.cta-section-plush {
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.95) 0%, rgba(30, 30, 30, 0.9) 100%);
    backdrop-filter: blur(20px);
    margin-top: 40px;
}

.cta-section + .cta-section-plush {
    margin-top: 0;
}

.cta-section-plush .btn-primary {
    background: #0098EA;
    color: white;
}

.cta-section-plush .btn-primary:hover {
    background: #007acc;
}

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

.cta-content {
    text-align: center;
}

.cta-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-image img {
    max-width: 300px;
    height: auto;
    border-radius: 16px;
}

.cta-title {
    font-size: 40px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.cta-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .btn-primary,
.cta-buttons .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.cta-buttons .btn-primary svg,
.cta-buttons .btn-secondary svg {
    width: 32px;
    height: 32px;
    margin: -4px 0;
}

.cta-buttons .btn-secondary svg {
    fill: white;
}

/* ==========================================
   Footer
   ========================================== */
/* Footer Compact */
footer {
    padding: 24px 0;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.footer-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-nav a:hover {
    color: var(--ton-blue);
}

.footer-social {
    display: flex;
    gap: 8px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.footer-social a svg {
    width: 18px;
    height: 18px;
    fill: rgba(255, 255, 255, 0.6);
    transition: fill 0.2s ease;
}

.footer-social a:hover {
    background: rgba(0, 152, 234, 0.15);
    border-color: var(--ton-blue);
}

.footer-social a:hover svg {
    fill: var(--ton-blue);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
}

.footer-separator {
    opacity: 0.4;
}

.footer-ton {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-ton svg {
    vertical-align: middle;
}

/* Footer Mobile */
@media (max-width: 640px) {
    footer {
        padding: 20px 0;
    }

    .footer-main {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 16px;
    }

    .footer-brand {
        font-size: 14px;
    }

    .footer-nav {
        gap: 16px;
    }

    .footer-nav a {
        font-size: 13px;
    }

    .footer-social a {
        width: 32px;
        height: 32px;
    }

    .footer-social a svg {
        width: 16px;
        height: 16px;
    }

    .footer-bottom {
        flex-wrap: wrap;
        font-size: 11px;
    }
}

/* Utility classes */
.hide-mobile {
    display: inline;
}

/* Skeleton Loading */
.skeleton {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 100%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.skeleton-img {
    display: block;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.05);
}

/* Lazy Load Images */
img[data-src] {
    opacity: 0;
    transition: opacity 0.4s ease;
}

img[data-src].loaded {
    opacity: 1;
}

img.loaded + .skeleton {
    display: none;
}

/* Image container with skeleton */
.img-skeleton-wrapper {
    position: relative;
    display: inline-block;
}

.img-skeleton-wrapper .skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.img-skeleton-wrapper img {
    position: relative;
    z-index: 2;
}

.img-skeleton-wrapper img.loaded ~ .skeleton {
    opacity: 0;
    pointer-events: none;
}


/* ==========================================
   Responsive - Desktop
   ========================================== */
@media (min-width: 768px) {
    body {
        padding-top: var(--header-height-desktop);
    }

    .header {
        height: var(--header-height-desktop);
    }

    .header-container {
        padding: 0 24px;
    }

    .header-brand {
        font-size: 16px;
    }

    .brand-logo {
        width: 32px;
        height: 32px;
    }

    .header-nav {
        gap: 12px;
    }

    .nav-btn {
        padding: 7px 14px;
        font-size: 14px;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   Responsive - Tablet
   ========================================== */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   Responsive - Mobile
   ========================================== */
@media (max-width: 768px) {
    .hero {
        padding: 60px 0 40px;
    }

    .hero-pretitle {
        font-size: 28px;
    }

    .rotating-text-wrapper {
        font-size: 28px;
        padding: 6px 18px;
        border-radius: 50px;
        margin-right: 2px;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-description {
        font-size: 16px;
    }

    .projects {
        padding: 30px 0 60px;
    }

    .projects-title {
        font-size: 24px;
        margin-bottom: 32px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .glass-card {
        padding: 20px;
    }

    .card-header {
        gap: 12px;
        margin-bottom: 12px;
    }

    .card-icon {
        width: 48px;
        height: 48px;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .header-brand {
        font-size: 14px;
        gap: 8px;
    }

    .brand-logo {
        width: 24px;
        height: 24px;
    }

    .header-container {
        padding: 0 16px;
    }

    /* About Section Mobile */
    .about {
        padding: 40px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .about-text {
        font-size: 16px;
    }

    /* Features Mobile */
    .features {
        padding: 40px 0 60px;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 16px 12px;
    }

    .feature-icon {
        width: 100px;
        height: 100px;
    }

    .feature-title {
        font-size: 16px;
    }

    .feature-description {
        font-size: 13px;
    }

    /* CTA Section Mobile */
    .cta-section {
        padding: 60px 0;
    }

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

    .cta-content {
        text-align: center;
    }

    .cta-image {
        order: 0;
    }

    .cta-title {
        font-size: 28px;
    }

    .cta-description {
        font-size: 16px;
    }

    .hide-mobile {
        display: none;
    }
}

/* ==========================================
   Responsive - Small Mobile
   ========================================== */
@media (max-width: 480px) {
    .header {
        height: 48px;
    }

    body {
        padding-top: 48px;
    }

    .header-brand {
        font-size: 13px;
        gap: 6px;
    }

    .brand-logo {
        width: 22px;
        height: 22px;
    }

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

    .hero-pretitle {
        font-size: 22px;
    }

    .rotating-text-wrapper {
        font-size: 22px;
        padding: 5px 16px;
        border-radius: 50px;
        margin-right: 1px;
    }

    .hero-title {
        font-size: 36px;
        margin-bottom: 24px;
    }

    .hero-description {
        font-size: 14px;
        margin-bottom: 32px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 12px 24px;
        font-size: 14px;
    }

    .btn-secondary-desktop {
        display: none;
    }

    .btn-secondary-mobile {
        display: inline-block;
    }

    .projects-grid {
        gap: 12px;
    }

    .glass-card {
        padding: 20px;
    }

    .card-title {
        font-size: 16px;
    }

    .card-subtitle {
        font-size: 12px;
    }

    .card-description {
        font-size: 13px;
        margin-bottom: 12px;
    }

    footer {
        padding: 20px 0;
        margin-top: 30px;
    }

    .footer-content {
        justify-content: space-between;
        gap: 16px;
    }

    /* Features Small Mobile - keep 2 columns */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
    }

    .feature-title {
        font-size: 13px;
    }

    .feature-description {
        font-size: 11px;
    }

}

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

    body {
        animation: none;
    }

    .rotating-text::after {
        animation: none;
    }

    .glass-card {
        transition: none;
    }
}
