:root {
  /* Minimal pre-app baseline: full A1/T2 logos, quiet links, native image crops, and no decorative effects without a concrete reason. Full-logo color variants share one canonical canvas, artwork geometry and alpha bounds; only color differs. Transparent logo assets are tightly cropped so CSS height measures visible artwork, never page-specific asset compensation. */
  --infidence-light: var(--infidence-page-background);
  --infidence-muted: var(--infidence-secondary-text);
  --infidence-white: var(--infidence-surface);
  --infidence-text: #172033;
  --preapp-logo-height: 42px;
  --preapp-logo-height-mobile: 38px;
  --preapp-control-height: 50px;
  --preapp-control-radius: 7px;
  --preapp-primary-inline-padding: 23px;
  --preapp-gutter: 24px;
  --preapp-gutter-mobile: 16px;
  --preapp-secondary-link-color: var(--infidence-secondary-text);
  --preapp-secondary-link-weight: 650;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.pre-app-page {
  min-width: 320px;
  margin: 0;
  background: var(--infidence-white);
  color: var(--infidence-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.pre-app-page a, .pre-app-page button, .pre-app-page input { font: inherit; }
.pre-app-page a:focus-visible, .pre-app-page button:focus-visible, .pre-app-page input:focus-visible {
  outline: 3px solid rgb(45 127 249 / 35%);
  outline-offset: 3px;
}

.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__logo { display: block; width: auto; height: var(--preapp-logo-height); }
.brand--light { color: var(--infidence-white); }
.site-header {
  display: flex;
  width: min(1180px, calc(100% - (var(--preapp-gutter) * 2)));
  min-height: 88px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}
.header-login {
  padding: 8px 3px;
  border-bottom: 1px solid transparent;
  color: var(--preapp-secondary-link-color);
  font-size: .94rem;
  font-weight: var(--preapp-secondary-link-weight);
  text-decoration: none;
}
.header-login:hover { border-color: var(--infidence-blue); color: var(--infidence-navy); }

.hero {
  display: grid;
  width: min(1180px, calc(100% - (var(--preapp-gutter) * 2)));
  min-height: 600px;
  margin: 0 auto;
  grid-template-columns: minmax(0, 1.04fr) minmax(400px, .96fr);
  align-items: center;
  gap: clamp(44px, 5vw, 72px);
  padding: 72px 0 106px;
}
.hero__content { position: relative; z-index: 1; max-width: 620px; }
.hero h1 {
  max-width: 640px;
  margin: 0;
  color: var(--infidence-navy);
  font-size: clamp(3.4rem, 5vw, 4.65rem);
  font-weight: 690;
  letter-spacing: -.06em;
  line-height: .98;
}
.hero__intro {
  max-width: 650px;
  margin: 30px 0 34px;
  color: var(--infidence-muted);
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.7;
}
.button {
  display: inline-flex;
  min-height: var(--preapp-control-height);
  padding: 13px var(--preapp-primary-inline-padding);
  border: 1px solid transparent;
  border-radius: var(--preapp-control-radius);
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button--primary {
  border-color: var(--infidence-blue);
  background: var(--infidence-blue);
  box-shadow: 0 8px 20px rgb(45 127 249 / 18%);
  color: var(--infidence-white);
}
.button--primary:hover { border-color: #216fe0; background: #216fe0; }

.architecture {
  position: relative;
  min-height: 420px;
  height: clamp(420px, 37vw, 460px);
  overflow: hidden;
  border-radius: 24px 24px 100px 24px;
  background: var(--infidence-light);
  box-shadow: 0 22px 55px rgb(13 27 51 / 10%);
}
.architecture img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 52% center; }

.capabilities { padding: 112px max(var(--preapp-gutter), calc((100vw - 1180px) / 2)); background: var(--infidence-light); }
.capabilities__heading { max-width: 720px; }
.capabilities h2 {
  margin: 0;
  color: var(--infidence-navy);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 680;
  letter-spacing: -.045em;
  line-height: 1.1;
}
.capabilities__grid { display: grid; margin-top: 64px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.capability { min-height: 270px; padding: 30px; border-top: 3px solid var(--infidence-blue); background: var(--infidence-white); }
.capability__number { display: block; margin-bottom: 48px; color: var(--infidence-blue); font-size: .76rem; font-weight: 760; letter-spacing: .12em; }
.capability h3 { margin: 0 0 16px; color: var(--infidence-navy); font-size: 1.16rem; font-weight: 720; letter-spacing: -.025em; }
.capability p { margin: 0; color: var(--infidence-muted); line-height: 1.65; }
.site-footer {
  display: grid;
  min-height: 150px;
  padding: 42px max(var(--preapp-gutter), calc((100vw - 1180px) / 2));
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 36px;
  background: var(--infidence-navy);
  color: #bdc7d6;
  font-size: .88rem;
}
.site-footer p { margin: 0; }
.site-footer__brand { color: var(--infidence-white); font-size: 1.05rem; font-weight: 720; letter-spacing: -.025em; }

.login-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(390px, 44%) minmax(0, 1fr); }
.login-welcome {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: clamp(34px, 5vw, 68px);
  flex-direction: column;
  background: var(--infidence-navy);
  color: var(--infidence-white);
}
.login-welcome::after { position: absolute; z-index: 1; inset: 0; background: linear-gradient(115deg, rgb(13 27 51 / 82%), rgb(13 27 51 / 62%)); content: ""; pointer-events: none; }
.login-welcome__image { position: absolute; inset: 0; }
.login-welcome__image img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.login-welcome .brand, .login-welcome__copy { position: relative; z-index: 2; }
.login-welcome .brand__logo { height: var(--preapp-logo-height); }
.login-welcome__copy { max-width: 480px; margin: auto 0; padding: 90px 0; }
.login-welcome h1 { margin: 0; font-size: clamp(2.6rem, 5vw, 4.4rem); font-weight: 670; letter-spacing: -.055em; line-height: 1.02; }
.login-welcome__copy p { margin: 24px 0 0; color: #c4cddd; font-size: 1.08rem; }
.login-panel { display: grid; min-width: 0; padding: 56px max(var(--preapp-gutter), 8vw); place-items: center; background: var(--infidence-white); }
.login-card { width: min(100%, 440px); }
.login-card__heading { margin-bottom: 30px; }
.login-card h2 { margin: 0; color: var(--infidence-navy); font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 680; letter-spacing: -.045em; }
.login-card__heading p { margin: 13px 0 0; color: var(--infidence-muted); line-height: 1.55; }
.form-error { margin: 0 0 22px; padding: 12px 14px; border-left: 3px solid #b42318; background: #fef3f2; color: #912018; font-size: .9rem; line-height: 1.45; }
.form-field { display: grid; gap: 9px; margin-bottom: 22px; }
.form-field label { color: var(--infidence-navy); font-size: .9rem; font-weight: 690; }
.form-field input { width: 100%; min-height: var(--preapp-control-height); padding: 12px 14px; border: 1px solid #b9c1cd; border-radius: var(--preapp-control-radius); background: var(--infidence-white); color: var(--infidence-text); }
.form-field input:hover { border-color: #8b97a8; }
.form-field input:focus { border-color: var(--infidence-blue); outline: 3px solid rgb(45 127 249 / 14%); }
.button--full { width: 100%; margin-top: 8px; }
.back-link { display: inline-block; margin-top: 30px; color: var(--preapp-secondary-link-color); font-size: .92rem; font-weight: var(--preapp-secondary-link-weight); text-decoration: none; }
.back-link::before { margin-right: 8px; content: "←"; }
.back-link:hover { color: var(--infidence-blue); }

.password-change-page { min-height: 100vh; background: var(--infidence-light); }
.pre-app-compact-layout {
  display: grid;
  width: min(100% - (var(--preapp-gutter) * 2), 620px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0 72px;
  align-content: start;
  gap: clamp(64px, 12vh, 120px);
}
.pre-app-compact-card {
  padding: clamp(34px, 7vw, 64px);
  border-top: 4px solid var(--infidence-blue);
  background: var(--infidence-white);
  box-shadow: 0 22px 55px rgb(13 27 51 / 8%);
}
.pre-app-compact-card__heading { margin-bottom: 30px; }
.pre-app-compact-card h1 { margin: 0; color: var(--infidence-navy); font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 680; letter-spacing: -.045em; line-height: 1.1; }
.pre-app-compact-card__heading p { margin: 14px 0 0; color: var(--infidence-muted); line-height: 1.6; }
.pre-app-compact-card .field-help { color: var(--infidence-muted); font-size: .82rem; line-height: 1.45; }
.pre-app-compact-card .field-help ul { margin: 0; padding-left: 20px; }
.pre-app-compact-card .field-help li + li { margin-top: 5px; }
.pre-app-compact-card .errorlist { margin: 0; padding-left: 20px; color: var(--color-error-text); font-size: .84rem; line-height: 1.45; }
.pre-app-compact-card--success { max-width: 520px; }

.tenant-start-page { min-height: 100vh; background: var(--infidence-light); }
.tenant-start-layout {
  display: grid;
  width: min(100% - (var(--preapp-gutter) * 2), 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0 72px;
  align-content: start;
  gap: clamp(64px, 12vh, 120px);
}
.tenant-start-card {
  padding: clamp(34px, 7vw, 64px);
  border-top: 4px solid var(--infidence-blue);
  background: var(--infidence-white);
  box-shadow: 0 22px 55px rgb(13 27 51 / 8%);
}
.tenant-start-card h1 {
  margin: 0;
  color: var(--infidence-navy);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-weight: 680;
  letter-spacing: -.045em;
}
.tenant-start-eyebrow {
  margin: 0 0 12px;
  color: var(--infidence-blue);
  font-size: .78rem;
  font-weight: 760;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tenant-start-message, .tenant-start-note {
  max-width: 580px;
  margin: 22px 0 0;
  color: var(--infidence-muted);
  line-height: 1.65;
}
.tenant-start-message + .tenant-start-message { margin-top: 8px; }
.organization-list { display: grid; gap: 12px; margin-top: 36px; }
.organization-choice {
  width: 100%;
  min-height: 58px;
  padding: 15px 18px;
  border: 1px solid #cbd2dc;
  border-radius: 7px;
  background: var(--infidence-white);
  color: var(--infidence-navy);
  font-weight: 690;
  text-align: left;
  cursor: pointer;
}
.organization-choice:hover { border-color: var(--infidence-blue); background: #f7faff; }
.tenant-start-note { margin-top: 32px; font-size: .92rem; }
.tenant-start-logout { margin-top: 34px; }
.tenant-start-logout button {
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--infidence-muted);
  font-weight: 650;
  cursor: pointer;
}
.tenant-start-logout button:hover { border-color: var(--infidence-blue); color: var(--infidence-navy); }

@media (min-width: 901px) {
  .hero__heading-tail { display: block; }
}

@media (max-width: 900px) {
  .hero { min-height: 0; grid-template-columns: 1fr; padding-top: 54px; }
  .hero__heading-tail { display: inline; }
  .architecture { min-height: 360px; height: auto; }
  .capabilities__grid { grid-template-columns: 1fr; }
  .capability { min-height: 0; }
  .capability__number { margin-bottom: 30px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-welcome { min-height: 410px; }
  .login-welcome__copy { padding: 72px 0 42px; }
  .login-panel { min-height: 620px; padding: 72px var(--preapp-gutter); }
}
@media (max-width: 620px) {
  .site-header, .hero { width: min(100% - (var(--preapp-gutter-mobile) * 2), 1180px); }
  .site-header { min-height: 76px; }
  .brand__logo { height: var(--preapp-logo-height-mobile); }
  .hero { padding: 48px 0 76px; }
  .hero h1 { font-size: clamp(2.8rem, 15vw, 4rem); }
  .architecture { min-height: 310px; }
  .capabilities { padding-top: 80px; padding-bottom: 80px; }
  .capabilities__grid { margin-top: 44px; }
  .site-footer { grid-template-columns: 1fr; gap: 12px; }
  .login-welcome { min-height: 360px; padding: 28px 24px; }
  .login-welcome .brand__logo { height: var(--preapp-logo-height-mobile); }
  .pre-app-compact-layout { width: min(100% - (var(--preapp-gutter-mobile) * 2), 620px); padding-top: 30px; gap: 56px; }
  .tenant-start-layout { width: min(100% - (var(--preapp-gutter-mobile) * 2), 760px); padding-top: 30px; gap: 56px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
