/* ============================================================
   Nejon Prayer: website styles
   ============================================================ */

/* ---------- Colors, fonts and sizes ---------- */
:root {
    --bg-top: #0c121e;
    --bg-bottom: #1d2b41;
    --card: #1f2937;
    --border: #2d3649;
    --text: #f3f4f6;
    --text2: #d1d5db;
    --muted: #9ca3af;
    --accent: #fbbf24;
    --accent-tint: rgba(251, 191, 36, 0.12);
    --brand-red: #a83239;

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --gutter: 16px;
    --max: 1080px;
    --radius-card: 16px;
    --radius-icon: 12px;
    --radius-button: 8px;
}

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

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

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Anchored sections land below the sticky nav */
[id] {
    scroll-margin-top: 80px;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%) fixed;
    background-color: var(--bg-top);
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
}

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

a {
    color: var(--accent);
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    border-radius: 6px;
}

.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Top navigation ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(12, 18, 30, 0.85);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-nav .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 24px;
    margin: 0 0 0 auto;
    padding: 0;
    list-style: none;
}

.nav-links a {
    color: var(--text2);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 12px;
    border-radius: var(--radius-button);
    background: var(--accent);
    color: var(--bg-top);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.nav-cta:hover {
    background: #fcd34d;
}

.nav-cta img {
    width: 18px;
    height: 18px;
}

/* Phones: brand + download button only */
@media (max-width: 720px) {
    .nav-links {
        display: none;
    }

    .nav-cta {
        margin-left: auto;
    }
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 32px 0 72px;
    background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(251, 191, 36, 0.08), transparent 70%);
}

/* Arc of the five daily prayers */
.day-arc {
    width: 100%;
    max-width: 600px;
    margin: 0 auto -8px;
}

.day-arc text {
    font-family: var(--font);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.08em;
    fill: var(--muted);
}

.app-icon {
    width: 112px;
    height: 112px;
    margin: 0 auto 28px;
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.hero h1 {
    margin: 0 0 18px;
}

.hero .title {
    display: block;
    font-weight: 700;
    font-size: clamp(2.2rem, 7vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.hero .subtitle {
    display: block;
    margin-top: 10px;
    color: var(--accent);
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.lead {
    max-width: 34em;
    margin: 0 auto 32px;
    color: var(--text2);
    font-size: 1.125rem;
}

/* ---------- Store badges ---------- */
/* 16px gap = required clear space around the Google Play badge */
.stores {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.store-badge {
    display: block;
}

.store-badge img {
    height: 60px;
    width: auto;
}

/* "Coming soon to the App Store" badge (no Apple logo before the app is released) */
.store-soon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 203px;
    height: 60px;
    padding: 0 12px;
    border: 1px solid #a6a6a6;
    border-radius: 9px;
    color: #fff;
    line-height: 1.1;
    text-align: left;
}

/* Phone icon */
.store-soon img {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
}

.store-soon small {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
}

.store-soon span {
    display: block;
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.facts {
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 0.875rem;
}

/* ---------- Sections ---------- */
.section {
    padding: 64px 0;
    border-top: 1px solid var(--border);
}

.section h2 {
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2rem);
    letter-spacing: -0.02em;
    margin: 0 0 28px;
}

/* ---------- Features ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 18px;
}

.feature-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-icon);
    background: var(--accent-tint);
}

.feature-icon img {
    width: 24px;
    height: 24px;
}

.feature h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.feature p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.extras {
    margin: 28px 0 0;
    color: var(--muted);
    text-align: center;
    font-size: 0.95rem;
}

.extras strong {
    color: var(--text2);
    font-weight: 600;
}

/* ---------- Screenshots ---------- */
/* Mobile: horizontal strip. Desktop: all eight in a 4 x 2 grid. */
.shots {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 4px var(--gutter) 16px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 var(--gutter);
    scrollbar-color: var(--border) transparent;
}

.shots li {
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.shots a {
    display: block;
    border-radius: 14px;
    cursor: zoom-in;
}

/* Phones: one screenshot fills most of the width, the next one peeks in */
.shots img {
    width: min(75vw, 320px);
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
}

@media (min-width: 900px) {
    .shots {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        max-width: var(--max);
        margin: 0 auto;
        overflow: visible;
    }

    .shots img {
        width: 100%;
    }
}

/* ---------- Screenshot gallery (dialog) ---------- */
.lightbox {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(8, 12, 20, 0.95);
    color: var(--text);
}

.lightbox[open] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox::backdrop {
    background: transparent;
}

/* Keep the page behind the gallery from scrolling */
html:has(.lightbox[open]) {
    overflow: hidden;
}

.lightbox-img {
    width: auto;
    max-width: calc(100% - 32px);
    max-height: calc(100% - 112px);
    border-radius: 16px;
}

.lightbox button {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(31, 41, 55, 0.9);
    cursor: pointer;
    touch-action: manipulation;
}

/* Taps on the icon go to the button */
.lightbox button img {
    pointer-events: none;
}

.lightbox button:hover {
    background: var(--border);
}

.lightbox button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.lightbox-close {
    top: 16px;
    right: 16px;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 16px;
}

.lightbox-next {
    right: 16px;
}

.lightbox-count {
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    margin: 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.875rem;
    /* Lets taps reach the arrow buttons below it */
    pointer-events: none;
}

/* Phones: arrows sit at the bottom, either side of the counter */
@media (max-width: 720px) {
    .lightbox-prev,
    .lightbox-next {
        top: auto;
        bottom: 12px;
        transform: none;
    }

    .lightbox-img {
        max-height: calc(100% - 160px);
    }
}

/* ---------- FAQ ---------- */
.faq {
    display: grid;
    gap: 10px;
    max-width: 820px;
}

.faq details {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
}

.faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "+";
    flex: 0 0 auto;
    color: var(--accent);
    font-size: 1.4rem;
    line-height: 1;
}

.faq details[open] summary::after {
    content: "\2212";
}

.faq summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-card);
}

.faq details p {
    margin: 0;
    padding: 0 18px 16px;
    color: var(--muted);
}

/* ---------- Download section ---------- */
.cta {
    text-align: center;
}

.cta .app-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 20px;
}

.cta .cta-text {
    margin: -12px auto 28px;
    max-width: 30em;
    color: var(--text2);
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 32px 0 40px;
    text-align: center;
    color: var(--muted);
    font-size: 0.875rem;
}

.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
    margin-bottom: 14px;
    font-size: 1rem;
}

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

.site-footer .legal {
    opacity: 0.75;
}

/* ---------- Privacy policy page ---------- */
.page {
    max-width: 760px;
}

.page-header {
    padding: 16px 0 8px;
}

.page-header h1 {
    font-weight: 700;
    font-size: clamp(1.9rem, 5vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 24px 0 4px;
}

.page-header .subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.page-body {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 8px 24px 16px;
    margin: 24px 0 0;
    line-height: 1.7;
}

.page-body h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    margin: 28px 0 8px;
}

.page-body p,
.page-body li {
    margin: 0 0 12px;
    color: var(--text2);
}

.page-body strong {
    color: var(--text);
}

.page-body ul {
    padding-left: 20px;
    margin: 0 0 12px;
}

.page-body a {
    overflow-wrap: anywhere;
}

.page + .site-footer {
    border-top: 0;
}

@media (max-width: 480px) {
    .page-body {
        padding: 4px 16px 12px;
    }
}
