/* Landing page for the WordTee demo. Dark only, matching the app itself. */

:root {
    --bg: #0b1017;
    --surface: #131c27;
    --border: #223044;
    --text: #e6edf5;
    --muted: #8ba0b8;
    --accent: #4db6f5;
    --accent-ink: #05121d;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    margin: 0;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    /* Keep the content centred but never wider than two comfortable columns. */
    max-width: 1060px;
    margin-inline: auto;
}

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

h1,
h2 {
    line-height: 1.2;
    margin: 0;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: #0006;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.1em 0.4em;
}

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

.site-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.mark {
    width: 52px;
    height: 52px;
    flex: none;
    color: var(--accent);
}

.site-header h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    letter-spacing: -0.02em;
}

.tagline {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

/* ---------- layout ---------- */

main {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3rem);
    grid-template-columns: auto minmax(280px, 1fr);
    align-items: start;
}

@media (max-width: 760px) {
    main {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    /* On a phone the visitor is here to install the app, not to play with the
       demo, so put the download first and the demo below it. */
    .download {
        order: 1;
    }

    .demo {
        order: 2;
    }
}

section h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    margin-bottom: 1rem;
}

/* ---------- the app ---------- */

.phone-bezel {
    background: #05090e;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 10px;
    box-shadow: 0 24px 60px -20px #000, 0 0 0 1px #ffffff08 inset;
}

.phone-screen {
    position: relative;
    width: min(320px, 78vw);
    aspect-ratio: 320 / 620;
    border-radius: 21px;
    overflow: hidden;
    background: #0f1722;
}

/* eframe observes the canvas' CSS box and sets the backing resolution itself. */
#wordtee-canvas {
    display: block;
    width: 100%;
    height: 100%;
    /* The app handles taps; don't let the browser scroll or zoom instead. */
    touch-action: none;
}

.boot-status {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: #0f1722;
    color: var(--muted);
    text-align: center;
    padding: 1rem;
}

.boot-status p {
    margin: 0;
}

.spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #ffffff1a;
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .spinner {
        animation-duration: 3s;
    }
}

.hint {
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
    margin: 1rem 0 0;
}

kbd {
    font: inherit;
    font-size: 0.85em;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: 0.05em 0.4em;
}

/* ---------- download ---------- */

.download {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 1.75rem);
    width: 100%;
    max-width: 460px;
}

.button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 650;
    text-decoration: none;
    transition: filter 0.15s;
}

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

.button svg {
    width: 20px;
    height: 20px;
    flex: none;
}

.button.disabled {
    background: #27364a;
    color: var(--muted);
    cursor: not-allowed;
    pointer-events: none;
}

.facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    margin: 1.5rem 0 0;
    font-size: 0.9rem;
}

.facts dt {
    color: var(--muted);
}

.facts dd {
    margin: 0;
}

details {
    margin-top: 1rem;
    font-size: 0.9rem;
}

summary {
    color: var(--muted);
    cursor: pointer;
}

.sha {
    display: block;
    margin-top: 0.5rem;
    padding: 0.5rem;
    overflow-wrap: anywhere;
    background: #0006;
}

.steps {
    margin: 1.5rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.steps li+li {
    margin-top: 0.4rem;
}

.warn {
    margin: 1.25rem 0 0;
    padding: 0.75rem 0.9rem;
    border: 1px solid #5c4a1f;
    background: #2a210c;
    border-radius: 9px;
    color: #e8d4a0;
    font-size: 0.875rem;
}

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

footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.875rem;
}

footer p {
    margin: 0;
}
