/* EyeVOne client — Gate tokens, local-sun sky, mascot landing */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/static/fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/static/fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --gate-chrome: #070B14;
    --gate-chrome2: #0B1220;
    --gate-plate: #0A1220;
    --gate-ink: #F4F7FC;
    --gate-muted: #8B9BB4;
    --gate-line: #1C2A44;
    --gate-accent: #3D7DFF;
    --gate-accent2: #7AA7FF;
    --gate-live: #E11D2E;
    --gate-plate-a: rgba(10, 18, 32, .72);
    --gate-line-a: rgba(122, 167, 255, .18);
    --gate-accent-glow: rgba(61, 125, 255, .35);
    --gate-font: 'Inter', system-ui, -apple-system, sans-serif;
    --gate-radius-pill: 999px;
    --gate-radius-msg: 14px;
    --gate-tap: 44px;
    --gate-shadow: 0 8px 32px rgba(0, 0, 0, .5);
    --gate-mark-gap: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    background-color: var(--gate-chrome);
    color: var(--gate-ink);
    font-family: var(--gate-font);
    overflow-x: hidden;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.gate-hero {
    background-color: var(--gate-chrome);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Local-sun skies: gradients + sun/moon disc. No geo APIs. */
html[data-sky="dawn"] body.gate-hero,
body[data-sky="dawn"] {
    background-color: #2a1830;
    background-image: linear-gradient(180deg, #1a1530 0%, #4a2c4a 38%, #c45c3a 72%, #e8a060 100%);
}

html[data-sky="day"] body.gate-hero,
body[data-sky="day"] {
    background-color: #0a2a5c;
    background-image: linear-gradient(180deg, #071a3a 0%, #1e4d8c 42%, #3d7dff 100%);
}

html[data-sky="dusk"] body.gate-hero,
body[data-sky="dusk"] {
    background-color: #1a0c18;
    background-image: linear-gradient(180deg, #12081c 0%, #3d1b3a 32%, #c44536 68%, #e07a3d 100%);
}

html[data-sky="night"] body.gate-hero,
body[data-sky="night"] {
    background-color: var(--gate-chrome);
    background-image: linear-gradient(180deg, #020617 0%, #070B14 55%, #0B1220 100%);
}

body.gate-hero::before {
    content: "";
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

html[data-sky="dawn"] body.gate-hero::before,
body[data-sky="dawn"]::before {
    width: 96px;
    height: 96px;
    background: #ffb347;
    box-shadow: 0 0 72px 22px rgba(255, 179, 71, 0.4);
    bottom: 16vh;
    left: 10vw;
    top: auto;
    right: auto;
}

html[data-sky="day"] body.gate-hero::before,
body[data-sky="day"]::before {
    width: 128px;
    height: 128px;
    background: #ffe566;
    box-shadow: 0 0 90px 28px rgba(255, 229, 102, 0.38);
    top: 8vh;
    right: 12vw;
}

html[data-sky="dusk"] body.gate-hero::before,
body[data-sky="dusk"]::before {
    width: 88px;
    height: 88px;
    background: #ff7a45;
    box-shadow: 0 0 70px 20px rgba(255, 122, 69, 0.38);
    bottom: 14vh;
    right: 10vw;
    top: auto;
    left: auto;
}

html[data-sky="night"] body.gate-hero::before,
body[data-sky="night"]::before {
    width: 72px;
    height: 72px;
    background: #e8eef8;
    box-shadow: 0 0 40px 10px rgba(232, 238, 248, 0.28);
    top: 10vh;
    right: 14vw;
}

@keyframes gate-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

:focus-visible {
    outline: 2px solid var(--gate-accent2);
    outline-offset: 2px;
}

.omni-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 32px;
    position: relative;
    z-index: 10;
    gap: 12px;
}

.omni-brand {
    display: flex;
    align-items: center;
    gap: var(--gate-mark-gap);
}

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

.omni-wordmark {
    font-family: var(--gate-font);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--gate-ink);
    text-transform: uppercase;
}

.omni-gate-chip {
    font-family: var(--gate-font);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--gate-accent2);
    border: 1px solid var(--gate-line);
    border-radius: var(--gate-radius-pill);
    padding: 2px 8px;
    text-transform: uppercase;
    line-height: 1.4;
}

.omni-nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.gate-pill-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--gate-line-a);
    color: var(--gate-ink);
    padding: 8px 18px;
    min-height: var(--gate-tap);
    border-radius: var(--gate-radius-pill);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: var(--gate-font);
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gate-pill-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--gate-accent2);
}

.gate-pill-btn:active {
    opacity: 0.9;
}

.gate-pill-btn:disabled,
.gate-send-btn:disabled {
    opacity: 0.45;
    pointer-events: none;
    cursor: not-allowed;
}

.gate-pill-primary {
    background: var(--gate-accent);
    color: var(--gate-ink);
    border: none;
    font-weight: 600;
}

.gate-pill-primary:hover {
    background: #5a90ff;
    box-shadow: 0 0 15px var(--gate-accent-glow);
}

.omni-hero-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0 20px 40px;
    position: relative;
    z-index: 5;
}

.iv1-hero-slot {
    width: 100%;
    height: 50vh;
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto 8px;
}

.iv1-mascot {
    width: 100%;
    height: 50vh;
    max-height: 50vh;
    object-fit: contain;
    object-position: center bottom;
    display: block;
    pointer-events: none;
}

.omni-hero-content {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gate-composer {
    width: 100%;
    min-height: 56px;
    background: var(--gate-plate-a);
    border: 1px solid var(--gate-line);
    border-radius: var(--gate-radius-pill);
    padding: 8px 10px 8px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(16px);
    box-shadow: var(--gate-shadow), inset 0 1px 1px rgba(255, 255, 255, 0.08);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    margin-bottom: 20px;
}

.gate-composer:focus-within {
    border-color: var(--gate-accent);
    box-shadow: var(--gate-shadow), 0 0 18px var(--gate-accent-glow);
    background: rgba(10, 18, 32, 0.88);
}

.gate-composer input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--gate-ink);
    font-size: 1.05rem;
    font-family: var(--gate-font);
}

.gate-composer input:focus {
    outline: none;
}

.gate-composer input::placeholder {
    color: var(--gate-muted);
}

.gate-send-btn {
    width: var(--gate-tap);
    height: var(--gate-tap);
    min-width: var(--gate-tap);
    min-height: var(--gate-tap);
    border-radius: 50%;
    background: rgba(244, 247, 252, 0.12);
    border: none;
    color: var(--gate-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.gate-send-btn:hover,
.gate-send-btn:focus-visible {
    background: var(--gate-accent);
    color: var(--gate-ink);
}

.gate-send-btn[aria-busy="true"] {
    opacity: 0.45;
    pointer-events: none;
}

.iv1-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    justify-content: center;
    width: 100%;
    border-bottom: 1px solid var(--gate-line);
    margin-bottom: 0;
}

.iv1-tab {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--gate-muted);
    padding: 10px 12px;
    min-height: var(--gate-tap);
    font-family: var(--gate-font);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: -1px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.iv1-tab:hover,
.iv1-tab:focus-visible {
    color: var(--gate-ink);
}

.iv1-tab[aria-selected="true"] {
    color: var(--gate-ink);
    border-bottom-color: var(--gate-accent);
}

.iv1-tab-panels {
    width: 100%;
}

.iv1-tab-panel {
    display: none;
    width: 100%;
    text-align: left;
    padding: 16px 8px 8px;
    color: var(--gate-ink);
    font-size: 0.95rem;
    line-height: 1.6;
    background: var(--gate-plate-a);
    border: 1px solid var(--gate-line);
    border-top: none;
    border-radius: 0 0 12px 12px;
    backdrop-filter: blur(12px);
}

.iv1-tab-panel.is-open,
.iv1-tab-panel:not([hidden]) {
    display: block;
}

.iv1-tab-panel[hidden] {
    display: none;
}

.iv1-tab-panel p {
    color: var(--gate-ink);
}

.iv1-tab-panel a {
    color: var(--gate-accent2);
    text-decoration: none;
}

.iv1-tab-panel a:hover {
    text-decoration: underline;
}

.iv1-notice {
    flex: 1;
    width: 100%;
    max-width: 640px;
    margin: 24px auto 0;
    padding: 0 24px 48px;
    text-align: left;
    position: relative;
    z-index: 5;
}

.iv1-notice h1 {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 16px;
}

.iv1-notice h2 {
    font-size: 0.92rem;
    font-weight: 600;
    margin: 22px 0 8px;
    color: var(--gate-ink);
}

.iv1-notice p {
    color: var(--gate-muted);
    line-height: 1.65;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.iv1-notice a {
    color: var(--gate-accent2);
    text-decoration: none;
}

.iv1-notice a:hover {
    text-decoration: underline;
}

.iv1-notice code {
    font-size: 0.88em;
    color: var(--gate-ink);
}

.omni-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 40px;
    position: relative;
    z-index: 10;
    gap: 12px;
    text-align: center;
}

.omni-footer-copy {
    font-size: 0.85rem;
    color: var(--gate-muted);
    line-height: 1.5;
}

.omni-footer-copy a {
    color: var(--gate-accent2);
    text-decoration: none;
}

.omni-footer-copy a:hover {
    text-decoration: underline;
}

.omni-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gate-live);
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(225, 29, 46, 0.55);
    animation: gate-pulse 2s ease-in-out infinite;
}

.gate-messages {
    width: 100%;
    margin-top: 24px;
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gate-msg {
    padding: 14px 18px;
    border-radius: var(--gate-radius-msg);
    background: var(--gate-plate-a);
    border: 1px solid var(--gate-line);
    backdrop-filter: blur(10px);
}

.gate-msg.user {
    align-self: flex-end;
    background: rgba(61, 125, 255, 0.15);
    border-color: rgba(61, 125, 255, 0.4);
    max-width: 80%;
}

.gate-msg.assistant {
    align-self: flex-start;
    max-width: 90%;
}

.gate-msg p {
    font-size: 0.98rem;
    line-height: 1.5;
    color: var(--gate-ink);
}

.gate-msg small {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--gate-muted);
}

.gate-msg.error p {
    color: #FF8A8A;
}

.gate-banner {
    width: 100%;
    margin-top: 14px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    background: rgba(225, 29, 46, 0.18);
    border: 1px solid rgba(225, 29, 46, 0.5);
    color: #FF8A8A;
}

/* Drawer is position:fixed on the viewport — do not nest in a relative landing group. */
.gate-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 340px;
    height: 100%;
    background: rgba(11, 18, 32, 0.96);
    border-left: 1px solid var(--gate-line);
    backdrop-filter: blur(20px);
    z-index: 100;
    padding: 30px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.gate-drawer.open {
    transform: translateX(0);
}

.gate-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--gate-line);
    padding-bottom: 12px;
}

.gate-drawer-header h3 {
    font-family: var(--gate-font);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.95rem;
}

.gate-icon-close {
    background: none;
    border: none;
    color: var(--gate-ink);
    font-size: 1.8rem;
    cursor: pointer;
    width: var(--gate-tap);
    height: var(--gate-tap);
    min-width: var(--gate-tap);
    min-height: var(--gate-tap);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gate-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    gap: 12px;
}

.gate-stat-label {
    color: var(--gate-muted);
}

.gate-stat-val {
    color: var(--gate-ink);
    font-weight: 600;
}

body.chat-active .iv1-hero-slot {
    display: none;
}

body.chat-active .iv1-tabs,
body.chat-active .iv1-tab-panels {
    display: none;
}

body.chat-active .gate-messages {
    max-height: none;
    flex: 1;
    min-height: 240px;
}

body.chat-active .omni-hero-main {
    flex: 1;
}

@media (min-width: 1024px) {
    .omni-nav {
        padding: 24px 40px;
    }
}

@media (max-width: 1023px) and (min-width: 641px) {
    .omni-nav {
        padding: 16px 24px;
    }
}

@media (max-width: 640px) {
    .omni-nav {
        padding: 16px;
        flex-wrap: wrap;
    }

    .omni-nav-actions {
        gap: 8px;
    }

    .gate-composer {
        padding: 6px 8px 6px 16px;
    }

    .iv1-tab {
        font-size: 0.78rem;
        padding: 10px 8px;
    }

    .gate-drawer {
        width: 100%;
    }

    .omni-footer {
        padding: 16px 20px;
    }

    .iv1-hero-slot,
    .iv1-mascot {
        height: 42vh;
        max-height: 42vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
