:root {
    color-scheme: dark;
    /* SF Pro on Apple devices, Segoe UI Variable on Windows 11; plain system UI elsewhere. */
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
    --page: #000;
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --smoke: #0c0c0e;
    --edge: #454549;
    --edge-focus: #8c8c92;
    --logo-ratio: 3.702;
    --logo: min(56vw, 840px, max(400px, (100svh - 380px) * var(--logo-ratio)));
    --form: clamp(420px, 36vw, 520px);
    --field: 58px;
    --inset: 6px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--page); }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--page); color: var(--ink); }
::selection { color: #000; background: #dedee1; }

/* One centred lockup, optically placed slightly above the middle of the viewport. */
.page-content { position: relative; z-index: 1; flex: 1 0 auto; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(40px, 6vh, 72px) 32px clamp(24px, 7vh, 72px); text-align: center; }
.brand { display: block; width: var(--logo); max-width: 100%; }
.brand img { display: block; width: 100%; height: auto; }
.signup-copy { width: var(--form); max-width: 100%; margin-top: clamp(40px, 7vh, 68px); }
h1 { margin: 0; font-family: var(--display); font-size: clamp(26px, 2.15vw, 32px); line-height: 1.15; font-weight: 600; letter-spacing: -0.015em; overflow-wrap: anywhere; }
.signup { width: 100%; margin-top: clamp(18px, 2.4vh, 24px); }

/* Flat field; surface stays separate from crisp native controls and focus rings. */
.glass-shell { position: relative; isolation: isolate; display: flex; align-items: center; gap: 8px; min-height: var(--field); padding: var(--inset) var(--inset) var(--inset) 24px; border-radius: 999px; }
.glass-surface { position: absolute; z-index: -1; inset: 0; overflow: hidden; border-radius: inherit; background: var(--smoke); border: 1px solid var(--edge); pointer-events: none; }

.glass-shell:focus-within .glass-surface { border-color: var(--edge-focus); }
/* Keyboard focus rings the whole pill rather than the bare text box inside it. */
:root:not([data-pointer-focus]) .glass-shell:has(input:focus-visible) { outline: 2px solid #f5f5f7; outline-offset: 3px; }
@supports not selector(:has(*)) { :root:not([data-pointer-focus]) .glass-shell:focus-within { outline: 2px solid #f5f5f7; outline-offset: 3px; } }
input, button { font: inherit; }
input[type="email"] { flex: 1; min-width: 0; width: 100%; height: calc(var(--field) - var(--inset) * 2); padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ink); caret-color: var(--ink); font-size: 17px; line-height: 1.3; letter-spacing: -0.01em; text-align: left; }
input[type="email"]:focus { outline: none; }
input::placeholder { color: var(--muted); opacity: 1; }

button[type="submit"] { position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; min-width: 112px; width: var(--pending-button-width, auto); max-width: 100%; height: calc(var(--field) - var(--inset) * 2); padding: 0 22px; border: 0; border-radius: 999px; background: #e3e5e8; color: #0b0b0c; font-size: 17px; font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; white-space: nowrap; cursor: pointer; transition: transform 140ms ease-out, background-color 140ms ease-out; }
.button-label { position: relative; z-index: 1; line-height: 1.2; transform: translateY(-0.5px); pointer-events: none; }
/* Only authored internal material is filtered; field and label remain crisp. */
.button-material { position: absolute; z-index: 0; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; background: linear-gradient(180deg, #f6f7f9b8 0%, #c5c9d0a8 48%, #e4e6eac9 100%); border: 1px solid #ffffffa8; border-bottom-color: #c9d1c9; transition: border-color 140ms ease-out, transform 140ms ease-out; }
.button-reflection { position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(ellipse 42% 85% at var(--light-x, 38%) var(--light-y, 24%), #ffffffed 0%, #ffffff80 33%, #ffffff00 75%), linear-gradient(176deg, #ffffff80 0%, #ffffff00 38%, #858e9c45 64%, #ffffffa3 96%); opacity: var(--light-strength, .78); }
@media (hover: hover) and (pointer: fine) { button[type="submit"]:hover:not(:disabled) .button-material { border-top-color: #fff; } }
button[type="submit"]:focus-visible .button-material { border-color: #fff; }
button[type="submit"]:focus-visible .button-reflection { opacity: 1; }
button[type="submit"]:active:not(:disabled) { background: #c6cbd2; transform: translateY(1px); transition-duration: 0ms; }
button[type="submit"]:active:not(:disabled) .button-material { transform: scaleY(.96); border-bottom-color: #f1f3f4; transition-duration: 0ms; }
button[type="submit"]:disabled { cursor: wait; opacity: 1; background: #d3d6dc; transform: none; }
button[type="submit"]:disabled .button-reflection { --light-x: 38% !important; --light-y: 24% !important; opacity: .65; }
/* Rendered glass (glass-button.mjs): the canvas carries body, rim and highlights, so the
   static CSS material steps aside and a spring drives a slight grow-and-squash on press. */
.button-glass { display: none; }
button[data-glass-enhanced] { background: transparent; transform: scale(var(--press-x, 1), var(--press-y, 1)); transition: none; }
button[data-glass-enhanced] .button-material { background: none; border: 0; transform: none !important; }
button[data-glass-enhanced] .button-reflection { display: none; }
button[data-glass-enhanced] .button-glass { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
button[data-glass-enhanced]:active:not(:disabled), button[data-glass-enhanced]:disabled { background: transparent; }
button[data-glass-enhanced]:active:not(:disabled) { transform: scale(var(--press-x, 1), var(--press-y, 1)); }
button:focus-visible, a:focus-visible { outline: 2px solid #f5f5f7; outline-offset: 3px; }
/* Messages hang below the field so validation never shifts the centred lockup;
   after success the confirmation takes the field's place at the same height. */
.signup { position: relative; }
.feedback { position: absolute; top: calc(100% + 14px); left: 0; right: 0; margin: 0; color: var(--ink); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
#signup-entry[hidden] ~ .feedback { position: static; display: flex; align-items: center; justify-content: center; min-height: var(--field); font-size: 17px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Termites stay small, dim and out at the edges. */
.roaming-layer { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.roamer { position: absolute; left: 0; top: 0; width: 24px; opacity: 0.62; transform: translate(-50%, -50%); pointer-events: none; }
.roamer--soldier { width: 34px; opacity: 0.76; }
.roamer svg { display: block; width: 100%; height: auto; }

.motion-footer { position: relative; z-index: 1; width: 100%; min-height: 56px; margin-top: auto; padding: 0 32px 16px; }
/* Keep the removed 44px control's space plus the existing 16px bottom padding. */
@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) and (forced-colors: none) and (min-height: 500.01px) {
    .motion-footer { min-height: 60px; }
}

.confirmation-copy { width: min(640px, 100%); }
.confirmation-copy h1 { font-size: clamp(24px, 2.15vw, 32px); }
.confirmation-copy p { margin: 18px 0 0; font-size: 17px; }
a { color: var(--ink); text-underline-offset: 4px; }

@media (max-width: 899.98px) {
    :root { --logo: min(100%, 360px); --form: 100%; --field: 56px; }
    .page-content { padding: 40px 24px 64px; }
    .signup-copy { max-width: 440px; margin-top: 48px; }
    h1 { font-size: 26px; }
    .signup { margin-top: 18px; }
    .glass-shell { padding-left: 20px; }
    button[type="submit"] { min-width: 0; padding: 0 18px; }
    .roamer { width: 20px; }
    .roamer--soldier { width: 28px; }
    .motion-footer { padding-inline: 24px; }
}
@media (max-width: 359.98px) {
    .page-content { padding-inline: 20px; }
    h1 { font-size: 24px; }
    .glass-shell { padding-left: 16px; }
    input[type="email"], button[type="submit"] { font-size: 16px; }
    button[type="submit"] { padding: 0 16px; }
}
@media (max-width: 299.98px) {
    .glass-shell { flex-direction: column; align-items: stretch; padding: 8px; border-radius: 24px; }
    input[type="email"] { padding: 0 10px; }
    button[type="submit"] { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { button[type="submit"], .button-material { transition: none; transform: none !important; } }
@media (forced-colors: active) {
    .glass-surface { background: Canvas; border: 1px solid CanvasText; box-shadow: none; }
    .roaming-layer { display: none; }
    .button-material { display: none; }
    button[type="submit"] { transform: none !important; }
    input[type="email"] { color: CanvasText; }
    .glass-shell:focus-within { outline: 2px solid Highlight; outline-offset: 3px; }
    button[type="submit"] { border: 1px solid ButtonText; background: ButtonFace; color: ButtonText; box-shadow: none; }
    button:focus-visible, a:focus-visible { outline-color: Highlight; }
}
@media (max-height: 500px) { .roaming-layer { display: none; } }

/* Isolated local beta entry; incumbent composition remains the authority. */
.beta-access{position:relative;z-index:2;display:flex;justify-content:flex-end;padding:12px 32px 0}.beta-access a{min-height:44px;display:inline-flex;align-items:center;color:#f5f5f7;font-size:16px;text-decoration:none}.beta-access a:hover{text-decoration:underline;text-underline-offset:4px}.beta-access a:focus-visible{outline:2px solid #f5f5f7;outline-offset:4px}
@media(max-width:600px){.beta-access{padding:8px 16px 0;margin-bottom:24px}}
