@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.ttf") format("truetype-variations");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  --login-shell: #101011;
  --login-canvas: #090909;
  --login-surface: #171717;
  --login-raised: #1f1f1f;
  --login-control: #242424;
  --login-line: #2e2e2e;
  --login-line-strong: #444;
  --login-ink: #fff;
  --login-body: #b4b4b4;
  --login-muted: #999;
  --login-tertiary: #808080;
  --login-accent: #ffdd55;
  --login-accent-hover: #ffe578;
  --login-online: #04c40a;
  --login-error: #ff8573;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--login-canvas);
  color: var(--login-ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button, input { font: inherit; }

.login-layout {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(24rem, 0.9fr) minmax(30rem, 1.1fr);
  background: var(--login-canvas);
}

.brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 100%;
  overflow: hidden;
  flex-direction: column;
  padding: clamp(2rem, 4.5vw, 4.5rem);
  border-right: 1px solid var(--login-line);
  background:
    radial-gradient(circle at 8% 8%, rgb(255 221 85 / 0.11), transparent 30rem),
    radial-gradient(circle at 95% 92%, rgb(4 196 10 / 0.07), transparent 26rem),
    var(--login-shell);
}

.brand-panel::after {
  position: absolute;
  z-index: -1;
  right: -12rem;
  bottom: -12rem;
  width: 29rem;
  height: 29rem;
  border: 1px solid rgb(255 255 255 / 0.045);
  border-radius: 50%;
  content: "";
}

.brand {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 10px;
  color: var(--login-ink);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent url('/assets/gashlin-logo.png') center/contain no-repeat;
  box-shadow: none;
  color: transparent;
  font-size: 0;
}

.brand-copy {
  max-width: 37rem;
  margin: auto 0;
  padding: 5.5rem 0 4.5rem;
}

.eyebrow {
  margin: 0 0 19px;
  color: var(--login-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(3.1rem, 5.2vw, 5.4rem);
  font-weight: 520;
  letter-spacing: -0.065em;
  line-height: 0.96;
}

.brand-copy > p:last-child {
  max-width: 31rem;
  margin: 1.75rem 0 0;
  color: var(--login-body);
  font-size: clamp(1rem, 1.35vw, 1.13rem);
  line-height: 1.65;
}

.trust-list {
  display: grid;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--login-line);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
}

.trust-list li {
  display: grid;
  min-width: 0;
  min-height: 104px;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 22px 18px 10px 0;
}

.trust-list li + li {
  padding-left: 18px;
  border-left: 1px solid var(--login-line);
}

.trust-list li > span:first-child {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  margin-top: 1px;
  border-radius: 50%;
  background: rgb(4 196 10 / 0.1);
  color: var(--login-online);
  font-size: 9px;
}

.trust-list b, .trust-list small { display: block; }

.trust-list b {
  margin-bottom: 4px;
  color: var(--login-body);
  font-size: 12px;
  font-weight: 600;
}

.trust-list small {
  color: var(--login-tertiary);
  font-size: 11px;
  line-height: 1.45;
}

.auth-panel {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: clamp(2rem, 7vw, 7rem);
  background: var(--login-canvas);
}

.auth-wrap { width: min(100%, 27rem); }
.auth-heading { margin-bottom: 2rem; }

.auth-heading h2 {
  margin: 0;
  color: var(--login-ink);
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 540;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.auth-heading > p:last-child {
  margin: 0.78rem 0 0;
  color: var(--login-muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-state {
  display: flex;
  min-height: 3rem;
  align-items: center;
  gap: 0.75rem;
  color: var(--login-muted);
  font-size: 13px;
}

.auth-state span {
  width: 1.05rem;
  height: 1.05rem;
  border: 2px solid var(--login-line-strong);
  border-top-color: var(--login-accent);
  border-radius: 50%;
  animation: login-spin 0.75s linear infinite;
}

body[data-auth-ready="true"] .auth-state,
body[data-auth-error="true"] .auth-state { display: none; }

.auth-error {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgb(255 133 115 / 0.35);
  border-radius: 10px;
  background: rgb(255 133 115 / 0.07);
  color: var(--login-error);
  font-size: 13px;
  line-height: 1.5;
}

hanko-auth {
  display: block;
  width: 100%;
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 180ms ease, transform 180ms ease;
  --color: #fff;
  --color-shade-1: #999;
  --color-shade-2: #2e2e2e;
  --brand-color: #fff;
  --brand-color-shade-1: #dbe5c5;
  --brand-contrast-color: #090909;
  --background-color: transparent;
  --error-color: var(--login-error);
  --link-color: var(--login-accent);
  --font-weight: 450;
  --font-size: 14px;
  --font-family: "DM Sans", sans-serif;
  --border-radius: 10px;
  --border-style: solid;
  --border-width: 1px;
  --item-height: 46px;
  --item-margin: 0.7rem 0;
  --container-padding: 0;
  --container-max-width: 100%;
  --headline1-font-size: 1.1rem;
  --headline1-font-weight: 600;
  --headline1-margin: 0 0 1rem;
  --headline2-font-size: 0.92rem;
  --headline2-font-weight: 600;
  --headline2-margin: 1rem 0 0.5rem;
  --divider-padding: 0 1rem;
  --input-min-width: 100%;
  --button-min-width: max-content;
}

body[data-auth-ready="true"] hanko-auth {
  opacity: 1;
  transform: none;
}

hanko-auth::part(container) { width: 100%; }
hanko-auth::part(form-item) { min-width: 100%; }

hanko-auth::part(input),
hanko-auth::part(button) {
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease,
    transform 150ms ease;
}

hanko-auth::part(input) {
  border-color: var(--login-line-strong);
  background: var(--login-surface);
  box-shadow: none;
  color: var(--login-ink);
}

hanko-auth::part(input):focus {
  border-color: var(--login-accent);
  box-shadow: 0 0 0 3px rgb(255 221 85 / 0.09);
}

hanko-auth::part(primary-button) {
  border-color: var(--login-ink);
  background: var(--login-ink);
  box-shadow: none;
  color: var(--login-canvas);
  font-weight: 650;
}

hanko-auth::part(primary-button):hover {
  border-color: #dbe5c5;
  background: #dbe5c5;
  transform: translateY(-1px);
}

hanko-auth::part(secondary-button) {
  border-color: var(--login-line-strong);
  background: var(--login-surface);
  color: var(--login-ink);
  font-weight: 600;
}

hanko-auth::part(link) {
  color: var(--login-accent);
  font-weight: 600;
}

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 1.75rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--login-line);
  color: var(--login-tertiary);
  font-size: 11px;
}

.auth-foot span {
  color: var(--login-accent);
  font-size: 15px;
}

@keyframes login-spin { to { transform: rotate(360deg); } }

@media (max-width: 920px) {
  .login-layout { grid-template-columns: 1fr; }

  .brand-panel {
    min-height: auto;
    padding: 1.5rem clamp(1.25rem, 6vw, 3rem) 2.25rem;
    border-right: 0;
    border-bottom: 1px solid var(--login-line);
  }

  .brand-copy { padding: 3.5rem 0 0; }
  .brand-copy h1 { font-size: clamp(2.5rem, 11vw, 4.2rem); }
  .trust-list { display: none; }

  .auth-panel {
    place-items: start center;
    padding: 3rem clamp(1.25rem, 7vw, 3rem) 4rem;
  }
}

@media (max-width: 480px) {
  .brand-copy { padding-top: 2.75rem; }

  .brand-copy > p:last-child {
    margin-top: 1.2rem;
    font-size: 0.93rem;
  }

  .auth-heading { margin-bottom: 1.55rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
