/* Theme: dark by default (the app's original palette), light when the OS prefers it.
   Values mirror core/ui NexusColor so the landing page and the app look the same. */
:root {
    color-scheme: dark light;
    --nexus-bg: #0f172a;
    --nexus-bg-rgb: 15 23 42;
    --nexus-landing-image: url("landing-bg-dark.jpg");
    --nexus-text: #fff;
    --nexus-text-secondary: #666;
    --nexus-outline: rgba(255, 255, 255, 0.3);
    --nexus-outline-hover: rgba(255, 255, 255, 0.6);
    --nexus-hover-fill: rgba(255, 255, 255, 0.1);
    --nexus-loader-track: #334155;
    --nexus-loader-arc: #f7f9fc;
}

@media (prefers-color-scheme: light) {
    :root {
        --nexus-bg: #f4f6fb;
        --nexus-bg-rgb: 244 246 251;
        --nexus-landing-image: url("landing-bg-light.jpg");
        --nexus-text: #0f172a;
        --nexus-text-secondary: #64748b;
        --nexus-outline: rgba(15, 23, 42, 0.25);
        --nexus-outline-hover: rgba(15, 23, 42, 0.5);
        --nexus-hover-fill: rgba(15, 23, 42, 0.06);
        --nexus-loader-track: #e2e8f0;
        --nexus-loader-arc: #334155;
    }
}

/* Base Setup */
html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Important for Compose */
    background-color: var(--nexus-bg);
    font-family: 'Inter', sans-serif; /* Optional: Sets default font */
}

/* Landing Page Styles */
.landing-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background art: the app's Welcome image (light or dark with the OS theme), drifting slowly,
   faded into the page colour like the app's IntroScrim so the text stays readable. */
.landing-container::before,
.landing-container::after {
    content: "";
    position: absolute;
    z-index: -1;
}

.landing-container::before {
    inset: -8%;
    background: var(--nexus-landing-image) center 35% / cover no-repeat;
    animation: landing-drift 18s ease-in-out infinite alternate;
}

.landing-container::after {
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgb(var(--nexus-bg-rgb) / 0) 0%,
        rgb(var(--nexus-bg-rgb) / 0.1) 30%,
        rgb(var(--nexus-bg-rgb) / 0.35) 55%,
        rgb(var(--nexus-bg-rgb) / 0.75) 80%,
        rgb(var(--nexus-bg-rgb) / 0.9) 100%
    );
}

@keyframes landing-drift {
    from { transform: scale(1) translate(-2%, 1.5%); }
    to { transform: scale(1.1) translate(2%, -1.5%); }
}

@media (prefers-reduced-motion: reduce) {
    .landing-container::before { animation: none; }
}

.landing-title {
    font-size: 3rem;
    color: var(--nexus-text);
    margin-bottom: 1rem;
    font-family: sans-serif;
}

.landing-subtitle {
    font-size: 1.2rem;
    color: var(--nexus-text-secondary);
    margin-bottom: 2rem;
    font-family: sans-serif;
}

.landing-login-button {
    position: absolute;
    top: 24px;
    right: 24px;
    padding: 10px 24px;
    font-size: 14px;
    background-color: transparent;
    color: var(--nexus-text);
    border: 1px solid var(--nexus-outline);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
    font-weight: 600;
}

.landing-login-button:hover {
    background-color: var(--nexus-hover-fill);
    border-color: var(--nexus-outline-hover);
}

/* Privacy policy link at the bottom of the landing (CL-44). */
.landing-privacy {
    position: absolute;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: var(--nexus-text);
    opacity: 0.75;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.landing-privacy:hover {
    opacity: 1;
}

.landing-button {
    padding: 12px 24px;
    font-size: 16px;
    background-color: #007AFF;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-weight: 600;
}

.landing-button:hover {
    background-color: #0056b3;
}