/* =============================================================================
   Digital JobHelp — kommune-login
   Bygget på JobHelp Solutions designsystem (Public Sans + Open Sans).
   --brand / --brand-hover / --brand-border sættes af index.html ud fra
   subdomænet — brug dem i stedet for hardkodede kommunefarver.
   ========================================================================== */

@import url('tokens.css');

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--base-light);
  color: var(--fg1);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }
a:hover { opacity: .7; }

/* ---- Layout ------------------------------------------------------------- */
.login-grid {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.brand-aside {
  background: var(--brand);
  display: flex;
  flex-direction: column;
  padding: 52px 60px;
  position: relative;
  overflow: hidden;
}

.circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.circle--tr { top: -100px; right: -100px; width: 380px; height: 380px; background: rgba(255,255,255,.10); }
.circle--bl { bottom: -60px; left: -60px; width: 280px; height: 280px; background: rgba(255,255,255,.06); }

.brand-logo { margin-bottom: auto; position: relative; }
.brand-logo img { height: var(--logo-h, 48px); display: block; }

.form-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--base-light);
}

/* ---- Venstre panel ------------------------------------------------------ */
.pitch {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 0;
  position: relative;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.pitch.is-in { opacity: 1; transform: none; }

.pitch__head { margin-bottom: 20px; }
.pitch__head h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 8px;
  text-wrap: balance;
}
.pitch__head p {
  color: rgba(255,255,255,.8);
  font-size: 15px;
  line-height: 1.55;
  text-wrap: pretty;
}

.video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Testimonial-bånd --------------------------------------------------- */
.tst {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
/* Fast troværdighedsudsagn — ankeret over de rullende citater. */
.tst__claim {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(255,255,255,.82);
}
.tst__claim b { font-weight: 700; color: #fff; }

.tst__row { display: flex; gap: 14px; align-items: center; }
.tst__quote { width: 22px; height: 22px; flex: none; color: #fff; opacity: .35; }

.tst__mask {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.tst__track { display: flex; align-items: center; width: max-content; will-change: transform; }

.tst__item {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding-right: 20px;
  white-space: nowrap;
}
.tst__item::after {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,.4);
  flex: none;
}
.tst__citat {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,.94);
}
.tst__stat {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.34);
}
.tst__stat b { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: #fff; }
.tst__stat span { font-size: 13px; color: #fff; }

/* ---- Login-kort --------------------------------------------------------- */
.card {
  width: 100%;
  max-width: 400px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .5s .15s var(--ease-out), transform .5s .15s var(--ease-out);
}
.card.is-in { opacity: 1; transform: none; }

.card__logos {
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.card__logos img { height: var(--logo-h, 48px); display: block; }
.card__djh { height: 22px !important; }
.rule { height: 1px; width: 80%; background: var(--line); }

.card__head { margin-bottom: 28px; }
.card__head h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 6px;
}
.card__head p { color: var(--fg3); font-size: 15px; line-height: 1.5; }

.group { margin-bottom: 12px; }
.group h2 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--fg1);
  margin-bottom: 2px;
}
.group p { font-size: 13px; color: var(--fg3); line-height: 1.5; }
.group--divided { margin: 22px 0 12px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ---- Knapper ------------------------------------------------------------ */
.btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  padding: 15px 22px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-base), border-color var(--dur-base),
              box-shadow var(--dur-base), transform var(--dur-fast);
}
.btn:hover { opacity: 1; }
.btn:active { transform: scale(.99); }
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn svg { flex: none; }

/* MitID-blå er en fast, officiel farve — må ALDRIG erstattes af kommunefarven. */
.btn--mitid {
  background: #0060e6;
  color: #fff;
  border: none;
  box-shadow: var(--shadow-md);
}
.btn--mitid:hover { background: #0050c4; }
.btn--mitid svg { height: 18px; }

.btn--sso {
  background: var(--surface);
  color: var(--brand);
  border: 1.5px solid var(--brand-border);
  box-shadow: var(--shadow-sm);
  gap: 10px;
}
.btn--sso:hover { border-color: var(--brand); box-shadow: var(--shadow-md); }
.btn--sso svg { width: 20px; height: 20px; }

/* ---- Hjælpelinks -------------------------------------------------------- */
.help {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.help p { font-size: 13px; color: var(--fg2); line-height: 1.5; }
.help__muted { color: var(--fg3); }
.help a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: opacity .15s;
}

/* ---- Telefon ------------------------------------------------------------
   Under 820px stables kolonnerne, så videoen fylder hele bredden.
   Desktop-layoutet er bevidst urørt.                                        */
@media (max-width: 820px) {
  .login-grid  { grid-template-columns: 1fr; min-height: auto; }
  .brand-aside { padding: 32px 22px; }
  .brand-logo  { margin-bottom: 28px; }
  .pitch       { padding: 4px 0 8px; flex: none; }
  .form-main   { padding: 36px 22px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .pitch, .card { transition: none; opacity: 1; transform: none; }
}
