/* Ubica - Family Location Sharing App - Stylesheet */

:root {
    --primary: #007AFF;
    --primary-dark: #0056B3;
    --primary-light: #E5F1FF;
    --secondary: #5856D6;
    --text-main: #1C1C1E;
    --text-muted: #636366;
    --bg-light: #FFFFFF;
    --bg-soft: #F2F2F7;
    --white: #FFFFFF;
    --border: #E5E5EA;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --radius: 16px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

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

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

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }

@media (max-width: 768px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.75rem; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary-light);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

header.scrolled {
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-links {
    display: flex;
    gap: 32px;
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    background: radial-gradient(circle at top right, var(--primary-light), transparent 40%);
    overflow: hidden;
}

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

.hero-content h1 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

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

.hero-btns {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
}

.map-animation {
    width: 100%;
    aspect-ratio: 1;
    background-color: var(--bg-soft);
    border-radius: 40px;
    position: relative;
    box-shadow: var(--shadow);
    border: 8px solid var(--white);
    overflow: hidden;
    perspective: 1000px;
}

/* 3D Locations */
.map-location {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.location-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.15));
    transform: rotateX(20deg) translateZ(10px);
    margin-bottom: 0px; /* Reduced from 4px to make text closer */
}

.map-location.cafe .location-icon {
    transform: rotateX(25deg) rotateY(-10deg) translateZ(20px);
    filter: drop-shadow(0 15px 15px rgba(0,0,0,0.2));
}

.map-location span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255,255,255,0.8);
    padding: 2px 8px;
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

.map-footer {
    position: absolute;
    bottom: -25px;
    right: 10px;
    font-size: 0.64rem; /* 20% smaller than 0.8rem */
    font-weight: 700;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
    padding: 3px 10px;
    border-radius: 100px;
    backdrop-filter: blur(4px);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Notification Bubble */
.map-notification {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: white;
    padding: 10px 20px;
    border-radius: 100px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
    white-space: nowrap;
    border: 1px solid var(--border);
    animation: notification-cycle 12s infinite;
}

.notif-dot {
    width: 8px;
    height: 8px;
    background-color: #34C759;
    border-radius: 50%;
}

.notif-text {
    font-size: 0.875rem;
    font-weight: 600;
}

@keyframes notification-cycle {
    0%, 15%, 100% { transform: translateX(-50%) translateY(-100px); opacity: 0; }
    20%, 35% { transform: translateX(-50%) translateY(0); opacity: 1; } /* Son arrived at School */
    40%, 55% { transform: translateX(-50%) translateY(-100px); opacity: 0; }
    60%, 75% { transform: translateX(-50%) translateY(0); opacity: 1; } /* Dad arrived at Office */
    80%, 95% { transform: translateX(-50%) translateY(-100px); opacity: 0; }
}

/* Simple CSS Map Animation */
.map-bg {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, #e0e0e0 2px, transparent 2px),
        radial-gradient(circle at 70% 60%, #e0e0e0 2px, transparent 2px),
        linear-gradient(#f0f0f0 1px, transparent 1px),
        linear-gradient(90deg, #f0f0f0 1px, transparent 1px);
    background-size: 40px 40px;
}

.user-marker {
    position: absolute;
    width: 44px;
    height: 44px;
    background-color: var(--white);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary);
    z-index: 5;
}

.user-marker.mom { animation: mom-move 12s infinite ease-in-out; }
.user-marker.son { animation: son-move 12s infinite ease-in-out; }
.user-marker.dad { animation: dad-move 12s infinite ease-in-out; }

@keyframes mom-move {
    0%, 100% { top: 20%; left: 20%; } /* Home */
    20%, 30% { top: 15%; left: 60%; } /* Cafe */
    50% { top: 25%; left: 70%; } /* Shopping? */
    75% { top: 40%; left: 50%; } /* Moving */
}

@keyframes son-move {
    0%, 20% { top: 20%; left: 20%; } /* Home */
    40%, 60% { top: 70%; left: 30%; } /* School */
    80%, 100% { top: 20%; left: 20%; } /* Home */
}

@keyframes dad-move {
    0%, 30% { top: 20%; left: 20%; } /* Home */
    40%, 55% { top: 15%; left: 60%; } /* Cafe */
    65%, 85% { top: 45%; left: 75%; } /* Office */
    95%, 100% { top: 20%; left: 20%; } /* Home */
}

.user-marker img,
.user-marker .marker-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    z-index: 2;
}

.user-marker img {
    width: 30px;
    height: 30px;
}

.marker-label {
    position: absolute;
    bottom: -25px;
    background: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    white-space: nowrap;
    border: 1px solid var(--border);
}

/* Update notification text via JS */
.map-notification::after {
    display: none;
}
.notif-text { 
    display: block; 
}

.pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: pulse-anim 2s infinite;
}

@keyframes pulse-anim {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Features Section */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 40px;
    background-color: var(--bg-soft);
    border-radius: var(--radius);
    transition: var(--transition);
}

.feature-card:hover {
    background-color: var(--white);
    box-shadow: var(--shadow);
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 1.5rem;
}

/* Pricing Section */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.pricing-card {
    padding: 40px 30px;
    background-color: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: scale(1.05);
    z-index: 2;
}

.pricing-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 1.5rem 0;
}

.price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pricing-features {
    margin-bottom: 2rem;
    flex-grow: 1;
}

.pricing-features li {
    margin-bottom: 12px;
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.pricing-disclaimer {
    margin-top: 40px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.125rem;
}

.faq-answer {
    margin-top: 16px;
    color: var(--text-muted);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

/* Footer */
footer {
    background-color: var(--bg-soft);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-info p {
    color: var(--text-muted);
    margin: 20px 0;
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: 24px;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a {
    color: var(--text-muted);
}

.footer-links ul li a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Legal Pages */
.legal-content {
    padding: 140px 0 100px;
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h1 {
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin: 2.5rem 0 1rem;
    font-size: 1.5rem;
}

.legal-content p, .legal-content li {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

.legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-btns {
        justify-content: center;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}
