/* Prayer Tracker — shared stylesheet
   Brand color #009000 is IslamicGreen from Assets.xcassets.
   Hero gradient mirrors the app's welcome screen. */

:root {
    --brand: #009000;
    --brand-dark: #00b300;
    --hero-from: #051f1a;
    --hero-to: #00664d;

    --text: #1a1a1a;
    --text-muted: #5c5c5c;
    --bg: #ffffff;
    --bg-alt: #f6f7f6;
    --border: #e3e5e3;
    --card: #ffffff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);

    --radius: 14px;
    --radius-lg: 22px;
    --content: 940px;
    --narrow: 680px;

    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
            Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root {
        --brand: #2fb62f;
        --text: #f2f3f2;
        --text-muted: #a0a4a0;
        --bg: #0e100f;
        --bg-alt: #171a18;
        --border: #2a2e2b;
        --card: #171a18;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
    }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: 44px; font-weight: 700; }
h2 { font-size: 30px; font-weight: 700; }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--content); margin: 0 auto; padding: 0 22px; }
.wrap-narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 22px; }

section { padding: 60px 0; }

/* ---------- Language switch ---------- */

.langbar {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    font-size: 14px;
}
.langbar .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 46px;
    gap: 16px;
}
.langbar a { color: var(--text-muted); }
.langbar .home { font-weight: 600; color: var(--text); }
.langbar .home:hover { color: var(--brand); }

/* ---------- Hero ---------- */

.hero {
    background: linear-gradient(140deg, var(--hero-from) 0%, var(--hero-to) 55%, var(--hero-from) 100%);
    color: #fff;
    text-align: center;
    padding: 68px 0 76px;
}
.hero img.icon {
    width: 118px; height: 118px;
    margin-bottom: 22px;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, .35));
}
.hero h1 { color: #fff; margin-bottom: 14px; }
.hero .tagline {
    font-size: 20px;
    color: rgba(255, 255, 255, .88);
    max-width: 520px;
    margin: 0 auto 30px;
}
.hero .meta {
    margin-top: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, .6);
}

/* ---------- App Store badge ----------
   Apple's official badge artwork. Per the marketing guidelines it must not be
   recoloured, cropped or redrawn — only scaled. White lockup on the dark hero. */

.appstore {
    display: inline-block;
    transition: transform .15s ease;
}
.appstore:hover { transform: translateY(-2px); text-decoration: none; }
.appstore img {
    height: 54px;
    width: auto;
    display: block;
}

/* ---------- Screenshots ---------- */

/* Wider than --content so four shots fit side by side on desktop
   (4 x 232px + 3 x 20px gap = 988px). Scrolls horizontally below that. */
.shots {
    display: flex;
    gap: 20px;
    justify-content: center;
    overflow-x: auto;
    padding: 4px 22px 22px;
    scroll-snap-type: x mandatory;
    max-width: 1080px;
    margin: 0 auto;
    scrollbar-width: thin;
}
/* justify-content: center would clip the first item once the row overflows */
@media (max-width: 1080px) {
    .shots { justify-content: flex-start; }
}
.shots figure { margin: 0; flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
/* height: auto is required — the width/height attributes on the <img> reserve
   layout space, but without this the intrinsic height would win over the CSS
   width and stretch the shot. */
.shots img {
    width: 232px;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: block;
}
.shots figcaption { font-size: 14px; color: var(--text-muted); margin-top: 10px; }

/* ---------- Features ---------- */

.features { background: var(--bg-alt); }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
    gap: 18px;
    margin-top: 34px;
}
.feature {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}
.feature h3 { margin-bottom: 6px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 15px; }
.feature .ico { font-size: 24px; line-height: 1; display: block; margin-bottom: 12px; }

/* ---------- Privacy highlight ---------- */

.privacy-note {
    border: 1px solid var(--border);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius);
    background: var(--card);
    padding: 26px 28px;
}
.privacy-note h2 { font-size: 24px; }
.privacy-note p:last-child { margin-bottom: 0; }

/* ---------- Support page ---------- */

.contact-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 20px;
}
.contact-card h2 { font-size: 22px; margin-bottom: 8px; }
.contact-card .mail {
    display: inline-block;
    font-size: 19px;
    font-weight: 600;
    margin-top: 4px;
    word-break: break-all;
}
.reply-time { font-size: 15px; color: var(--text-muted); margin-top: 12px; }

details {
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
}
details:first-of-type { border-top: 1px solid var(--border); }
details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 17px;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: baseline;
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
    content: "+";
    color: var(--brand);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    flex-shrink: 0;
}
details[open] summary::after { content: "−"; }
details .answer { padding-top: 10px; color: var(--text-muted); }
details .answer p:last-child { margin-bottom: 0; }

/* ---------- Privacy page ---------- */

.policy h2 {
    font-size: 26px;
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}
.policy h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.policy h3 { font-size: 18px; margin-top: 26px; }
.policy .updated { color: var(--text-muted); font-size: 15px; }

/* ---------- Footer ---------- */

footer {
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
    padding: 34px 0;
    font-size: 15px;
    color: var(--text-muted);
}
footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-bottom: 14px; }
footer .credit { margin: 0; font-size: 14px; }
footer .credit a { color: var(--text-muted); text-decoration: underline; }

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
    h1 { font-size: 32px; }
    h2 { font-size: 25px; }
    body { font-size: 16px; }
    section { padding: 44px 0; }
    .hero { padding: 46px 0 54px; }
    .hero img.icon { width: 94px; height: 94px; }
    .hero .tagline { font-size: 18px; }
    .shots { gap: 14px; padding-inline: 22px; }
    .shots img { width: 200px; }
    .appstore img { height: 48px; }
    .contact-card, .privacy-note { padding: 20px; }
}
