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

:root {
    --fg: #1a1a1a;
    --fg-muted: #888;
    --fg-faint: #b0b0b0;
    --bg: #fefefe;
    --accent: #6b8f71;
    --border: #d8d8d8;
    --border-focus: #1a1a1a;
    --error: #b44;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'IBM Plex Sans', 'Zen Kaku Gothic New', -apple-system, sans-serif;
    font-weight: 400;
    background: var(--bg);
    color: var(--fg);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    letter-spacing: 0.01em;
    line-height: 1.5;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
}

.login-container {
    width: 100%;
    max-width: 320px;
}

/* brand */

.brand {
    margin-bottom: 3rem;
}

.wordmark {
    font-family: 'Zen Kaku Gothic New', 'IBM Plex Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: var(--fg);
}

.divider {
    width: 24px;
    height: 1px;
    background: var(--border);
    margin: 0.75rem 0;
}

.tagline {
    font-size: 0.8125rem;
    font-weight: 300;
    color: var(--fg-muted);
    letter-spacing: 0.02em;
}

/* form */

form {
    display: flex;
    flex-direction: column;
}

.field {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fg-muted);
    margin-bottom: 0.5rem;
}

input {
    width: 100%;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    font-family: inherit;
    font-weight: 400;
    letter-spacing: 0.01em;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--fg);
    transition: border-color 0.2s ease;
    border-radius: 0;
    -webkit-appearance: none;
}

input::placeholder {
    color: var(--fg-faint);
    font-weight: 300;
}

input:focus {
    outline: none;
    border-bottom-color: var(--border-focus);
}

/* error */

.error-message {
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--error);
    min-height: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.error-message.visible {
    opacity: 1;
}

/* button */

button {
    width: 100%;
    padding: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--fg);
    border: none;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:hover {
    background: #333;
}

button:active {
    background: #111;
}

/* links */

.form-links {
    text-align: right;
    margin-top: 1rem;
}

.form-links a {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--fg-muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}

.form-links a:hover {
    color: var(--accent);
}

/* footer */

footer {
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 300;
    color: var(--fg-faint);
    letter-spacing: 0.04em;
}

/* responsive */

@media (max-width: 480px) {
    main {
        align-items: flex-start;
        padding-top: 5rem;
    }

    .login-container {
        max-width: none;
        padding: 0 0.5rem;
    }

    .brand {
        margin-bottom: 2.5rem;
    }
}

@media (min-height: 800px) {
    main {
        padding-bottom: 8rem;
    }
}
