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

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

/* ==========================================
   CSS Variables - TON Brand Colors
   ========================================== */
:root {
    --ton-dark: #1E2337;
    --ton-blue: #0098EA;
    --ton-light-blue: #1AC9FF;
    --ton-gradient-start: #2D83EC;
    --ton-gradient-end: #1AC9FF;
    --ton-light-bg: #F7F9FB;
    --white: #FFFFFF;
    --primary: #0088cc;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 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;
}

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: 600;
    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-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);
}

/* ==========================================
   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;
}

.privacy-badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 48px;
    font-weight: 700;
    margin-right: 2px;
}

.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;
}

.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: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    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.3), transparent);
}

@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.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
}

@media (hover: hover) and (pointer: fine) {
    .card-link:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.15);
        transform: translateY(-2px);
    }
}

.card-link::after {
    content: '→';
    font-size: 16px;
}

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

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

/* ==========================================
   Mystery Card
   ========================================== */
.glass-card.mystery {
    position: relative;
    cursor: default;
}

.glass-card.mystery::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 152, 234, 0.1), rgba(26, 201, 255, 0.1));
    border-radius: 16px;
    pointer-events: none;
}

.mystery-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.blurred-text {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

.mystery-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    display: block;
}

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

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    text-decoration: none;
}

.footer-item.link {
    transition: color 0.2s ease;
    cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
    .footer-item.link:hover {
        color: var(--primary);
    }
}

.footer-logo {
    width: 20px;
    height: 20px;
}

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

/* Background Effects (hidden) */
.bg-gradient {
    display: 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;
    }

    .privacy-badge {
        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;
    }

    .footer-content {
        gap: 20px;
        font-size: 12px;
    }

    .footer-logo {
        width: 18px;
        height: 18px;
    }

    .header-nav {
        display: none;
    }

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

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

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

/* ==========================================
   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;
    }

    .privacy-badge {
        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;
    }

    .mystery-badge {
        font-size: 10px;
        padding: 3px 10px;
    }

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

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