/* ─── Local Fonts ────────────────────────────────── */

@font-face {
    font-family: 'Karla';
    src: url('../fonts/Karla.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'Paul';
    src: url('../fonts/Paul.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ─── Reset & Base ───────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ─── Awwwards Exact Design Tokens ───────────────── */
:root {
    /* Fonts — from awwwards.com source CSS */
    --font-1: 'Karla', system-ui, -apple-system, sans-serif;
    --font-mono: 'Paul', Consolas, Monaco, monospace;
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-bold: 600;
    --font-extrabold: 700;

    /* Colors — exact from awwwards.com :root */
    --color-primary: #131313;
    --color-secondary: #646464;
    --color-white: #fff;
    --color-orange: #FA5D29;       /* awwwards accent */
    --color-inspire: #AAEEC4;      /* SOTD green badge */
    --color-awards: #502bd8;       /* awards purple */
    --bg-primary: #F8F8F8;         /* awwwards --bg-primary */
    --bg-secondary: #222;
    --bg-3rd: #ededed;
    --border-gray: #c7c7c7;
    --text-size-small: 14px;
    --text-size-primary: 18px;
    --rounded-small: 4px;
    --rounded-normal: 8px;

    /* Local aliases */
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
}

html {
    font-size: var(--text-size-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-1);
    font-weight: var(--font-light);
    font-size: var(--text-size-primary);
    min-height: 100vh;
    width: 100vw;
    background: var(--bg-primary);
    color: var(--color-primary);
    overflow: hidden;
    line-height: 200%;
}

/* ─── Split Layout ───────────────────────────────── */
.split-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.split-left {
    width: 42%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.8rem 3rem;
    background: #111;
    color: #fff;
}

.brand-top,
.brand-center,
.brand-bottom {
    position: relative;
    z-index: 2;
}

.brand-top img {
    max-width: 80%;
    margin-bottom: 20px;
}

.brand-title {
    font-family: var(--font-1);
    font-size: clamp(2.4rem, 4.5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #ffffff;
    margin-bottom: 1rem;
}

.brand-title em {
    font-style: italic;
    font-weight: 300;
    color: rgba(255,255,255,0.7);
}

/* Footer row */
.brand-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bg-primary);
}

.brand-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-footer-dot {
    width: 10px;
    height: 10px;
    background: var(--color-inspire);
    border-radius: 50%;
}

/* ══════════════════════════════════════════════════
   RIGHT PANEL 
   ══════════════════════════════════════════════════ */
.split-right {
    flex: 1;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 3rem 4rem;
    padding-top: calc(54px + 3rem);
    padding-bottom: 3rem;
    overflow-y: auto;
    position: relative;
}

/* Top nav bar — like awwwards.com header */
.form-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.6rem 4rem;
}

.form-nav-logo {
    font-size: 13px;
    font-weight: var(--font-bold);
    letter-spacing: 0.04em;
    color: var(--color-primary);
    text-decoration: none;
}

.form-nav-link {
    font-size: var(--text-size-small);
    font-weight: var(--font-medium);
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color 0.3s;
}

.form-nav-link:hover {
    color: var(--color-primary);
}

/* ─── Form Container ─────────────────────────────── */
.login-container {
    width: 100%;
    max-width: 380px;
    margin: auto 0;   /* centra verticalmente cuando hay espacio; no bloquea scroll */
    animation: fadeUp 2s var(--ease) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Form Header ────────────────────────────────── */
.login-header {
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-family: var(--font-1);
    font-size: 2rem;
    font-weight: var(--font-bold);
    color: var(--color-primary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.login-header p {
    font-size: 0.9rem;
    font-weight: var(--font-light);
    color: var(--color-secondary);
    line-height: 1.5;
}

/* ─── Form Elements — Awwwards Style ─────────────── */
/* Awwwards uses bottom-border-only inputs, no box */
.login-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.6rem;
    position: relative;
}

/* Label: 12px uppercase 300 weight — exact awwwards */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 14px;
    font-weight: var(--font-bold);
    color: var(--color-primary);
    letter-spacing: 0em;
    text-transform: uppercase;
    transition: color 0.3s;
}

.form-group:focus-within label {
    color: var(--color-primary);
}

.input-wrapper {
    position: relative;
}

/* Icon — dentro del casillero */
.input-wrapper .bi {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: #c8c8c8;
    pointer-events: none;
    transition: color 0.25s;
}

.form-group:focus-within .input-wrapper .bi {
    color: var(--color-primary);
}

/* Input — casillero con borde completo */
.form-group input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 16px 0 40px;
    background: #ffffff;
    border: 1px solid var(--border-gray);
    border-radius: var(--rounded-normal);
    color: var(--color-primary);
    font-family: var(--font-1);
    font-size: 0.9rem;
    font-weight: var(--font-normal);
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
    caret-color: var(--color-primary);
    outline: none;
}

.form-group input::placeholder {
    color: #c8c8c8;
    font-weight: var(--font-light);
}

.form-group input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(34, 34, 34, 0.07);
}

/* Active underline animation */
.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-primary);
    transition: width 0.4s var(--ease);
}

.form-group:focus-within .input-line {
    width: 100%;
}

/* ─── Forgot Password ────────────────────────────── */
.forgot-password {
    text-align: right;
    margin: -0.8rem 0 1.6rem;
}

.forgot-password a {
    font-size: 13px;
    font-weight: var(--font-medium);
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password a:hover {
    color: var(--color-primary);
}

/* ─── Submit Button — Awwwards style ─────────────── */
/* Awwwards: height 48px, rounded-normal (8px), bg #222, hover #383838 */
.login-button {
    position: relative;
    width: 100%;
    height: 48px;
    padding: 0 24px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: var(--rounded-normal);
    font-family: var(--font-1);
    font-size: var(--text-size-primary);
    font-weight: var(--font-medium);
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.3s var(--ease), transform 0.2s var(--ease);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.3s;
}

.login-button:hover {
    background: #383838;
}

.login-button:active {
    transform: scale(0.99);
}

/* ─── Divider ────────────────────────────────────── */
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1.6rem;
}

.divider span {
    flex: 1;
    height: 1px;
    background: var(--border-gray);
}

.divider p {
    font-size: var(--text-size-small);
    color: var(--color-secondary);
    font-weight: var(--font-normal);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ─── Register / Back Link ───────────────────────── */
.register-link {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-secondary);
    font-weight: var(--font-light);
}

.register-link a {
    color: var(--color-primary);
    font-weight: var(--font-medium);
    text-decoration: none;
    position: relative;
    display: inline-block;
    transition: opacity 0.3s;
}

.register-link a:hover {
    opacity: 0.7;
}

/* Awwwards-style animated underline */
.register-link a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 0.5px;
    background: var(--color-primary);
    transform: scaleX(1);
    transform-origin: left;
    transition: transform 0.3s var(--ease);
}

.register-link a:hover::after {
    transform: scaleX(0);
    transform-origin: right;
}

/* ══════════════════════════════════════════════════
   CANVAS ANIMATION (Awwwards hero bg feel)
   Animated via JS — abstract color field
   ══════════════════════════════════════════════════ */

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 1100px) {
    .split-left { width: 38%; padding: 2.4rem 2.4rem; }
    .split-right { padding: 3rem 2.5rem; }
    .form-nav { padding: 1.4rem 2.5rem; }
}

@media (max-width: 900px) {
    .split-left { width: 34%; }
    .brand-title { font-size: clamp(1.8rem, 4vw, 3rem); }
}

@media (max-width: 768px) {
    body { overflow-y: auto; }
    .split-container { flex-direction: column; height: auto; min-height: 100vh; }
    .split-left { display: none; }
    .split-right {
        width: 100%;
        min-height: 100vh;
        padding: 5rem 1.8rem 2rem;
    }
    .form-nav { padding: 1.2rem 1.8rem; }
}