:root {
    --color-ea-red: #e41b1b;
    --color-ea-red-dark: #b21c17;
    --color-ea-red-light: #fdecec;
    --color-ink: #1b2326;
    --color-ink-soft: #2a3438;
    --color-ink-muted: #5c6568;
    --color-mist: #f4f5f5;
    --color-white: #fff;
    --color-black: #000;
    --radius-card: 1.25rem;
    --radius-xl: 0.75rem;
    --font-body: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
    --font-display: 'Anton', ui-sans-serif, system-ui, sans-serif;
    --container-max: 80rem;
    --shadow-panel: 0 10px 25px rgba(27, 35, 38, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font-body);
    color: var(--color-ink);
    background: var(--color-mist);
    line-height: 1.5;
}

.flex-1 {
    flex: 1;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    color: var(--color-ea-red);
}

img,
svg {
    display: block;
    max-width: 100%;
}

.container-site {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: 1rem;
}

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--color-white);
    box-shadow: 0 1px 3px rgba(27, 35, 38, 0.08);
}

.site-header__bar {
    border-bottom: 1px solid rgba(27, 35, 38, 0.1);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: 4rem;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.25rem;
    line-height: 1;
    color: var(--color-black);
}

.brand-logo__everyone {
    position: relative;
    display: inline-block;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: -0.02em;
}

.brand-logo__o-wrap {
    position: relative;
    display: inline-block;
}

.brand-logo__dot {
    position: absolute;
    top: -0.25rem;
    right: -0.125rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--color-ea-red);
}

.brand-logo__active {
    font-family: var(--font-display);
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.site-header__actions {
    margin-left: auto;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-ink);
}

/* Hero */
.hero {
    background: var(--color-ink);
    color: var(--color-white);
    padding: 3.5rem 0;
    text-align: center;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 2.25rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hero p {
    max-width: 32rem;
    margin: 0.75rem auto 0;
    color: rgba(255, 255, 255, 0.75);
}

/* Auth section */
.auth-page {
    flex: 1;
    padding: 3.5rem 0;
}

.auth-panel {
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
    padding: 2rem;
    border: 1px solid rgba(27, 35, 38, 0.1);
    border-radius: var(--radius-card);
    background: var(--color-white);
    box-shadow: var(--shadow-panel);
}

@media (min-width: 640px) {
    .auth-panel {
        padding: 2.5rem;
    }
}

.auth-panel__title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--color-ink);
}

.auth-panel__intro {
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    color: var(--color-ink-muted);
}

.auth-panel__body {
    margin-top: 1.5rem;
}

.hidden {
    display: none !important;
}

.loading {
    color: var(--color-ink-muted);
    font-size: 0.9375rem;
}

.status-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.status-authenticated {
    background: #d1fae5;
    color: #065f46;
}

.status-unauthenticated {
    background: var(--color-ea-red-light);
    color: var(--color-ea-red-dark);
}

.status-message {
    margin-top: 0.75rem;
    font-size: 0.9375rem;
    color: var(--color-ink-muted);
}

.button-group {
    margin-top: 1.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--color-ea-red);
    color: var(--color-white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-ea-red-dark);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-ink);
    color: var(--color-ink);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(27, 35, 38, 0.05);
}

.text-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-ea-red);
}

.text-link:hover {
    text-decoration: underline;
}

.error {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-xl);
    border-left: 4px solid var(--color-ea-red);
    font-size: 0.9375rem;
}

.error strong {
    display: block;
    margin-bottom: 0.25rem;
}

.success {
    background: #d1fae5;
    color: #065f46;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-xl);
    border-left: 4px solid #10b981;
    font-size: 0.9375rem;
}

/* Native auth form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-field label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-ink);
}

.form-field input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(27, 35, 38, 0.12);
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-ink);
    background: var(--color-white);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input::placeholder {
    color: rgba(27, 35, 38, 0.4);
}

.form-field input:focus {
    outline: none;
    border-color: var(--color-ea-red);
    box-shadow: 0 0 0 3px rgba(228, 27, 27, 0.12);
}

.form-field input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--color-ink-muted);
    line-height: 1.5;
}

.form-error {
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-xl);
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--color-ea-red);
    font-size: 0.875rem;
    line-height: 1.5;
}

.btn-text {
    align-self: flex-start;
    padding: 0;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-ea-red);
    cursor: pointer;
}

.btn-text:hover:not(:disabled) {
    text-decoration: underline;
}

.btn-text:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.social-sign-in {
    margin-top: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--color-ink-muted);
    font-size: 0.8125rem;
    text-transform: lowercase;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(27, 35, 38, 0.12);
}

.btn-google,
.btn-apple {
    gap: 0.625rem;
}

.btn-social__icon {
    flex-shrink: 0;
}

.btn-apple {
    background: var(--color-ink);
    color: var(--color-white);
    border: 2px solid var(--color-ink);
}

.btn-apple:hover:not(:disabled) {
    background: var(--color-ink-soft);
    border-color: var(--color-ink-soft);
}

#clerk-captcha {
    margin-top: 1rem;
}

/* Footer */
.site-footer {
    background: var(--color-black);
    color: var(--color-white);
}

.site-footer__main {
    padding: 3.5rem 0;
}

.site-footer__grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .site-footer__grid {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}

.brand-logo--inverse {
    color: var(--color-white);
}

.site-footer__tagline {
    margin-top: 1rem;
    max-width: 20rem;
    font-size: 0.875rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.site-footer__nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
}

.site-footer__nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
}

.site-footer__nav a:hover {
    color: var(--color-white);
}

.site-footer__legal {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer__legal-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.5rem 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

@media (min-width: 640px) {
    .site-footer__legal-inner {
        flex-direction: row;
        text-align: left;
    }
}
