:root {
    --bg: #fff7fb;
    --surface: #ffffff;
    --surface-soft: #fff0f6;
    --ink: #2a1721;
    --muted: #715765;
    --line: #ead3de;
    --period: #d92b70;
    --fertile: #0aa39d;
    --ovulation: #6554d9;
    --phase: #f0a14b;
    --private: #5d9679;
    --shadow: 0 18px 50px rgba(88, 45, 67, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.6;
}

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

a {
    color: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 247, 251, 0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.nav {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 800;
    color: #6b0738;
    white-space: nowrap;
}

.brand img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    font-size: 0.95rem;
    color: var(--muted);
}

.nav-links a {
    text-decoration: none;
    font-weight: 700;
}

.nav-links a:hover,
.nav-links a:focus-visible {
    color: var(--period);
}

.language-picker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.language-picker select {
    min-width: 132px;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    padding: 0 10px;
}

.hero {
    min-height: 72svh;
    display: flex;
    align-items: center;
    background:
        linear-gradient(90deg, rgba(255, 247, 251, 0.98) 0%, rgba(255, 247, 251, 0.88) 45%, rgba(255, 247, 251, 0.46) 100%),
        url("../images/luna-feature.png");
    background-size: cover;
    background-position: center right;
    border-bottom: 1px solid var(--line);
}

.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--period);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.hero h1 {
    max-width: 680px;
    margin: 0;
    color: #610635;
    font-size: 4rem;
    line-height: 1.04;
}

.hero-subtitle {
    max-width: 620px;
    margin: 22px 0 0;
    color: #5c4552;
    font-size: 1.24rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.button.primary {
    background: var(--period);
    color: #ffffff;
}

.button.secondary {
    background: rgba(255, 255, 255, 0.78);
    border-color: var(--line);
    color: #610635;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.hero-points {
    max-width: 700px;
    display: grid;
    gap: 10px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-weight: 650;
}

.hero-points li {
    position: relative;
    padding-inline-start: 22px;
}

.hero-points li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0.72em;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--fertile);
}

.overview {
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.overview-item {
    min-height: 104px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(88, 45, 67, 0.07);
}

.overview-item span {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 750;
}

.overview-item strong {
    display: block;
    margin-top: 8px;
    color: #610635;
    font-size: 1.1rem;
    line-height: 1.25;
}

.section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 32px;
}

.section-heading h2,
.privacy-band h2 {
    margin: 0;
    color: #610635;
    font-size: 2.4rem;
    line-height: 1.12;
}

.section-heading p:not(.eyebrow),
.privacy-band p:not(.eyebrow) {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1.06rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.feature-card {
    min-height: 100%;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(88, 45, 67, 0.07);
}

.feature-card h3 {
    margin: 12px 0 10px;
    color: #3a0a23;
    font-size: 1.24rem;
    line-height: 1.25;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
}

.feature-card ul {
    display: grid;
    gap: 8px;
    margin: 16px 0 0;
    padding-inline-start: 20px;
    color: #4d3442;
}

.feature-mark {
    display: block;
    width: 36px;
    height: 5px;
    border-radius: 999px;
}

.feature-mark.period {
    background: var(--period);
}

.feature-mark.fertile {
    background: var(--fertile);
}

.feature-mark.journal {
    background: #b53272;
}

.feature-mark.reminder {
    background: var(--ovulation);
}

.feature-mark.private {
    background: var(--private);
}

.feature-mark.caution {
    background: var(--phase);
}

.caution-card {
    background: #fffaf0;
}

.gallery-section {
    padding-top: 36px;
}

.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: start;
}

.screenshot-grid figure {
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 12px 34px rgba(88, 45, 67, 0.08);
}

.screenshot-grid img {
    width: 100%;
    aspect-ratio: 9 / 16;
    object-fit: contain;
    object-position: top center;
    border-radius: 6px;
    border: 1px solid #f2dce6;
    background: #fff7fb;
}

.screenshot-grid figcaption {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 10px;
    color: #5a3147;
    font-weight: 850;
    text-align: center;
    line-height: 1.25;
}

.privacy-band {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 28px;
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 34px;
    border: 1px solid #b7d8cc;
    border-radius: 8px;
    background: linear-gradient(90deg, #edf9f5, #fff7fb);
}

.contact-section {
    padding-top: 48px;
    text-align: center;
}

.contact-section .section-heading {
    margin-inline: auto;
}

.email-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 18px;
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: #610635;
    font-weight: 850;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.policy-page {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 52px 0 76px;
}

.policy-content {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.back-link {
    color: var(--period);
    font-weight: 850;
    text-decoration: none;
}

.policy-content h1 {
    margin: 0;
    color: #610635;
    font-size: 2.8rem;
    line-height: 1.1;
}

.policy-content .updated {
    margin: 12px 0 28px;
    color: var(--muted);
    font-weight: 750;
}

.policy-content section {
    padding-top: 22px;
    margin-top: 22px;
    border-top: 1px solid var(--line);
}

.policy-content h2 {
    margin: 0 0 8px;
    color: #3a0a23;
    font-size: 1.35rem;
}

.policy-content p {
    margin: 0;
    color: var(--muted);
}

.site-footer {
    padding: 28px 16px;
    border-top: 1px solid var(--line);
    background: #ffffff;
    color: var(--muted);
    text-align: center;
}

.site-footer p {
    margin: 6px 0;
}

html[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .nav,
html[dir="rtl"] .hero-content,
html[dir="rtl"] .section-heading,
html[dir="rtl"] .policy-content {
    text-align: right;
}

@media (max-width: 980px) {
    .nav {
        min-height: auto;
        padding: 12px 0;
        flex-wrap: wrap;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        gap: 14px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    html[dir="rtl"] .nav-links {
        justify-content: flex-end;
    }

    .hero {
        min-height: 68svh;
        background-position: 62% center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .screenshot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .brand span {
        font-size: 0.98rem;
    }

    .language-picker {
        width: 100%;
        justify-content: space-between;
    }

    .language-picker select {
        flex: 1;
        min-width: 0;
    }

    .hero {
        min-height: 64svh;
        background:
            linear-gradient(180deg, rgba(255, 247, 251, 0.98) 0%, rgba(255, 247, 251, 0.9) 100%),
            url("../images/luna-feature.png");
        background-size: cover;
        background-position: center;
    }

    .hero-content {
        padding: 52px 0;
    }

    .hero h1 {
        font-size: 2.34rem;
    }

    .hero-subtitle {
        font-size: 1.06rem;
    }

    .hero-actions {
        display: grid;
    }

    .button,
    .email-link {
        width: 100%;
    }

    .overview,
    .feature-grid,
    .screenshot-grid,
    .privacy-band {
        grid-template-columns: 1fr;
    }

    .overview-item {
        min-height: auto;
    }

    .section {
        padding: 54px 0;
    }

    .section-heading h2,
    .privacy-band h2 {
        font-size: 1.9rem;
    }

    .screenshot-grid {
        gap: 18px;
    }

    .screenshot-grid figure {
        max-width: 340px;
        margin-inline: auto;
    }

    .privacy-band {
        padding: 24px;
    }

    .policy-content {
        padding: 24px;
    }

    .policy-content h1 {
        font-size: 2rem;
    }
}
