/* Hallmark · pre-emit critique: P5 H5 E4 S5 R5 V4
 * macrostructure: split diptych · theme: BSpot studied-DNA
 * source: https://www.bspotgroup.com/ · studied: yes
 */

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("nunito-sans-regular.ttf") format("truetype");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("nunito-sans-bold.ttf") format("truetype");
}

@font-face {
  font-family: "Playfair Display";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("playfair-display-bold.ttf") format("truetype");
}

:root {
  color-scheme: light;
  --color-brand: #1e7881;
  --color-brand-dark: #155c63;
  --color-ink: #020304;
  --color-text: #242a2b;
  --color-muted: #687173;
  --color-surface: #ffffff;
  --color-soft: #f5f7f7;
  --color-line: #d8e0df;
  --color-input-line: #aab9b8;
  --color-error: #9c2d2d;
  --color-error-soft: #fff3f2;
  --color-white: #ffffff;
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Nunito Sans", Arial, sans-serif;
  --radius-control: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 72px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 160ms;
}

* { box-sizing: border-box; }

html,
body { overflow-x: clip; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--color-surface);
  color: var(--color-text);
  font-family: var(--font-body);
}

.auth-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.brand-panel {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(var(--space-xl), 5vw, var(--space-3xl));
  background: var(--color-brand);
  color: var(--color-white);
}

.brand-panel::before,
.brand-panel::after {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: "";
}

.brand-panel::before {
  background: url("bspot-health.jpg") center / cover no-repeat;
  filter: grayscale(1);
  transform: scale(1.015);
}

.brand-panel::after {
  z-index: -1;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--color-ink) 35%, transparent), transparent 38%),
    linear-gradient(0deg, color-mix(in srgb, var(--color-ink) 82%, transparent), color-mix(in srgb, var(--color-brand) 68%, transparent));
}

.brand-logo {
  width: 132px;
  height: 90px;
  object-fit: contain;
  object-position: left center;
}

.brand-copy {
  width: min(100%, 720px);
  padding-block: var(--space-2xl);
}

.eyebrow {
  margin: 0 0 var(--space-md);
  color: var(--color-brand);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-light { color: var(--color-white); }

.brand-title,
h1 {
  margin: 0;
  color: inherit;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.brand-title {
  max-width: 12ch;
  font-size: clamp(3rem, 5.4vw, 6.25rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.brand-copy > p:last-child {
  max-width: 50ch;
  margin: var(--space-lg) 0 0;
  color: color-mix(in srgb, var(--color-white) 84%, transparent);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.6;
}

.brand-footer {
  margin: 0;
  color: color-mix(in srgb, var(--color-white) 76%, transparent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-panel {
  min-width: 0;
  display: grid;
  place-items: center;
  padding: clamp(var(--space-xl), 6vw, 96px);
  background: var(--color-surface);
}

.login-content { width: min(100%, 480px); }

h1 {
  color: var(--color-ink);
  font-size: clamp(2.75rem, 5vw, 4.75rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.intro,
.workspace-card > p:not(.eyebrow) {
  margin: var(--space-md) 0 var(--space-xl);
  color: var(--color-muted);
  line-height: 1.6;
}

.field { margin-top: 20px; }

label {
  display: block;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--space-md);
  border: 1px solid var(--color-input-line);
  border-radius: var(--radius-control);
  background: var(--color-soft);
  color: var(--color-ink);
  font: inherit;
  transition: border-color var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out);
}

input:hover { border-color: var(--color-brand); }

input:focus {
  border-color: var(--color-brand);
  background: var(--color-surface);
}

input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 3px;
}

button {
  width: 100%;
  min-height: 52px;
  margin-top: var(--space-lg);
  border: 1px solid var(--color-brand);
  border-radius: var(--radius-control);
  background: var(--color-brand);
  color: var(--color-white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}

button:hover {
  border-color: var(--color-brand-dark);
  background: var(--color-brand-dark);
}

button:active { transform: translateY(1px); }

button.secondary { background: var(--color-ink); }

.form-error {
  margin-top: var(--space-lg);
  padding: 12px var(--space-md);
  border-left: 3px solid var(--color-error);
  background: var(--color-error-soft);
  color: var(--color-error);
  line-height: 1.45;
}

.workspace-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--space-lg);
  background: var(--color-soft);
}

.workspace-card {
  width: min(100%, 430px);
  padding: clamp(28px, 6vw, 44px);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-surface);
}

@media (max-width: 780px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); }

  .brand-panel {
    min-height: 280px;
    padding: var(--space-lg);
  }

  .brand-logo {
    width: 100px;
    height: 68px;
  }

  .brand-copy { padding: var(--space-xl) 0; }

  .brand-title {
    max-width: 15ch;
    font-size: clamp(2.35rem, 10.5vw, 4rem);
    line-height: 0.98;
  }

  .brand-copy > p:last-child,
  .brand-footer { display: none; }

  .login-panel { padding: var(--space-2xl) var(--space-lg); }
}

@media (max-width: 374px) {
  .brand-panel { min-height: 244px; }

  .login-panel { padding: 40px var(--space-md); }

  h1 { font-size: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  input,
  button { transition-duration: 0.01ms; }
}
