/**
 * Ghost Ink Marketing Site
 *
 * WHY: Minimal, zen-inspired design matching the app's warm gray
 * aesthetic with subtle noise texture and calming visual hierarchy.
 */

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    /* Colors - matching app's productionSettings */
    --bg-primary: #9a9996;
    --bg-dark: #7a7976;
    --text-heading: #1e1e1e;
    --text-body: #3d3d3d;
    --text-muted: #5a5a5a;
    --white: #ffffff;
    --white-soft: rgba(255, 255, 255, 0.9);
    --ink: rgba(30, 30, 30, 0.7);

    /* Typography */
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-base: 18px;
    --line-height: 1.6;

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

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-slow: 600ms ease-out;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-system);
    line-height: var(--line-height);
    color: var(--text-body);
    background-color: var(--bg-primary);
    min-height: 100vh;
    position: relative;
}

/* Subtle noise texture matching app's 5% opacity */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    z-index: 0;
}

/* Accessibility: Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-md);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.logo {
    font-size: clamp(3rem, 12vw, 5rem);
    font-weight: 300;
    letter-spacing: 0.05em;
    color: var(--text-heading);
    margin-bottom: var(--space-xs);
}

.tagline {
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 300;
    color: var(--text-heading);
    margin-bottom: var(--space-sm);
    letter-spacing: 0.1em;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto var(--space-lg);
}

/* Fading ink circle around hero content */
.ink-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(500px, 80vw);
    height: min(500px, 80vw);
    border-radius: 50%;
    pointer-events: none;

    /* Partial arc using conic gradient */
    background: conic-gradient(
        from 200deg,
        transparent 0deg,
        rgba(30, 30, 30, 0.08) 30deg,
        rgba(30, 30, 30, 0.12) 90deg,
        rgba(30, 30, 30, 0.08) 150deg,
        transparent 180deg,
        transparent 360deg
    );

    /* Soft edges - ring shape with feathered edges */
    mask-image: radial-gradient(
        circle,
        transparent 45%,
        black 48%,
        black 52%,
        transparent 55%
    );
    -webkit-mask-image: radial-gradient(
        circle,
        transparent 45%,
        black 48%,
        black 52%,
        transparent 55%
    );

    animation: fade-circle 12s ease-in-out infinite;
}

@keyframes fade-circle {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(0deg) scale(0.9);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(10deg) scale(1);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(20deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(30deg) scale(0.9);
    }
}

/* ============================================
   Play Store Badge
   ============================================ */
.play-store-badge {
    display: inline-block;
    transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.play-store-badge:hover {
    transform: scale(1.05);
}

.play-store-badge:active {
    transform: scale(0.98);
}

.play-store-badge img {
    display: block;
    height: auto;
}

/* ============================================
   Features Section
   ============================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
    padding: var(--space-xl) var(--space-md);
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.feature {
    text-align: center;
    padding: var(--space-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-sm);
    color: var(--text-heading);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: var(--space-xs);
}

.feature p {
    color: var(--text-muted);
    max-width: 300px;
    margin: 0 auto;
}

/* ============================================
   How It Works Section
   ============================================ */
.how-it-works {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    background: rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 1;
}

.how-it-works h2 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--text-heading);
    margin-bottom: var(--space-md);
}

.how-description {
    max-width: 600px;
    margin: 0 auto var(--space-md);
    font-size: 1.1rem;
    color: var(--text-body);
}

.how-quote {
    font-style: italic;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ============================================
   CTA Section
   ============================================ */
.cta {
    text-align: center;
    padding: var(--space-xl) var(--space-md);
    position: relative;
    z-index: 1;
}

.cta h2 {
    font-size: 2rem;
    font-weight: 300;
    color: var(--text-heading);
    margin-bottom: var(--space-md);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--space-sm);
}

.footer nav a {
    color: var(--text-body);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer nav a:hover {
    color: var(--text-heading);
    text-decoration: underline;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 480px) {
    :root {
        --font-size-base: 16px;
    }

    .hero {
        min-height: 90vh;
    }

    .features {
        padding: var(--space-lg) var(--space-sm);
    }

    .play-store-badge img {
        width: 180px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .ink-circle {
        animation: none;
        opacity: 0.5;
    }

    html {
        scroll-behavior: auto;
    }
}
