/* ============================================
   SAL APP - Material Design 3 Dark Theme
   With animations, glassmorphism & effects
   ============================================ */

:root {
    --md-primary: #FF8A65;
    --md-on-primary: #3E0500;
    --md-primary-container: #5C1900;
    --md-on-primary-container: #FFDBCF;

    --md-secondary: #42A5F5;
    --md-on-secondary: #003258;
    --md-secondary-container: #00497D;
    --md-on-secondary-container: #D1E4FF;

    --md-tertiary: #CE93D8;
    --md-on-tertiary: #3B0048;

    --md-error: #F2B8B5;
    --md-on-error: #601410;

    --md-bg: #0A0A0F;
    --md-on-bg: #E6E1E5;
    --md-surface: #0F0F17;
    --md-surface-dim: #131318;
    --md-surface-bright: #1C1C24;
    --md-surface-container: #141419;
    --md-surface-container-high: #1E1E26;
    --md-on-surface: #E6E1E5;
    --md-on-surface-variant: #CAC4D0;
    --md-outline: #938F99;
    --md-outline-variant: #49454F;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 28px;
    --radius-xl: 32px;

    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1.0);
    --ease-emphasized: cubic-bezier(0.2, 0.0, 0, 1.0);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--md-bg);
    color: var(--md-on-bg);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* ========== Particle Canvas ========== */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}

/* ========== Cursor Glow ========== */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 138, 101, 0.06) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    will-change: transform;
}

/* ========== Navigation ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 0;
    transform: translateY(-100%);
    transition: transform 0.4s var(--ease-emphasized), background 0.3s;
}

.navbar.visible {
    transform: translateY(0);
}

.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 15, 0.75);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--md-on-surface);
}

.nav-logo {
    height: 32px;
    width: auto;
    transition: transform 0.3s var(--ease-spring);
}

.logo-container:hover .nav-logo {
    transform: rotate(-8deg) scale(1.1);
}

.nav-title {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

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

.nav-link {
    color: var(--md-on-surface-variant);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease-out);
    position: relative;
}

.nav-link:hover {
    color: var(--md-on-surface);
    background: rgba(255, 255, 255, 0.06);
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 24px;
    height: 44px;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: -0.01em;
    transition: all 0.3s var(--ease-emphasized);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    background: radial-gradient(circle at center, rgba(255,255,255,0.2), transparent 70%);
}

.btn:active::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--md-primary), #FF6E40);
    color: var(--md-on-primary);
    box-shadow: 0 4px 16px rgba(255, 138, 101, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 8px 32px rgba(255, 138, 101, 0.35);
    transform: translateY(-2px);
}

.btn-glow {
    animation: btnGlow 3s ease-in-out infinite;
}

@keyframes btnGlow {
    0%, 100% { box-shadow: 0 4px 16px rgba(255, 138, 101, 0.25); }
    50% { box-shadow: 0 4px 32px rgba(255, 138, 101, 0.45), 0 0 60px rgba(255, 138, 101, 0.15); }
}

.btn-outline {
    background: transparent;
    color: var(--md-on-surface-variant);
    border: 1px solid var(--md-outline-variant);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--md-outline);
    color: var(--md-on-surface);
    transform: translateY(-2px);
}

.btn-sm { height: 36px; padding: 0 16px; font-size: 0.813rem; border-radius: 18px; }
.btn-lg { height: 52px; padding: 0 32px; font-size: 0.938rem; border-radius: 26px; }

/* ========== Hero Section ========== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 0 60px;
    overflow: hidden;
}

.hero-bg-orbs, .download-bg-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: orbFloat 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 138, 101, 0.15), transparent);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(66, 165, 245, 0.12), transparent);
    top: 20%;
    right: -10%;
    animation-delay: -7s;
    animation-duration: 25s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(206, 147, 216, 0.1), transparent);
    bottom: 0%;
    left: 30%;
    animation-delay: -13s;
    animation-duration: 22s;
}

.orb-4 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 138, 101, 0.12), transparent);
    top: -20%;
    right: -10%;
}

.orb-5 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(66, 165, 245, 0.1), transparent);
    bottom: -20%;
    left: -10%;
    animation-delay: -10s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -40px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 35px) scale(1.03); }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--md-on-surface-variant);
    margin-bottom: 32px;
}

.hero-badge .material-icons-round {
    font-size: 18px;
    color: var(--md-primary);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 24px;
    color: var(--md-on-surface);
}

.gradient-text {
    background: linear-gradient(135deg, var(--md-primary), #FF6E40, #FFAB91);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-blue {
    background: linear-gradient(135deg, var(--md-secondary), #64B5F6, #90CAF9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--md-on-surface-variant);
    max-width: 560px;
    margin: 0 auto 40px;
    font-weight: 400;
    line-height: 1.7;
}

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

/* Phone Mockup */
.hero-phone {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1200px;
}

.phone-mockup {
    width: 280px;
    height: 580px;
    background: #000;
    border-radius: 36px;
    padding: 8px;
    position: relative;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 30px 60px -20px rgba(0, 0, 0, 0.7),
        0 50px 100px -30px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: rotateX(4deg);
    transition: transform 0.6s var(--ease-emphasized);
}

.phone-mockup:hover {
    transform: rotateX(0deg) scale(1.02);
}

.phone-shine {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    border-radius: 36px 36px 0 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
    z-index: 2;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 28px;
    overflow: hidden;
    background: #000;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.phone-shadow {
    width: 200px;
    height: 20px;
    background: radial-gradient(ellipse, rgba(255, 138, 101, 0.15), transparent);
    border-radius: 50%;
    margin-top: 24px;
    filter: blur(8px);
    animation: shadowPulse 3s ease-in-out infinite;
}

@keyframes shadowPulse {
    0%, 100% { transform: scaleX(1); opacity: 0.6; }
    50% { transform: scaleX(1.3); opacity: 0.3; }
}

/* ========== Feature Sections ========== */
.feature-section {
    padding: 140px 0;
    position: relative;
}

.alt-bg {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015) 0%, transparent 30%, transparent 70%, rgba(255, 255, 255, 0.015) 100%);
}

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

.feature-grid.reverse {
    direction: rtl;
}

.feature-grid.reverse > * {
    direction: ltr;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.813rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: rgba(255, 138, 101, 0.1);
    color: var(--md-primary);
    border: 1px solid rgba(255, 138, 101, 0.15);
    margin-bottom: 20px;
}

.feature-chip .material-icons-round {
    font-size: 16px;
}

.feature-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--md-on-surface);
}

.feature-desc {
    font-size: 1.05rem;
    color: var(--md-on-surface-variant);
    line-height: 1.8;
    margin-bottom: 28px;
}

.feature-visual {
    display: flex;
    justify-content: center;
}

.feature-phone-wrapper {
    position: relative;
}

.feature-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s;
}

.feature-phone-wrapper:hover .feature-glow {
    opacity: 0.5;
}

.glow-orange { background: var(--md-primary); }
.glow-blue { background: var(--md-secondary); }
.glow-purple { background: var(--md-tertiary); }

/* ========== Download Section ========== */
.download-section {
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.download-card {
    text-align: center;
    padding: 64px 40px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--md-surface-container-high), var(--md-surface-container));
    border: 1px solid var(--md-outline-variant);
    position: relative;
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
}

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

.download-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    color: var(--md-on-surface);
}

.download-subtitle {
    font-size: 1.1rem;
    color: var(--md-on-surface-variant);
    margin-bottom: 40px;
}

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

.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    background: var(--md-surface-bright);
    border: 1px solid var(--md-outline-variant);
    color: var(--md-on-surface-variant);
    text-decoration: none;
    transition: all 0.3s var(--ease-out);
}

.store-btn.disabled {
    opacity: 0.45;
    cursor: default;
}

.store-btn .material-icons-round {
    font-size: 28px;
}

.store-text {
    text-align: left;
}

.store-small {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.store-name {
    display: block;
    font-size: 1rem;
    font-weight: 600;
}

.store-trademark {
    margin-top: 20px;
    font-size: 0.7rem;
    color: var(--md-outline);
    opacity: 0.6;
    line-height: 1.5;
}

/* ========== Footer ========== */
.footer-bottom {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--md-outline-variant);
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.footer-links a {
    color: var(--md-outline);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--md-on-surface);
    background: rgba(255, 255, 255, 0.04);
}

.footer-dot {
    color: var(--md-outline-variant);
    font-size: 0.875rem;
    line-height: 2;
}

.footer-copy {
    color: var(--md-outline);
    font-size: 0.813rem;
}

.footer-copy a {
    color: var(--md-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    position: relative;
}

.footer-copy a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--md-primary);
    transition: width 0.3s var(--ease-out);
}

.footer-copy a:hover::after {
    width: 100%;
}

/* ========== Reveal Animations ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s var(--ease-emphasized), transform 0.8s var(--ease-emphasized);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s var(--ease-emphasized), transform 0.8s var(--ease-emphasized);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.feature-text .reveal:nth-child(1) { transition-delay: 0s; }
.feature-text .reveal:nth-child(2) { transition-delay: 0.1s; }
.feature-text .reveal:nth-child(3) { transition-delay: 0.2s; }
.feature-text .reveal:nth-child(4) { transition-delay: 0.3s; }

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .hero-section { padding: 100px 0 40px; }
    
    .hero-title { font-size: 2.8rem; }
    
    .nav-links { gap: 4px; }
    .nav-link { display: none; }
    
    .feature-section { padding: 80px 0; }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    
    .feature-grid.reverse {
        direction: ltr;
    }
    
    .phone-mockup {
        width: 240px;
        height: 500px;
    }
    
    .download-buttons { flex-direction: column; align-items: center; }
    .store-btn { width: 100%; max-width: 260px; justify-content: center; }
    
    .cursor-glow { display: none; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.2rem; }
    .feature-title { font-size: 1.8rem; }
    .download-title { font-size: 1.8rem; }
    .download-card { padding: 40px 20px; }
}
