/* Small Group's website. The colors are the app's own (see
   mobile/src/constants/colors.ts in the SmallGroup repo), and like the app,
   the site follows the phone's light or dark setting. */

:root
{
    color-scheme: light dark;

    --background: #F6F8F6;
    --card: #FFFFFF;
    --text: #1B2722;
    --muted: #56655E;
    --line: #D9E1DC;
    --accent: #2D6A4E;
    --on-accent: #FFFFFF;
    --accent-soft: #DFECE4;

    /* The green band at the top of the home and invite pages, from the app icon. */
    --band-top: #3F8566;
    --band-bottom: #234F3C;
    --band-text: #F6F8F6;
    --band-muted: #D2E5D9;
    --sun: #F5DCAB;

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --width: 680px;
    --radius: 16px;
}

@media (prefers-color-scheme: dark)
{
    :root
    {
        --background: #121815;
        --card: #19211D;
        --text: #E4ECE7;
        --muted: #A0AEA7;
        --line: #29332F;
        --accent: #7AC49E;
        --on-accent: #0C1912;
        --accent-soft: #1C3126;

        --band-top: #2A5C46;
        --band-bottom: #17352A;
    }
}

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

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

body
{
    margin: 0;
    background: var(--background);
    color: var(--text);
    font: 17px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
}

img,
svg
{
    display: block;
}

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

a:hover
{
    text-decoration-thickness: 2px;
}

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

/* Keeps hidden things hidden, even ones whose class sets a display. */
[hidden]
{
    display: none !important;
}

/* ---------- Header and footer ---------- */

.site-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: var(--width);
    margin: 0 auto;
    padding: 18px 20px;
}

.brand
{
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
}

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

.site-nav a
{
    color: var(--muted);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

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

.site-footer
{
    max-width: var(--width);
    margin: 0 auto;
    padding: 0 20px 48px;
    color: var(--muted);
    font-size: 15px;
}

.site-footer nav
{
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}

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

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

/* ---------- The green band ---------- */

.band
{
    padding-bottom: 64px;
    /* A soft glow behind the sun, like the one on the app icon. */
    background:
        radial-gradient(340px 220px at 50% 165px, rgba(235, 198, 125, 0.28), transparent 70%),
        linear-gradient(180deg, var(--band-top), var(--band-bottom));
    /* Curves along the bottom, like the pages of the open book. */
    border-bottom-left-radius: 50% 44px;
    border-bottom-right-radius: 50% 44px;
    color: var(--band-text);
}

.band .brand,
.band .site-nav a
{
    color: var(--band-text);
}

.hero
{
    max-width: var(--width);
    margin: 0 auto;
    padding: 20px 20px 0;
    text-align: center;
}

.hero-art
{
    width: 150px;
    height: 150px;
    margin: 0 auto 18px;
}

.hero h1
{
    margin: 0;
    font-size: clamp(36px, 10vw, 46px);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-subtitle
{
    margin: 8px 0 0;
    color: var(--sun);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-lead
{
    max-width: 30em;
    margin: 18px auto 0;
    color: var(--band-muted);
    font-size: 19px;
}

.badge
{
    display: inline-block;
    margin: 26px 0 0;
    padding: 10px 20px;
    border: 1px solid rgba(246, 248, 246, 0.45);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
}

/* ---------- Pages ---------- */

.page
{
    max-width: var(--width);
    margin: 0 auto;
    padding: 12px 20px 56px;
}

.eyebrow
{
    margin: 16px 0 8px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.page h1
{
    margin: 0;
    font-size: clamp(30px, 8vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.lead
{
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 19px;
}

.callout
{
    margin: 28px 0 0;
    padding: 18px 20px;
    background: var(--accent-soft);
    border-radius: var(--radius);
}

.callout-label
{
    display: block;
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.callout p
{
    margin: 0;
}

.section
{
    margin-top: 36px;
}

.section h2
{
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.3;
}

.section p
{
    margin: 0 0 12px;
}

.list
{
    margin: 0;
    padding-left: 22px;
}

.list li
{
    margin: 8px 0;
    padding-left: 4px;
}

.list li::marker
{
    color: var(--accent);
}

.button
{
    display: inline-block;
    padding: 13px 26px;
    background: var(--accent);
    border-radius: 999px;
    color: var(--on-accent);
    font-weight: 700;
    text-decoration: none;
}

.button:hover
{
    filter: brightness(1.08);
}

/* ---------- Home ---------- */

.features
{
    display: grid;
    gap: 12px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

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

.feature-icon
{
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--accent-soft);
    border-radius: 12px;
    color: var(--accent);
}

.feature h2
{
    margin: 0 0 2px;
    font-size: 18px;
    line-height: 1.35;
}

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

.fine-print
{
    margin: 24px 0 0;
    color: var(--muted);
    font-size: 15px;
    text-align: center;
}
