/* The sign-in screen, in the Vision identity (visionecommerce.co).
   Taken from True Vision's sign-in screen (src/signin.css there, 2026-11-20), at Gabriel's
   request: "we can do the same thing". Keep the two in step when one changes.
   Always dark: every color here is the identity's own value, not a theme
   variable, so the light theme of the app never reaches this page.

   Black page, grey ink scale, ONE accent (brass), Geist for everything,
   Geist Mono for eyebrows and labels, one Instrument Serif italic word in the
   headline, pill buttons, 16px surfaces with hairline borders. */

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/instrument-serif-italic.woff2') format('woff2');
}

.signin {
  --si-black: #000000;
  --si-surface: rgba(10, 10, 10, 0.72);
  --si-field: #141414;
  --si-text: #ffffff;
  --si-text-2: #c8c8c8;
  --si-text-3: #8e8e8e;
  --si-line: rgba(255, 255, 255, 0.08);
  --si-line-strong: rgba(255, 255, 255, 0.18);
  --si-brass: #c9a96a;
  --si-brass-hi: #e6ce9b;
  --si-brass-lo: #9c7f48;
  --si-neg: #fca5a5;
  --si-sans: 'Geist', 'Geist Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --si-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --si-serif: 'Instrument Serif', 'Times New Roman', serif;
  --si-ease: cubic-bezier(0.16, 1, 0.3, 1);
  /* the top bar, the two halves and the foot share one column */
  --si-width: 1240px;
  --si-gutter: clamp(20px, 4vw, 48px);
  --signin-mark: url('/vision-mark.png');

  color-scheme: dark;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--si-black);
  color: var(--si-text);
  font-family: var(--si-sans);
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
}

/* ---------- behind everything: the mark, very large and barely there, and a
   warm light where the emblem sits ---------- */
.signin-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 55% at 78% 46%, rgba(201, 169, 106, 0.13), transparent 70%),
    radial-gradient(45% 40% at 12% 8%, rgba(255, 255, 255, 0.05), transparent 70%);
}

.signin-backdrop::before {
  content: '';
  position: absolute;
  right: -18vw;
  top: 50%;
  width: min(92vw, 1320px);
  aspect-ratio: 512 / 350;
  transform: translateY(-50%);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012) 70%);
  -webkit-mask: var(--signin-mark) center / contain no-repeat;
  mask: var(--signin-mark) center / contain no-repeat;
  filter: blur(1.5px);
}

/* a hairline horizon, the way the site divides its sections */
.signin-backdrop::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 73px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--si-line) 18%, var(--si-line) 82%, transparent);
}

/* ---------- top bar ---------- */
.signin-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: var(--si-width);
  margin: 0 auto;
  padding: 28px var(--si-gutter) 0;
}

.signin-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.signin-logo img {
  height: 22px;
  width: auto;
  display: block;
  user-select: none;
}

.signin-logo span {
  font-family: var(--si-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--si-text);
}

.signin-tag {
  font-family: var(--si-mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--si-text-3);
  padding: 5px 12px;
  border: 1px solid var(--si-line);
  border-radius: 9999px;
  white-space: nowrap;
}

/* ---------- the two halves ---------- */
.signin-main {
  flex: 1;
  width: 100%;
  max-width: var(--si-width);
  margin: 0 auto;
  padding: clamp(32px, 6vh, 72px) var(--si-gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.signin-pitch {
  animation: signin-rise 0.7s var(--si-ease) both;
}

.signin-eyebrow {
  font-family: var(--si-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--si-text-3);
}

.signin-eyebrow b {
  font-weight: 500;
  color: var(--si-brass);
}

.signin-pitch h1 {
  margin: 22px 0 0;
  font-size: clamp(40px, 5.4vw, 84px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--si-text);
  text-wrap: balance;
}

/* the one serif word */
.signin-pitch h1 em {
  font-family: var(--si-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  letter-spacing: -0.02em;
  color: var(--si-brass);
  padding-right: 0.04em;
}

.signin-pitch p {
  margin: 24px 0 0;
  max-width: 430px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--si-text-2);
}

/* ---------- the sign-in surface ---------- */
.signin-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  justify-self: end;
  padding: 36px 32px 30px;
  background: var(--si-surface);
  border: 1px solid var(--si-line);
  border-radius: 16px;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: signin-rise 0.7s var(--si-ease) 0.08s both;
}

/* the emblem in brass, as on the site's hero */
.signin-emblem {
  display: block;
  width: 62px;
  aspect-ratio: 512 / 350;
  background: linear-gradient(150deg, var(--si-brass-hi), var(--si-brass) 48%, var(--si-brass-lo));
  -webkit-mask: var(--signin-mark) center / contain no-repeat;
  mask: var(--signin-mark) center / contain no-repeat;
  filter: drop-shadow(0 6px 22px rgba(201, 169, 106, 0.28));
}

.signin-label {
  margin-top: 30px;
  font-family: var(--si-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--si-text-3);
}

.signin-card h2 {
  margin: 8px 0 0;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--si-text);
}

.signin-note {
  margin-top: 20px;
  padding: 12px 14px 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--si-text-2);
  background: rgba(201, 169, 106, 0.06);
  border: 1px solid rgba(201, 169, 106, 0.22);
  border-left: 2px solid var(--si-brass);
  border-radius: 10px;
}

.signin-note-bad {
  margin-top: 0;
  color: var(--si-neg);
  background: rgba(252, 165, 165, 0.06);
  border-color: rgba(252, 165, 165, 0.22);
  border-left-color: var(--si-neg);
}

/* primary: the white pill */
.signin-btn {
  margin-top: 24px;
  height: 48px;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  font-family: var(--si-sans);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #000000;
  background: #ffffff;
  border: 1px solid #ffffff;
  border-radius: 9999px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s var(--si-ease), box-shadow 0.2s ease, background-color 0.15s ease;
}

.signin-btn:hover {
  background: #f2f2f2;
  box-shadow: 0 10px 34px -10px rgba(201, 169, 106, 0.55);
  transform: translateY(-1px);
}

.signin-btn:active {
  transform: translateY(0);
}

.signin-btn:focus-visible {
  outline: 2px solid var(--si-brass);
  outline-offset: 3px;
}

/* secondary: clear with a hairline */
.signin-btn-ghost {
  color: var(--si-text);
  background: transparent;
  border-color: var(--si-line-strong);
}

.signin-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
}

/* holds the place of the button while the server says which way in it uses */
.signin-btn-placeholder {
  background: rgba(255, 255, 255, 0.05);
  border-color: transparent;
  cursor: default;
  animation: signin-pulse 1.4s ease-in-out infinite;
}

.signin-btn-placeholder:hover {
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none;
  transform: none;
}

.signin-rules {
  list-style: none;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--si-line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.signin-rules li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--si-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--si-text-3);
}

.signin-rules li::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--si-brass);
  flex: none;
}

/* the password way in (before Google is set up, and the way back) */
.signin-form {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.signin-form input {
  height: 46px;
  padding: 0 16px;
  font-family: var(--si-sans);
  font-size: 14px;
  color: var(--si-text);
  background: var(--si-field);
  border: 1px solid var(--si-line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s ease;
}

.signin-form input::placeholder {
  color: var(--si-text-3);
}

.signin-form input:hover {
  border-color: var(--si-line-strong);
}

.signin-form input:focus {
  border-color: var(--si-brass);
}

.signin-form .signin-btn {
  margin-top: 8px;
}

/* ---------- foot ---------- */
.signin-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: var(--si-width);
  margin: 0 auto;
  padding: 0 var(--si-gutter);
  height: 73px;
  font-family: var(--si-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--si-text-3);
}

@keyframes signin-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes signin-pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- one column: tablets and phones ---------- */
@media (max-width: 900px) {
  .signin-main {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 36px;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .signin-card {
    justify-self: start;
    max-width: 440px;
  }

  .signin-backdrop {
    background:
      radial-gradient(90% 45% at 60% 70%, rgba(201, 169, 106, 0.13), transparent 70%),
      radial-gradient(70% 30% at 10% 0%, rgba(255, 255, 255, 0.05), transparent 70%);
  }

  .signin-backdrop::before {
    right: -45vw;
    top: 30%;
    width: 150vw;
  }
}

@media (max-width: 520px) {
  .signin-top {
    padding-top: 22px;
  }

  .signin-tag {
    display: none;
  }

  .signin-pitch h1 {
    font-size: clamp(34px, 10.5vw, 44px);
  }

  .signin-pitch p {
    font-size: 15px;
    line-height: 1.55;
    margin-top: 16px;
  }

  .signin-main {
    gap: 28px;
    padding-top: 28px;
    padding-bottom: 28px;
  }

  .signin-card {
    padding: 28px 22px 24px;
  }

  .signin-foot {
    height: 64px;
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  .signin-backdrop::after {
    bottom: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .signin-pitch,
  .signin-card,
  .signin-btn-placeholder {
    animation: none;
  }

  .signin-btn,
  .signin-btn:hover {
    transition: none;
    transform: none;
  }
}

/* While this screen is up the page behind it is black too (a light-theme user
   would otherwise see white at the edge of an overscroll). */
html.signin-open,
html.signin-open body {
  background: #000000;
}

/* ---------- this app only ---------- */
/* The screen is a layer over the app, and scrolls on a short phone. */
#login { position: fixed; inset: 0; z-index: 100; overflow-y: auto; background: #000000; }

/* The owner's way in without Google: a quiet line under the rules, opening one field. */
.signin-owner {
  margin-top: 16px;
  align-self: flex-start;
  font-family: var(--si-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--si-text-3);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--si-line-strong);
}
.signin-owner:hover { color: var(--si-text-2); }
.signin-form input { font-size: 16px; width: 100%; }
.signin-form .signin-note-bad:empty { display: none; }
