/* Endru — brand tokens from the Endru brand board (Figma, "Brand 26102026") */

@font-face {
  font-family: "Instrument Sans";
  src: url("assets/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* Light only: the primary treatment (black paths + purple dots on production off-white). */
:root {
  color-scheme: light;
  --identity-black: #000000;
  --brand-purple: #6B4FB3;
  --off-white: #F5F3F0;
  --app-ink: #1F1F1F;
  --divider-grey: #D5D4CD;

  --gutter: clamp(16px, 5vw, 64px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--off-white);
  color: var(--app-ink);
  font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, p { margin: 0; }

/* The page clips the background paths at the screen edges. */
.page {
  --wm: min(74vw, 680px, 76vh);   /* wordmark width; the login row and footer share it */
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
}

/* Stage — the wordmark, front and centre. Its SVG also draws the background paths,
   which grow out of the n and u and overflow the wordmark box in every direction. */
.stage {
  display: grid;
  place-content: center;
}

.lockup { width: var(--wm); }
/* On phones the wordmark runs a little wider, so the tagline under it stays readable. */
@media (max-width: 600px) {
  .page { --wm: min(86vw, 76vh); }
}

.wordmark {
  color: var(--identity-black);
  line-height: 0;
}
.wordmark svg { display: block; width: 100%; height: auto; overflow: visible; }
.wordmark .field { stroke: var(--divider-grey); }
.wordmark .marker,
.wordmark .field-markers { fill: var(--brand-purple); }

/* Tagline — drawn in the wordmark's SVG under "dru", stretched to exactly that width. */
.tagline-text {
  font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  fill: var(--app-ink);
}

/* Bottom — beta login above a footer row; the paths dissolve into it.
   Login and footer share three columns as wide as the wordmark, so they line up. */
.bottom {
  --purple-08: rgb(107 79 179 / 0.08);
  --purple-18: rgb(107 79 179 / 0.18);   /* brand board: base purple at 18%, not a new purple */
  --purple-26: rgb(107 79 179 / 0.26);
  position: relative;
  display: grid;
  justify-items: center;
  gap: clamp(28px, 5vh, 48px);
  padding: 72px var(--gutter) clamp(14px, 2.5vh, 22px);
  background: linear-gradient(to bottom,
    rgb(245 243 240 / 0) 0,
    rgb(245 243 240 / 0.85) 40px,
    var(--off-white) 64px);
}

@media (max-height: 500px) {
  .bottom { padding-top: 44px; gap: 20px; }
}

/* Login and footer scale with the wordmark: same width, three columns at every size. */
.login,
.footer {
  width: var(--wm);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(6px, calc(var(--wm) * 0.018), 12px);
}

.field { display: block; min-width: 0; }

.login input,
.login button {
  width: 100%;
  height: clamp(32px, calc(var(--wm) * 0.065), 44px);
  border: 0;
  border-radius: clamp(9px, calc(var(--wm) * 0.02), 14px);
  font: inherit;
  font-size: clamp(13px, calc(var(--wm) * 0.0235), 16px);
  color: var(--app-ink);
}

/* Touch screens: 16px text stops iOS from zooming into the field. */
@media (pointer: coarse) {
  .login input { font-size: 16px; }
}

.login input {
  min-width: 0;
  padding: 0 clamp(9px, calc(var(--wm) * 0.024), 16px);
  background: var(--purple-08);
}
.login input::placeholder { color: rgb(31 31 31 / 0.55); }

.login button {
  background: var(--purple-18);
  font-weight: 500;
  cursor: pointer;
}
.login button:hover { background: var(--purple-26); }

.login input:focus-visible,
.login button:focus-visible {
  outline: 2px solid var(--brand-purple);
  outline-offset: 2px;
}

.footer {
  text-align: center;
  font-size: clamp(11px, calc(var(--wm) * 0.0195), 13px);
}

/* The email reads as plain text, with an underline only on hover. */
.footer a {
  color: inherit;
  text-decoration: none;
}
.footer a:hover { text-decoration: underline; text-underline-offset: 0.22em; }
.footer a:focus-visible { outline: 2px solid var(--brand-purple); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
