/* Perch — site styles. Palette lifted from the app (ic_launcher_background.xml + ui/Theme.kt). */

:root {
    --bg: #0c1119;
    --bg-glow: #1b2c4a;
    --surface: #121a26;
    --border: #22304a;
    --text: #ececec;
    --muted: #9aa0a6;
    --accent: #6aa5ff;
    --perch: #3a4e70;
    --measure: 62ch;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* The same radial desk glow the launcher icon uses, spread across the page top. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(
        1200px 800px at 22% -10%,
        var(--bg-glow) 0%,
        var(--bg) 70%
    );
    z-index: -1;
}

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

/* Text-only pages: keep the header and footer aligned to the reading column. */
.wrap-narrow {
    max-width: 760px;
}

a {
    color: var(--accent);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: #9cc4ff;
}

h1,
h2,
h3 {
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
}

/* ---------- header ---------- */

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 0;
}

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

.brand svg {
    display: block;
    border-radius: 10px;
}

.site-nav {
    display: flex;
    gap: 22px;
    font-size: 0.95rem;
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
}

.site-nav a:hover {
    color: var(--text);
}

/* ---------- hero ---------- */

.hero {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    align-items: center;
    padding: 64px 0 72px;
}

.hero-mark svg {
    width: 100%;
    height: auto;
    border-radius: 44px;
    box-shadow: 0 24px 60px rgb(0 0 0 / 55%);
}

.hero h1 {
    font-size: clamp(2.6rem, 7vw, 3.9rem);
    margin-bottom: 6px;
}

.rule {
    width: 76px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin: 22px 0;
}

.tagline {
    font-size: clamp(1.15rem, 2.6vw, 1.4rem);
    color: var(--text);
    font-weight: 400;
    max-width: 34ch;
    margin: 0;
}

.hero p.lede {
    color: var(--muted);
    max-width: var(--measure);
    margin: 20px 0 0;
}

.badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.badge {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    font-size: 0.95rem;
    text-decoration: none;
}

.badge-primary {
    border-color: transparent;
    background: var(--accent);
    color: #0c1119;
    font-weight: 600;
}

.badge-primary:hover {
    background: #9cc4ff;
    color: #0c1119;
}

/* ---------- sections ---------- */

section {
    padding: 56px 0;
    border-top: 1px solid var(--border);
}

section > h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
}

.section-lede {
    color: var(--muted);
    max-width: var(--measure);
    margin: 0 0 36px;
}

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

/* Four cards: 2x2 rather than 3 + a lone orphan on the second row. */
.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px 24px;
}

.card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

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

/* Inline qualifier on a card heading, e.g. the stocks widget's beta state. */
.tag {
    display: inline-block;
    vertical-align: 2px;
    margin-left: 8px;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.quiet-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
    max-width: var(--measure);
}

.quiet-list li {
    padding-left: 30px;
    position: relative;
    color: var(--muted);
}

.quiet-list li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 0.62em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.quiet-list strong {
    color: var(--text);
    font-weight: 600;
}

/* ---------- prose (privacy page) ---------- */

.prose {
    padding: 40px 0 8px;
    max-width: var(--measure);
}

.prose h1 {
    font-size: clamp(2rem, 5vw, 2.6rem);
}

.prose h2 {
    font-size: 1.25rem;
    margin: 44px 0 12px;
}

.prose p,
.prose li {
    color: var(--muted);
}

.prose strong {
    color: var(--text);
    font-weight: 600;
}

.prose ul {
    padding-left: 22px;
}

.prose li {
    margin-bottom: 8px;
}

.effective {
    color: var(--muted);
    font-size: 0.9rem;
    margin-top: 10px;
}

.callout {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 10px;
    padding: 18px 22px;
    margin: 28px 0;
}

.callout p {
    margin: 0;
    color: var(--text);
}

/* ---------- footer ---------- */

.site-footer {
    border-top: 1px solid var(--border);
    margin-top: 56px;
    padding: 28px 0 48px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--muted);
}

.site-footer a:hover {
    color: var(--text);
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 0 52px;
        text-align: left;
    }

    .hero-mark {
        width: 150px;
    }

    .hero-mark svg {
        border-radius: 28px;
    }
}
