/* =============================================
   AltSleep — "Heaven in the Clouds"
   White, airy, soft lavender accents
   ============================================= */

:root {
    --bg: #FFFFFF;
    --bg-soft: #F8F7FC;
    --bg-accent: #F3F0FF;
    --bg-card: #FFFFFF;
    
    --text: #1E1B3A;
    --text-muted: #6B6888;
    --text-light: #9E9BB8;
    
    --lavender: #8B9CF7;
    --lavender-deep: #6B7BF7;
    --violet: #B4A7F5;
    --sky: #85C7DE;
    --peach: #E8A87C;
    --coral: #E07070;
    --sage: #A0D2A0;
    --blush: #F0E4FF;
    
    --gradient-primary: linear-gradient(135deg, #8B9CF7 0%, #B4A7F5 100%);
    --gradient-warm: linear-gradient(135deg, #E8A87C 0%, #E07070 100%);
    
    --radius: 14px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --shadow-soft: 0 2px 20px rgba(139, 156, 247, 0.08);
    --shadow-md: 0 8px 30px rgba(139, 156, 247, 0.12);
    --shadow-lg: 0 16px 50px rgba(139, 156, 247, 0.15);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(139,156,247,0.06);
    
    --font: 'Inter', -apple-system, system-ui, sans-serif;
    --nav-height: 72px;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

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

/* =============================================
   Typography
   ============================================= */

h1, h2, h3, h4, h5 { font-weight: 700; line-height: 1.15; color: var(--text); }
h1 { font-size: clamp(2.5rem, 5vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; }

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-warm {
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 580px; }

.section { padding: 120px 0; }
.section-accent { background: var(--bg-soft); }

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

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 16px;
    line-height: 1.7;
}

.section-tag {
    display: inline-block;
    padding: 5px 16px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--blush);
    color: var(--lavender-deep);
    margin-bottom: 16px;
}

.tag-alert {
    background: #FDECEA;
    color: var(--coral);
}

/* =============================================
   Buttons
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 20px rgba(139,156,247,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(139,156,247,0.4);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid #E5E2F0;
}

.btn-ghost:hover {
    border-color: var(--lavender);
    color: var(--lavender-deep);
    background: rgba(139,156,247,0.04);
}

.btn-sm { padding: 8px 20px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }

/* =============================================
   Navigation
   ============================================= */

#nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all 0.3s ease;
}

#nav.scrolled {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    box-shadow: 0 1px 0 rgba(0,0,0,0.04);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.15rem;
}

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

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* =============================================
   Hero — Heaven in the Clouds
   ============================================= */

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #F3F0FF 0%, #FFFFFF 70%);
    padding-top: var(--nav-height);
}

/* Cloud shapes */
.hero-clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.cloud {
    position: absolute;
    background: white;
    border-radius: 100px;
    opacity: 0.7;
    filter: blur(1px);
}

.cloud::before, .cloud::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 50%;
}

.cloud-1 {
    width: 240px; height: 60px;
    top: 15%; left: -5%;
    animation: cloud-drift 40s linear infinite;
}
.cloud-1::before { width: 100px; height: 80px; top: -40px; left: 30px; }
.cloud-1::after { width: 80px; height: 60px; top: -30px; left: 100px; }

.cloud-2 {
    width: 200px; height: 50px;
    top: 25%; right: -10%;
    opacity: 0.5;
    animation: cloud-drift 55s linear infinite reverse;
}
.cloud-2::before { width: 80px; height: 60px; top: -30px; left: 40px; }
.cloud-2::after { width: 60px; height: 50px; top: -25px; left: 90px; }

.cloud-3 {
    width: 160px; height: 40px;
    top: 40%; left: 10%;
    opacity: 0.3;
    animation: cloud-drift 65s linear infinite;
    animation-delay: -20s;
}
.cloud-3::before { width: 70px; height: 50px; top: -25px; left: 20px; }
.cloud-3::after { width: 50px; height: 40px; top: -20px; left: 70px; }

.cloud-4 {
    width: 300px; height: 70px;
    bottom: 25%; right: 5%;
    opacity: 0.4;
    animation: cloud-drift 50s linear infinite reverse;
    animation-delay: -10s;
}
.cloud-4::before { width: 120px; height: 90px; top: -50px; left: 50px; }
.cloud-4::after { width: 100px; height: 70px; top: -35px; left: 140px; }

@keyframes cloud-drift {
    from { transform: translateX(-200px); }
    to { transform: translateX(calc(100vw + 200px)); }
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,156,247,0.15) 0%, transparent 70%);
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    padding: 60px 24px 100px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 18px 6px 12px;
    border-radius: var(--radius-full);
    background: var(--blush);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--lavender-deep);
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out;
}

.badge-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--sage);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero-content h1 {
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.hero-bottom-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(transparent, white);
    pointer-events: none;
}

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

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

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

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    border: 1px solid #F0EDF8;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-card);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(139,156,247,0.2);
}

.feature-wide { grid-column: span 2; }

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--bg-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-card h3 { margin-bottom: 8px; }

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* =============================================
   Health Alerts
   ============================================= */

.alerts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.alert-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid #F0EDF8;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.alert-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.alert-card.alert-shared {
    grid-column: span 2;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.alert-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}

.pulse-red {
    background: var(--coral);
    box-shadow: 0 0 0 0 rgba(224,112,112,0.4);
    animation: pulse-alert 2s infinite;
}

.pulse-blue {
    background: var(--lavender);
    box-shadow: 0 0 0 0 rgba(139,156,247,0.4);
    animation: pulse-alert-blue 2s infinite;
}

@keyframes pulse-alert {
    0% { box-shadow: 0 0 0 0 rgba(224,112,112,0.4); }
    70% { box-shadow: 0 0 0 8px rgba(224,112,112,0); }
    100% { box-shadow: 0 0 0 0 rgba(224,112,112,0); }
}

@keyframes pulse-alert-blue {
    0% { box-shadow: 0 0 0 0 rgba(139,156,247,0.4); }
    70% { box-shadow: 0 0 0 8px rgba(139,156,247,0); }
    100% { box-shadow: 0 0 0 0 rgba(139,156,247,0); }
}

.alert-level {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--coral);
}

.alert-shared .alert-level { color: var(--lavender-deep); }

.alert-card h3 { margin-bottom: 8px; }

.alert-card p {
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.7;
}

.alert-preview {
    margin-top: 20px;
}

.phone-notif {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--bg-soft);
    border: 1px solid #EDE9F6;
}

.notif-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.notif-body strong {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 4px;
    color: var(--text);
}

.notif-body span {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.alert-note {
    margin-top: 12px;
    font-size: 0.8rem !important;
    font-style: italic;
    color: var(--text-light) !important;
}

/* =============================================
   Pricing
   ============================================= */

.pricing-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    border: 1px solid #F0EDF8;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.pricing-range {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.price-from, .price-to {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.price-dash {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 300;
}

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

.pricing-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 32px;
}

.pricing-includes {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    margin-bottom: 32px;
}

.pricing-includes li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text);
}

.pricing-options {
    margin-bottom: 24px;
}

.option-tag {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    background: var(--blush);
    color: var(--lavender-deep);
    font-size: 0.85rem;
    font-weight: 500;
}

.pricing-note {
    margin-top: 12px;
    font-size: 0.82rem;
    color: var(--text-light);
}

/* =============================================
   Signup
   ============================================= */

.section-signup {
    background: var(--bg-soft);
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1.5px solid #E5E2F0;
    background: white;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input::placeholder { color: var(--text-light); }

.form-group input:focus {
    outline: none;
    border-color: var(--lavender);
    box-shadow: 0 0 0 3px rgba(139,156,247,0.08);
}

.form-note {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.form-note a { color: var(--lavender-deep); text-decoration: none; }

.form-error {
    padding: 12px 16px;
    border-radius: var(--radius);
    background: #FFF5F5;
    border: 1px solid #FECACA;
    color: var(--coral);
    font-size: 0.9rem;
}

.form-success {
    padding: 12px 16px;
    border-radius: var(--radius);
    background: #F0FFF4;
    border: 1px solid #C6F6D5;
    color: #38A169;
    font-size: 0.9rem;
}

/* =============================================
   FAQ
   ============================================= */

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    border: 1px solid #F0EDF8;
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.3s;
    background: var(--bg-card);
}

.faq-item.open { border-color: rgba(139,156,247,0.3); }

.faq-q {
    width: 100%;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
}

.faq-q::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-light);
    transition: transform 0.3s, color 0.3s;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item.open .faq-q::after {
    transform: rotate(45deg);
    color: var(--lavender-deep);
}

.faq-q:hover { background: var(--bg-soft); }

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-a {
    max-height: 200px;
    padding: 0 24px 20px;
}

.faq-a p {
    color: var(--text-muted);
    font-size: 0.93rem;
    line-height: 1.7;
}

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

#footer {
    padding: 64px 0 32px;
    border-top: 1px solid #F0EDF8;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 12px;
}

.footer-links { display: flex; gap: 64px; }

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h5 {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #F0EDF8;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-light);
}

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

@media (max-width: 768px) {
    .nav-links { display: none; }
    
    .features-grid { grid-template-columns: 1fr; }
    .feature-wide { grid-column: span 1; }
    .alerts-grid { grid-template-columns: 1fr; }
    .alert-card.alert-shared { grid-column: span 1; }
    
    .form-row { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 40px; }
    .section { padding: 80px 0; }
    
    .pricing-card { padding: 32px 24px; }
    .price-from, .price-to { font-size: 2rem; }
}
