/* CSS Variables */
:root {
    --primary: #FA3942;
    --primary-hover: #D9252D;
    --secondary: #FFF1F0;
    --bg-base: #F5F5F5;
    --bg-card: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-light: #FFFFFF;
    --text-muted: #555555;
    --header-bg: #FFFFFF;
    --footer-bg: #111111;
    --btn-bg: #FA1519;
    --btn-radius: 32px;
    --transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-base: #121212;
        --bg-card: #1E1E1E;
        --text-dark: #F5F5F5;
        --text-muted: #AAAAAA;
        --header-bg: #1A1A1A;
        --secondary: #331A1A;
    }
}

/* Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto; /* Handled by JS for hash router */
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
    height: 48px;
    border-radius: var(--btn-radius);
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background-color: var(--btn-bg);
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(250, 21, 25, 0.2);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-large {
    height: 56px;
    padding: 0 32px;
    font-size: 1.125rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    height: 72px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.brand-logo span {
    font-family: 'Ubuntu', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-list {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
}

.mobile-menu-toggle .bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-dark);
    margin: 5px 0;
    transition: 0.3s;
}

/* Phone Mockup */
.phone-mockup {
    border: 10px solid #1A1A1A;
    border-radius: 36px;
    overflow: hidden;
    background-color: #000;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    aspect-ratio: 0.5 / 1;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 20px;
    background-color: #1A1A1A;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 2;
}

.phone-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

/* Pages */
.page {
    min-height: calc(100vh - 72px);
    padding: 0;
}

.page > section:first-of-type {
    margin-top: 0;
    padding-top: 0;
}

.page > section:first-of-type .container {
    padding-top: 80px;
    padding-bottom: 80px;
}

section {
    padding: 80px 0;
}

/* Section Tags */
.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background-color: var(--secondary);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 20px;
    margin-bottom: 16px;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero-section {
    position: relative;
    background-color: var(--bg-base);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 75%;
    background: linear-gradient(180deg, var(--primary) 0%, transparent 100%);
    z-index: 0;
}

.hero-watermark {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 800px;
    height: 100%;
    background-image: url('./assets/img/logo.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.04;
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    color: #FFFFFF;
    font-size: 3rem;
    margin-bottom: 24px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hero-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.125rem;
    margin-bottom: 40px;
    max-width: 480px;
}

/* Brand Section */
.brand-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.feature-list {
    margin-top: 24px;
}

.feature-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
    font-weight: 500;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary);
    font-weight: bold;
}

/* How It Works */
.how-it-works-section {
    background-color: var(--secondary);
    text-align: center;
}

.section-header {
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 2.5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.step-card {
    background-color: var(--bg-card);
    padding: 40px 24px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    position: relative;
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 48px;
    background-color: var(--primary);
    color: #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Ubuntu', sans-serif;
    font-weight: bold;
    font-size: 1.25rem;
    border: 4px solid var(--secondary);
}

.small-mockup {
    max-width: 180px;
    margin-bottom: 24px;
    border-width: 6px;
}

/* Showcase Section */
.showcase-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.carousel-container {
    overflow: hidden;
    border-radius: 36px;
    padding: 10px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #CCC;
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--primary);
    width: 24px;
    border-radius: 4px;
}

/* User Center & Security */
.user-center-container, .security-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.user-center-section {
    background-color: var(--secondary);
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: linear-gradient(135deg, var(--primary) 0%, #C41C24 100%);
    color: #FFF;
}

.cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-icon {
    margin-bottom: 24px;
    background: #FFF;
    border-radius: 20px;
    padding: 10px;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 1.125rem;
    margin-bottom: 32px;
    opacity: 0.9;
}

.cta-section .btn {
    background-color: #FFF;
    color: var(--primary);
}

.cta-section .btn:hover {
    background-color: var(--bg-base);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* About Page */
.about-hero-section {
    background-color: var(--secondary);
    text-align: center;
    overflow: hidden;
}

.about-header {
    max-width: 700px;
    margin: 0 auto 60px;
}

.about-header h1 {
    font-size: 3rem;
    color: var(--primary);
}

.about-visuals {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: -100px;
}

.offset-mockup {
    transform: translateY(40px);
}

.about-content-section {
    padding-top: 140px;
}

.content-block {
    max-width: 800px;
    margin: 0 auto 60px;
    text-align: center;
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

/* Legal Pages */
.legal-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 60px 24px;
}

#legal-privacy, #legal-terms {
    background-color: var(--bg-card);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

#legal-privacy h2, #legal-terms h2,
#legal-privacy h3, #legal-terms h3,
#legal-privacy h4, #legal-terms h4 {
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

#legal-privacy h2:first-child, #legal-terms h2:first-child {
    margin-top: 0;
    color: var(--primary);
    font-size: 2rem;
}

#legal-privacy p, #legal-terms p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-muted);
}

#legal-privacy ul, #legal-terms ul {
    margin-bottom: 1.5rem;
    padding-left: 0;
    list-style-type: none;
    color: var(--text-muted);
}

#legal-privacy li, #legal-terms li {
    margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: #FFFFFF;
    padding: 80px 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-brand p {
    color: #AAAAAA;
    margin-bottom: 16px;
    max-width: 300px;
}

.contact-link {
    color: var(--primary);
    font-weight: 500;
}

.footer-links h3, .footer-legal h3 {
    font-size: 1.125rem;
    margin-bottom: 24px;
}

.footer-links ul li, .footer-legal ul li {
    margin-bottom: 12px;
}

.footer-links a, .footer-legal a {
    color: #AAAAAA;
}

.footer-links a:hover, .footer-legal a:hover {
    color: #FFFFFF;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
    text-align: center;
    color: #777777;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-container, .brand-container, .showcase-container, .user-center-container, .security-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        margin: 0 auto 32px;
    }
    
    .brand-visual, .security-visual {
        grid-row: 2;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--header-bg);
        flex-direction: column;
        justify-content: center;
        padding: 40px 24px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        z-index: 1001;
    }
    
    .main-nav.active {
        right: 0;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin-bottom: 32px;
    }
    
    .nav-link {
        font-size: 1.125rem;
        display: block;
        padding: 10px 0;
    }
    
    .mobile-menu-toggle {
        display: block;
        z-index: 1002;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 990;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .nav-overlay.active {
        display: block;
        opacity: 1;
    }
    
    body.no-scroll {
        overflow: hidden;
    }

    .hero-section::before {
        height: 85%;
    }

    .about-visuals {
        flex-direction: column;
        align-items: center;
        margin-bottom: 0;
    }
    
    .offset-mockup {
        transform: none;
        margin-top: 20px;
    }
    
    .about-content-section {
        padding-top: 60px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}
