/* Lexicon — marketing site.
 *
 * Palette is lifted from the app's default "Letterpress" theme so the site and
 * the product look like the same thing: a magenta primary and a green
 * secondary, the two colours the Letterpress board plays with. Neutrals are
 * warm-tinted rather than pure white/black, which is the same call the app
 * makes — flat #fff/#000 read as cheap next to the accents.
 */
:root {
    color-scheme: light dark;

    --pink: #c42066;
    --pink-soft: #e85a96;
    --green: #12876b;
    --green-soft: #42b28f;

    --bg: #fbf8f9;
    --bg-alt: #f3edef;
    --bg-elevated: #ffffff;
    --text: #1f1a1d;
    --text-muted: #6b6169;
    --border: #e4d9dd;
    --accent: var(--pink);
    --accent-hover: #a3164f;
    --on-accent: #ffffff;

    --shadow: 0 1px 2px rgba(31, 26, 29, 0.04), 0 8px 24px rgba(31, 26, 29, 0.06);
    --shadow-lift: 0 2px 4px rgba(31, 26, 29, 0.06), 0 16px 40px rgba(31, 26, 29, 0.10);
    --radius: 18px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --pink: #ff6fa8;
        --pink-soft: #ff9ec4;
        --green: #4fd6a8;
        --green-soft: #7fe4c4;

        --bg: #131016;
        --bg-alt: #1b161d;
        --bg-elevated: #221b24;
        --text: #f4eef1;
        --text-muted: #a99ba3;
        --border: #332a36;
        --accent: var(--pink);
        --accent-hover: #ff9ec4;
        --on-accent: #2a0a19;

        --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.45);
        --shadow-lift: 0 2px 6px rgba(0, 0, 0, 0.5), 0 16px 40px rgba(0, 0, 0, 0.55);
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
    font-size: 17px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

.container {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 20;
    background: var(--accent);
    color: var(--on-accent);
    padding: 10px 18px;
    border-radius: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
}
.skip-link:focus {
    left: 0;
    color: var(--on-accent);
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    border-bottom: 1px solid var(--border);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 60px;
}
.site-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--text);
}
.site-header .brand img {
    width: 30px;
    height: 30px;
    border-radius: 7px;
}
.site-header nav {
    display: flex;
    gap: 22px;
    font-size: 14px;
}
.site-header nav a { color: var(--text-muted); }
.site-header nav a:hover { color: var(--text); }

/* Hero.
 * The drifting tiles behind the hero are the app's animated background, done
 * in CSS. Same rule applies as in the app: Reduce Motion parks them. */
.hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 96px 0 80px;
    background:
        radial-gradient(70% 55% at 50% 0%, color-mix(in srgb, var(--pink) 14%, transparent) 0%, transparent 70%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hero .tiles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    /* Deliberately faint. The app draws its tiles at 5–13% alpha so they never
     * compete with the words on top; at full strength here they read as content
     * rather than texture. */
    opacity: 0.16;
}
.hero .tiles span {
    position: absolute;
    display: grid;
    place-items: center;
    border-radius: 22%;
    font-weight: 700;
    color: var(--on-accent);
    animation: drift 46s linear infinite;
}
/* Below the two-column breakpoint the tiles crowd the headline, and there is no
 * margin for them to live in. */
@media (max-width: 820px) {
    .hero .tiles { display: none; }
}
@keyframes drift {
    from { transform: translate3d(0, 0, 0) rotate(var(--rot, 0deg)); }
    to   { transform: translate3d(-14vw, 9vh, 0) rotate(var(--rot, 0deg)); }
}
.hero .container { position: relative; }

.hero img.app-icon {
    width: 132px;
    height: 132px;
    border-radius: 29px;
    box-shadow: var(--shadow-lift);
    margin-bottom: 32px;
}
.hero h1 {
    font-size: clamp(42px, 6.5vw, 68px);
    font-weight: 750;
    line-height: 1.03;
    letter-spacing: -0.025em;
    margin: 0 0 18px;
}
.hero .tagline {
    font-size: clamp(18px, 2.4vw, 23px);
    color: var(--text-muted);
    margin: 0 auto 40px;
    max-width: 660px;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    border: 0;
    cursor: pointer;
}
.btn-primary {
    background: var(--accent);
    color: var(--on-accent);
    box-shadow: var(--shadow);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--on-accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lift);
}
.btn-ghost {
    color: var(--accent);
    background: transparent;
}
.btn-ghost::after { content: " ›"; }

.platform-note {
    margin-top: 26px;
    font-size: 13.5px;
    color: var(--text-muted);
}

/* Sections */
section.block { padding: 88px 0; }
section.block + section.block { border-top: 1px solid var(--border); }
section.block.alt { background: var(--bg-alt); }

section h2 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 720;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
}
section .lede {
    font-size: 19px;
    color: var(--text-muted);
    max-width: 660px;
    margin: 0 0 48px;
}

/* Features grid */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
    gap: 20px;
}
.feature {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
}
.feature .icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--pink) 12%, transparent);
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    font-size: 21px;
}
.feature:nth-child(3n+2) .icon { background: color-mix(in srgb, var(--green) 14%, transparent); }
.feature h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.01em;
}
.feature p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
}

/* Source / fact cards */
.sources {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.source {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    background: var(--bg-elevated);
}
.source .name {
    font-weight: 650;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}
.source .count {
    font-size: 13px;
    font-weight: 600;
    color: var(--green);
    margin-bottom: 10px;
}
.source p { margin: 0; font-size: 14.5px; color: var(--text-muted); }

/* FAQ */
.faq { max-width: 760px; }
.faq details {
    border-top: 1px solid var(--border);
    padding: 18px 0;
}
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
    cursor: pointer;
    font-weight: 550;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    font-size: 22px;
    color: var(--accent);
    line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details > p {
    margin: 12px 0 0;
    color: var(--text-muted);
}

/* Footer */
.site-footer {
    padding: 52px 0;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13.5px;
}
.site-footer .row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 32px;
    align-items: center;
    justify-content: space-between;
}
.site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
}
.site-footer nav a { color: var(--text-muted); }
.site-footer nav a:hover { color: var(--text); }

/* Article (privacy / support) */
.article {
    max-width: 740px;
    margin: 0 auto;
    padding: 72px 0;
}
.article h1 {
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 720;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}
.article .updated {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 40px;
}
.article h2 {
    font-size: 23px;
    font-weight: 650;
    letter-spacing: -0.01em;
    margin: 40px 0 12px;
}
.article p, .article li { font-size: 16.5px; color: var(--text); }
.article p { margin: 0 0 16px; }
.article ul, .article ol { padding-left: 22px; }
.article li { margin-bottom: 8px; }
.article a { word-break: break-word; }

.callout {
    background: color-mix(in srgb, var(--green) 10%, var(--bg-elevated));
    border: 1px solid color-mix(in srgb, var(--green) 28%, var(--border));
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 28px 0;
    font-size: 15.5px;
}
.callout p:last-child { margin-bottom: 0; }

/* Compatibility pills */
.compat {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 28px;
}
.compat .pill {
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 14px;
    color: var(--text-muted);
}

/* 404 */
.notfound {
    text-align: center;
    padding: 120px 24px;
}
.notfound h1 {
    font-size: clamp(72px, 14vw, 112px);
    margin: 0;
    line-height: 1;
    letter-spacing: -0.03em;
    color: var(--accent);
}
.notfound p { color: var(--text-muted); margin: 16px 0 32px; }
