/* JLR Dev — preview login styling.
   🔴 EXTERNAL ON PURPOSE. These rules used to be an inline <style> block in
   login.html, and a site with a real Content-Security-Policy
   (style-src 'self', no 'unsafe-inline') BLOCKS an inline style element. The
   gate still worked, but the login page rendered as raw serif text with no
   card and no layout: the first thing a prospect would ever see of JLR Dev
   (caught live on Nahoon, 2026-09-17, before the link was sent).
   Keep it external, and keep /login.css in the middleware's bypass list. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      min-height: 100vh;
      min-height: 100dvh;
      background: #060D1A;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Space Grotesk', system-ui, sans-serif;
      -webkit-font-smoothing: antialiased;
      overflow: hidden;
      position: relative;
    }

    /* ── Particle canvas ── */
    #particle-canvas {
      position: fixed;
      inset: 0;
      z-index: 0;
    }

    /* ── Radial vignette over canvas ── */
    .vignette {
      position: fixed; inset: 0; z-index: 1;
      background: radial-gradient(ellipse 80% 80% at 50% 50%, transparent 40%, rgba(6,13,26,0.75) 100%);
      pointer-events: none;
    }

    /* ── Card wrapper — glowing animated border ── */
    .card-wrap {
      position: relative;
      z-index: 2;
      width: 100%;
      max-width: 420px;
      margin: 20px;
      border-radius: 20px;
      padding: 1.5px;
      background: conic-gradient(
        from var(--angle, 0deg),
        rgba(79,142,247,0.8) 0deg,
        rgba(79,142,247,0.05) 60deg,
        rgba(126,179,255,0.6) 120deg,
        rgba(79,142,247,0.05) 180deg,
        rgba(79,142,247,0.8) 240deg,
        rgba(79,142,247,0.05) 300deg,
        rgba(79,142,247,0.8) 360deg
      );
      box-shadow: 0 0 60px rgba(79,142,247,0.1), 0 40px 100px rgba(0,0,0,0.7);
      animation: spin-border 6s linear infinite;
    }
    @property --angle {
      syntax: '<angle>';
      initial-value: 0deg;
      inherits: false;
    }
    @keyframes spin-border {
      to { --angle: 360deg; }
    }

    /* ── Card inner ── */
    .card {
      background: linear-gradient(155deg, #0C1A2E 0%, #07101C 60%, #050C18 100%);
      border-radius: 18.5px;
      padding: 52px 44px 44px;
      position: relative;
      overflow: hidden;
    }
    /* Top highlight */
    .card::before {
      content: '';
      position: absolute;
      top: 0; left: 10%; right: 10%;
      height: 1px;
      background: linear-gradient(90deg, transparent, rgba(79,142,247,0.4), transparent);
    }
    /* Inner shimmer sweep */
    .card::after {
      content: '';
      position: absolute;
      top: 0; left: -120%;
      width: 60%; height: 100%;
      background: linear-gradient(90deg, transparent, rgba(79,142,247,0.025), transparent);
      animation: card-shimmer 10s ease-in-out infinite;
      pointer-events: none;
    }
    @keyframes card-shimmer {
      0%   { left: -120%; }
      40%  { left: 160%; }
      100% { left: 160%; }
    }

    /* ── Logo ── */
    .brand-logo {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 28px;
    }
    .brand-logo img {
      width: 80px;
      height: 80px;
      border-radius: 18px;
      box-shadow: 0 0 32px rgba(79,142,247,0.25), 0 8px 24px rgba(0,0,0,0.4);
    }

    /* ── Divider ── */
    .brand-rule {
      display: flex; align-items: center; gap: 10px;
      margin-bottom: 20px;
    }
    .brand-rule-line {
      flex: 1; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(79,142,247,0.25));
    }
    .brand-rule-line:last-child {
      background: linear-gradient(90deg, rgba(79,142,247,0.25), transparent);
    }
    .brand-rule-dot {
      width: 4px; height: 4px; border-radius: 50%;
      background: rgba(79,142,247,0.6);
      box-shadow: 0 0 8px rgba(79,142,247,1);
    }

    /* ── Client info ── */
    .brand-eyebrow {
      text-align: center;
      font-size: 9px; font-weight: 700;
      letter-spacing: 4px; text-transform: uppercase;
      color: rgba(79,142,247,0.5);
      margin-bottom: 8px;
    }
    .brand-client {
      text-align: center;
      font-size: 22px; font-weight: 800;
      color: rgba(255,255,255,0.92);
      letter-spacing: -0.02em;
      margin-bottom: 10px;
    }
    .brand-tagline {
      text-align: center;
      font-size: 12px; font-weight: 400;
      color: rgba(255,255,255,0.25);
      line-height: 1.7;
      margin-bottom: 32px;
    }

    /* ── Error ── */
    .error {
      background: rgba(239,68,68,0.08);
      border: 1px solid rgba(239,68,68,0.2);
      border-radius: 8px;
      color: rgba(255,160,160,0.9);
      font-size: 13px; padding: 10px 14px;
      margin-bottom: 18px;
      display: none; text-align: center;
    }
    .error.show { display: block; }

    /* ── Form ── */
    label {
      display: block;
      font-size: 9px; font-weight: 700;
      letter-spacing: 3.5px; text-transform: uppercase;
      color: rgba(79,142,247,0.5);
      margin-bottom: 10px;
    }
    .input-wrap { position: relative; }
    input[type="password"],
    input[type="text"] {
      width: 100%;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(79,142,247,0.18);
      border-radius: 10px;
      color: rgba(255,255,255,0.9);
      font-family: 'Space Grotesk', sans-serif;
      font-size: 16px; font-weight: 500;
      padding: 14px 46px 14px 16px;
      outline: none;
      transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
    }
    input::placeholder { color: rgba(255,255,255,0.12); }
        /* WCAG 2.2 AA 2.4.7 - a 10%-opacity glow is not a focus indicator.
       Keyboard users must be able to SEE where they are. */
    input:focus-visible, button:focus-visible, a:focus-visible {
      outline: 3px solid #4F8EF7;
      outline-offset: 3px;
    }
    input:focus {
      border-color: rgba(79,142,247,0.6);
      background: rgba(79,142,247,0.04);
      box-shadow: 0 0 0 3px rgba(79,142,247,0.1), 0 0 24px rgba(79,142,247,0.06);
    }
    .eye-btn {
      position: absolute; right: 14px; top: 50%;
      transform: translateY(-50%);
      background: none; border: none; cursor: pointer;
      color: rgba(79,142,247,0.3);
      padding: 4px; display: flex; align-items: center;
      transition: color 0.2s;
    }
    .eye-btn:hover { color: rgba(79,142,247,0.8); }

    /* ── Consent checkbox ── */
    .consent-row {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      margin-top: 18px;
      cursor: pointer;
    }
    .consent-row input[type="checkbox"] {
      accent-color: #4F8EF7;
      width: 16px; height: 16px;
      margin-top: 1px;
      flex-shrink: 0;
      cursor: pointer;
    }
    .consent-row span {
      font-size: 12px;
      line-height: 1.55;
      color: rgba(255,255,255,0.45);
    }

    /* ── Button ── */
    .submit-btn {
      position: relative; overflow: hidden;
      width: 100%;
      background: linear-gradient(135deg, #2C6AE0 0%, #4F8EF7 60%, #6BA8FF 100%);
      background-size: 200% 100%;
      color: #fff; border: none; border-radius: 10px;
      font-family: 'Space Grotesk', sans-serif;
      font-size: 12px; font-weight: 700;
      letter-spacing: 2.5px; text-transform: uppercase;
      padding: 15px; cursor: pointer; margin-top: 20px;
      transition: background-position 0.4s ease, transform 0.15s, box-shadow 0.3s;
      box-shadow: 0 4px 24px rgba(79,142,247,0.3);
    }
    .submit-btn::after {
      content: '';
      position: absolute; inset: 0;
      background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
      transform: translateX(-100%);
      transition: transform 0.6s ease;
    }
    .submit-btn:hover {
      background-position: right center;
      box-shadow: 0 8px 32px rgba(79,142,247,0.45);
      transform: translateY(-2px);
    }
    .submit-btn:hover::after { transform: translateX(100%); }
    .submit-btn:active { transform: scale(0.99) translateY(0); }

    /* ── Footer ── */
    .card-footer {
      display: flex; align-items: center;
      justify-content: center; gap: 8px;
      margin-top: 30px;
    }
    .footer-dot { width: 3px; height: 3px; border-radius: 50%; background: rgba(79,142,247,0.3); }
    .card-footer span { font-size: 11px; color: rgba(255,255,255,0.15); }
    .card-footer a {
      font-size: 11px; font-weight: 600;
      color: rgba(79,142,247,0.5); text-decoration: none;
      transition: color 0.2s;
    }
    .card-footer a:hover { color: rgba(79,142,247,1); }

    @media (max-width: 460px) {
      .card { padding: 40px 24px 36px; }
      .brand-client { font-size: 18px; }
    }
  
    /* WCAG 2.2 AA 2.3.3 - this gate runs two INFINITE animations
       (spin-border, card-shimmer). Continuous motion is a vestibular trigger,
       so stop it for anyone who has asked the OS for less motion. */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
      }
    }
