/* ==========================================================================
   Login themes. Each one re-tokenises the auth screen only; the rest of the
   application keeps the shared design system in site.css.

   steel     - graphite + caution amber, split panel  (workshop / industrial)
   midnight  - deep indigo aurora, single glass card  (modern, app-like)
   showroom  - warm ivory, racing green + brass       (premium, understated)
   ========================================================================== */

/* -------------------------------------------------------------- 1. STEEL -- */
/* Tokens live in site.css; this file only carries the two new themes and the
   shared layout/animation machinery. */

/* The steel panel's amber corner glow belongs to steel alone. */
[data-theme="midnight"] .auth-side::before,
[data-theme="showroom"] .auth-side::before { content: none; }

/* ----------------------------------------------------------- 2. MIDNIGHT -- */

[data-theme="midnight"] .auth {
    grid-template-columns: minmax(0, 1fr);
    background: #080c1a;
    position: relative;
    overflow: hidden;
    place-items: center;
    align-content: center;
    padding: 40px 20px;
    gap: 0;
}

/* Aurora: three soft colour fields, no image, no request. */
[data-theme="midnight"] .auth::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(38% 42% at 18% 22%, rgb(99 102 241 / 55%), transparent 70%),
        radial-gradient(34% 38% at 82% 26%, rgb(34 211 238 / 34%), transparent 70%),
        radial-gradient(46% 44% at 60% 92%, rgb(168 85 247 / 34%), transparent 70%);
    filter: blur(38px);
    pointer-events: none;
}

[data-theme="midnight"] .auth-side {
    background: none;
    padding: 0 0 26px;
    text-align: center;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    max-width: 580px;
    width: 100%;
}

/* Solid, not gradient text: background-clip:text cannot work once the wordmark is split into
   per-letter spans, and it rendered the name invisible. */
[data-theme="midnight"] .auth-side .shop {
    font-size: clamp(2rem, 5vw, 2.75rem);
    color: #fff;
    text-shadow: 0 0 28px rgb(129 140 248 / 55%);
}

[data-theme="midnight"] .auth-side .tagline { color: #7dd3fc; }
[data-theme="midnight"] .auth-side .rule {
    margin: 18px auto 0;
    background: linear-gradient(90deg, #818cf8, #22d3ee);
}

[data-theme="midnight"] .auth-side .blurb { color: #b8c2e0; margin: 16px auto 0; max-width: 38ch; }
[data-theme="midnight"] .auth-side .contact { display: none; }
[data-theme="midnight"] .gauge { display: none; }

[data-theme="midnight"] .auth-main { padding: 0; width: 100%; max-width: 420px; }

/* Glass card. */
[data-theme="midnight"] .auth-card .panel {
    background: rgb(255 255 255 / 7%);
    border: 1px solid rgb(255 255 255 / 14%);
    box-shadow: 0 24px 60px rgb(2 6 23 / 55%);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    color: #e8ecf8;
}

[data-theme="midnight"] .auth-card h1 { color: #fff; }
[data-theme="midnight"] .auth-card .sub { color: #a9b4d0; }
[data-theme="midnight"] .auth-card .form-label { color: #d5dcef; }

[data-theme="midnight"] .auth-card .form-control {
    background: rgb(255 255 255 / 8%);
    border-color: rgb(255 255 255 / 18%);
    color: #fff;
}

[data-theme="midnight"] .auth-card .form-control::placeholder { color: #8b96b5; }

[data-theme="midnight"] .auth-card .form-control:focus {
    background: rgb(255 255 255 / 12%);
    border-color: #67e8f9;
    box-shadow: 0 0 0 3px rgb(103 232 249 / 22%);
}

[data-theme="midnight"] .auth-card .form-check-label { color: #c3cbe3; }

[data-theme="midnight"] .auth-card .btn-ink {
    background: linear-gradient(96deg, #6366f1, #22d3ee);
    border: 0;
    color: #06121f;
    font-weight: 700;
}

[data-theme="midnight"] .auth-card .btn-ink:hover { box-shadow: 0 8px 24px rgb(99 102 241 / 45%); }

[data-theme="midnight"] .monogram {
    margin-inline: auto;
    background: rgb(255 255 255 / 12%);
    border: 1px solid rgb(255 255 255 / 18%);
}

[data-theme="midnight"] .monogram::after { background: #22d3ee; }
[data-theme="midnight"] .auth-foot { color: #7c88a8; }
[data-theme="midnight"] .auth-card { text-align: center; }
[data-theme="midnight"] .auth-card .form-label,
[data-theme="midnight"] .auth-card .form-check { text-align: left; }

/* ----------------------------------------------------------- 3. SHOWROOM -- */

[data-theme="showroom"] .auth {
    grid-template-columns: minmax(0, 1fr);
    background: #f7f4ee;
    position: relative;
    overflow: hidden;
    place-items: center;
    align-content: center;
    padding: 40px 20px;
    gap: 0;
}

/* Faint engineering grid, the paper a workshop drawing sits on. */
[data-theme="showroom"] .auth::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgb(20 83 45 / 5%) 1px, transparent 1px),
        linear-gradient(90deg, rgb(20 83 45 / 5%) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(70% 60% at 50% 45%, #000 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 40%, transparent 100%);
    pointer-events: none;
}

[data-theme="showroom"] .auth-side {
    background: none;
    padding: 0 0 26px;
    text-align: center;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    max-width: 580px;
    width: 100%;
}

[data-theme="showroom"] .auth-side .shop {
    font-size: clamp(2rem, 5vw, 2.75rem);
    color: #14532d;
}

[data-theme="showroom"] .auth-side .tagline { color: #a07a3c; letter-spacing: 0.34em; }

[data-theme="showroom"] .auth-side .rule {
    margin: 18px auto 0;
    background: linear-gradient(90deg, #b08d57, #e3c78f);
    width: 72px;
}

[data-theme="showroom"] .auth-side .blurb { color: #4a5a50; margin: 16px auto 0; max-width: 38ch; }
[data-theme="showroom"] .auth-side .contact { display: none; }
[data-theme="showroom"] .gauge { display: none; }

[data-theme="showroom"] .auth-main { padding: 0; width: 100%; max-width: 420px; }

[data-theme="showroom"] .auth-card .panel {
    background: #fff;
    border: 1px solid #e6e0d4;
    border-top: 3px solid #14532d;
    box-shadow: 0 20px 46px rgb(20 83 45 / 10%);
}

[data-theme="showroom"] .auth-card h1 { color: #14532d; }

[data-theme="showroom"] .auth-card .form-control:focus {
    border-color: #b08d57;
    box-shadow: 0 0 0 3px rgb(176 141 87 / 20%);
}

[data-theme="showroom"] .auth-card .btn-ink {
    background: #14532d;
    border-color: #14532d;
}

[data-theme="showroom"] .auth-card .btn-ink:hover {
    background: #0f3d21;
    border-color: #0f3d21;
    box-shadow: 0 8px 20px rgb(20 83 45 / 28%);
}

[data-theme="showroom"] .monogram {
    margin-inline: auto;
    background: #14532d;
}

[data-theme="showroom"] .monogram::after { background: #b08d57; }
[data-theme="showroom"] .auth-foot { color: #93887a; }
[data-theme="showroom"] .auth-card { text-align: center; }
[data-theme="showroom"] .auth-card .form-label,
[data-theme="showroom"] .auth-card .form-check { text-align: left; }

/* ==========================================================================
   Shared: animated wordmark + theme picker
   ========================================================================== */

/* Explicit gap - collapsed whitespace between inline-blocks is not reliable here. */
.shop .word { display: inline-block; white-space: nowrap; }
.shop .word + .word { margin-left: 0.3em; }
.shop .ch { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
    .shop .ch {
        animation: letterIn .55s cubic-bezier(.2, .75, .3, 1) both;
    }

    @keyframes letterIn {
        from { opacity: 0; transform: translateY(16px) rotate(-4deg); }
        to { opacity: 1; transform: none; }
    }
}

.theme-picker {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgb(255 255 255 / 92%);
    border: 1px solid rgb(16 24 40 / 10%);
    box-shadow: 0 6px 20px rgb(16 24 40 / 14%);
    font-size: 0.75rem;
}

.theme-picker .lbl {
    font-family: var(--font-display);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #667085;
    padding: 0 6px;
}

.theme-picker a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    color: #344054;
    text-decoration: none;
    font-weight: 600;
}

.theme-picker a:hover { background: #f2f4f7; text-decoration: none; }
.theme-picker a.on { background: #1a1d23; color: #fff; }

.theme-picker .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 15%);
}

.dot-steel { background: linear-gradient(135deg, #1a1d23 50%, #f5a524 50%); }
.dot-midnight { background: linear-gradient(135deg, #6366f1 50%, #22d3ee 50%); }
.dot-showroom { background: linear-gradient(135deg, #14532d 50%, #b08d57 50%); }

@media (max-width: 600px) {
    .theme-picker .lbl { display: none; }
    .theme-picker a span:not(.dot) { display: none; }
}
