/*
    Public pages: login, register, about. Same tokens as app.css, no app chrome.
*/

:root {
    --bg: #f5f6f8;
    --surface: #ffffff;
    --surface-2: #f1f3f6;
    --border: #e3e6eb;
    --border-strong: #cdd2da;
    --text: #11151b;
    --text-2: #49515d;
    --text-3: #79818e;
    --accent: #1466ff;
    --accent-hover: #0c56e6;
    --accent-ink: #0b52d6;
    --accent-soft: #e9f0ff;
    --danger: #c9302c;
    --danger-soft: #fdeceb;
    --ring: 0 0 0 3px rgba(20, 102, 255, 0.28);

    /* The brand panel is always dark: it's where the logo lives. */
    --ink: #0e1420;
    --ink-2: #16203a;

    --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0e1116;
        --surface: #151920;
        --surface-2: #1b2029;
        --border: #242a34;
        --border-strong: #343b47;
        --text: #e8ebf0;
        --text-2: #a9b0bc;
        --text-3: #737b88;
        --accent: #2f7dff;
        --accent-hover: #4b8fff;
        --accent-ink: #7cabff;
        --accent-soft: rgba(47, 125, 255, 0.15);
        --danger: #ff7468;
        --danger-soft: rgba(255, 116, 104, 0.12);
        --ring: 0 0 0 3px rgba(47, 125, 255, 0.4);
        --ink: #0a0f19;
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0e1116;
    --surface: #151920;
    --surface-2: #1b2029;
    --border: #242a34;
    --border-strong: #343b47;
    --text: #e8ebf0;
    --text-2: #a9b0bc;
    --text-3: #737b88;
    --accent: #2f7dff;
    --accent-hover: #4b8fff;
    --accent-ink: #7cabff;
    --accent-soft: rgba(47, 125, 255, 0.15);
    --danger: #ff7468;
    --danger-soft: rgba(255, 116, 104, 0.12);
    --ring: 0 0 0 3px rgba(47, 125, 255, 0.4);
    --ink: #0a0f19;
    color-scheme: dark;
}

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

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-ink);
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    text-decoration: underline;
}

img,
svg {
    display: block;
    max-width: 100%;
}

:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

/* ============================================================
   Split layout (login / register)
   ============================================================ */

.split {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 40px;
    padding: clamp(32px, 5vw, 64px);
    background: var(--ink);
    background-image: radial-gradient(120% 80% at 0% 0%, var(--ink-2), transparent 60%);
    color: #e9eef8;
    overflow: hidden;
}

/* The logo, huge and faint, bleeding off the bottom corner. */
.brand-panel .watermark {
    position: absolute;
    right: -12%;
    bottom: -10%;
    width: 85%;
    height: auto;
    color: #ffffff;
    opacity: 0.04;
    pointer-events: none;
}

.brand-lockup {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 21px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.brand-lockup:hover {
    text-decoration: none;
}

.brand-lockup img {
    width: 42px;
    height: auto;
}

.brand-copy {
    position: relative;
    max-width: 440px;
}

.brand-copy h2 {
    font-size: clamp(26px, 2.2vw + 10px, 38px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: #fff;
}

.brand-copy p {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.6;
    color: #a9b6cf;
}

.facts {
    position: relative;
    list-style: none;
    display: grid;
    gap: 10px;
    font-size: 14px;
    color: #c4cee2;
}

.facts li {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.facts .k {
    flex-shrink: 0;
    width: 76px;
    font-family: var(--mono);
    font-size: 12.5px;
    color: #6f86b3;
}

.form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 5vw, 64px) clamp(20px, 5vw, 64px);
}

.form-box {
    width: 100%;
    max-width: 380px;
}

.form-box h1 {
    font-size: clamp(24px, 1vw + 18px, 30px);
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.form-box .lead {
    margin: 6px 0 28px;
    color: var(--text-3);
    font-size: 15px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
}

input[type=text],
input[type=email],
input[type=password] {
    width: 100%;
    height: 44px;
    margin-bottom: 18px;
    padding: 0 12px;
    border-radius: 7px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 0.12s, box-shadow 0.12s;
}

input::placeholder {
    color: var(--text-3);
}

input:focus {
    border-color: var(--accent);
    box-shadow: var(--ring);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;
    border-radius: 7px;
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background 0.12s, border-color 0.12s;
}

.btn:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-block {
    width: 100%;
    margin-top: 4px;
}

.btn-quiet {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-quiet:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
}

.hint {
    margin: -12px 0 18px;
    font-size: 13px;
    color: var(--text-3);
}

.error {
    margin-bottom: 20px;
    padding: 10px 12px;
    border-left: 3px solid var(--danger);
    border-radius: 7px;
    background: var(--danger-soft);
    font-size: 14px;
}

.switch {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 14.5px;
    color: var(--text-3);
}

.mobile-brand {
    display: none;
}

@media (max-width: 860px) {
    .split {
        grid-template-columns: minmax(0, 1fr);
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        align-items: flex-start;
        padding-top: max(28px, env(safe-area-inset-top));
        padding-bottom: max(28px, env(safe-area-inset-bottom));
    }

    .mobile-brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 36px;
        color: var(--text);
        font-size: 19px;
        font-weight: 650;
        letter-spacing: -0.02em;
    }

    .mobile-brand img {
        width: 36px;
        height: auto;
    }

    input[type=text],
    input[type=email],
    input[type=password] {
        font-size: 16px; /* stops iOS from zooming in on focus */
    }
}

/* ============================================================
   About
   ============================================================ */

.site-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    max-width: 1040px;
    margin: 0 auto;
    padding: 20px clamp(16px, 4vw, 32px);
}

.site-head .brand-lockup {
    color: var(--text);
    font-size: 19px;
}

.site-head .brand-lockup img {
    width: 36px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav .btn {
    height: 38px;
    padding: 0 14px;
    font-size: 14px;
}

.hero {
    background: var(--ink);
    background-image: radial-gradient(120% 90% at 100% 0%, var(--ink-2), transparent 60%);
    color: #e9eef8;
    overflow: hidden;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 40px;
    max-width: 1040px;
    margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) clamp(16px, 4vw, 32px);
}

.hero h1 {
    font-size: clamp(32px, 3.4vw + 14px, 54px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #fff;
}

.hero p {
    max-width: 480px;
    margin-top: 18px;
    font-size: 17px;
    line-height: 1.6;
    color: #a9b6cf;
}

.hero .cta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.hero .btn-quiet {
    color: #e9eef8;
    border-color: rgba(255, 255, 255, 0.22);
}

.hero .btn-quiet:hover {
    background: rgba(255, 255, 255, 0.06);
}

.hero-mark {
    width: 100%;
    max-width: 380px;
    justify-self: center;
}

.about-body {
    max-width: 1040px;
    margin: 0 auto;
    padding: clamp(40px, 6vw, 72px) clamp(16px, 4vw, 32px);
}

.about-body h2 {
    font-size: clamp(22px, 1vw + 16px, 28px);
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

.points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--border);
}

.points > div {
    padding: 22px 24px 4px 0;
}

.points > div + div {
    padding-left: 24px;
    border-left: 1px solid var(--border);
}

.points .n {
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--accent-ink);
}

.points h3 {
    margin: 6px 0 6px;
    font-size: 17px;
    font-weight: 600;
}

.points p {
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.6;
}

.site-foot {
    max-width: 1040px;
    margin: 0 auto;
    padding: 28px clamp(16px, 4vw, 32px) max(28px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    color: var(--text-3);
    font-size: 13.5px;
}

@media (max-width: 760px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-mark {
        display: none;
    }

    .points {
        grid-template-columns: minmax(0, 1fr);
    }

    .points > div,
    .points > div + div {
        padding: 18px 0;
        border-left: 0;
    }

    .points > div + div {
        border-top: 1px solid var(--border);
    }
}
