/* ============================================
   WakeWise - Midnight Observatory Theme
   ============================================ */

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

:root {
    /* Night sky palette */
    --void: #05080f;
    --midnight: #0a1020;
    --deep: #101828;
    --slate: #1e293b;

    /* Text */
    --text-bright: #f1f5f9;
    --text-dim: #94a3b8;
    --text-muted: #64748b;

    /* Accent - warm amber for "wake" */
    --amber: #f59e0b;
    --amber-glow: rgba(245, 158, 11, 0.15);
    --amber-soft: #fbbf24;

    /* Celestial accents */
    --nebula: rgba(139, 92, 246, 0.08);
    --star: rgba(255, 255, 255, 0.9);

    /* Typography */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'Outfit', -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-body);
    background: var(--void);
    color: var(--text-dim);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    font-weight: 300;
}

/* ============================================
   Animated Star Field
   ============================================ */

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(1px 1px at 20px 30px, var(--star), transparent),
        radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 90px 40px, var(--star), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.2px 1.2px at 160px 120px, var(--star), transparent),
        radial-gradient(1px 1px at 200px 50px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1.5px 1.5px at 250px 160px, var(--star), transparent),
        radial-gradient(1px 1px at 300px 90px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.3px 1.3px at 350px 200px, var(--star), transparent),
        radial-gradient(1px 1px at 400px 130px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 450px 60px, var(--star), transparent),
        radial-gradient(1.4px 1.4px at 500px 180px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 80px 200px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.2px 1.2px at 180px 250px, var(--star), transparent),
        radial-gradient(1px 1px at 280px 220px, rgba(255,255,255,0.6), transparent);
    background-size: 550px 300px;
    animation: twinkle 8s ease-in-out infinite alternate;
}

.stars--secondary {
    background-image:
        radial-gradient(1px 1px at 50px 100px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.2px 1.2px at 150px 50px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 220px 180px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1.3px 1.3px at 320px 70px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 420px 150px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.1px 1.1px at 480px 220px, rgba(255,255,255,0.5), transparent);
    background-size: 600px 280px;
    animation: twinkle 12s ease-in-out infinite alternate-reverse;
    opacity: 0.6;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ============================================
   Grain Texture Overlay
   ============================================ */

.grain {
    position: fixed;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    animation: grain 0.5s steps(1) infinite;
}

@keyframes grain {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-1%, -1%); }
    20% { transform: translate(1%, 1%); }
    30% { transform: translate(-1%, 1%); }
    40% { transform: translate(1%, -1%); }
    50% { transform: translate(-1%, 0%); }
    60% { transform: translate(1%, 0%); }
    70% { transform: translate(0%, 1%); }
    80% { transform: translate(0%, -1%); }
    90% { transform: translate(1%, 1%); }
}

/* ============================================
   Layout
   ============================================ */

.page-wrapper {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Header
   ============================================ */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    animation: fadeDown 0.8s ease-out;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-bright);
}

.logo-moon {
    width: 28px;
    height: 28px;
    color: var(--amber-soft);
    transition: transform 0.4s ease;
}

.logo:hover .logo-moon {
    transform: rotate(-15deg);
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.nav-link:hover {
    color: var(--text-bright);
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 3rem 6rem;
    min-height: 70vh;
}

.hero-content {
    max-width: 540px;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--amber);
    margin-bottom: 1.5rem;
    animation: fadeUp 0.7s ease-out 0.2s both;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.75rem, 6vw, 4.5rem);
    font-weight: 400;
    line-height: 1.1;
    color: var(--text-bright);
    margin-bottom: 1.75rem;
    animation: fadeUp 0.7s ease-out 0.35s both;
}

.hero-title em {
    font-style: italic;
    color: var(--amber-soft);
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    animation: fadeUp 0.7s ease-out 0.5s both;
}

.hero-status {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    animation: fadeUp 0.7s ease-out 0.65s both;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: var(--amber);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--amber-glow); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px transparent; }
}

/* Hero Visual - Moon */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeUp 1s ease-out 0.4s both;
}

.moon-container {
    position: relative;
    width: 280px;
    height: 280px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.moon {
    position: relative;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #d4a843 100%);
    box-shadow:
        0 0 60px rgba(253, 230, 138, 0.3),
        0 0 120px rgba(253, 230, 138, 0.15),
        inset -20px -10px 40px rgba(0, 0, 0, 0.15);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.moon-glow {
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(253, 230, 138, 0.15) 0%, transparent 70%);
}

.moon-surface {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background-image:
        radial-gradient(circle at 30% 40%, rgba(0,0,0,0.05) 0%, transparent 20%),
        radial-gradient(circle at 60% 30%, rgba(0,0,0,0.04) 0%, transparent 15%),
        radial-gradient(circle at 45% 70%, rgba(0,0,0,0.06) 0%, transparent 18%),
        radial-gradient(circle at 75% 55%, rgba(0,0,0,0.03) 0%, transparent 12%);
}

.moon-shadow {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(to left, transparent 40%, rgba(10, 16, 32, 0.7) 100%);
}

.orbit-ring {
    position: absolute;
    width: 220px;
    height: 220px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    animation: spin 30s linear infinite;
}

.orbit-ring--outer {
    width: 280px;
    height: 280px;
    border-color: rgba(255, 255, 255, 0.03);
    animation-duration: 45s;
    animation-direction: reverse;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   Features Section
   ============================================ */

.features {
    padding: 5rem 3rem;
    background: linear-gradient(180deg, transparent 0%, var(--nebula) 50%, transparent 100%);
}

.features-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3.5rem;
}

.features-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-bright);
    white-space: nowrap;
}

.features-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--slate) 0%, transparent 100%);
}

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

.feature-card {
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.35s ease;
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    transform: translateY(-4px);
}

.feature-number {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: var(--amber);
    margin-bottom: 1.25rem;
}

.feature-name {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 0.875rem;
}

.feature-text {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-dim);
}

/* ============================================
   Principles Section
   ============================================ */

.principles {
    padding: 4rem 3rem 6rem;
}

.principle {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    border-left: 2px solid var(--amber);
    background: linear-gradient(90deg, var(--amber-glow) 0%, transparent 50%);
}

.principle-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    color: var(--amber);
}

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

.principle-content h3 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}

.principle-content p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-dim);
}

/* ============================================
   Footer
   ============================================ */

.footer {
    margin-top: auto;
    padding: 2.5rem 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 1.125rem;
    color: var(--text-muted);
}

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

.footer-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: color 0.25s ease;
}

.footer-nav a:hover {
    color: var(--text-bright);
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* ============================================
   Privacy Policy Page
   ============================================ */

.policy-content {
    max-width: 680px;
    padding: 3rem 3rem 5rem;
}

.policy-content h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}

.last-updated {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.policy-content section {
    margin-bottom: 2.5rem;
}

.policy-content h2 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 400;
    color: var(--text-bright);
    margin-bottom: 1rem;
}

.policy-content p {
    color: var(--text-dim);
    margin-bottom: 0.75rem;
    line-height: 1.75;
}

.policy-content ul {
    list-style: none;
    padding-left: 0;
}

.policy-content li {
    color: var(--text-dim);
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.625rem;
    line-height: 1.7;
}

.policy-content li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 4px;
    height: 4px;
    background: var(--amber);
    border-radius: 50%;
}

.policy-content a {
    color: var(--amber);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.policy-content a:hover {
    opacity: 0.8;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .hero-content {
        max-width: 100%;
        order: 2;
    }

    .hero-visual {
        order: 1;
    }

    .moon-container {
        width: 200px;
        height: 200px;
    }

    .moon {
        width: 100px;
        height: 100px;
    }

    .orbit-ring {
        width: 160px;
        height: 160px;
    }

    .orbit-ring--outer {
        width: 200px;
        height: 200px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 1.5rem;
    }

    .hero {
        padding: 2rem 1.5rem 4rem;
    }

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

    .features {
        padding: 3rem 1.5rem;
    }

    .principles {
        padding: 2rem 1.5rem 4rem;
    }

    .principle {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    .footer {
        padding: 2rem 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .policy-content {
        padding: 2rem 1.5rem;
    }

    .policy-content h1 {
        font-size: 2rem;
    }
}
