/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    color: #1a1a2e;
    background: #fafcfc;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
em { font-style: italic; }

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; line-height: 1.15; }
h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.4rem; }
p { line-height: 1.7; color: #4a5568; }

.gradient-text {
    background: linear-gradient(135deg, #4CB8A4, #2D9CDB, #9B51E0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 16px 32px; border-radius: 60px;
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer; border: none;
}
.btn-primary {
    background: linear-gradient(135deg, #4CB8A4, #3AA897);
    color: white;
    box-shadow: 0 4px 20px rgba(76, 184, 164, 0.35);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(76, 184, 164, 0.5);
}
.btn-ghost {
    background: transparent;
    color: #2D3E50;
    border: 2px solid #e2e8f0;
}
.btn-ghost:hover { border-color: #4CB8A4; color: #4CB8A4; }
.btn-lg { padding: 20px 40px; font-size: 1.1rem; }
.btn-full { width: 100%; justify-content: center; }

/* ===== NAV ===== */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    padding: 0 40px;
    transition: all 0.4s ease;
}
.nav.scrolled {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 72px;
}
.nav-logo {
    font-family: 'Playfair Display', serif; font-size: 1.6rem; font-weight: 700;
    color: white; letter-spacing: 2px;
    transition: color 0.3s;
}
.nav.scrolled .nav-logo { color: #1a1a2e; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
    font-size: 0.9rem; font-weight: 500; color: rgba(255,255,255,0.8);
    transition: color 0.3s;
}
.nav.scrolled .nav-links a { color: #4a5568; }
.nav-links a:hover { color: #4CB8A4; }
.nav-cta {
    background: rgba(255,255,255,0.15) !important;
    padding: 10px 24px !important; border-radius: 60px !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2) !important;
}
.nav.scrolled .nav-cta {
    background: #4CB8A4 !important; color: white !important;
    border-color: transparent !important;
}

/* ===== HERO ===== */
.hero {
    position: relative; min-height: 100vh;
    display: flex; align-items: center;
    padding: 120px 40px 80px;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #0D1B2A 0%, #1B3A4B 40%, #2D6A6F 70%, #4CB8A4 100%);
    z-index: 0;
}
.hero-stars {
    position: absolute; inset: 0; z-index: 1;
    pointer-events: none;
}
.hero-stars .star {
    position: absolute;
    width: 3px; height: 3px;
    background: white; border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    opacity: 0;
}
@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}
.hero-content {
    position: relative; z-index: 2;
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 60px; align-items: center;
    width: 100%;
}
.hero-visual {
    overflow: visible;
    min-height: 640px;
}
.hero-text { color: white; }
.hero-eyebrow {
    font-size: 0.9rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 3px; color: #4CB8A4;
    margin-bottom: 20px;
}
.hero-headline { color: white; margin-bottom: 24px; }
.hero-sub {
    font-size: 1.2rem; color: rgba(255,255,255,0.75);
    max-width: 480px; margin-bottom: 36px; line-height: 1.8;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-ctas .btn-ghost { color: white; border-color: rgba(255,255,255,0.3); }
.hero-ctas .btn-ghost:hover { border-color: #4CB8A4; color: #4CB8A4; }
.hero-social-proof {
    display: flex; align-items: center; gap: 12px;
    margin-top: 32px; color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}
.hero-social-proof .stars { color: #FFB800; font-size: 1rem; letter-spacing: 2px; }

/* Phone Mockup Duo */
.phone-duo {
    position: relative;
    display: flex; justify-content: center; align-items: center;
    height: 640px;
}
.phone-mockup {
    position: absolute;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.phone-frame {
    border-radius: 44px;
    background: #000;
    padding: 10px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.phone-front .phone-frame {
    width: 320px; height: 660px;
    animation: float 6s ease-in-out infinite;
}
.phone-front { z-index: 3; }
.phone-back .phone-frame {
    width: 280px; height: 580px;
}
.phone-back {
    z-index: 1;
    transform: rotate(-6deg) translate(-100px, 20px);
}
.phone-back .phone-frame {
    opacity: 0.85;
}

/* Hover: bring library to front */
.phone-back:hover {
    z-index: 10;
    transform: rotate(0deg) translate(-80px, -10px);
}
.phone-back:hover .phone-frame {
    opacity: 1;
    width: 320px; height: 660px;
    box-shadow: 0 30px 100px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.15);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.phone-screen {
    width: 100%; height: 100%;
    border-radius: 34px;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    filter: contrast(1.05) brightness(1.02);
}
.phone-side .phone-screen { border-radius: 28px; }
.phone-side:hover .phone-screen { border-radius: 34px; }
.phone-glow {
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(76,184,164,0.3) 0%, transparent 70%);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse-glow 4s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* Scroll Indicator */
.hero-scroll-indicator {
    position: absolute; bottom: 32px; left: 50%;
    transform: translateX(-50%); z-index: 2;
}
.scroll-line {
    width: 2px; height: 40px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scroll-hint 2s ease-in-out infinite;
}
@keyframes scroll-hint {
    0% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.3; transform: scaleY(0.5); }
    100% { opacity: 1; transform: scaleY(1); }
}

/* ===== TRUST BAR ===== */
.trust-bar {
    padding: 60px 40px;
    text-align: center;
    background: white;
    border-bottom: 1px solid #f0f0f0;
}
.trust-label {
    font-size: 0.85rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 3px; color: #a0aec0; margin-bottom: 32px;
}
.trust-stats {
    display: flex; align-items: center; justify-content: center;
    gap: 48px; max-width: 700px; margin: 0 auto;
}
.stat { text-align: center; }
.stat-number {
    font-family: 'Playfair Display', serif; font-size: 3rem; font-weight: 800;
    color: #4CB8A4;
}
.stat-suffix {
    font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 700;
    color: #4CB8A4;
}
.stat-label {
    display: block; font-size: 0.85rem; color: #718096;
    margin-top: 4px; font-weight: 500;
}
.stat-divider {
    width: 1px; height: 48px;
    background: linear-gradient(to bottom, transparent, #e2e8f0, transparent);
}

/* ===== FEATURE SECTIONS ===== */
.feature-section {
    padding: 100px 40px;
}
.feature-card {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 80px; align-items: center;
}
.feature-card--reversed { direction: rtl; }
.feature-card--reversed > * { direction: ltr; }
.feature-tag {
    display: inline-block;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: #4CB8A4;
    padding: 6px 16px; border-radius: 20px;
    background: rgba(76, 184, 164, 0.1);
    margin-bottom: 16px;
}
.feature-text h2 { margin-bottom: 20px; color: #1a1a2e; }
.feature-text p { font-size: 1.1rem; margin-bottom: 24px; }
.feature-list {
    list-style: none; display: flex; flex-direction: column; gap: 12px;
}
.feature-list li {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.95rem; color: #4a5568;
}
.feature-list li::before {
    content: '✓'; display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(76, 184, 164, 0.1); color: #4CB8A4;
    font-weight: 700; font-size: 0.75rem; flex-shrink: 0;
}
.feature-img {
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

/* Storybook Grid */
.storybook-grid {
    display: flex; justify-content: center; align-items: center;
    position: relative; height: 400px;
}
.storybook-page {
    position: absolute;
    width: 200px; height: 300px;
    border-radius: 16px; overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border: 4px solid white;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.storybook-page img { width: 100%; height: 100%; object-fit: cover; }
.page-1 { transform: rotate(-8deg) translateX(-60px); z-index: 1; }
.page-2 { transform: rotate(0deg) translateY(-10px); z-index: 2; }
.page-3 { transform: rotate(8deg) translateX(60px); z-index: 1; }
.storybook-grid:hover .page-1 { transform: rotate(-12deg) translateX(-90px); }
.storybook-grid:hover .page-3 { transform: rotate(12deg) translateX(90px); }

/* ===== HOW IT WORKS ===== */
.how-it-works {
    padding: 120px 40px;
    background: linear-gradient(180deg, #fafcfc, #f0faf9);
}
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
    display: inline-block;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: #4CB8A4;
    padding: 6px 16px; border-radius: 20px;
    background: rgba(76, 184, 164, 0.1);
    margin-bottom: 16px;
}
.section-header h2 { color: #1a1a2e; }
.steps {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 0; max-width: 1000px; margin: 0 auto;
}
.step {
    text-align: center; padding: 40px 32px;
    flex: 1;
}
.step-number {
    font-family: 'Playfair Display', serif; font-size: 0.8rem;
    font-weight: 700; color: #4CB8A4;
    width: 28px; height: 28px;
    border: 2px solid #4CB8A4; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
}
.step-icon { font-size: 2.5rem; margin-bottom: 20px; }
.step h3 { margin-bottom: 12px; color: #1a1a2e; }
.step p { font-size: 0.95rem; color: #718096; }
.step-connector {
    width: 80px; height: 2px;
    background: linear-gradient(to right, #4CB8A4, rgba(76,184,164,0.2));
    margin-top: 90px; flex-shrink: 0;
}

/* ===== PRICING ===== */
.pricing {
    padding: 120px 40px;
    background: #0D1B2A;
}
.pricing .section-header h2 { color: white; }
.pricing .section-tag { background: rgba(76, 184, 164, 0.2); }
.pricing-cards {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px; max-width: 1000px; margin: 0 auto;
}
.pricing-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px; padding: 40px 32px;
    text-align: center; position: relative;
    transition: transform 0.3s, border-color 0.3s;
}
.pricing-card:hover { transform: translateY(-4px); border-color: rgba(76,184,164,0.3); }
.pricing-card--popular {
    background: rgba(76, 184, 164, 0.1);
    border-color: #4CB8A4;
    transform: scale(1.05);
}
.pricing-card--popular:hover { transform: scale(1.05) translateY(-4px); }
.pricing-badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, #4CB8A4, #3AA897);
    color: white; font-size: 0.75rem; font-weight: 700;
    padding: 6px 20px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 1px;
}
.pricing-tier {
    font-family: 'Playfair Display', serif; font-size: 1.3rem;
    font-weight: 700; color: white; margin-bottom: 16px;
}
.pricing-price {
    font-family: 'Playfair Display', serif; font-size: 3rem;
    font-weight: 800; color: #4CB8A4;
}
.pricing-period { color: rgba(255,255,255,0.5); font-size: 0.9rem; margin-bottom: 28px; }
.pricing-features {
    list-style: none; text-align: left;
    margin-bottom: 32px;
}
.pricing-features li {
    padding: 10px 0; color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.pricing-features li::before {
    content: '✓'; color: #4CB8A4; margin-right: 10px; font-weight: 700;
}
.pricing .btn-ghost { color: white; border-color: rgba(255,255,255,0.2); }
.pricing .btn-ghost:hover { border-color: #4CB8A4; color: #4CB8A4; }

/* ===== TESTIMONIALS ===== */
.testimonials {
    padding: 120px 40px;
    background: white;
}
.testimonial-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 32px; max-width: 1100px; margin: 0 auto;
}
.testimonial {
    padding: 36px;
    background: #fafcfc;
    border: 1px solid #f0f0f0;
    border-radius: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.testimonial:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}
.testimonial-stars {
    color: #FFB800; font-size: 1rem;
    letter-spacing: 2px; margin-bottom: 16px;
}
.testimonial p {
    font-size: 1rem; font-style: italic;
    color: #2D3E50; line-height: 1.7;
    margin-bottom: 16px;
}
.testimonial-author { font-size: 0.85rem; font-weight: 600; color: #a0aec0; }

/* ===== FINAL CTA ===== */
.final-cta {
    padding: 120px 40px;
    background: linear-gradient(135deg, #f0faf9, #e8f4f8);
    text-align: center;
}
.final-cta-content { max-width: 600px; margin: 0 auto; }
.final-cta h2 { margin-bottom: 20px; }
.final-cta p { font-size: 1.15rem; margin-bottom: 36px; }

/* ===== FOOTER ===== */
.footer {
    padding: 64px 40px 32px;
    background: #0D1B2A; color: rgba(255,255,255,0.6);
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo {
    font-family: 'Playfair Display', serif; font-size: 1.4rem;
    font-weight: 700; color: white; letter-spacing: 2px;
}
.footer-brand p { margin-top: 8px; font-size: 0.85rem; }
.footer-links { display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 {
    font-family: 'Inter', sans-serif; font-size: 0.8rem;
    font-weight: 700; text-transform: uppercase;
    letter-spacing: 2px; color: rgba(255,255,255,0.4);
    margin-bottom: 4px;
}
.footer-col a { font-size: 0.9rem; transition: color 0.3s; }
.footer-col a:hover { color: #4CB8A4; }
.footer-bottom {
    max-width: 1200px; margin: 0 auto;
    padding-top: 24px; text-align: center;
    font-size: 0.8rem;
}

/* ===== REVEAL ANIMATIONS ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-sub { margin: 0 auto 36px; }
    .hero-ctas { justify-content: center; }
    .hero-social-proof { justify-content: center; }
    .hero-visual { order: -1; }
    .phone-back { display: none; }
    .phone-front .phone-frame { width: 260px; height: 540px; }
    .feature-card, .feature-card--reversed { grid-template-columns: 1fr; gap: 40px; }
    .feature-card--reversed { direction: ltr; }
    .pricing-cards { grid-template-columns: 1fr; max-width: 400px; }
    .pricing-card--popular { transform: none; }
    .testimonial-grid { grid-template-columns: 1fr; }
    .steps { flex-direction: column; align-items: center; }
    .step-connector { width: 2px; height: 40px; margin: 0; background: linear-gradient(to bottom, #4CB8A4, rgba(76,184,164,0.2)); }
    .trust-stats { flex-direction: column; gap: 24px; }
    .stat-divider { width: 48px; height: 1px; }
    .footer-inner { flex-direction: column; gap: 40px; }
    .footer-links { gap: 32px; }
    .nav-links { display: none; }
}
