/* Azimut Suite — Registration
   Centered form on existing body background.
   Fraunces serif accents + Inter body, champagne accents. */

.auth-stage {
    --ar-navy: #2C3E50;
    --ar-navy-deep: #16222F;
    --ar-navy-soft: #243140;
    --ar-cream: #FAFAF6;
    --ar-ink: #1A1F2C;
    --ar-mist: #6B7280;
    --ar-line: #E5E2D9;
    --ar-line-soft: #EFECE4;
    --ar-gold: #B8975B;
    --ar-gold-soft: #C9B27E;
    --ar-success: #10B981;
    --ar-error: #DC2626;
    --serif: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    max-width: 680px;
    margin: 1rem auto 2rem;
    background: var(--ar-cream);
    box-shadow: 0 20px 50px rgba(28, 38, 53, 0.12), 0 6px 16px rgba(28, 38, 53, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

/* ===== FORM PANEL ===== */
.auth-stage__form {
    padding: 2.75rem 3rem;
    background: var(--ar-cream);
    color: var(--ar-ink);
    font-family: var(--sans);
}
@media (max-width: 700px) { .auth-stage__form { padding: 2rem 1.5rem; } }

.auth-form__heading {
    margin-bottom: 2.25rem; padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--ar-line-soft);
}
.auth-form__heading h1 {
    font-family: var(--serif); font-weight: 300; font-size: 1.9rem;
    letter-spacing: -0.015em; margin: 0 0 0.4rem; color: var(--ar-ink);
    font-variation-settings: "opsz" 60;
}
.auth-form__heading p {
    font-size: 0.9rem; color: var(--ar-mist);
    margin: 0; line-height: 1.6; max-width: 55ch;
}

.form-section { margin-bottom: 2rem; }
.form-section__label {
    display: flex; align-items: center; gap: 0.85rem;
    margin: 0 0 1.15rem;
    font-family: var(--sans); font-size: 0.7rem; font-weight: 500;
    letter-spacing: 0.25em; text-transform: uppercase; color: var(--ar-mist);
}
.form-section__num {
    font-family: var(--serif); font-style: italic; font-weight: 400;
    font-size: 1rem; color: var(--ar-gold);
    letter-spacing: 0; text-transform: none;
    font-variation-settings: "opsz" 14;
}
.form-section__divider { flex: 1; height: 1px; background: var(--ar-line); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 520px) { .field-grid { grid-template-columns: 1fr; gap: 0; } }

.ar-field { margin-bottom: 1.05rem; position: relative; }
.ar-field__label {
    display: block; font-size: 0.78rem; font-weight: 500;
    color: var(--ar-ink); margin-bottom: 0.35rem; letter-spacing: 0.01em;
}
.ar-field__label .req { color: var(--ar-gold); margin-left: 2px; }

/* Underline-style inputs */
.ar-input,
.ar-select {
    width: 100%; border: none;
    border-bottom: 1.5px solid var(--ar-line);
    background: transparent; padding: 0.55rem 0;
    font-family: var(--sans); font-size: 0.95rem; color: var(--ar-ink);
    transition: border-color 0.25s ease;
    border-radius: 0; outline: none;
}
.ar-input::placeholder { color: #B4B7BD; font-weight: 300; }
.ar-input:focus,
.ar-select:focus { border-bottom-color: var(--ar-navy); }
.ar-input.is-invalid { border-bottom-color: var(--ar-error); }
.ar-input.is-valid { border-bottom-color: var(--ar-success); }

.ar-select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232C3E50' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.15rem center;
    padding-right: 1.5rem; cursor: pointer; color: var(--ar-ink);
}
.ar-select:invalid,
.ar-select option[disabled] { color: #B4B7BD; }
.ar-select option { color: var(--ar-ink); background: var(--ar-cream); font-weight: 400; }

/* Password */
.ar-password-wrap { position: relative; }
.ar-password-wrap .ar-input { padding-right: 2.5rem; }
.ar-password-toggle {
    position: absolute; right: -6px; bottom: 0;
    width: 34px; height: 34px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; color: var(--ar-mist);
    cursor: pointer; padding: 0;
    transition: color 0.2s ease;
}
.ar-password-toggle:hover { color: var(--ar-navy); }
.ar-password-toggle:focus-visible { outline: 1px solid var(--ar-navy); outline-offset: 2px; }
.ar-password-toggle .ar-eye-off { display: none; }
.ar-password-toggle.is-showing .ar-eye { display: none; }
.ar-password-toggle.is-showing .ar-eye-off { display: inline; }

.ar-password-reqs {
    margin-top: 0.85rem; padding: 0.85rem 1rem;
    background: rgba(184, 151, 91, 0.06);
    border-left: 2px solid var(--ar-gold);
    font-size: 0.78rem; line-height: 1.7;
}
.ar-password-reqs__title {
    color: var(--ar-mist); font-size: 0.68rem; font-weight: 500;
    letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 0.45rem;
}
.ar-password-reqs ul {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0.1rem 0.85rem;
}
@media (max-width: 520px) { .ar-password-reqs ul { grid-template-columns: 1fr; } }
.ar-password-reqs li {
    display: flex; align-items: center; gap: 0.55rem;
    color: var(--ar-mist); transition: color 0.2s ease;
}
.ar-password-reqs li::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: #D6CFC0; flex-shrink: 0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.ar-password-reqs li.is-met { color: var(--ar-ink); }
.ar-password-reqs li.is-met::before { background: var(--ar-success); transform: scale(1.15); }

/* Terms */
.ar-terms {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 1.1rem 0; margin: 0.5rem 0 1.5rem;
    border-top: 1px solid var(--ar-line-soft);
    border-bottom: 1px solid var(--ar-line-soft);
    font-size: 0.85rem; color: var(--ar-mist);
    line-height: 1.6; cursor: pointer;
}
.ar-terms input[type="checkbox"] {
    appearance: none; -webkit-appearance: none;
    width: 16px; height: 16px;
    border: 1.5px solid #C9C5B9; border-radius: 2px;
    cursor: pointer; position: relative; flex-shrink: 0;
    margin-top: 0.15rem; transition: all 0.2s ease; background: white;
}
.ar-terms input[type="checkbox"]:hover { border-color: var(--ar-navy); }
.ar-terms input[type="checkbox"]:checked { background: var(--ar-navy); border-color: var(--ar-navy); }
.ar-terms input[type="checkbox"]:checked::after {
    content: ''; position: absolute; inset: 1px;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 12 12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6l3 3 5-7' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.ar-terms a {
    color: var(--ar-navy); text-decoration: underline;
    text-decoration-thickness: 1px; text-underline-offset: 2px;
    transition: color 0.2s ease;
}
.ar-terms a:hover { color: var(--ar-gold); }

/* Submit */
.ar-submit {
    width: 100%; padding: 0.95rem 1.5rem;
    background: var(--ar-navy); color: #FFFEFA;
    border: none; border-radius: 2px;
    font-family: var(--sans); font-size: 0.82rem; font-weight: 500;
    letter-spacing: 0.2em; text-transform: uppercase; cursor: pointer;
    transition: background-color 0.25s ease, letter-spacing 0.25s ease;
    display: flex; align-items: center; justify-content: center; gap: 0.75rem;
}
.ar-submit:hover { background: var(--ar-navy-soft); letter-spacing: 0.24em; }
.ar-submit:active { background: var(--ar-navy-deep); }
.ar-submit:disabled { background: #95A0AC; cursor: not-allowed; letter-spacing: 0.2em; }
.ar-submit__arrow {
    transition: transform 0.25s ease;
    font-family: var(--serif); font-style: italic;
    font-size: 1rem; margin-top: -2px;
}
.ar-submit:hover .ar-submit__arrow { transform: translateX(5px); }

/* Login link */
.ar-login-link { margin-top: 1.5rem; text-align: center; font-size: 0.85rem; color: var(--ar-mist); }
.ar-login-link a {
    color: var(--ar-navy); font-weight: 500; text-decoration: none;
    border-bottom: 1px solid var(--ar-line); padding-bottom: 1px;
    transition: border-color 0.2s ease;
}
.ar-login-link a:hover { border-bottom-color: var(--ar-navy); }

/* Inline error */
.ar-username-error { color: var(--ar-error); font-size: 0.78rem; margin-top: 0.4rem; display: none; }
.ar-username-error.is-active { display: block; }

/* Motion */
@keyframes ar-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.auth-stage { animation: ar-fade-up 0.5s ease-out both; }
.auth-form__heading, .form-section, .ar-terms, .ar-submit, .ar-login-link {
    animation: ar-fade-up 0.45s ease-out both;
}
.auth-form__heading          { animation-delay: 0.08s; }
.form-section:nth-of-type(1) { animation-delay: 0.14s; }
.form-section:nth-of-type(2) { animation-delay: 0.20s; }
.form-section:nth-of-type(3) { animation-delay: 0.26s; }
.ar-terms                    { animation-delay: 0.32s; }
.ar-submit                   { animation-delay: 0.38s; }
.ar-login-link               { animation-delay: 0.44s; }

@media (prefers-reduced-motion: reduce) {
    .auth-stage,
    .auth-form__heading, .form-section, .ar-terms, .ar-submit, .ar-login-link {
        animation: none;
    }
}
