/**
 * 3ASYAPPS Landing Page Styles
 * 
 * Performance-first CSS for www.3asy.app
 * Built by 3Festo - 3D Future Experience
 * 
 * Design Philosophy: Clean, fast, accessible
 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* Container & Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Large Desktop Optimization */
@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
        padding: 30px;
    }
    
    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
    }
    
    header {
        padding: 25px 40px;
    }
    
    .header-content {
        gap: 40px;
    }
}

/* Header */
header {
    background: white;
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 40px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
}

header img {
    max-width: 280px;
    height: auto;
    flex-shrink: 0;
}

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

/* Language Toggle */
.language-toggle {
    background: #0bb24a;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 60px;
}

.language-toggle:hover {
    background: #099940;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 178, 74, 0.3);
}

/* Typography */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 5px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1rem;
    color: #0bb24a;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tagline {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.tagline a {
    color: #0bb24a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.tagline a:hover {
    color: #099940;
    text-decoration: underline;
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px;
    border-radius: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

        .lang-btn {
            background: transparent;
            border: none;
            padding: 6px 10px;
            border-radius: 15px;
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #666;
            min-width: 35px;
        }.lang-btn.active {
    background: #0bb24a;
    color: white;
    transform: scale(1.05);
}

.lang-btn:hover:not(.active) {
    background: rgba(11, 178, 74, 0.1);
    color: #0bb24a;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    gap: 30px;
    margin: 40px 0;
    width: 100%;
}

/* Safari iOS Fixes */
@supports (-webkit-touch-callout: none) {
    .app-card {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
    
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

.app-card {
    background: white;
    border-radius: 16px;
    padding: clamp(24px, 2.8vw, 35px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #0bb24a;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 35px rgba(11, 178, 74, 0.15);
    border-left-width: 6px;
}

.app-icon {
    font-size: clamp(44px, 3.5vw, 56px);
    transition: transform 0.3s ease;
}

.app-card:hover .app-icon {
    transform: scale(1.1);
}

.app-title {
    font-size: clamp(1.4rem, 1.6vw + 1rem, 1.9rem);
    font-weight: 700;
    color: #000;
    line-height: 1.25;
    word-break: break-word;
}

.app-category {
    font-size: 0.85rem;
    color: #0bb24a;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 18px;
}

.app-description {
    color: #555;
    font-size: 1.05rem;
    margin-bottom: auto;
    line-height: 1.8;
    flex: 1;
    word-break: break-word;
    text-wrap: pretty;
}

.app-features {
    list-style: none;
    margin: 20px 0 25px;
}

.app-features li {
    padding: 10px 0;
    color: #444;
    font-size: 0.98rem;
    word-break: break-word;
}

.app-features li:before {
    content: "✓";
    color: #0bb24a;
    font-weight: bold;
    margin-right: 12px;
    font-size: 1.1rem;
}

.app-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(14px, 1.3vw + 10px, 18px) clamp(24px, 2.5vw + 16px, 36px);
    background: linear-gradient(135deg, #0bb24a 0%, #0dd45f 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: clamp(0.95rem, 0.4vw + 0.9rem, 1.05rem);
    transition: all 0.3s ease;
    margin: 12px auto 0;
    align-self: stretch;
    width: 100%;
    max-width: 320px;
    white-space: normal;
    text-align: center;
    box-shadow: 0 4px 15px rgba(11, 178, 74, 0.3);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: auto;
}

.app-link::after {
    content: '→';
    margin-left: 8px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.app-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(11, 178, 74, 0.4);
    background: linear-gradient(135deg, #0dd45f 0%, #0bb24a 100%);
}

.app-link:hover::after {
    transform: translateX(4px);
}

.app-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(11, 178, 74, 0.3);
}

/* Philosophy Section */
.philosophy {
    background: #000;
    color: white;
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    margin: 60px 0 40px;
}

.philosophy h2 {
    color: #0bb24a;
    font-size: 2rem;
    margin-bottom: 20px;
}

.philosophy p {
    font-size: 1.2rem;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
}

/* CTA Section */
.cta-section {
    background: white;
    padding: 50px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    margin: 40px 0;
}

.cta-section h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 1.15rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.8;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 50px;
    background: linear-gradient(135deg, #0bb24a 0%, #0dd45f 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    white-space: nowrap;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(11, 178, 74, 0.35);
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(11, 178, 74, 0.45);
    background: linear-gradient(135deg, #0dd45f 0%, #0bb24a 100%);
}

.cta-button:active {
    transform: translateY(-1px) scale(1.02);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 0.95rem;
}

footer a {
    color: #0bb24a;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */

/* Tablet & Small Desktop */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }
    
    .apps-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    header {
        padding: 18px 25px;
    }
    
    .header-content {
        gap: 25px;
    }
    
    header img {
        max-width: 240px;
    }
}

/* Mobile Landscape & Tablet Portrait */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    header {
        padding: 15px 20px;
        margin-bottom: 30px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    header img {
        max-width: 200px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .tagline {
        font-size: 0.88rem;
        line-height: 1.5;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .app-card {
        padding: 25px 20px;
        min-height: auto;
    }
    
    .app-icon {
        font-size: 48px;
        margin-bottom: 15px;
    }
    
    .app-title {
        font-size: 1.6rem;
    }
    
    .app-category {
        font-size: 0.8rem;
    }
    
    .app-description {
        font-size: 0.98rem;
    }
    
    .app-features li {
        font-size: 0.9rem;
        padding: 8px 0;
    }
    
    .app-link {
        padding: 14px 24px;
        font-size: 0.95rem;
        max-width: none;
        width: 100%;
        margin: 12px 0 0;
    }
    
    .philosophy {
        padding: 35px 25px;
        margin: 40px 0 30px;
    }
    
    .philosophy h2 {
        font-size: 1.6rem;
    }
    
    .philosophy p {
        font-size: 1rem;
    }
    
    .cta-section {
        padding: 35px 25px;
        margin: 30px 0;
    }
    
    .cta-section h2 {
        font-size: 1.8rem;
    }
    
    .cta-section p {
        font-size: 1rem;
    }
    
    .cta-button {
        padding: 17px 40px;
        font-size: 1.15rem;
    }
    
    .language-switcher {
        top: 12px;
        right: 12px;
    }
    
    .lang-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 12px 15px;
        margin-bottom: 25px;
    }
    
    .header-content {
        gap: 10px;
    }
    
    header img {
        max-width: 180px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    .subtitle {
        font-size: 0.8rem;
    }
    
    .tagline {
        font-size: 0.82rem;
        line-height: 1.4;
    }
    
    .apps-grid {
        gap: 15px;
    }
    
    .app-card {
        padding: 20px 15px;
    }
    
    .app-icon {
        font-size: 42px;
        margin-bottom: 12px;
    }
    
    .app-title {
        font-size: 1.4rem;
    }
    
    .app-category {
        font-size: 0.75rem;
        margin-bottom: 12px;
    }
    
    .app-description {
        font-size: 0.92rem;
        margin-bottom: 15px;
    }
    
    .app-features {
        margin: 15px 0 20px;
    }
    
    .app-features li {
        font-size: 0.85rem;
        padding: 7px 0;
    }
    
    .app-link {
        padding: 12px 20px;
        font-size: 0.9rem;
        max-width: none;
        width: 100%;
        margin: 12px 0 0;
    }
    
    .philosophy {
        padding: 30px 20px;
        margin: 30px 0 25px;
    }
    
    .philosophy h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }
    
    .philosophy p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    
    .cta-section {
        padding: 30px 20px;
        margin: 25px 0;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .cta-section p {
        font-size: 0.95rem;
        line-height: 1.7;
        margin-bottom: 25px;
    }
    
    .cta-button {
        padding: 16px 35px;
        font-size: 1.05rem;
        max-width: 90%;
    }
    
    footer {
        padding: 25px 15px;
        font-size: 0.85rem;
    }
    
    .language-switcher {
        top: 10px;
        right: 10px;
        gap: 6px;
    }
    
    .lang-btn {
        padding: 7px 14px;
        font-size: 12px;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    header img {
        max-width: 160px;
    }
    
    h1 {
        font-size: 1.2rem;
    }
    
    .app-icon {
        font-size: 38px;
    }
    
    .app-title {
        font-size: 1.3rem;
    }
    
    .app-link {
        font-size: 0.9rem;
        padding: 11px 20px;
        max-width: none;
        width: 100%;
        margin: 12px 0 0;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .app-card {
        -webkit-tap-highlight-color: rgba(11, 178, 74, 0.1);
    }
    
    .app-link {
        min-height: 48px;
        touch-action: manipulation;
    }
    
    .lang-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .cta-button {
        min-height: 48px;
    }
    
    /* Remove hover effects on touch */
    .app-card:hover::after {
        width: 0;
    }
    
    .app-card:active {
        transform: scale(0.98);
    }
    
    .app-link:active {
        transform: scale(0.95);
    }
}

/* Landscape Mobile Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    header {
        padding: 10px 20px;
        margin-bottom: 20px;
    }
    
    .header-content {
        flex-direction: row;
        gap: 20px;
    }
    
    header img {
        max-width: 150px;
    }
    
    .philosophy {
        padding: 25px 20px;
    }
    
    .cta-section {
        padding: 25px 20px;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .language-switcher,
    .floating-shape {
        display: none !important;
    }
    
    .app-card {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    header {
        box-shadow: none;
        border-bottom: 2px solid #0bb24a;
    }
}

/* Performance & Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 3D Effects Enhancements */
.app-card {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    will-change: transform;
}

.app-card:hover .app-icon {
    transform: rotateY(360deg);
    transition: transform 0.6s ease-in-out;
}

header img {
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.philosophy {
    overflow: hidden;
}

/* WebGL Performance Optimizations */
.container {
    transform-style: preserve-3d;
}

/* Glitch animation keyframes */
@keyframes glitch {
    0% { transform: translateX(0); }
    10% { transform: translateX(-2px) scaleX(0.99); }
    20% { transform: translateX(2px) scaleY(0.99); }
    30% { transform: translateX(-1px) scaleX(1.01); }
    40% { transform: translateX(1px) scaleY(1.01); }
    50% { transform: translateX(-2px) scaleX(0.98); }
    60% { transform: translateX(2px) scaleY(0.98); }
    70% { transform: translateX(-1px) scaleX(1.02); }
    80% { transform: translateX(1px) scaleY(1.02); }
    90% { transform: translateX(-2px) scaleX(0.99); }
    100% { transform: translateX(0); }
}

.glitch-active {
    animation: glitch 0.3s ease-in-out;
}

/* Performance optimizations for 3D */
@media (prefers-reduced-motion: reduce) {
    .app-card {
        transform: none !important;
    }
    
    header img {
        transform: none !important;
    }
}

/* Low-end device optimizations */
@media (max-width: 768px) and (max-height: 1024px) {
    .app-card {
        will-change: auto;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .language-switcher {
        display: none;
    }
    
    .app-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        transform: none !important;
    }
}