/* Scale Match — landing page.
   Self-contained: no Tailwind, no icon font, no webfont. */

/* base.html.twig ships no reset — Tailwind's preflight used to supply one —
   so without this the default body margin frames the page in white. This
   stylesheet only loads on the Scale Match page, so it may own the body. */
body {
    margin: 0;
    background: #08090b;
}

.sm {
    --bg: #08090b;
    --text: #eceef1;
    --muted: #878d96;
    --line: rgba(255, 255, 255, 0.12);
    --accent: #2fe3a4;
    --accent-ink: #04120c;

    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.sm ::selection {
    background: var(--accent);
    color: var(--accent-ink);
}

.sm a {
    color: inherit;
    text-decoration: none;
}

.sm :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.sm-wrap {
    width: 100%;
    max-width: 64rem;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.sm-rule {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 0;
}

.sm-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: var(--accent);
    color: var(--accent-ink);
    font-size: 0.9375rem;
    font-weight: 600;
    white-space: nowrap;
    transition: filter 0.15s ease;
}

.sm-btn:hover {
    filter: brightness(1.08);
}

.sm-btn svg {
    width: 1.0625rem;
    height: 1.0625rem;
    flex: none;
}

/* ── header ──────────────────────────────────────────────────────────── */

.sm-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem 2rem;
    padding-block: clamp(2.5rem, 7vw, 4.5rem) clamp(2rem, 5vw, 3rem);
}

.sm-header h1 {
    margin: 0;
    font-size: clamp(2.25rem, 7.5vw, 3.75rem);
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.sm-tagline {
    margin: 0.625rem 0 0;
    color: var(--muted);
    font-size: 1rem;
}

/* ── preview rows ────────────────────────────────────────────────────── */

.sm-preview {
    padding-block: clamp(2.5rem, 7vw, 4.5rem);
    display: flex;
    flex-direction: column;
    gap: clamp(3rem, 9vw, 6rem);
}

.sm-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
}

/* Rows alternate: odd rows put the shot on the right, even rows on the left. */
.sm-row:nth-child(even) .sm-row-shot {
    order: -1;
}

.sm-row-shot {
    display: flex;
    justify-content: center;
}

.sm-row-shot img {
    display: block;
    width: 100%;
    max-width: 17.5rem;
    height: auto;
}

.sm-row-eyebrow {
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.6875rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
}

.sm-row-text h2 {
    margin: 0.75rem 0 0;
    font-size: clamp(1.375rem, 3.2vw, 1.875rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.sm-row-text p {
    margin: 0.625rem 0 0;
    color: var(--muted);
    max-width: 34ch;
}

/* ── footer ──────────────────────────────────────────────────────────── */

.sm-footer {
    padding-block: clamp(2.5rem, 7vw, 4rem);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem 2rem;
}

.sm-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.sm-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.sm-footer nav a {
    transition: color 0.15s ease;
}

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

/* ── small screens ───────────────────────────────────────────────────── */

@media (max-width: 46rem) {
    .sm-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* One column, and the shot always leads — the alternating order only
       makes sense side by side. */
    .sm-row,
    .sm-row:nth-child(even) {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        text-align: center;
    }

    .sm-row .sm-row-shot {
        order: -1;
    }

    .sm-row-shot img {
        max-width: min(64vw, 15rem);
    }

    .sm-row-text p {
        margin-inline: auto;
    }

    .sm-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sm * {
        transition-duration: 0.01ms !important;
    }
}
