/* ══════════════════════════════════════════════════════════════
   AUTH PAGES — shared design (login / register / reset-password)
   ══════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Alte Haas Grotesk';
  src: url('/fonts/AlteHaasGroteskRegular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Alte Haas Grotesk';
  src: url('/fonts/AlteHaasGroteskBold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ahg: 'Alte Haas Grotesk', 'Helvetica Neue', sans-serif;
  --body: 'Geist', -apple-system, 'Segoe UI', sans-serif;

  --panel: #0f1522;
  --field: #131a2b;
  --line: rgba(125, 145, 185, 0.18);
  --fg: #e9eef7;
  --muted: #8d99b5;
  --faint: #5d6a85;
  --arctic: #1d72b8;
  --ice: #bcd7f5;

  --r: 8px;
}

* { box-sizing: border-box; margin: 0; }

html { height: 100%; }

body {
  font-family: var(--body);
  color: var(--fg);
  background: var(--panel);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 480px);
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* sfumatura foto → pannello form */
.stage::after {
  content: '';
  position: absolute;
  top: -1px;
  bottom: -1px;
  right: -1px;
  width: 160px;
  background: linear-gradient(90deg, rgba(15, 21, 34, 0) 0%, rgba(15, 21, 34, 0.55) 55%, #0f1522 100%);
  pointer-events: none;
}

/* ══ LEFT — editorial brand panel ══ */
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 52px;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(9, 13, 24, 0.55) 30%, rgba(9, 13, 24, 0.88) 100%),
    url('/img/background-truck.jpg') no-repeat center center;
  background-size: cover;
}

.stage-top { display: flex; align-items: center; gap: 12px; }
.stage-top img { width: 52px; height: 52px; }

.headline {
  font-family: var(--ahg);
  font-weight: 700;
  font-size: clamp(44px, 6.2vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 11ch;
}

.headline em {
  font-style: normal;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(188, 215, 245, 0.85);
}

.route {
  position: absolute;
  right: -40px;
  bottom: 120px;
  width: 62%;
  opacity: 0.7;
  pointer-events: none;
}

.stage-bottom {
  display: flex;
  gap: 48px;
  font-family: var(--body);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.stage-bottom b {
  display: block;
  font-family: var(--ahg);
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 2px;
}

/* ══ RIGHT — form panel — only this scrolls, page fixed — centered when short */
.gate {
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  padding: 48px 58px 32px;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  background:
    radial-gradient(600px 300px at 80% 110%, rgba(68, 133, 224, 0.07), transparent),
    var(--panel);
}

.gate::-webkit-scrollbar { width: 6px; }
.gate::-webkit-scrollbar-track { background: transparent; }
.gate::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.gate::-webkit-scrollbar-thumb:hover { background: rgba(125,145,185,0.28); }

.gate h1 {
  font-family: var(--ahg);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}

.subtitle {
  margin: -20px 0 26px;
  font-size: 14.5px;
  color: var(--muted);
}

/* ── form primitives ── */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-family: var(--body);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--fg);
  font-family: var(--body);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

input::placeholder { color: var(--faint); }

input:focus,
select:focus {
  border-color: var(--arctic);
  background: #16203a;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%238d99b5' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: var(--field);
}

select option {
  background: var(--field);
  color: var(--fg);
}

button {
  width: 100%;
  margin-top: 8px;
  padding: 14px 20px;
  border: none;
  border-radius: var(--r);
  background: var(--arctic);
  color: #fff;
  font-family: var(--ahg);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

button:hover:not(:disabled) { filter: brightness(1.12); }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── discord button (ghost) ── */
.discord-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  margin-bottom: 22px;
  border-radius: var(--r);
  border: 1px solid rgba(125, 145, 185, 0.35);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--fg);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.discord-button:hover {
  border-color: #7289ff;
  background: rgba(114, 137, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
}

.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0;
  color: var(--faint);
  font-family: var(--body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── messages ── */
.error-message {
  font-size: 13.5px;
  color: #f08c8a;
  border-left: 2px solid #f08c8a;
  padding: 8px 12px;
  margin-bottom: 22px;
  background: rgba(240, 140, 138, 0.06);
}

.message-success {
  font-size: 13.5px;
  color: #55d6a4;
  border-left: 2px solid #55d6a4;
  padding: 8px 12px;
  margin-bottom: 22px;
  background: rgba(85, 214, 164, 0.06);
}

/* ── links footer ── */
.links-container {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.links-container.column {
  flex-direction: column;
  gap: 8px;
}

a {
  color: var(--ice);
  text-decoration: none;
}

a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ══ register-specific ══ */
.discord-status {
  font-size: 13.5px;
  padding: 11px 14px;
  margin-bottom: 14px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--field);
  color: var(--muted);
}

.discord-status.verified {
  border-color: rgba(85, 214, 164, 0.35);
  background: rgba(85, 214, 164, 0.06);
  color: #55d6a4;
}

.strength-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(125, 145, 185, 0.15);
  margin-top: 10px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: transparent;
  transition: width 0.25s ease, background 0.25s ease;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 12px 0 4px;
  font-size: 13px;
  color: var(--faint);
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.checklist li::before {
  content: '○';
  font-size: 10px;
  width: 14px;
  color: var(--faint);
}

.checklist li.valid { color: var(--muted); }

.checklist li.valid::before {
  content: '●';
  color: #55d6a4;
}

/* ══ responsive ══ */
@media (max-width: 900px) {
  body {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
    overflow: auto;
    min-height: 100vh;
  }

  .stage {
    height: auto;
    max-height: none;
    min-height: 380px;
    padding: 28px 28px 96px;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .stage::after {
    top: auto;
    left: -1px;
    right: -1px;
    bottom: -1px;
    width: auto;
    height: 120px;
    background: linear-gradient(180deg, rgba(15, 21, 34, 0) 0%, #0f1522 100%);
  }

  .headline { font-size: clamp(38px, 11vw, 60px); }
  .stage-bottom { display: none; }
  .route { bottom: 24px; width: 75%; }

  .gate {
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 36px 28px;
  }
  .links-container { flex-direction: column; gap: 8px; }
}
