/* General Variables & Reset */
:root {
    --primary: #A9647C;
    --secondary: #F6D9E2;
    --accent: #E8A0B4;
    --gold: #D4A96A;
    --morning: #FFB347;
    --evening: #9B8EC4;
    --bg-dark: #171113;
    --bg-card: rgba(255, 255, 255, 0.03);
    --text-main: #F6EBEE;
    --text-muted: #B7A4A9;
    --glass-border: rgba(255, 255, 255, 0.08);
    --accent-rgb: 232, 160, 180;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    overflow-x: hidden;
}

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

/* Header & Nav */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background-color: rgba(23, 17, 19, 0.7);
    border-bottom: 1px solid var(--glass-border);
}

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

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

.logo-wrapper svg {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.brand-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

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

/* Language Selector Dropdown */
.lang-selector {
    position: relative;
    display: inline-block;
}

.lang-flag-img {
    width: 20px;
    height: 14px;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.dropdown-trigger {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.dropdown-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(var(--accent-rgb), 0.15);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(33, 26, 28, 0.97);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 8px;
    list-style: none;
    min-width: 150px;
    display: none;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    z-index: 1000;
}

.dropdown-menu.open {
    display: flex;
}

.dropdown-menu li {
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: left;
}

.dropdown-menu li:hover {
    background: var(--primary);
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent);
    color: #241A1D;
}

.btn-primary:hover {
    background-color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--accent-rgb), 0.4);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--accent);
    background-color: rgba(var(--accent-rgb), 0.1);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    min-height: 80dvh;
    display: flex;
    align-items: center;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.badge-accent {
    display: inline-flex;
    align-self: flex-start;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 40%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pas-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 16px;
    line-height: 1.7;
}

.pas-problem {
    color: #F6EBEE;
    font-weight: 500;
}

.pas-agitate {
    color: var(--text-muted);
    border-left: 3px solid var(--primary);
    padding-left: 16px;
}

.pas-solve {
    color: #EFE1E5;
    font-weight: 500;
    background: rgba(var(--accent-rgb), 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 1px dashed rgba(var(--accent-rgb), 0.22);
}

.hero-ctas {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Phone Mockup */
.phone-mockup {
    width: 280px;
    height: 560px;
    border: 12px solid #3A2E32;
    border-radius: 40px;
    background-color: #120D0F;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 40px rgba(var(--accent-rgb), 0.22);
    position: relative;
    overflow: hidden;
}

.phone-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    background: radial-gradient(circle at top, rgba(var(--accent-rgb), 0.16), transparent);
    overflow-y: auto;
}

.phone-screen::-webkit-scrollbar {
    display: none;
}

.phone-app-preview {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* AM / PM Rhythm Section */
.rhythm-section {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.01);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.rhythm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.rhythm-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.3s ease;
}

.rhythm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.rhythm-card.am-card:hover {
    border-color: var(--morning);
}

.rhythm-card.pm-card:hover {
    border-color: var(--evening);
}

.card-tag {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.am-card .card-tag {
    color: var(--morning);
}

.pm-card .card-tag {
    color: var(--evening);
}

.rhythm-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.rhythm-text {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-muted);
}

.rhythm-quote {
    text-align: center;
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rhythm-quote blockquote {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    line-height: 1.4;
    color: #ffffff;
}

.rhythm-quote cite {
    font-size: 14px;
    color: var(--text-muted);
    font-style: normal;
}

/* Features Section */
.features {
    padding: 100px 0;
}

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

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 44px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 24px;
}

.feature-title {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-text {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* Download Section */
.download-section {
    padding: 100px 0;
}

.download-box {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.1) 0%, rgba(var(--accent-rgb), 0.02) 100%);
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    border-radius: 32px;
    padding: 64px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.download-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.download-text {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 540px;
    line-height: 1.7;
}

.store-buttons {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #211A1C;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px 28px;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.store-btn:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.store-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.store-btn.disabled:hover {
    transform: none;
    border-color: var(--glass-border);
    box-shadow: none;
}

.store-icon {
    flex-shrink: 0;
}

.store-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-btn-text span {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.store-btn-text strong {
    font-size: 16px;
    font-weight: 600;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    background-color: rgba(33, 26, 28, 0.5);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer p {
    color: var(--text-muted);
    font-size: 14px;
}

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

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--text-main);
}

/* RTL Layout Adjustments (Arabic) */
html[dir="rtl"] .dropdown-menu {
    left: 0;
    right: auto;
}

html[dir="rtl"] .dropdown-menu li {
    text-align: right;
}

html[dir="rtl"] .pas-agitate {
    border-left: none;
    border-right: 3px solid var(--primary);
    padding-left: 0;
    padding-right: 16px;
}

html[dir="rtl"] .mock-item,
html[dir="rtl"] .stats-title,
html[dir="rtl"] .mock-card-header {
    text-align: right;
}

/* Responsive Breakpoints */
@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
    .badge-accent {
        align-self: center;
    }
    .hero-ctas {
        justify-content: center;
    }
    .hero-title {
        font-size: 44px;
    }
    .rhythm-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 16px 24px;
        gap: 16px;
    }
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    .download-box {
        padding: 40px 24px;
    }
    .footer-container {
        flex-direction: column;
        text-align: center;
    }
    .footer-links {
        justify-content: center;
    }
}

/* Mockup Components */
.mock-card {
    background: rgba(46, 36, 39, 0.75);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    width: 100%;
}

.mock-card-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 12px;
    text-align: left;
}

.mock-toggle {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    padding: 4px;
    margin-bottom: 14px;
}

.mock-toggle-half {
    flex: 1;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 0;
    border-radius: 999px;
    color: var(--text-muted);
}

.mock-toggle-half.active-am {
    background: rgba(255, 179, 71, 0.18);
    color: var(--morning);
}

.mock-toggle-half.active-pm {
    background: rgba(155, 142, 196, 0.18);
    color: var(--evening);
}

.mock-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mock-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    text-align: left;
}

.mock-item.completed {
    color: #F6EBEE;
}

.mock-item.completed .check-box {
    background: var(--accent);
    border-color: var(--accent);
    color: #241A1D;
}

.mock-item.pending {
    color: var(--text-muted);
}

.check-box {
    width: 16px;
    height: 16px;
    border: 1px solid var(--text-muted);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.stats-title {
    font-size: 11px;
    color: var(--text-muted);
    text-align: left;
    margin-bottom: 10px;
}

.bar-chart {
    display: flex;
    justify-content: space-between;
    height: 70px;
    align-items: flex-end;
    gap: 4px;
}

.chart-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px 4px 0 0;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.chart-bar.active {
    background: var(--accent);
}

.circular-display {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 120px;
}

.ring-svg {
    width: 100px;
    height: 100px;
    transform: rotate(-90deg);
}

.ring-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 8;
}

.ring-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 8;
    stroke-linecap: round;
}

.ring-text {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ring-text h4 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    font-variant-numeric: tabular-nums;
}

.ring-text p {
    font-size: 9px;
    color: var(--text-muted);
}

.progress-pill {
    display: inline-flex;
    align-self: flex-start;
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--accent);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin-top: 12px;
}
