/* Xuro landing page. Every colour, space, radius, size and font is a token
   from tokens.css; buttons and the focus ring come from controls.css.
   No new palette, no gradients, no glow. */

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--site-offset);
    -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

:root {
    --site-header-h: 44px;
    /* Scroll offset under the sticky bar: two rows on a phone, one above. */
    --site-offset: 96px;
    --site-max: 1160px;
    --site-gutter: var(--space-4);
}

@media (min-width: 560px) {
    :root { --site-offset: 60px; }
}

@media (min-width: 720px) {
    :root { --site-gutter: var(--space-6); }
}

body {
    font-size: var(--text-md);
    line-height: 1.55;
}

.wrap {
    max-width: var(--site-max);
    margin: 0 auto;
    padding: 0 var(--site-gutter);
}

/* Top bar: the app header's own look */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--color-bg-header);
    border-bottom: 1px solid var(--color-border-subtle);
}

.site-header .wrap {
    min-height: var(--site-header-h);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--space-4);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-primary);
    text-decoration: none;
    order: 1;
    min-height: var(--site-header-h);
}

.brand img {
    width: 22px;
    height: 22px;
}

.brand .mark-light { display: none; }
:root[data-theme="light"] .brand .mark-dark { display: none; }
:root[data-theme="light"] .brand .mark-light { display: inline; }

.brand-word {
    font-weight: var(--weight-bold);
    font-size: var(--text-md);
    letter-spacing: .04em;
}

.site-nav {
    order: 3;
    flex-basis: 100%;
    display: flex;
    gap: var(--space-1);
    padding-bottom: var(--space-2);
}

.site-nav a,
.theme-toggle {
    text-decoration: none;
}

.header-actions {
    order: 2;
    margin-left: auto;
}

.theme-toggle .t-night { display: none; }
:root[data-theme="light"] .theme-toggle .t-night { display: inline; }
:root[data-theme="light"] .theme-toggle .t-day { display: none; }

@media (min-width: 560px) {
    .site-nav {
        order: 2;
        flex-basis: auto;
        flex: 1;
        padding-bottom: 0;
        margin-left: var(--space-4);
    }
    .header-actions { order: 3; }
}

/* Sections */
.section {
    padding: 56px 0;
    border-bottom: 1px solid var(--color-border-subtle);
}

@media (min-width: 860px) {
    .section { padding: 72px 0; }
}

.section h2 {
    font-size: var(--text-xl);
    line-height: 1.2;
    margin: 0 0 var(--space-4);
    letter-spacing: -.005em;
}

.section p {
    margin: 0 0 var(--space-4);
    color: var(--color-text-secondary);
    max-width: 640px;
}

.eyebrow {
    display: block;
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--space-3);
}

/* Hero: the Designer sandbox */
.hero {
    padding: var(--space-8) 0 var(--space-10);
    border-bottom: 1px solid var(--color-border-subtle);
}

@media (min-width: 860px) {
    .hero { padding: 48px 0 56px; }
}

.hero h1 {
    font-size: var(--text-xl);
    line-height: 1.12;
    margin: 0 0 var(--space-3);
    letter-spacing: -.01em;
    max-width: 760px;
}

@media (min-width: 560px) {
    .hero h1 { font-size: var(--text-2xl); }
}

.hero .lead {
    font-size: var(--text-md);
    color: var(--color-text-secondary);
    max-width: 620px;
    margin: 0 0 var(--space-6);
}

/* A framed still. The space is reserved at its final aspect ratio so nothing
   shifts when the L2 sandbox or the L3 recording replaces it. */
.demo-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--color-bg-inset);
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

@media (min-width: 720px) {
    .demo-frame { aspect-ratio: 16 / 9; }
}

/* The live Designer needs room (owner, 2026-10-01: "I can barely even see the map").
   On a desktop the sandbox breaks out of the text column to nearly the full window,
   centred on it, and takes most of the screen height. */
@media (min-width: 1024px) {
    .demo-frame[data-demo="designer-sandbox"] {
        --sandbox-w: min(1680px, calc(100vw - 48px));
        width: var(--sandbox-w);
        margin-left: calc((100% - var(--sandbox-w)) / 2);
        aspect-ratio: auto;
        height: min(84vh, 940px);
        min-height: 560px;
    }
}

.demo-prompt {
    position: absolute;
    top: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - var(--space-8));
    margin: 0;
    padding: var(--space-2) var(--space-4);
    background: var(--color-bg-surface-raised);
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
    color: var(--color-text-primary);
    font-size: var(--text-base);
    font-weight: var(--weight-medium);
    text-align: center;
    pointer-events: none;
}

.section .demo-prompt {
    color: var(--color-text-primary);
}

/* L2: the live Designer sandbox (demo.js frames it from its own origin),
   or the looping clip where the sandbox does not run. */
.demo-frame iframe,
.demo-frame .demo-clip {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.demo-frame .demo-clip {
    object-fit: cover;
    background: var(--color-bg-inset);
}

/* Once the demo reports where its map is, the prompt sits 12 px down from
   the map's top edge, centred on the map (demo.js sets the two values). */
.demo-prompt.is-placed {
    top: var(--demo-prompt-top);
    left: var(--demo-prompt-left);
    z-index: 1;
    transition: opacity 400ms ease;
}

.demo-prompt.is-faded {
    opacity: 0;
}

.demo-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: var(--color-text-secondary);
    font-size: var(--text-base);
}

.demo-caption {
    margin: var(--space-3) 0 0;
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .demo-prompt.is-placed { transition: none; }
}

.hero-actions,
.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.button {
    text-decoration: none;
}

.cta-note {
    color: var(--color-text-secondary);
    font-size: var(--text-md);
    user-select: all;
}

/* Review demo */
.demo-head { margin-bottom: var(--space-6); }

.demo-end {
    margin-top: var(--space-6);
}

.demo-end p {
    color: var(--color-text-primary);
    margin-bottom: 0;
}

/* What Review checks */
.cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

@media (min-width: 720px) {
    .cols { grid-template-columns: 1fr 1fr; }
}

.card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-md);
    padding: var(--space-5);
}

.card h3 {
    margin: 0 0 var(--space-3);
    font-size: var(--text-md);
    font-weight: var(--weight-semibold);
}

.points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: var(--space-3);
}

.points li {
    display: grid;
    grid-template-columns: 14px 1fr;
    gap: var(--space-3);
    color: var(--color-text-secondary);
    font-size: var(--text-base);
}

.points li::before {
    content: "";
    width: 8px;
    height: 8px;
    margin-top: 7px;
    border-radius: 2px;
    background: var(--color-accent);
}

.card.leaves .points li::before {
    background: transparent;
    border: 1.5px solid var(--color-text-muted);
}

.disclaimer {
    margin-top: var(--space-6);
    padding: var(--space-4) var(--space-5);
    background: var(--color-bg-surface-raised);
    border: 1px solid var(--color-border-default);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius-md);
    max-width: 640px;
}

.section .disclaimer p {
    margin: 0;
    color: var(--color-text-primary);
    font-weight: var(--weight-medium);
}

/* Founder note, Early access */
.prose-narrow p { max-width: 620px; }

.section .offer {
    color: var(--color-text-primary);
}

/* Footer */
.site-footer {
    padding: var(--space-10) 0 56px;
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.site-footer p { margin: 0 0 var(--space-3); max-width: 720px; }
.site-footer a { color: var(--color-text-secondary); }
.site-footer a:hover { color: var(--color-text-primary); }
.site-footer .sep { padding: 0 var(--space-2); }

/* Privacy and Terms */
.legal {
    padding: var(--space-8) 0 var(--space-10);
}

.legal .wrap { max-width: 760px; }

.legal h1 {
    font-size: var(--text-2xl);
    line-height: 1.15;
    margin: 0 0 var(--space-3);
}

.legal h2 {
    font-size: var(--text-lg);
    margin: var(--space-8) 0 var(--space-3);
}

.legal p,
.legal li {
    color: var(--color-text-secondary);
}

.legal p { margin: 0 0 var(--space-4); }
.legal ul { margin: 0 0 var(--space-4); padding-left: var(--space-5); }
.legal li { margin-bottom: var(--space-2); }
.legal strong { color: var(--color-text-primary); font-weight: var(--weight-semibold); }

@media (prefers-reduced-motion: reduce) {
    .button { transition: none; }
}

/* Early access form */
.ea-form {
    margin-top: var(--space-6);
    max-width: 620px;
}

.ea-line {
    margin: 0 0 var(--space-4);
}

.ea-label {
    display: block;
    margin-bottom: var(--space-2);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

.ea-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.ea-row .field-input {
    flex: 1 1 260px;
    width: auto;
}

/* Honeypot: off screen, not display:none, so a bot still sees a field. */
.ea-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cf-turnstile {
    margin-top: var(--space-4);
}

.ea-live {
    margin-top: var(--space-3);
}

.ea-status {
    display: none;
    margin: 0;
}

.ea-status:target,
.ea-status.is-shown {
    display: block;
}

.ea-error {
    color: var(--color-danger-fill);
}

.ea-form.is-done .ea-line,
.ea-form.is-done .ea-label,
.ea-form.is-done .ea-row,
.ea-form.is-done .cf-turnstile {
    display: none;
}

.ea-alt {
    margin-top: var(--space-4);
    color: var(--color-text-secondary);
    font-size: var(--text-md);
}
