/* login-styles.css — Heritage Split redesign (Bobtail Group) */

:root {
    --bg: #f5f3f7;
    --surface: #ffffff;
    --ink: #191120;
    --ink-2: #4a3f54;
    --muted: #7b6f85;
    --line: #e7e2ec;
    --line-strong: #d6cedd;
    --brand: oklch(52% 0.15 325);
    --brand-soft: oklch(96% 0.02 325);
    --brand-ink: oklch(35% 0.13 325);
    --brand-ring: oklch(52% 0.15 325 / 0.2);
    --danger: oklch(52% 0.20 25);
    --danger-soft: oklch(97% 0.02 25);
    --danger-line: oklch(85% 0.08 25);
    --danger-ink: oklch(42% 0.15 25);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    color: var(--ink);
    background: var(--bg);
}

body.login-page { overflow: hidden; }

@media (max-width: 780px) {
    body.login-page { overflow: auto; }
}

a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ── Split layout ────────────────────────────── */
.split {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    background: #fff;
}

/* ── Brand panel (left) ──────────────────────── */
.brand-panel {
    flex: 1 1 52%;
    min-width: 0;
    position: relative;
    padding: clamp(40px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(ellipse at top left, var(--brand-soft) 0%, transparent 55%),
        radial-gradient(ellipse at bottom right, oklch(97% 0.02 70) 0%, transparent 60%),
        #faf8fb;
    border-right: 1px solid var(--line);
    overflow: hidden;
}

.brand-grid {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    pointer-events: none;
    background-image: linear-gradient(to right, rgba(25, 17, 32, 0.04) 1px, transparent 1px);
    background-size: 80px 100%;
}

.brand-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-height: 0;
    max-width: 520px;
}

.brand-logo-link {
    display: inline-block;
    margin-bottom: 28px;
    text-decoration: none;
}

.brand-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: contain;
    background: #fff;
    padding: 6px;
    border: 1px solid var(--line);
    display: block;
}

.brand-eyebrow {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.brand-headline {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(34px, 3.6vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--ink);
    max-width: 480px;
    margin: 0;
}

.brand-body {
    font-size: 15px;
    color: var(--muted);
    margin: 18px 0 0;
    max-width: 420px;
    line-height: 1.6;
}

/* ── Form panel (right) ──────────────────────── */
.form-panel {
    flex: 0 1 520px;
    min-width: 380px;
    padding: clamp(40px, 5vw, 64px) clamp(40px, 5vw, 56px);
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow-y: auto;
}

.form-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 28px;
}

.form-head { margin-bottom: 24px; }

.form-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 34px;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0;
}

.form-sub {
    font-size: 14px;
    color: var(--muted);
    margin: 10px 0 0;
    line-height: 1.5;
}

/* ── Error banner ─────────────────────────────── */
.error-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: var(--danger-soft);
    color: var(--danger-ink);
    border: 1px solid var(--danger-line);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

/* ── Form ─────────────────────────────────────── */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.field { display: block; }

.field-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}

.field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-2);
    letter-spacing: 0.01em;
}

.field-hint-link {
    font-size: 11px;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
}

.field-hint-link:hover { text-decoration: underline; }

.field-control {
    position: relative;
    display: block;
}

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    display: flex;
}

.field-control input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 42px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    transition: border-color 120ms, box-shadow 120ms;
    -webkit-appearance: none;
    appearance: none;
}

.field-control input::placeholder { color: var(--muted); opacity: 0.7; }

.field-control input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-ring);
}

/* Password field with eye toggle */
#password { padding-right: 44px; }

.field-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: 6px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.field-toggle:hover { color: var(--ink-2); }

.field-toggle .icon-eye-off { display: none; }
.field-toggle.is-showing .icon-eye { display: none; }
.field-toggle.is-showing .icon-eye-off { display: block; }

/* ── Turnstile ────────────────────────────────── */
.turnstile-wrap {
    min-height: 65px;
    display: flex;
    align-items: center;
}

.turnstile-wrap .cf-turnstile {
    width: 100%;
}

/* ── Submit button ────────────────────────────── */
.submit-btn {
    margin-top: 4px;
    height: 50px;
    border-radius: 10px;
    border: none;
    background: var(--brand);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.005em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 8px 24px -8px var(--brand-ring);
    transition: transform 120ms, filter 120ms;
}

.submit-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Footer links ─────────────────────────────── */
.form-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    padding-top: 14px;
    margin-top: 6px;
    border-top: 1px dashed var(--line);
}

.link-accent {
    background: transparent;
    border: none;
    padding: 0;
    color: var(--brand);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.link-accent:hover { text-decoration: underline; }

.form-foot {
    margin-top: auto;
    padding-top: 32px;
    font-size: 11.5px;
    color: var(--muted);
}

.form-foot a { color: var(--muted); text-decoration: none; }
.form-foot a:hover { color: var(--ink-2); text-decoration: underline; }

/* ── Mobile (<=780px): stack, compact brand header ─── */
@media (max-width: 780px) {
    .split { flex-direction: column; min-height: 100vh; }

    .brand-panel {
        flex: 0 0 auto;
        padding: 32px 24px 28px;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .brand-inner { justify-content: flex-start; }

    .brand-logo-link { margin-bottom: 14px; }
    .brand-logo { width: 48px; height: 48px; border-radius: 12px; }

    .brand-eyebrow { font-size: 10.5px; margin-bottom: 8px; }

    .brand-headline { font-size: 24px; }

    .brand-body { display: none; }

    .form-panel {
        flex: 1 1 auto;
        min-width: 0;
        padding: 28px 24px 32px;
        overflow-y: visible;
    }

    .form-eyebrow { margin-bottom: 18px; }

    .form-title { font-size: 28px; }

    .form-foot { padding-top: 28px; }
}

/* Prevent iOS zoom on focus */
@media (max-width: 780px) {
    .field-control input { font-size: 16px; }
}
