:root {
  color-scheme: light;
  --paper: #f3eee4;
  --paper-clean: #fbf8f1;
  --paper-deep: #e8e0d2;
  --ink: #11110f;
  --muted: #6a655d;
  --yellow: #f8b800;
  --yellow-hot: #ffc400;
  --error: #8c1d18;
  --display: "Iowan Old Style", Baskerville, "Times New Roman", serif;
  --body: "Avenir Next", "Helvetica Neue", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(104deg, transparent 0 72%, rgb(248 184 0 / 4%) 72% 100%),
    var(--paper);
  color: var(--ink);
  font-family: var(--body);
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

.paper-texture {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.33;
  background-image:
    repeating-linear-gradient(
      0deg,
      rgb(17 17 15 / 1.4%) 0,
      rgb(17 17 15 / 1.4%) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      91deg,
      transparent 0,
      transparent 83px,
      rgb(17 17 15 / 1.1%) 84px
    );
  mix-blend-mode: multiply;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(24px, 3.6vw, 58px) clamp(24px, 5vw, 80px) 24px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  animation: rise-in 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.brand-logo {
  width: clamp(176px, 18vw, 262px);
  height: auto;
  display: block;
  mix-blend-mode: multiply;
}

.document-mark {
  display: flex;
  gap: 11px;
  align-items: center;
  padding-bottom: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.18em;
}

.top-rule {
  position: relative;
  height: 24px;
  margin-top: 18px;
  border-top: 2px solid var(--ink);
}

.top-rule span {
  position: absolute;
  top: -2px;
  right: 0;
  width: 29%;
  height: 6px;
  background: var(--yellow);
  transform: skewX(-27deg);
  transform-origin: right top;
  animation: rail-in 900ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.composition {
  min-height: 580px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) clamp(72px, 8vw, 124px) minmax(340px, 0.78fr);
  border-bottom: 1px solid var(--ink);
}

.brand-field {
  position: relative;
  padding: clamp(48px, 7vh, 88px) clamp(30px, 5vw, 78px) 54px 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: rise-in 820ms 80ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow {
  margin: 0 0 clamp(42px, 8vh, 88px);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(62px, 7.1vw, 112px);
  font-weight: 400;
  letter-spacing: -0.06em;
  line-height: 0.78;
}

h1 span,
h1 em {
  display: block;
}

h1 em {
  margin-left: clamp(20px, 5.4vw, 86px);
  color: var(--ink);
  font-weight: 400;
}

.introduction {
  max-width: 470px;
  margin: clamp(44px, 7vh, 78px) 0 0 clamp(20px, 5.4vw, 86px);
  color: var(--muted);
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.65;
}

.folio {
  width: min(360px, 52%);
  margin-top: auto;
  padding-top: 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.folio-line {
  height: 1px;
  background: var(--muted);
  opacity: 0.55;
}

.yellow-rail {
  position: relative;
  margin: 0 10%;
  overflow: hidden;
  background: var(--yellow);
  transform: skewX(-5deg);
  transform-origin: center top;
  animation: vertical-reveal 900ms 160ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.yellow-rail::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 54px,
    rgb(17 17 15 / 16%) 55px
  );
}

.yellow-rail span {
  position: absolute;
  right: 50%;
  bottom: 30px;
  transform: translateX(50%) rotate(-90deg) skewX(5deg);
  color: rgb(17 17 15 / 72%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.28em;
}

.auth-field {
  align-self: center;
  margin-left: clamp(22px, 3vw, 50px);
  padding: clamp(34px, 5vw, 64px) 0;
  animation: rise-in 820ms 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.form-heading {
  margin-bottom: clamp(42px, 7vh, 72px);
  padding: 0 0 13px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ink);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.field-group + .field-group {
  margin-top: 28px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

input {
  width: 100%;
  min-height: 48px;
  padding: 9px 0;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 18px;
  transition: border-color 160ms ease, background-color 160ms ease;
}

input:focus-visible {
  border-bottom-color: var(--yellow);
  background: linear-gradient(to top, rgb(248 184 0 / 9%), transparent 72%);
}

input:disabled {
  cursor: wait;
  opacity: 0.62;
}

.form-message {
  min-height: 22px;
  margin: 18px 0 8px;
  color: var(--error);
  font-size: 13px;
  line-height: 1.45;
}

button {
  width: 100%;
  min-height: 56px;
  padding: 0 18px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: background-color 150ms ease, transform 150ms ease;
}

button:hover:not(:disabled) {
  background: var(--yellow-hot);
  transform: translate(-2px, -2px);
}

button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.button-arrow {
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
}

.security-note {
  max-width: 300px;
  margin: 20px 0 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: 13px;
  font-style: italic;
  line-height: 1.45;
}

.page-footer {
  padding-top: 17px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.noscript-message {
  position: fixed;
  z-index: 5;
  inset: auto 20px 20px;
  margin: 0;
  padding: 14px 18px;
  border: 1px solid var(--ink);
  background: var(--paper-clean);
  color: var(--error);
  font-family: var(--body);
  font-size: 13px;
}

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

@keyframes rail-in {
  from {
    transform: scaleX(0) skewX(-27deg);
  }
  to {
    transform: scaleX(1) skewX(-27deg);
  }
}

@keyframes vertical-reveal {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0);
  }
}

@media (max-width: 980px) {
  .composition {
    grid-template-columns: minmax(0, 1.2fr) 64px minmax(300px, 0.8fr);
  }

  h1 {
    font-size: clamp(58px, 8vw, 82px);
  }

  .auth-field {
    margin-left: 22px;
  }
}

@media (max-width: 760px) {
  .page-shell {
    min-height: 100svh;
    padding: 24px 20px 18px;
  }

  .masthead {
    align-items: center;
  }

  .brand-logo {
    width: 168px;
  }

  .document-mark span:nth-child(2),
  .document-mark span:nth-child(3) {
    display: none;
  }

  .top-rule {
    height: 16px;
    margin-top: 15px;
  }

  .top-rule span {
    width: 42%;
    height: 5px;
  }

  .composition {
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
  }

  .brand-field {
    padding: 34px 0 32px;
  }

  .eyebrow {
    margin-bottom: 28px;
    font-size: 9px;
  }

  h1 {
    font-size: clamp(51px, 15.8vw, 70px);
    line-height: 0.82;
  }

  h1 em {
    margin-left: 8vw;
  }

  .introduction {
    max-width: 390px;
    margin: 32px 0 0 8vw;
    font-size: 15px;
  }

  .folio {
    display: none;
  }

  .yellow-rail {
    width: 44%;
    height: 13px;
    margin: 0 0 0 auto;
    transform: skewX(-27deg);
  }

  .yellow-rail span,
  .yellow-rail::before {
    display: none;
  }

  .auth-field {
    width: 100%;
    margin: 0;
    padding: 42px 0 48px;
  }

  .form-heading {
    margin-bottom: 34px;
  }

  .page-footer {
    flex-direction: column;
    gap: 8px;
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
