/* 
  Small Tiny Apps - Design System & Styles 
*/

:root {
    /* Color Palette - Minimalist Tech Dark Theme */
    --bg-primary: #0a0a0c;
    --bg-secondary: #141417;
    --bg-card: rgba(255, 255, 255, 0.03);
    
    --text-primary: #f8f9fa;
    --text-secondary: #b0b0b8; /* Enhanced contrast */
    
    --accent-primary: #818cf8; /* Enhanced contrast */
    --accent-hover: #4f46e5;
    --accent-gradient-start: #8b5cf6;
    --accent-gradient-end: #3b82f6;

    /* Border & Glows */
    --border-color: rgba(255, 255, 255, 0.08);
    --glow-primary: rgba(99, 102, 241, 0.15);
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-heading: 'Outfit', var(--font-sans);
    
    /* Spacing & Layout */
    --max-width: 1200px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    
    /* Animation */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

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

.text-gradient {
    background: linear-gradient(135deg, var(--accent-gradient-start), var(--accent-gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Sticky Header */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(10, 10, 12, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: transform var(--transition-medium);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    border-radius: 6px;
    object-fit: contain;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

nav ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

nav a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

nav a:hover:not(.btn-primary) {
    color: var(--text-primary);
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: white !important;
    border: none;
    box-shadow: 0 4px 14px 0 var(--glow-primary);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px 0 rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-secondary);
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 180px 0 120px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(3rem, 5vw, 4.5rem);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-background {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vw;
    background: radial-gradient(circle, rgba(99,102,241,0.1) 0%, rgba(10,10,12,0) 50%);
    z-index: 1;
    pointer-events: none;
}

/* Apps Section */
.apps-section {
    padding: var(--spacing-xl) 0;
    background-color: var(--bg-secondary);
}

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

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

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

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* App Card */
.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 1.5rem;
    transition: all var(--transition-medium);
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.app-icon-placeholder, .app-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 1.5rem;
}

.app-icon {
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.gradient-1 { background: linear-gradient(135deg, #f43f5e, #fb923c); }
.gradient-2 { background: linear-gradient(135deg, #10b981, #3b82f6); }
.gradient-3 { background: linear-gradient(135deg, #8b5cf6, #d946ef); }

.app-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.app-details h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.app-category {
    font-size: 0.85rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 1rem;
}

.app-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    flex-grow: 1;
}

.app-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.app-btn {
    width: 100%;
    text-align: center;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.app-privacy-link {
    font-size: 0.8rem;
    color: var(--text-secondary);
    align-self: center;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.app-privacy-link:hover {
    color: var(--text-primary);
}

/* Privacy Policy Page */
.policy-section {
    padding: 160px 0 80px; /* Account for sticky header */
    min-height: 80vh;
}

.policy-container {
    max-width: 800px; /* Narrower width for readable text */
    margin: 0 auto;
}

.policy-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.policy-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.last-updated {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.policy-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
}

.policy-content h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.policy-content h3:first-child {
    margin-top: 0;
}

.policy-content p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.7;
}

.policy-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.font-bold {
    font-weight: 600;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    background-color: var(--bg-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-secondary);
}

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

.footer-bottom {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    nav ul {
        display: none; /* simple hidden nav for mobile without JS */
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* App Landing Pages Generic Styles */
.app-landing-hero {
    position: relative;
    padding: 160px 0 80px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.app-hero-container {
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.app-hero-text {
    flex: 1;
}

.app-hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.promo-video {
    width: 100%;
    max-width: 320px; /* Kept it sleek like a phone frame */
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    transition: all var(--transition-medium);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

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

.app-gallery-section {
    padding: var(--spacing-xl) 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.gallery-img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-medium);
}

.gallery-img:hover {
    transform: scale(1.03);
    z-index: 2;
    position: relative;
}

/* Showcase Layout */
.showcase-rows {
    display: flex;
    flex-direction: column;
    gap: 6rem;
    padding: 2rem 0;
}

.showcase-row {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.showcase-row.reverse {
    flex-direction: row-reverse;
}

.showcase-text {
    flex: 1;
}

.showcase-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.showcase-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.showcase-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.showcase-image img, .cta-image img {
    width: 100%;
    max-width: 300px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform var(--transition-medium);
    
    /* Artificially crop the top header and subtext out of the screenshots */
    /* aspect-ratio provided inline per image for precise cropping */
    object-fit: cover;
    object-position: bottom;
}

.showcase-image img:hover, .cta-image img:hover {
    transform: translateY(-10px);
}

@media (max-width: 768px) {
    .app-hero-container, .cta-container, .showcase-row, .showcase-row.reverse {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .app-landing-hero .hero-actions, .cta-container .hero-actions {
        justify-content: center !important;
    }

    .showcase-image img {
        max-width: 260px;
    }
}

/* Contact Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-medium);
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem;
    max-width: 90%;
    width: 400px;
    text-align: center;
    transform: translateY(20px);
    transition: transform var(--transition-medium);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
}
.modal-close:hover {
    color: var(--text-primary);
}
.modal-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
