:root {
    --bg: #ffffff;
    --ink: #121317;
    --ink-soft: #4a4d57;
    --ink-faint: #8b8f99;
    --line: rgba(18, 19, 23, 0.10);
    --line-strong: rgba(18, 19, 23, 0.18);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
}

body {
    min-height: 100vh;
    overflow: hidden;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', 'Google Sans', 'Helvetica Neue', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-feature-settings: 'ss01', 'cv11';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

#field-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 22px 36px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand-mark {
    display: inline-flex;
}

.brand-name {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    color: var(--ink);
}

.top-shell {
    position: relative;
    z-index: 2;
    width: min(1080px, calc(100% - 48px));
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 96px 0 120px;
}

h1 {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.6rem, 6.6vw, 5rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    font-weight: 400;
    color: var(--ink);
    max-width: 18ch;
    text-wrap: balance;
}

.lede {
    margin: 28px 0 0;
    max-width: 38ch;
    color: var(--ink-soft);
    font-size: clamp(1rem, 1.4vw, 1.125rem);
    line-height: 1.55;
    letter-spacing: -0.005em;
    font-weight: 400;
}

.top-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 24px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--ink-faint);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    pointer-events: none;
}

.footer-line {
    color: var(--ink-soft);
}

.footer-line--muted {
    color: var(--ink-faint);
}

@media (max-width: 720px) {
    .top-header {
        padding: 18px 22px;
    }

    .top-shell {
        width: calc(100% - 28px);
        padding: 80px 0 130px;
    }

    h1 {
        font-size: clamp(2.1rem, 9vw, 3.4rem);
        letter-spacing: -0.008em;
    }

    .lede {
        font-size: 0.96rem;
        margin-top: 22px;
    }

    .top-footer {
        bottom: 18px;
        font-size: 0.72rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


.input-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    z-index: -10;
}

.hand-control {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 4;
}

.hand-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    box-shadow: 0 1px 0 rgba(18, 19, 23, 0.04);
}

.hand-btn:hover,
.hand-btn:focus-visible {
    border-color: var(--ink);
    outline: none;
}

.hand-btn:active {
    transform: translateY(1px);
}

.hand-btn.is-active {
    background: var(--ink);
    color: #ffffff;
    border-color: var(--ink);
}

.hand-btn.is-busy {
    opacity: 0.72;
    cursor: progress;
}

.hand-btn:disabled,
.hand-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
}

.hand-btn-icon {
    flex: 0 0 auto;
}

.hand-indicator {
    position: fixed;
    right: 22px;
    bottom: 70px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
    pointer-events: none;
}

.hand-indicator.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hand-indicator.is-tracking {
    color: var(--ink);
}

.hand-indicator-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #c8ccd3;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.hand-indicator.is-tracking .hand-indicator-dot {
    background: #2bb673;
    box-shadow: 0 0 0 3px rgba(43, 182, 115, 0.18);
}


@media (max-width: 720px) {
    .hand-control { right: 14px; bottom: 14px; }
    .hand-indicator { right: 14px; bottom: 60px; }
}
