/* Cytosphere site — shared styles. Single file, no preprocessor.
   Colors lifted from the app icon (deep purple → pale lavender). */

:root {
    --bg-page:       #1a0e2e;
    --bg-card:       #251638;
    --bg-card-soft:  rgba(255, 255, 255, 0.04);
    --border:        rgba(255, 255, 255, 0.08);
    --text:          #f0e8f8;
    --text-dim:      rgba(240, 232, 248, 0.62);
    --text-faint:    rgba(240, 232, 248, 0.42);
    --accent:        #d472e8;
    --accent-deep:   #8b3fb5;
    --accent-soft:   rgba(212, 114, 232, 0.16);

    --max-width:     980px;
    --gap:           28px;
    --radius:        18px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg-page);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

body {
    background:
        radial-gradient(circle at 20% 0%, rgba(140, 70, 200, 0.22), transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(70, 40, 150, 0.22), transparent 50%),
        var(--bg-page);
    min-height: 100vh;
}

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

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}
a:hover { color: #f0a8ff; }

/* ---------- Top nav ---------- */
.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 24px;
    font-size: 14px;
}
.nav-brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--text); font-weight: 600;
}
.nav-brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--text-dim); }
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 56px 0 64px;
}
.hero-icon {
    width: 180px; height: 180px;
    border-radius: 40px;
    margin: 0 auto 28px;
    box-shadow:
        0 28px 64px rgba(0, 0, 0, 0.5),
        0 6px 16px rgba(140, 70, 200, 0.3);
    display: block;
}
.hero h1 {
    font-size: 56px;
    font-weight: 700;
    letter-spacing: -1.6px;
    margin: 0 0 12px;
    background: linear-gradient(180deg, #ffffff 0%, #d8c4ec 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-tagline {
    font-size: 22px;
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 32px;
    font-weight: 400;
}

.btn {
    display: inline-flex;
    align-items: center; justify-content: center; gap: 8px;
    padding: 14px 26px;
    border-radius: 12px;
    font-size: 15px; font-weight: 600;
    border: none; cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(180deg, #b94fd6, #8b3fb5);
    color: white;
    box-shadow: 0 6px 24px rgba(140, 70, 200, 0.4);
}
.btn-primary:hover { color: white; transform: translateY(-1px); }
.btn-primary[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-secondary {
    background: var(--bg-card-soft);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }

.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-meta {
    margin-top: 18px;
    font-size: 13px;
    color: var(--text-faint);
}

/* ---------- Section common ---------- */
.section { padding: 56px 0; }
.section-label {
    text-transform: uppercase;
    letter-spacing: 1.6px;
    font-size: 11px;
    color: var(--accent);
    font-weight: 700;
    margin: 0 0 12px;
}
.section h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 0 16px;
}
.section p { color: var(--text-dim); max-width: 640px; }

/* ---------- Feature grid ---------- */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--gap);
    margin-top: 32px;
}
.feature {
    padding: 26px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.feature-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 14px;
}
.feature h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
}
.feature p {
    margin: 0;
    font-size: 14px;
    color: var(--text-dim);
}

/* ---------- Patterns list ---------- */
.patterns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 24px;
}
.pattern-tag {
    padding: 12px 16px;
    background: var(--bg-card-soft);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
}
.pattern-tag .free {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6ce58c;
    background: rgba(108, 229, 140, 0.13);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ---------- Screenshot strip ---------- */
.shots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 32px;
}
.shot {
    aspect-ratio: 1 / 1;             /* exports are square 6K × 6K */
    border-radius: 22px;
    overflow: hidden;
    /* Background only shows during image-loading; once the img paints it
       covers the whole tile, so we don't need a border or contrasting bg. */
    background: var(--bg-card);
    border: none;
    display: block;
    position: relative;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    /* Reset <button> defaults (margins, padding, font) */
    margin: 0;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-faint);
    font-size: 12px;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}
.shot:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(212, 114, 232, 0.25);
}
.shot:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}
.shot img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    /* Strip the default inline-baseline gap below an <img> */
    vertical-align: bottom;
}
.shot.placeholder::before {
    content: "📱  Sample wallpaper";
    color: var(--text-faint);
    padding: 16px;
}

/* Lightbox modal — uses native <dialog> for accessibility (focus trap,
   ESC to close, etc.). The dialog auto-sizes to the image rather than
   filling 92vw — that way there's no white frame around the image. */
dialog.lightbox {
    border: none;
    padding: 0;
    margin: auto;
    /* User-agent stylesheet sets a white background on <dialog>; override
       both 'background' and 'background-color' so neither wins. */
    background: transparent;
    background-color: transparent;
    color: inherit;
    overflow: visible;
    /* Let the dialog shrink to fit its single <img> child */
    width: fit-content;
    max-width: 92vw;
    max-height: 92vh;
}
dialog.lightbox::backdrop {
    background: rgba(8, 4, 16, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
dialog.lightbox img {
    display: block;
    max-width: 92vw;
    max-height: 92vh;
    width: auto; height: auto;        /* preserve native aspect ratio */
    border-radius: 16px;
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.7);
}
/* Close button sits INSIDE the image's top-right corner — pinning it
   outside the image would clip on small viewports where the dialog
   already fills 92vh top-to-bottom. Dark backdrop + white × shows over
   both light and dark wallpapers. */
.lightbox-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 40px; height: 40px;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
    z-index: 2;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.05);
}
.lightbox-close:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* ---------- Pricing ---------- */
.pricing {
    background: linear-gradient(180deg, rgba(140, 70, 200, 0.12), rgba(140, 70, 200, 0.02));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-top: 32px;
    text-align: center;
}
.pricing .price {
    font-size: 44px;
    font-weight: 700;
    letter-spacing: -1px;
    margin: 8px 0;
}
.pricing .price small {
    font-size: 16px;
    color: var(--text-dim);
    font-weight: 400;
    margin-left: 4px;
}

/* ---------- Privacy summary ---------- */
.privacy-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 18px;
}
.privacy-row {
    display: flex; gap: 10px; align-items: flex-start;
    font-size: 14px;
    color: var(--text-dim);
}
.privacy-row .check {
    color: #6ce58c;
    font-weight: 700;
}
.privacy-row .x {
    color: #e88b8b;
    font-weight: 700;
}

/* ---------- Footer ---------- */
.footer {
    margin-top: 64px;
    padding: 32px 0;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer a { color: var(--text-dim); }
.footer a:hover { color: var(--text); }
.footer-attribution {
    max-width: 540px;
    font-size: 11px;
    line-height: 1.5;
    color: var(--text-faint);
    margin-top: 14px;
}

/* ---------- Privacy / Support page ---------- */
.doc {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}
.doc h1 {
    font-size: 36px;
    letter-spacing: -0.6px;
    margin: 0 0 8px;
}
.doc-meta {
    color: var(--text-faint);
    font-size: 13px;
    margin-bottom: 32px;
}
.doc h2 {
    margin-top: 36px;
    font-size: 22px;
    font-weight: 600;
}
.doc h3 {
    margin-top: 24px;
    font-size: 17px;
    font-weight: 600;
}
.doc p, .doc li {
    color: var(--text-dim);
    font-size: 15px;
}
.doc strong { color: var(--text); }
.doc ul, .doc ol { padding-left: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .hero { padding: 36px 0 48px; }
    .hero h1 { font-size: 40px; }
    .hero-tagline { font-size: 18px; }
    .hero-icon { width: 140px; height: 140px; border-radius: 32px; }
    .section h2 { font-size: 26px; }
    .privacy-list { grid-template-columns: 1fr; }
    .footer { flex-direction: column; align-items: flex-start; }
}
