/* CSS Variables */
:root {
    /* Colors - Blending SM Secure Corporate & Geo Guard Me Blues */
    --primary: #0A2342;
    /* Deep Navy Blue */
    --primary-light: #1A3E6B;
    --accent: #2196F3;
    /* Vibrant Blue for actions */
    --accent-hover: #1976D2;
    --dark: #0f1115;
    /* SM Secure Black */
    --darker: #08090b;
    --light: #F8F9FA;
    --white: #FFFFFF;

    /* Semantic Theme Variables - Light (Default) */
    --bg-color: var(--light);
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-light: #B0BEC5;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --card-bg: var(--white);
    --border-color: rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Typography */
    --font-family: 'Inter', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --section-pad: 5rem 1rem;

    /* Effects */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    color-scheme: light dark;
}

/* High Contrast & Dark Mode Logo Asset Swap */
@media (prefers-color-scheme: dark), (prefers-contrast: more), (forced-colors: active) {
    :root:not([data-theme="light"]) .logo-img,
    :root:not([data-theme="light"]) .logo-footer {
        content: url("assets/1_footer.png");
        filter: none !important;
    }
}

/* Explicit fallback for the manual Dark Mode toggle */
[data-theme="dark"] .logo-img,
[data-theme="dark"] .logo-footer {
    content: url("assets/1_footer.png");
    filter: none !important;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-color: #0f1115;
        --text-primary: #e6edf3;
        --text-secondary: #8b949e;
        --text-light: #7d8590;
        --navbar-bg: rgba(15, 17, 21, 0.95);
        --card-bg: #161b22;
        --border-color: #30363d;
        --glass-bg: rgba(255, 255, 255, 0.03);
        --glass-border: rgba(255, 255, 255, 0.08);
        --white: #e6edf3;
        --primary: #58a6ff;
        --light: #161b22;
    }
}

[data-theme="dark"] {
    --bg-color: #0f1115;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-light: #7d8590;
    --navbar-bg: rgba(15, 17, 21, 0.95);
    --card-bg: #161b22;
    --border-color: #30363d;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --white: #e6edf3;
    --primary: #58a6ff;
    --light: #161b22;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-color);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-pad);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Background Utility Classes */
.bg-dark {
    background-color: var(--dark);
    color: var(--white);
}

.bg-dark .section-header h2 {
    color: var(--white);
}

.bg-dark .section-header p {
    color: var(--text-light);
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: var(--white);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition), background-color 0.3s ease;
    padding: 0.2rem 0;
    box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
    padding: 0.8rem 0;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.navbar .logo {
    margin-left: 0;
}

.footer-brand .logo {
    margin-left: 0;
}

.logo-img {
    height: 55px;
    width: auto;
    display: block;
    /* Invisible on normal white navbar, but creates a protective glow when Samsung Stealth High Contrast forces the navbar dark */
    filter: drop-shadow(0px 0px 8px rgba(255, 255, 255, 1)) drop-shadow(0px 0px 15px rgba(255, 255, 255, 0.8));
}

.footer-brand .logo {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.logo-footer {
    height: 60px;
    width: auto;
    display: block;
    margin-bottom: 2rem;
    object-fit: contain;
    filter: drop-shadow(0px 0px 10px rgba(255, 255, 255, 1))
        drop-shadow(0px 0px 30px rgba(255, 255, 255, 0.8))
        drop-shadow(0px 0px 50px rgba(255, 255, 255, 0.4));
}



.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
}



.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 50%;
}

.theme-toggle-btn:hover {
    background-color: var(--glass-border);
    color: var(--accent);
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 2000;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-close {
    align-self: flex-end;
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-links a {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--text-primary);
}

.mobile-btn {
    margin-top: 1rem;
    text-align: center;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-color: var(--darker);
    padding-top: 80px;
    /* Offset for navbar */
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Subtle radial gradient to mimic a glowing center */
    background: radial-gradient(circle at center, #1a3e6b40 0%, transparent 70%);
    pointer-events: none;
}

/* Adding an abstract shape for the hero background */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    filter: blur(100px);
    opacity: 0.4;
    z-index: 0;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
    color: var(--white);
    animation: slideUp 0.8s ease-out;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(33, 150, 243, 0.15);
    border: 1px solid rgba(33, 150, 243, 0.3);
    color: var(--accent);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--white);
}


.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.store-badge-link {
    display: inline-block;
    transition: var(--transition);
}

.store-badge-link:hover {
    transform: translateY(-3px) scale(1.02);
}

.store-badge {
    height: 55px;
    /* Adjust based on desired size */
    width: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.store-badge-google {
    height: 75px;
    /* Adjusted height */
    transform: scale(1.35);
    /* Scale up to bypass internal transparent padding */
    transform-origin: center;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: fadeIn 1.2s ease-out;
}

/* Phone Mockup Styling */
.hero-mockup {
    position: relative;
    z-index: 10;
    max-width: 280px;
    animation: floating 4s ease-in-out infinite;
    transform-style: preserve-3d;
}

.app-screenshot {
    width: 100%;
    height: auto;
    border-radius: 30px;
    /* Inner radius */
    display: block;
}

@keyframes floating {
    0% {
        transform: translateY(0px) rotate3d(0, 1, 0, -5deg);
    }

    50% {
        transform: translateY(-15px) rotate3d(0, 1, 0, -5deg);
    }

    100% {
        transform: translateY(0px) rotate3d(0, 1, 0, -5deg);
    }
}

/* Device Mockup Structure */
.iphone-frame {
    position: relative;
    background: #000;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(33, 150, 243, 0.2);
    border: 2px solid #333;
    display: inline-block;
    overflow: hidden;
    /* Ensure inner image borders curve perfectly */
}

/* The Notch */
.iphone-notch {
    position: absolute;
    top: 9px;
    left: 50%;
    transform: translateX(-50%);
    width: 45%;
    height: 25px;
    background-color: #000;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 2;
}

/* Gallery Frame specific overrides */
.gallery-frame {
    border-radius: 35px;
    padding: 10px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.gallery-frame:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.gallery-frame .iphone-notch {
    top: 8px;
    height: 20px;
}

/* Steps Section */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    z-index: 1;
    border: 1px solid var(--border-color);
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.step-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(33, 150, 243, 0.1);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: var(--transition);
}

.step-card:hover .step-icon {
    background: var(--accent);
    color: var(--white);
    transform: scale(1.1);
}

.step-card:hover .step-icon .fa-map-marker-alt {
    animation: bounce-marker 1s ease infinite;
}

.step-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.step-card p {
    color: var(--text-secondary);
}

/* Connect steps with a line on desktop */
@media (min-width: 992px) {
    .step-card:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 25%;
        right: -15%;
        width: 30%;
        height: 2px;
        background: border-box;
        border-top: 2px dashed rgba(33, 150, 243, 0.3);
        z-index: -1;
    }
}

/* Features Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 20px rgba(33, 150, 243, 0.15);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--accent);
    flex-shrink: 0;
}

.feature-item h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.feature-item p {
    color: var(--text-light);
}

/* App Screenshots Gallery */
.app-screenshots.bg-white {
    background-color: var(--white);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    align-items: center;
}

.screenshot-wrap {
    display: flex;
    flex-direction: column;
    /* to handle titles below */
    align-items: center;
}

.app-screenshot-thumbnail {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 25px;
    display: block;
}

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.about-text {
    flex: 1;
}

.about-container {
    color: var(--white); /* Force white text in this specific container */
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: inherit; /* Allow .bg-gradient's white color to flow through */
}

.about-stats {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-box {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
}

.stat-box p {
    color: var(--white);
    margin-bottom: 0;
}

.stat-box h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

/* CTA Section */
.cta {
    background-color: var(--light);
    text-align: center;
}

.cta-container h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.cta-container p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

/* Footer */
.footer {
    background-color: var(--darker);
    color: var(--text-light);
    padding-top: 5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Even columns for cleaner alignment */
    gap: 2rem;
    margin-bottom: 4rem;
    align-items: flex-start;
}

.footer-brand .logo-footer {
    margin-bottom: 1rem;
    display: block;
}

.footer-brand p {
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent);
}

.footer-links h4 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    margin-top: 0;
    /* Align with top of grid container */
}

.footer-links a {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes bounce-marker {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Interactivity Classes */
.magnetic-content {
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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


/* Contact Page Styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    padding-top: 220px;
    padding-bottom: 80px;
}

.contact-info h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.method-icon {
    width: 50px;
    height: 50px;
    background: rgba(33, 150, 243, 0.1);
    color: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.method-details h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.method-details p,
.method-details a {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Contact Form */
.contact-form-card {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #edf2f7;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    background-color: var(--accent);
    color: var(--white);
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 1rem;
}

.submit-btn:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}


/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .about-container {
        flex-direction: column;
    }

    .about-stats {
        width: 100%;
    }
}

@media (max-width: 992px) {
    /* logo naturally sized */

    .nav-links,
    .nav-actions .btn {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        padding-top: 4rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero p {
        margin: 0 auto 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .steps-grid,
    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .logo-img {
        height: 45px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }
}