/* ==========================================
   DEARLY Landing Page CSS
   Design System & Styling Tokens
   ========================================== */

/* CSS Variables */
:root {
    --bg-base: #FFF5F7;
    --primary: #FF6B8B;
    --primary-hover: #E05372;
    --primary-light: #FFECEF;
    --secondary: #FF8E9C;
    --text-main: #2E2528;
    --text-muted: #756569;
    --white: #FFFFFF;
    --gold: #F4C430;
    --purple: #8A2BE2;
    --cyan: #00D2C4;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    --shadow-soft: 0 10px 30px rgba(255, 107, 139, 0.12);
    --shadow-hover: 0 20px 40px rgba(255, 107, 139, 0.22);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Global Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography Helpers */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #FF8E9C 50%, #FFB6C1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 245, 247, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 107, 139, 0.1);
    transition: var(--transition);
}

.header.scrolled {
    padding: 12px 0;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-logo {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(255, 107, 139, 0.2);
}

.app-name {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 6px 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.btn-download-nav {
    background-color: var(--primary);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 139, 0.25);
}

.btn-download-nav::after {
    display: none;
}

.btn-download-nav:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 139, 0.35);
    color: var(--white);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}

.mobile-menu-btn .bar {
    width: 25px;
    height: 2.5px;
    background-color: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background-color: var(--white);
    padding: 24px;
    border-bottom: 1px solid rgba(255, 107, 139, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateY(-120%);
    transition: var(--transition);
    z-index: 999;
}

.mobile-drawer.active {
    transform: translateY(0);
}

.drawer-link {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 8px 0;
    text-align: center;
}

.drawer-btn {
    background-color: var(--primary);
    color: var(--white);
    border-radius: 50px;
    padding: 12px;
}

/* Hero Section */
.hero-section {
    padding-top: 140px;
    padding-bottom: 80px;
    background: radial-gradient(circle at 80% 20%, rgba(255, 182, 193, 0.15) 0%, rgba(255, 245, 247, 0) 60%);
    position: relative;
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.badge-tag {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 107, 139, 0.2);
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1.5px;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.download-badge {
    height: 54px;
    display: inline-flex;
    align-items: center;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    transition: var(--transition);
}

.download-badge:hover {
    transform: translateY(-4px);
    filter: brightness(1.05);
}

.badge-img {
    height: 100%;
    width: auto;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
}

.hero-visual::before {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 107, 139, 0.2) 0%, rgba(255, 245, 247, 0) 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
}

/* Phone Frame Mockup */
.phone-frame {
    width: 290px;
    height: 590px;
    background: #000;
    border: 10px solid #1c1c1e;
    border-radius: 40px;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15), 0 0 0 4px #2c2c2e;
    z-index: 1;
    overflow: hidden;
}

.phone-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 25px;
    background-color: #1c1c1e;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    z-index: 30;
}

.phone-screen {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.screen-content {
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.active-mockup-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease-in-out;
}

/* Section Common Titles */
.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.feature-card {
    background-color: var(--bg-base);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: var(--transition);
    border: 1px solid rgba(255, 107, 139, 0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    background-color: var(--white);
    border-color: rgba(255, 107, 139, 0.15);
}

.feature-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 1.8rem;
    position: relative;
    overflow: hidden;
}

/* Icon specific gradient circles */
.circle-onetap { background: linear-gradient(135deg, #FFE1E6 0%, #FFB6C1 100%); }
.circle-tarot { background: linear-gradient(135deg, #EBE1FF 0%, #D4BFFF 100%); }
.circle-draw { background: linear-gradient(135deg, #E1FBFF 0%, #BFF2FF 100%); }
.circle-ai { background: linear-gradient(135deg, #FFE1F6 0%, #FFBFED 100%); }
.circle-notes { background: linear-gradient(135deg, #FFF3E1 0%, #FFE0BF 100%); }

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

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

/* Screenshot Preview Section */
.preview-section {
    padding: 80px 0;
    background-color: var(--bg-base);
}

.carousel-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 0 60px;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    min-height: 640px;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, visibility 0.5s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.slide-image-wrapper {
    width: 250px;
    height: 480px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    margin-bottom: 24px;
    border: 6px solid #1c1c1e;
}

.slide-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-caption {
    text-align: center;
}

.slide-caption h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--primary);
}

.slide-caption p {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Slider Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--white);
    border: 1px solid rgba(255, 107, 139, 0.1);
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(255, 107, 139, 0.15);
    transition: var(--transition);
    z-index: 10;
}

.carousel-control:hover {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 6px 16px rgba(255, 107, 139, 0.35);
}

.carousel-control.prev { left: 0; }
.carousel-control.next { right: 0; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 107, 139, 0.25);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    width: 24px;
    border-radius: 5px;
    background-color: var(--primary);
}

/* Contact Links Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--white);
}

.contact-container {
    display: flex;
    justify-content: center;
}

.contact-card {
    background: linear-gradient(135deg, rgba(255, 245, 247, 0.8) 0%, rgba(255, 230, 235, 0.8) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 139, 0.15);
    border-radius: var(--radius-lg);
    padding: 50px 40px;
    text-align: center;
    max-width: 650px;
    width: 100%;
    box-shadow: var(--shadow-soft);
}

.contact-card h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.contact-card p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.contact-link-item {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    padding: 10px 24px;
    background-color: var(--white);
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(255, 107, 139, 0.08);
    transition: var(--transition);
    border: 1px solid rgba(255, 107, 139, 0.1);
}

.contact-link-item:hover {
    color: var(--white);
    background-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 107, 139, 0.25);
}

/* Footer styling */
.footer {
    background-color: var(--bg-base);
    padding: 40px 0;
    border-top: 1px solid rgba(255, 107, 139, 0.08);
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.footer-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-meta a {
    color: var(--text-muted);
}

.footer-meta a:hover {
    color: var(--primary);
}

/* Coming Soon Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(46, 37, 40, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background-color: var(--white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transform: translateY(30px);
    transition: transform 0.3s ease;
    border: 1px solid rgba(255, 107, 139, 0.1);
}

.modal-overlay.active .modal-card {
    transform: translateY(0);
}

.modal-header {
    padding: 24px 24px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 107, 139, 0.08);
}

.modal-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.close-modal-btn:hover {
    color: var(--primary);
}

.modal-body {
    padding: 24px;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.modal-body p {
    margin-bottom: 16px;
}

.modal-body p:last-child {
    margin-bottom: 0;
}

.modal-footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(255, 107, 139, 0.08);
}

.modal-btn-download {
    background-color: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
}

.modal-btn-download:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(255, 107, 139, 0.25);
}

.modal-btn-close {
    background-color: var(--bg-base);
    color: var(--text-muted);
    border: 1px solid rgba(255, 107, 139, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.modal-btn-close:hover {
    background-color: rgba(255, 107, 139, 0.1);
    color: var(--primary);
}

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

@media (max-width: 992px) {
    .hero-container {
        flex-direction: column-reverse;
        text-align: center;
        padding-top: 40px;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        margin-bottom: 40px;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 64px;
    }

    .nav-menu {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .carousel-container {
        padding: 0 20px;
    }

    .carousel-control {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .carousel-control.prev { left: -10px; }
    .carousel-control.next { right: -10px; }

    .slider-wrapper {
        min-height: 560px;
    }

    .slide-image-wrapper {
        width: 200px;
        height: 390px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .download-badge {
        width: 100%;
        justify-content: center;
        height: 50px;
    }

    .badge-img {
        height: 100%;
        width: auto;
    }

    .feature-card {
        padding: 30px 20px;
        align-items: center;
        text-align: center;
    }

    .feature-icon-wrapper {
        margin-bottom: 16px;
    }

    .slider-wrapper {
        min-height: 500px;
        padding: 20px;
    }

    .slide {
        padding: 20px 10px;
    }

    .slide-image-wrapper {
        width: 160px;
        height: 310px;
    }

    .contact-card {
        padding: 30px 20px;
    }

    .contact-card h2 {
        font-size: 1.8rem;
    }

    .contact-links {
        flex-direction: column;
        gap: 12px;
    }

    .contact-link-item {
        width: 100%;
    }
}
