/* =========================================================
   WildRoute - Sign-in / Auth pages (auth-front.css)
   Location: assets/css/css-front/auth-front.css

   Used by login.php (and reusable for register.php, which
   shares the same .auth-*, .field, .btn and .contact-alert
   classes). Same visual language as the rest of the site.
   Everything is scoped under "#main.auth-page" so style.css
   cannot override it.

   01 Tokens        05 Alerts         09 Responsive
   02 Base          06 Form           10 Motion / a11y
   03 Layout        07 Note + footer
   04 Brand + card  08 Buttons
   ========================================================= */

/* =========================================================
   01. TOKENS
   ========================================================= */
:root {
  --au-bg:          #f7f7f9;
  --au-card:        #ffffff;
  --au-ink:         #14161a;
  --au-ink-2:       #565a63;
  --au-ink-3:       #8b8f98;
  --au-line:        #e8e9ed;
  --au-line-2:      #d6d8de;
  --au-soft:        #f2f3f6;

  --au-accent:      #d94460;
  --au-accent-dark: #b8324b;
  --au-accent-soft: #fdeef1;

  --au-success:      #178a52;
  --au-success-soft: #e9f7f0;
  --au-danger:       #c8374e;
  --au-danger-soft:  #fdeef1;

  --au-r-md:   14px;
  --au-r-lg:   20px;
  --au-r-xl:   28px;
  --au-r-pill: 999px;

  --au-shadow-sm: 0 1px 2px rgba(20, 22, 26, .05);
  --au-shadow-lg: 0 30px 70px -34px rgba(20, 22, 26, .35), 0 2px 6px rgba(20, 22, 26, .04);

  --au-ease: cubic-bezier(.4, 0, .2, 1);
}

/* =========================================================
   02. BASE
   ========================================================= */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body:has(#main.auth-page) {
  background: var(--au-bg);
  color: var(--au-ink);
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

#main.auth-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 140px);
  min-height: calc(100dvh - 140px);
  padding: clamp(24px, 5vw, 64px) 16px clamp(32px, 6vw, 72px);
  overflow-x: clip;
  color: var(--au-ink);
  line-height: 1.55;
  background:
    radial-gradient(60% 50% at 100% 0%, rgba(217, 68, 96, .1), transparent 62%),
    radial-gradient(50% 45% at 0% 100%, rgba(217, 68, 96, .06), transparent 60%),
    var(--au-bg);
}

#main.auth-page *,
#main.auth-page *::before,
#main.auth-page *::after { box-sizing: border-box; }
#main.auth-page h1,
#main.auth-page h2,
#main.auth-page p { margin: 0; }
#main.auth-page a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
#main.auth-page button,
#main.auth-page input { font: inherit; }
#main.auth-page ::selection { background: var(--au-accent); color: #fff; }

#main.auth-page :focus { outline: none; }
#main.auth-page :focus-visible {
  outline: 3px solid var(--au-ink);
  outline-offset: 3px;
  border-radius: 10px;
}

#main.auth-page svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* =========================================================
   03. LAYOUT
   ========================================================= */
#main.auth-page .auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3vw, 26px);
  width: 100%;
  max-width: 460px;
}

/* =========================================================
   04. BRAND + CARD
   ========================================================= */
#main.auth-page .auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: var(--au-r-md);
}
#main.auth-page .auth-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #e0556f 0%, #d94460 100%);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(217, 68, 96, .7);
}
#main.auth-page .auth-brand-mark svg { width: 22px; height: 22px; }
#main.auth-page .auth-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
#main.auth-page .auth-brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--au-ink);
}
#main.auth-page .auth-brand-tag { font-size: .76rem; font-weight: 500; color: var(--au-ink-3); }

#main.auth-page .auth-card {
  width: 100%;
  padding: clamp(24px, 5vw, 40px);
  border: 1px solid var(--au-line);
  border-radius: var(--au-r-xl);
  background: var(--au-card);
  box-shadow: var(--au-shadow-lg);
}

#main.auth-page .auth-card-head { margin-bottom: 22px; }
#main.auth-page .eyebrow {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 12px;
  border-radius: var(--au-r-pill);
  background: var(--au-accent-soft);
  font-size: .76rem;
  font-weight: 700;
  color: var(--au-accent-dark);
}
#main.auth-page .auth-title {
  font-size: clamp(1.65rem, 5vw, 2.1rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.04em;
  color: var(--au-ink);
  text-wrap: balance;
}
#main.auth-page .auth-lede {
  margin-top: 10px;
  font-size: .96rem;
  line-height: 1.6;
  color: var(--au-ink-2);
}

/* =========================================================
   05. ALERTS
   ========================================================= */
#main.auth-page .contact-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--au-r-md);
  font-size: .9rem;
  line-height: 1.5;
}
#main.auth-page .contact-alert-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  color: #fff;
}
#main.auth-page .contact-alert-icon svg { width: 15px; height: 15px; }
#main.auth-page .contact-alert-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow-wrap: anywhere;
}
#main.auth-page .contact-alert-body strong { font-weight: 700; }

#main.auth-page .contact-alert--error {
  background: var(--au-danger-soft);
  border-color: rgba(200, 55, 78, .25);
  color: #7c1f2e;
}
#main.auth-page .contact-alert--error .contact-alert-icon { background: var(--au-danger); }

#main.auth-page .contact-alert--success {
  background: var(--au-success-soft);
  border-color: rgba(23, 138, 82, .25);
  color: #0f5a35;
}
#main.auth-page .contact-alert--success .contact-alert-icon { background: var(--au-success); }

/* =========================================================
   06. FORM
   ========================================================= */
#main.auth-page .auth-form { display: flex; flex-direction: column; gap: 18px; }

#main.auth-page .field { display: flex; flex-direction: column; gap: 8px; }
#main.auth-page .field label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--au-ink);
}
#main.auth-page .field input {
  width: 100%;
  height: 54px;
  padding: 0 18px;
  border: 1.5px solid var(--au-line);
  border-radius: var(--au-r-md);
  background: var(--au-soft);
  font-size: 1rem;
  font-weight: 500;
  color: var(--au-ink);
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
#main.auth-page .field input::placeholder { color: var(--au-ink-3); font-weight: 400; }
#main.auth-page .field input:hover { border-color: var(--au-line-2); }
#main.auth-page .field input:focus {
  border-color: var(--au-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(217, 68, 96, .16);
}
#main.auth-page .field input:-webkit-autofill,
#main.auth-page .field input:-webkit-autofill:hover,
#main.auth-page .field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--au-ink);
  box-shadow: 0 0 0 1000px #fff inset;
  caret-color: var(--au-ink);
}
#main.auth-page .field input[aria-invalid="true"] {
  border-color: var(--au-danger);
  box-shadow: 0 0 0 4px rgba(200, 55, 78, .12);
}

/* =========================================================
   07. NOTE + FOOTER
   ========================================================= */
#main.auth-page .auth-note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 22px;
  padding: 14px 16px;
  border: 1px solid var(--au-line);
  border-radius: var(--au-r-md);
  background: var(--au-soft);
}
#main.auth-page .auth-note-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 10px;
  background: #fff;
  color: var(--au-accent);
  box-shadow: var(--au-shadow-sm);
}
#main.auth-page .auth-note-icon svg { width: 17px; height: 17px; }
#main.auth-page .auth-note-text { font-size: .84rem; line-height: 1.55; color: var(--au-ink-2); }

#main.auth-page .auth-card-foot {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--au-line);
  text-align: center;
  font-size: .9rem;
  color: var(--au-ink-2);
}
#main.auth-page .auth-card-foot a {
  font-weight: 700;
  color: var(--au-accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(184, 50, 75, .35);
  transition: color .18s ease, text-decoration-color .18s ease;
}
#main.auth-page .auth-card-foot a:hover { color: var(--au-accent); text-decoration-color: currentColor; }

#main.auth-page .auth-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  font-size: .84rem;
  color: var(--au-ink-3);
}
#main.auth-page .auth-links a { padding: 4px 2px; color: var(--au-ink-2); transition: color .18s ease; }
#main.auth-page .auth-links a:hover { color: var(--au-ink); }

/* =========================================================
   08. BUTTONS
   ========================================================= */
#main.auth-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 50px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: var(--au-r-pill);
  font-size: .96rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s var(--au-ease);
}
#main.auth-page .btn:active { transform: scale(.985); }
#main.auth-page .btn .ico { width: 17px; height: 17px; transition: transform .18s var(--au-ease); }
@media (hover: hover) { #main.auth-page .btn:hover .ico { transform: translateX(3px); } }

#main.auth-page .btn-lg { height: 54px; font-size: 1rem; }

#main.auth-page .btn-primary {
  background: var(--au-accent);
  border-color: var(--au-accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(184, 50, 75, .25), 0 12px 24px -12px rgba(217, 68, 96, .7);
}
#main.auth-page .btn-primary:hover { background: var(--au-accent-dark); border-color: var(--au-accent-dark); }
#main.auth-page .btn-primary:disabled,
#main.auth-page .btn-primary[aria-busy="true"] { opacity: .65; cursor: progress; }

#main.auth-page .auth-submit { width: 100%; margin-top: 2px; }

/* =========================================================
   09. RESPONSIVE
   ========================================================= */
@media (max-width: 600px) {
  #main.auth-page {
    align-items: flex-start;
    min-height: 0;
    padding: 20px 12px 40px;
  }
  #main.auth-page .auth-wrap { gap: 18px; }
  #main.auth-page .auth-card { padding: 22px 18px; border-radius: 24px; }
  #main.auth-page .auth-card-head { margin-bottom: 18px; }
  #main.auth-page .auth-lede { font-size: .93rem; }
  #main.auth-page .field input { font-size: 16px; }       /* stops iOS zoom */
  #main.auth-page .auth-note { padding: 12px 14px; }
}

@media (max-width: 360px) {
  #main.auth-page { padding-inline: 8px; }
  #main.auth-page .auth-card { padding: 20px 14px; }
  #main.auth-page .auth-brand-tag { display: none; }
}

@media (max-height: 520px) and (orientation: landscape) {
  #main.auth-page { align-items: flex-start; min-height: 0; padding-block: 16px 28px; }
}

/* =========================================================
   10. MOTION / A11Y
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  #main.auth-page .auth-card { animation: au-rise .5s var(--au-ease) both; }
  #main.auth-page .auth-brand { animation: au-rise .5s var(--au-ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  #main.auth-page *,
#main.auth-page *::before,
#main.auth-page *::after {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}
@media (forced-colors: active) {
  #main.auth-page .btn-primary,
#main.auth-page .field input,
#main.auth-page .auth-card { border: 1px solid CanvasText; }
}
@media print {
  #main.auth-page { background: #fff; min-height: 0; }
  #main.auth-page .auth-card { box-shadow: none; }
}

@keyframes au-rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}