/*
  Shared design foundation for the sign in page and the hub.
  It lives under /assets/login/ because that is the only static path the server
  publishes before sign in (see PUBLIC_LOGIN_FILES in server.py).

  Rules: one typeface (Geist), Tailwind type scale only, named text styles,
  spacing tokens only, Tailwind radii only, flat dark backgrounds,
  one easing curve, transform and opacity are the only animated properties.
*/

@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/login/fonts/geist-latin-wght-normal.woff2') format('woff2-variations'), url('/assets/login/fonts/geist-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Geist;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/login/fonts/geist-latin-ext-wght-normal.woff2') format('woff2-variations'), url('/assets/login/fonts/geist-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;

  /* Surfaces: the approved dark palette only */
  --bg-0: #000000;
  --bg-1: #181818;
  --bg-2: #1F1F1F;
  --bg-3: #272727;
  --bg-4: #313131;

  /* Text */
  --text-1: #FFFFFF;
  --text-2: #A8A8A8;
  --text-3: #8C8C8C;

  /* Brand and states */
  --brand: #E60012;
  --brand-hover: #C7000F;
  --success: #5CD69A;
  --warning: #F5B957;
  --danger: #FF6B73;
  --danger-text: #FFB4B9;
  --focus: #FFFFFF;

  /* Spacing (B2) */
  --space-0: 0;
  --space-25: 2px;
  --space-50: 4px;
  --space-75: 8px;
  --space-100: 12px;
  --space-200: 16px;
  --space-300: 24px;
  --space-400: 32px;
  --space-500: 40px;
  --space-600: 48px;
  --space-700: 64px;
  --space-800: 80px;
  --space-900: 96px;

  /* Radius (Tailwind steps, B3) */
  --radius-sm: 2px;
  --radius: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* Motion (B7) */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-move: 500ms;
  --duration-fade: 300ms;
  --duration-reveal: 700ms;

  font-family: Geist, ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg-0); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-width: 320px; background: var(--bg-0); color: var(--text-1); font-size: 1rem; line-height: 1.5rem; font-weight: 400; }
h1, h2, h3, h4, h5, h6 { margin: 0; text-wrap: balance; }
p, li, dd, label, figcaption { text-wrap: pretty; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
kbd { font: inherit; }

/* B1 text styles. Each maps to one Tailwind scale step. */
.heading-1 { font-size: 3.75rem;  line-height: 1;       font-weight: 600; }
.heading-2 { font-size: 3rem;     line-height: 1;       font-weight: 600; }
.heading-3 { font-size: 2.25rem;  line-height: 2.5rem;  font-weight: 600; }
.heading-4 { font-size: 1.875rem; line-height: 2.25rem; font-weight: 600; }
.heading-5 { font-size: 1.5rem;   line-height: 2rem;    font-weight: 600; }
.heading-6 { font-size: 1.25rem;  line-height: 1.75rem; font-weight: 600; }
.title-1   { font-size: 1.25rem;  line-height: 1.75rem; font-weight: 500; }
.title-2   { font-size: 1.125rem; line-height: 1.75rem; font-weight: 500; }
.title-3   { font-size: 1rem;     line-height: 1.5rem;  font-weight: 500; }
.title-4   { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.title-5   { font-size: 0.75rem;  line-height: 1rem;    font-weight: 500; }
.body-1    { font-size: 1rem;     line-height: 1.5rem;  font-weight: 600; }
.body-2    { font-size: 1rem;     line-height: 1.5rem;  font-weight: 500; }
.body-3    { font-size: 1rem;     line-height: 1.5rem;  font-weight: 400; }
.body-4    { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.body-5    { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.body-6    { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.button-lg  { font-size: 1.125rem; line-height: 1.75rem; font-weight: 600; }
.button-md  { font-size: 1rem;     line-height: 1.5rem;  font-weight: 600; }
.button-sm  { font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; }
.button-xsm { font-size: 0.75rem;  line-height: 1rem;    font-weight: 600; }
.caption-1 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; }
.caption-2 { font-size: 0.875rem; line-height: 1.25rem; font-weight: 400; }
.caption-3 { font-size: 0.75rem;  line-height: 1rem;    font-weight: 600; }
.caption-4 { font-size: 0.75rem;  line-height: 1rem;    font-weight: 500; }
.caption-5 { font-size: 0.75rem;  line-height: 1rem;    font-weight: 400; }

/* B5 hero heading: left to right gradient on the text only. */
.hero-gradient {
  width: fit-content;
  max-width: 680px;
  padding-bottom: var(--space-75); /* keeps descenders inside the painted area */
  background: linear-gradient(90deg, #FFFFFF, #9B9B9B);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* Icons (Phosphor, regular weight) */
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; }

/* Accessibility helpers */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed; z-index: 100; top: var(--space-200); left: var(--space-200);
  padding: var(--space-75) var(--space-100); border-radius: var(--radius-lg);
  background: var(--text-1); color: var(--bg-0); text-decoration: none;
  transform: translateY(-200%); opacity: 0;
  transition: transform var(--duration-move) var(--ease), opacity var(--duration-fade) var(--ease);
}
.skip-link:focus { transform: none; opacity: 1; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .skip-link { transform: none; }
}
