/**
 * Baseline - Login Page (Highline Adventures brand)
 * Split layout: Hills-green brand panel + paper form panel. Stacks at ≤900px.
 * Colours come from variables.css (--hills, --blooms, --light, --vp-c-*).
 */

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

html, body { min-height: 100%; }

body {
    font-family: var(--vp-font-family-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--vp-c-bg);
    color: var(--vp-c-text-1);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
}

/* ── Brand panel ─────────────────────────────────────────── */
.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: clamp(32px, 5vw, 72px);
    background: var(--hills);
    color: var(--light);
    overflow: hidden;
}
/* Blooms rule along the panel edge */
.login-brand::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 6px;
    background: var(--blooms);
}
html.dark .login-brand { background: #123A2E; }

.login-brand-logo {
    width: min(100%, 520px);
    height: auto;
    margin-left: -3%; /* PNG has built-in padding */
}

.login-brand-clock { display: flex; flex-direction: column; gap: 8px; }

.time-text {
    font-size: clamp(3rem, 7vw, 6rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.date-text {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--mute-cream);
    opacity: 0.85;
}

/* ── Form panel ──────────────────────────────────────────── */
.login-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 48px 24px;
}

.login-card { width: 100%; max-width: 380px; }


.login-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--blooms);
    margin-bottom: 8px;
}

.login-card h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.login-sub {
    margin: 8px 0 32px;
    color: var(--vp-c-text-2);
    font-size: 0.95rem;
}

.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    background: var(--vp-c-bg);
    border: 2px solid var(--vp-c-border);
    border-radius: 2px;
    color: var(--vp-c-text-1);
    font: inherit;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input::placeholder { color: var(--vp-c-text-3); }
.form-input:focus {
    outline: none;
    border-color: var(--hills);
    box-shadow: 0 0 0 3px rgba(243, 120, 31, 0.35); /* blooms */
}

.btn-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    background: var(--vp-button-brand-bg);
    color: var(--vp-button-brand-text);
    border: 0;
    border-radius: 2px;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: background 0.15s ease;
}
.btn-submit:hover { background: var(--vp-button-brand-hover-bg); }
.btn-submit:active { background: var(--vp-button-brand-active-bg); }
.btn-submit:focus-visible { outline: 3px solid var(--blooms); outline-offset: 2px; }

.login-error {
    margin-bottom: 20px;
    padding: 10px 12px;
    background: var(--vp-c-danger-soft);
    border-left: 4px solid var(--vp-c-danger-1);
    color: var(--vp-c-text-1);
    font-size: 0.9rem;
}

.login-foot {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--vp-c-text-2);
    text-align: center;
}

/* ── Theme toggle ────────────────────────────────────────── */
.theme-btn {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 0;
    color: var(--vp-c-text-2);
    cursor: pointer;
}
.theme-btn:hover { color: var(--blooms); }
.theme-btn .material-symbols-outlined { font-size: 24px; }

/* ── Stacked (tablet / mobile) ───────────────────────────── */
@media (max-width: 900px) {
    .login-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .login-brand { padding: 24px; gap: 0; }
    .login-brand::after { top: auto; left: 0; width: auto; height: 5px; }
    .login-brand-logo { width: min(70%, 300px); }
    .login-brand-clock { display: none; }
    .login-panel { justify-content: flex-start; padding: 40px 20px 32px; }
    .theme-btn { color: var(--light); }
}

@media (max-width: 400px) {
    .login-card h1 { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition-duration: 0.01ms !important; }
}
