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

/* ── Light Theme (app colors) ── */
:root, [data-theme="light"] {
    --bg-primary: #F8F8F8;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #F0F0F0;
    --border: #EBEBEB;
    --text-1: #1A1A1A;
    --text-2: #808080;
    --text-3: #ABABAB;
    --shadow: rgba(0, 0, 0, 0.06);
    --shadow-lg: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(248, 248, 248, 0.85);
    --phone-bg: #0A0A0A;
    --phone-screen-bg: linear-gradient(180deg, #F8F8F8, #FFF);
    --toggle-bg: var(--bg-tertiary);
    --toggle-active-bg: var(--text-1);
    --toggle-active-text: var(--bg-primary);
}

/* ── Dark Theme (app colors) ── */
[data-theme="dark"] {
    --bg-primary: #1C1D22;
    --bg-secondary: #262730;
    --bg-tertiary: #2E2F38;
    --border: #3A3B45;
    --text-1: #F5F5F5;
    --text-2: #CFCFD4;
    --text-3: #7A7A82;
    --shadow: rgba(0, 0, 0, 0.2);
    --shadow-lg: rgba(0, 0, 0, 0.35);
    --nav-bg: rgba(28, 29, 34, 0.88);
    --phone-bg: #000;
    --phone-screen-bg: linear-gradient(180deg, #1C1D22, #262730);
    --toggle-bg: var(--bg-tertiary);
    --toggle-active-bg: var(--text-1);
    --toggle-active-text: var(--bg-primary);
}

/* ── Palette ── */
:root {
    --primary: #F5987C;
    --primary-light: #FFD19D;
    --primary-dark: #E07A5E;
    --secondary: #F9C590;
    --gradient: linear-gradient(135deg, #F5987C 0%, #FFD19D 100%);

    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-w: 1080px;
}

/* ── Base ── */
html {
    scroll-behavior: smooth;
    color-scheme: light dark;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-1);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; }
em { font-family: var(--font-display); font-style: italic; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Nav ── */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    transition: background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 22px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-right > a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-2);
    transition: color 0.2s;
}

.nav-right > a:hover { color: var(--text-1); }

.nav-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Toggle Group ── */
.toggle-group {
    display: flex;
    background: var(--toggle-bg);
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
}

.toggle-btn {
    border: none;
    background: transparent;
    color: var(--text-3);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.toggle-btn.active {
    background: var(--toggle-active-bg);
    color: var(--toggle-active-text);
}

.toggle-btn:hover:not(.active) { color: var(--text-1); }

/* ── Theme Toggle ── */
.theme-toggle {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--toggle-bg);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    transition: color 0.2s, background 0.2s;
}

.theme-toggle:hover {
    color: var(--text-1);
    background: var(--border);
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: none; }

/* ── Nav CTA ── */
.nav-cta {
    background: var(--text-1) !important;
    color: var(--bg-primary) !important;
    padding: 9px 22px;
    border-radius: 10px;
    font-weight: 600 !important;
    font-size: 13px !important;
    letter-spacing: 0.2px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--shadow-lg);
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 140px 32px 80px;
    display: flex;
    align-items: center;
    gap: 80px;
    width: 100%;
}

.hero-text {
    flex: 1;
    animation: fadeUp 0.7s ease both;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(42px, 5.5vw, 64px);
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: -0.3px;
    margin-bottom: 20px;
}

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

.hero-sub {
    font-size: 17px;
    color: var(--text-2);
    max-width: 380px;
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 14px; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--text-1);
    color: var(--bg-primary);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-lg);
}

/* ── Phone ── */
.hero-phone {
    flex: 0 0 auto;
    position: relative;
    animation: fadeUp 0.7s 0.15s ease both;
}

.phone-glow {
    position: absolute;
    inset: -50px;
    background: radial-gradient(ellipse, rgba(245, 152, 124, 0.18) 0%, rgba(255, 209, 157, 0.08) 50%, transparent 70%);
    border-radius: 50%;
    animation: pulse 5s ease-in-out infinite;
}

.phone {
    position: relative;
    z-index: 1;
    width: 252px;
    height: 516px;
    background: var(--phone-bg);
    border-radius: 42px;
    padding: 10px;
    box-shadow:
        0 32px 64px var(--shadow-lg),
        inset 0 0.5px 0 rgba(255,255,255,0.06);
    animation: float 6s ease-in-out infinite;
}

.phone-notch {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 86px;
    height: 24px;
    background: var(--phone-bg);
    border-radius: 0 0 16px 16px;
    z-index: 3;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--phone-screen-bg);
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-placeholder {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.5;
}

.screen-placeholder span {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 500;
}

/* ── Features ── */
.features {
    padding: 120px 0;
    background: var(--bg-secondary);
    transition: background 0.3s;
}

.section-header { text-align: center; margin-bottom: 64px; }

.label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(30px, 3.5vw, 44px);
    font-weight: 400;
}

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

.feature {
    display: flex;
    gap: 16px;
    padding: 24px;
    border-radius: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s, opacity 0.5s, background 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

.feature.revealed {
    opacity: 1;
    transform: translateY(0);
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px var(--shadow);
    border-color: rgba(245, 152, 124, 0.25);
}

.feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(245, 152, 124, 0.1);
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.feature h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 400;
    margin-bottom: 4px;
}

.feature p {
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.6;
}

/* ── Download ── */
.download {
    padding: 120px 0;
    position: relative;
}

.download::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center top, rgba(245, 152, 124, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

.download-content {
    text-align: center;
    position: relative;
}

.download-title {
    font-family: var(--font-display);
    font-size: clamp(34px, 4.5vw, 52px);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 12px;
}

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

.download-sub {
    font-size: 16px;
    color: var(--text-2);
    margin-bottom: 44px;
}

.download-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--text-1);
    color: var(--bg-primary);
    padding: 13px 28px;
    border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.store-btn div { text-align: left; line-height: 1.2; }
.store-btn strong { font-size: 16px; display: block; }
.store-btn small { font-size: 10px; opacity: 0.7; letter-spacing: 0.2px; }

.store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-lg);
}

.qr-area { text-align: center; }

.qr-box {
    width: 96px;
    height: 96px;
    border: 2px dashed var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.qr-area small {
    font-size: 11px;
    color: var(--text-3);
}

/* ── Footer ── */
.footer {
    padding: 36px 0;
    border-top: 1px solid var(--border);
    transition: border-color 0.3s;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 18px;
}

.footer-nav {
    display: flex;
    gap: 28px;
}

.footer-nav a {
    font-size: 13px;
    color: var(--text-3);
    transition: color 0.2s;
}

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

.footer-copy {
    font-size: 12px;
    color: var(--text-3);
}

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero-inner {
        flex-direction: column;
        text-align: center;
        padding: 120px 24px 60px;
        gap: 48px;
    }

    .hero-sub { margin: 0 auto 36px; }
    .hero-actions { justify-content: center; }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .phone { width: 216px; height: 442px; }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .nav-right > a:first-child { display: none; }
    .container { padding: 0 20px; }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-primary { justify-content: center; }
    .download-actions { flex-direction: column; }
    .nav-cta { display: none !important; }
}
