/* Triplyo Web - Premium Stylesheet (Revamped) */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

/* --- CSS Variables (matched to app screenshots) --- */
:root {
    --bg-primary: #070b13;
    --bg-secondary: #0c1426;
    --bg-card: rgba(18, 24, 38, 0.75);
    --bg-card-solid: #121826;
    --bg-card-hover: rgba(26, 37, 62, 0.85);
    
    --primary: #1ad1a5;
    --primary-glow: rgba(26, 209, 165, 0.12);
    --primary-hover: #15b38d;
    
    --text-primary: #f0f4f8;
    --text-secondary: #8b9ab8;
    --text-muted: #4e5d78;
    
    --border-color: rgba(255, 255, 255, 0.06);
    --border-color-hover: rgba(255, 255, 255, 0.12);
    
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--primary-glow);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-primary);
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(ellipse at 15% 15%, rgba(26, 209, 165, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 85% 85%, rgba(20, 30, 55, 0.5) 0%, transparent 50%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* --- Layout --- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
section { padding: 7rem 0; position: relative; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: 3.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2.5rem; margin-bottom: 1.5rem; text-align: center; }

.gradient-text {
    background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-align: center;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: block;
}

.section-desc {
    color: var(--text-secondary);
    text-align: center;
    max-width: 560px;
    margin: 0 auto 4rem auto;
    font-size: 1.05rem;
}

p { color: var(--text-secondary); }
a { text-decoration: none; color: inherit; transition: var(--transition-fast); }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.6rem;
    border-radius: 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    gap: 0.4rem;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #070b13;
    box-shadow: 0 4px 15px rgba(26, 209, 165, 0.25);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 209, 165, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color-hover);
}
.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.btn-apple {
    background-color: #ffffff;
    color: #000000;
    border: none;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.08);
}
.btn-apple:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.15);
}

/* --- Header --- */
header {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000; padding: 1.25rem 0;
    transition: all var(--transition-normal);
}
header.scrolled {
    padding: 0.8rem 0;
    background-color: rgba(7, 11, 19, 0.88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-heading); font-weight: 800; font-size: 1.4rem; }
.logo img { height: 34px; width: 34px; border-radius: 8px; }
nav ul { display: flex; list-style: none; gap: 1.8rem; align-items: center; }
nav ul a { color: var(--text-secondary); font-size: 0.9rem; font-weight: 500; }
nav ul a:hover { color: var(--text-primary); }
.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

/* --- Hero --- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 7rem; padding-bottom: 3rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.hero-content { display: flex; flex-direction: column; }
.hero-tagline {
    font-size: 0.8rem; font-weight: 700; color: var(--primary);
    background-color: var(--primary-glow);
    padding: 0.35rem 0.9rem; border-radius: 20px; width: fit-content;
    margin-bottom: 1.5rem; letter-spacing: 0.08em;
    border: 1px solid rgba(26, 209, 165, 0.18);
}
.hero-content h1 { margin-bottom: 1.5rem; }
.hero-content p { font-size: 1.15rem; margin-bottom: 2.5rem; max-width: 480px; }
.hero-actions { display: flex; gap: 1rem; align-items: center; }
.hero-visual { position: relative; display: flex; justify-content: center; align-items: center; }
.glow-orb { position: absolute; width: 320px; height: 320px; background: radial-gradient(circle, rgba(26, 209, 165, 0.12) 0%, transparent 70%); filter: blur(50px); z-index: 1; }

/* --- Features --- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }

.feature-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px; padding: 2.2rem;
    transition: all var(--transition-normal);
    position: relative; overflow: hidden;
    backdrop-filter: blur(10px);
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0; transition: var(--transition-normal);
}
.feature-card:hover {
    transform: translateY(-4px);
    background-color: var(--bg-card-hover);
    border-color: rgba(26, 209, 165, 0.25);
    box-shadow: var(--shadow-lg), 0 0 20px rgba(26, 209, 165, 0.04);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background-color: var(--primary-glow); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(26, 209, 165, 0.15);
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.65; }

/* --- Demo Section --- */
.demo-section {
    background-color: rgba(10, 16, 30, 0.6);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.carousel-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    padding: 2rem 0;
}

.screenshot-carousel {
    display: flex;
    transition: transform var(--transition-normal);
    will-change: transform;
}

.screenshot-card {
    flex: 0 0 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    padding: 0 4rem;
    opacity: 0.15;
    transform: scale(0.95);
    transition: opacity var(--transition-normal), transform var(--transition-normal);
}

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

.iphone-frame-screenshot {
    width: 280px;
    height: 580px;
    background-color: #0b0f19;
    border: 12px solid #1c2640;
    border-radius: 40px;
    box-shadow: 
        0 15px 35px rgba(0,0,0,0.6),
        0 0 40px rgba(26, 209, 165, 0.08);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.5s cubic-bezier(0.1, 0.8, 0.2, 1), box-shadow 0.5s ease;
}

.iphone-frame-screenshot:hover {
    transform: translateY(-8px) rotateY(-4deg) rotateX(4deg);
    box-shadow: 
        15px 25px 45px rgba(0,0,0,0.7),
        0 0 50px rgba(26, 209, 165, 0.15);
}

.iphone-notch-screenshot {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 18px;
    background-color: #1c2640;
    border-radius: 0 0 12px 12px;
    z-index: 10;
}

.iphone-camera-screenshot {
    width: 6px;
    height: 6px;
    background-color: #0b0f19;
    border-radius: 50%;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.screenshot-info {
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.info-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background-color: var(--primary-glow);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(26, 209, 165, 0.15);
}

.info-icon svg {
    width: 26px;
    height: 26px;
}

.screenshot-info h3 {
    font-size: 1.8rem;
    color: #ffffff;
}

.screenshot-info p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #ffffff;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all var(--transition-normal);
    backdrop-filter: blur(8px);
}

.carousel-control:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

/* Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.indicator.active {
    background-color: var(--primary);
    width: 24px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .screenshot-card {
        flex-direction: column;
        gap: 2rem;
        padding: 0 1rem;
        text-align: center;
    }
    
    .screenshot-info {
        text-align: center;
        align-items: center;
    }
    
    .carousel-control {
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }
    
    .carousel-control.prev {
        left: 0;
    }
    
    .carousel-control.next {
        right: 0;
    }
}

@media (max-width: 480px) {
    .iphone-frame-screenshot {
        width: 220px;
        height: 450px;
        border-width: 8px;
        border-radius: 30px;
    }
}


/* Home Indicator */
.phone-home-indicator {
    position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
    width: 110px; height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 2px; z-index: 100; pointer-events: none;
}

/* --- CTA Section --- */
.cta-section { padding: 5rem 0; text-align: center; }
.cta-box {
    background: linear-gradient(135deg, rgba(12, 20, 38, 0.8) 0%, rgba(20, 32, 60, 0.8) 100%);
    border: 1px solid rgba(26, 209, 165, 0.15);
    border-radius: 28px; padding: 4rem 2rem;
    position: relative; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}
.cta-box::before {
    content: ''; position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(26, 209, 165, 0.08) 0%, transparent 70%);
    top: -150px; right: -150px; pointer-events: none;
}
.cta-box h2 { font-size: 2.5rem; margin-bottom: 1rem; }
.cta-box p { max-width: 550px; margin: 0 auto 2.5rem auto; font-size: 1.05rem; }
.cta-buttons { display: flex; justify-content: center; gap: 1.5rem; align-items: center; }

/* --- Footer --- */
footer {
    background-color: #04070d;
    border-top: 1px solid var(--border-color);
    padding: 3.5rem 0 1.5rem 0;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; margin-bottom: 2.5rem; }
.footer-brand { display: flex; flex-direction: column; gap: 0.8rem; }
.footer-brand p { font-size: 0.9rem; max-width: 280px; }
.footer-links h4 { font-size: 1rem; color: var(--text-primary); margin-bottom: 1.2rem; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.footer-links ul a { font-size: 0.9rem; color: var(--text-secondary); }
.footer-links ul a:hover { color: var(--text-primary); }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem; font-size: 0.8rem; color: var(--text-muted);
}

/* --- Legal Pages --- */
.legal-body { background-color: var(--bg-primary); color: var(--text-primary); line-height: 1.8; }
.legal-header { background-color: var(--bg-secondary); border-bottom: 1px solid var(--border-color); padding: 6rem 0 3rem 0; text-align: center; }
.legal-header h1 { font-size: 2.8rem; margin-bottom: 1rem; }
.legal-header p { color: var(--primary); font-weight: 500; }
.legal-content { padding: 4rem 0; max-width: 800px; margin: 0 auto; }
.legal-content h3 { font-size: 1.4rem; margin-top: 2.5rem; margin-bottom: 1rem; color: var(--primary); }
.legal-content p { margin-bottom: 1.5rem; color: var(--text-secondary); }
.legal-content ul { margin-bottom: 1.5rem; padding-left: 1.5rem; color: var(--text-secondary); }
.legal-content li { margin-bottom: 0.5rem; }
.legal-back-btn { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--primary); font-weight: 600; margin-bottom: 2rem; }
.legal-back-btn:hover { color: var(--primary-hover); transform: translateX(-3px); }

/* --- Scroll Reveal Animations --- */
.reveal {
    opacity: 0; transform: translateY(25px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.active { opacity: 1; transform: translateY(0); }

@keyframes float {
    0% { transform: translateY(0px) scale(0.85); }
    50% { transform: translateY(-8px) scale(0.85); }
    100% { transform: translateY(0px) scale(0.85); }
}
.float-animation { animation: float 5s ease-in-out infinite; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; }
    .hero-grid { gap: 2rem; }
}

@media (max-width: 768px) {
    section { padding: 4.5rem 0; }
    h1 { font-size: 2.3rem; }
    h2 { font-size: 1.8rem; }
    .container { padding: 0 1.25rem; }

    .hero { padding-top: 5rem; }
    .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 2.5rem; }
    .hero-content { align-items: center; }
    .hero-content p { margin-left: auto; margin-right: auto; }
    .hero-actions { flex-direction: column; width: 100%; max-width: 280px; }
    .btn { width: 100%; }

    .demo-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .demo-info { order: -1; text-align: center; }
    .demo-nav-tabs { flex-direction: row; overflow-x: auto; gap: 0.4rem; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
    .demo-tab-btn { flex-shrink: 0; padding: 0.7rem 0.8rem; flex-direction: column; align-items: center; text-align: center; width: 105px; gap: 0.4rem; }
    .tab-icon { width: 30px; height: 30px; }
    .tab-desc { display: none; }
    .tab-title { font-size: 0.78rem; }

    /* Scale phone down on mobile */
    .iphone-frame { transform: scale(0.82); transform-origin: top center; }
    .phone-mockup-wrapper { margin-bottom: -60px; }

    .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

    .menu-toggle { display: block; z-index: 1001; }
    nav {
        position: fixed; top: 0; right: -100%; width: 75%; max-width: 280px;
        height: 100vh; background-color: var(--bg-secondary);
        border-left: 1px solid var(--border-color);
        padding: 5rem 1.5rem 2rem 1.5rem;
        transition: right var(--transition-normal); z-index: 1000;
    }
    nav.open { right: 0; }
    nav ul { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
    nav ul a { font-size: 1.1rem; display: block; padding: 0.4rem 0; }
}

@media (max-width: 420px) {
    .iphone-frame { transform: scale(0.72); }
    .phone-mockup-wrapper { margin-bottom: -100px; }
}
