/* Qail Labs — single page */

:root {
    --ground: #e6ebf0;        /* cool grey-blue paper */
    --ground-deep: #d8dfe7;   /* slightly darker band */
    --ink: #1a2230;           /* graphite */
    --ink-soft: #4d5867;      /* secondary text */
    --rule: #b9c3cf;          /* hairlines */
    --cobalt: #2446d8;        /* the one accent */
    --cobalt-ink: #1a34a8;    /* accent on hover / focus */

    --font-display: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;
    --font-body: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", "DejaVu Sans Mono", monospace;

    --measure: 34rem;
    --gutter: clamp(1.25rem, 4vw, 3.5rem);
}

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

html { scroll-behavior: smooth; }

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

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--cobalt-ink); }
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--cobalt);
    outline-offset: 3px;
}

.skip {
    position: absolute;
    left: var(--gutter);
    top: -3rem;
    background: var(--ink);
    color: var(--ground);
    padding: 0.5rem 0.9rem;
    z-index: 20;
}
.skip:focus { top: 0.75rem; }

/* Masthead ------------------------------------------------------------ */

.masthead {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem var(--gutter);
    pointer-events: none;
}
.masthead > * { pointer-events: auto; }

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0;
    text-decoration: none;
}
.wordmark-logo {
    width: 22px;
    height: auto;
    display: block;
}

.masthead-nav { display: flex; gap: 1.6rem; font-size: 0.95rem; }
.masthead-nav a { text-decoration: none; }
.masthead-nav a:hover { text-decoration: underline; }

/* Hero ---------------------------------------------------------------- */

.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    align-items: center;
    padding: 6rem var(--gutter) 4.5rem;
    overflow: hidden;
}

.scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    touch-action: pan-y;
}
.scene.dragging { cursor: grabbing; }

.hero-copy {
    position: relative;
    isolation: isolate;
    width: 100%;
    justify-self: center;
    text-align: center;
    pointer-events: none;
}
.hero-copy::before {
    content: "";
    position: absolute;
    inset: -4rem -2rem;
    background: radial-gradient(ellipse at 50% 50%, rgba(230,235,240,0.45) 0%, rgba(230,235,240,0.2) 50%, rgba(230,235,240,0) 78%);
    z-index: -1;
}
.hero-copy a, .hero-copy p { pointer-events: auto; }

.hero-kicker {
    margin: 0 0 1.2rem;
    font-size: clamp(0.95rem, 1.3vw, 1.2rem);
    color: var(--ink-soft);
}

.hero h1 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 5.4vw, 5.75rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
    text-wrap: balance;
}


.hero-hint,
.hero-readout {
    position: absolute;
    bottom: 1.1rem;
    margin: 0;
    font-size: 0.8rem;
    color: var(--ink-soft);
    pointer-events: none;
}
.hero-hint { left: var(--gutter); }
.hero-readout {
    right: var(--gutter);
    font-variant-numeric: tabular-nums;
}
.hero-readout span { color: var(--ink); }

@media (max-width: 640px) {
    .hero-readout { display: none; }
    .hero { padding-bottom: 3.4rem; }
}

/* Contact ------------------------------------------------------------- */

.contact {
    padding: clamp(4rem, 9vw, 7.5rem) var(--gutter);
    border-top: 1px solid var(--rule);
    background: var(--ground-deep);
}

.contact h2 {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.25rem;
    line-height: 1.1;
    letter-spacing: -0.01em;
}


.contact-list {
    font-style: normal;
    font-family: var(--font-display);
    font-size: 1.05rem;
    letter-spacing: 0;
}
.contact-list a { text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

/* Colophon ------------------------------------------------------------ */

.colophon {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem var(--gutter) 2rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
    background: var(--ground-deep);
    border-top: 1px solid var(--rule);
}
.colophon p { margin: 0; }
