/*
 * Ruby App Landing Page - Custom Styles
 * Design inspired by Clue app: Clean, minimal, trustworthy
 * Mobile-first approach
 */

:root {
    /* Color Palette - Clean & Warm */
    --ruby-primary: #E85D75;       /* Ruby pink/red */
    --ruby-primary-dark: #D14663;
    --ruby-primary-light: #FFE5E9;

    --ruby-secondary: #4A90E2;     /* Trust blue */
    --ruby-secondary-dark: #357ABD;

    --ruby-neutral-50: #FAFAFA;
    --ruby-neutral-100: #F5F5F5;
    --ruby-neutral-200: #EEEEEE;
    --ruby-neutral-300: #E0E0E0;
    --ruby-neutral-400: #BDBDBD;
    --ruby-neutral-600: #757575;
    --ruby-neutral-700: #616161;
    --ruby-neutral-800: #424242;
    --ruby-neutral-900: #212121;

    --ruby-dark-purple: #4A1942;  /* Dark purple from logo */

    --ruby-success: #66BB6A;
    --ruby-warning: #FFA726;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.12);
}

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

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--ruby-neutral-800);
    background-color: #FFFFFF;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--ruby-neutral-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--spacing-sm);
}

.lead {
    font-size: 1.125rem;
    color: var(--ruby-neutral-600);
}

section {
    padding: var(--spacing-3xl) 0;
}

/* Header/Navigation */
.navbar {
    padding: var(--spacing-md) 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--ruby-primary);
    text-decoration: none;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.brand-text {
    color: var(--ruby-primary);
}

.nav-link {
    color: var(--ruby-neutral-700);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-md);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--ruby-primary);
}

.btn-download {
    background-color: var(--ruby-primary);
    color: white;
    border: none;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-sm);
}

.btn-download:hover {
    background-color: var(--ruby-primary-dark);
    color: white;
}

/* Hero Section */
.hero-section {
    padding: 1rem 0 var(--spacing-2xl);
    background: linear-gradient(135deg, var(--ruby-neutral-50) 0%, var(--ruby-primary-light) 100%);
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    color: var(--ruby-neutral-900);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--ruby-neutral-600);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

.hero-badges {
    display: flex;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.badge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--ruby-neutral-700);
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-item img {
    max-height: 30px;
    width: auto;
}

.badge-item svg {
    color: var(--ruby-primary);
    width: 24px;
    height: 24px;
}

.download-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    align-items: center;
}

.btn-store-badge {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn-store-badge:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-store-badge img {
    height: 40px;
    width: auto;
    display: block;
}

.hero-image {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.phone-mockup {
    max-width: 80%;
    max-height: 888px; /* Match the previous hero-phone-2.png height to preserve layout */
    width: auto;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
}

/* Stats Section */
.stats-section {
    background-color: white;
    padding: var(--spacing-xl) 0;
}

.stat-item {
    padding: var(--spacing-md);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--ruby-primary);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 1rem;
    color: var(--ruby-neutral-600);
    margin-bottom: 0;
}

/* Section Headers */
.section-header {
    margin-bottom: var(--spacing-2xl);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ruby-neutral-900);
}

.section-header .lead {
    font-size: 1.125rem;
    color: var(--ruby-neutral-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Features Section - 8 Domains */
.features-section {
    background-color: white;
}

.feature-card {
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-lg);
    border: 2px solid var(--ruby-neutral-200);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--ruby-primary-light);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ruby-primary-light);
    border-radius: var(--radius-md);
}

.domain-icon {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--ruby-neutral-900);
}

.feature-description {
    font-size: 0.875rem;
    color: var(--ruby-neutral-600);
    margin-bottom: 0;
}

/* Screenshots Showcase */
.showcase-section {
    background: var(--ruby-neutral-50);
}

.screenshot-card {
    text-align: center;
}

.screenshot-card img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-md);
}

.screenshot-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ruby-neutral-900);
}

.screenshot-card p {
    color: var(--ruby-neutral-600);
    margin-bottom: 0;
}

/* Key Features Section */
.key-features-section {
    background: white;
}

.key-feature-card {
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    background: var(--ruby-neutral-50);
    height: 100%;
    transition: transform 0.2s ease;
}

.key-feature-card:hover {
    transform: translateY(-4px);
}

.key-feature-icon {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-sm);
}

.key-feature-icon svg {
    color: var(--ruby-primary);
}

.key-feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.key-feature-card p {
    font-size: 0.875rem;
    color: var(--ruby-neutral-600);
    margin-bottom: 0;
}

/* Privacy Section */
.privacy-section {
    background: linear-gradient(135deg, var(--ruby-primary-light) 0%, white 100%);
    padding: var(--spacing-3xl) 0;
}

.privacy-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.privacy-features {
    margin-top: var(--spacing-xl);
}

.privacy-feature-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.privacy-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--ruby-primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.privacy-icon svg {
    color: var(--ruby-primary);
}

.privacy-feature-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.privacy-feature-item p {
    font-size: 0.875rem;
    color: var(--ruby-neutral-600);
    margin-bottom: 0;
}

/* Download CTA Section */
.download-cta-section {
    background: linear-gradient(135deg, var(--ruby-primary) 0%, var(--ruby-primary-dark) 100%);
    padding: var(--spacing-3xl) 0;
    color: white;
}

.download-cta-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
}

.download-cta-section h2 {
    color: white;
    font-size: 2.5rem;
}

.download-cta-section .lead {
    color: rgba(255, 255, 255, 0.9);
}

.download-buttons-large {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    align-items: center;
}

.download-mockup {
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.3));
}

/* Bug Reporting Section */
.bug-reporting-section {
    background: linear-gradient(135deg, #F3E8F2 0%, var(--ruby-primary-light) 100%);
    padding: var(--spacing-3xl) 0;
}

.bug-reporting-icon {
    margin-bottom: var(--spacing-lg);
    color: var(--ruby-primary);
}

.bug-reporting-icon svg {
    width: 64px;
    height: 64px;
}

.bug-reporting-section h2 {
    color: var(--ruby-neutral-900);
    font-size: 2.25rem;
    font-weight: 700;
}

.bug-reporting-subtitle {
    font-size: 1.25rem;
    color: var(--ruby-neutral-700);
    font-weight: 500;
}

.bug-reporting-text {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--ruby-neutral-600);
}

.btn-bug-report {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--ruby-primary) 0%, var(--ruby-primary-dark) 100%);
    border: none;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-bug-report:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
    text-decoration: none;
}

.bug-reporting-note {
    font-size: 0.875rem;
    color: var(--ruby-neutral-600);
    font-style: italic;
}

/* Footer */
.footer {
    background-color: var(--ruby-dark-purple);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-sm);
}

.footer img[alt*="Logo"] {
    height: 24px;
    width: auto;
}

.footer-heading {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: white;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-sm);
    font-size: 0.75rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.25rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.75rem;
}

.footer-links a:hover {
    color: white;
}

.footer-downloads {
    display: flex;
    flex-direction: row;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.footer-downloads .btn-store-badge img {
    height: 28px;
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: var(--spacing-sm) 0;
}

.footer-bottom {
    padding-top: var(--spacing-sm);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.25rem;
    font-size: 0.7rem;
}

.footer-bottom img {
    height: 20px !important;
}

.footer-notice {
    font-size: 0.65rem;
    opacity: 0.5;
}

.footer-legal-links {
    font-size: 0.7rem;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Fix for row overflow in mobile - prevent content touching screen edges */
@media (max-width: 767px) {
    .row {
        margin-left: 0;
        margin-right: 0;
    }

    .row > * {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }
}

/* Responsive Design - Mobile First */
@media (max-width: 991px) {
    /* Hero section - reorganize elements in mobile */
    .hero-section .container > .row {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "subtitle"
            "badges"
            "image"
            "buttons";
    }

    .hero-content {
        grid-area: unset;
        display: contents;
    }

    .hero-title {
        grid-area: title;
    }

    .hero-subtitle {
        grid-area: subtitle;
    }

    .hero-badges {
        grid-area: badges;
    }

    .hero-image {
        grid-area: image;
        margin: var(--spacing-lg) 0;
    }

    .download-buttons {
        grid-area: buttons;
        flex-direction: row;
        justify-content: center;
    }

    /* Download CTA section - reorganize in mobile */
    .download-cta-section .download-cta-card > .row {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "cta-title"
            "cta-subtitle"
            "cta-image"
            "cta-buttons";
    }

    .download-cta-section .col-lg-6.text-center.text-lg-start {
        grid-area: unset;
        display: contents;
    }

    .download-cta-section .col-lg-6.text-center {
        grid-area: cta-image;
        margin: var(--spacing-lg) 0;
    }

    .download-cta-section h2 {
        grid-area: cta-title;
    }

    .download-cta-section .lead {
        grid-area: cta-subtitle;
    }

    .download-buttons-large {
        grid-area: cta-buttons;
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    section {
        padding: var(--spacing-2xl) 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (min-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .section-header h2 {
        font-size: 3rem;
    }
}

/* Accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--ruby-primary);
    outline-offset: 2px;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading States */
img {
    max-width: 100%;
    height: auto;
}

/* Placeholder Images - Temporary */
img[src*="placeholder"] {
    background: var(--ruby-neutral-200);
    border: 2px dashed var(--ruby-neutral-400);
    display: block;
}
