/* Avenue client review: auth screens 01-04. Design's file, unmodified except: the Google Fonts @import is removed (fonts are self-hosted, declared by the page). */

.av-app {
  --p: #F0EDE6; --p2: #E8E4DB; --ink: #111110; --terra: #C4826A;
  --ln: rgba(17,17,16,.10); --ln2: rgba(17,17,16,.18);
  --f2: rgba(17,17,16,.60); --f3: rgba(17,17,16,.35); --f4: rgba(17,17,16,.25);
  --panel: #2A2826; --panelfg: #F0EDE6;
  --sans: 'Geist', system-ui, sans-serif; --mono: 'Geist Mono', monospace; --serif: 'Instrument Serif', serif;
  --ease-out: cubic-bezier(.2,.7,.2,1);
  background: var(--p); color: var(--ink); font-family: var(--sans);
  min-height: 100vh; box-sizing: border-box;
  transition: background-color .4s ease, color .4s ease;
}
.av-app[data-theme="dark"] {
  --p: #1E1C1A; --p2: #2A2826; --ink: #F0EDE6;
  --ln: rgba(240,237,230,.12); --ln2: rgba(240,237,230,.24);
  --f2: rgba(240,237,230,.64); --f3: rgba(240,237,230,.40); --f4: rgba(240,237,230,.26);
  --panel: #111110; --panelfg: #F0EDE6;
}
.av-app *, .av-app *::before, .av-app *::after { box-sizing: border-box; }

/* Shell: split (screens 01, 02) */
.av-auth { display: grid; grid-template-columns: minmax(0,.78fr) minmax(0,1fr); min-height: 100vh; }
.av-auth__panel {
  position: relative; padding: 44px 40px; display: flex; flex-direction: column; justify-content: space-between;
  color: var(--panelfg); background-color: var(--panel); background-size: cover; background-position: center;
}
.av-auth__panel[data-image] {
  background-image:
    linear-gradient(to bottom, rgba(17,17,16,.38), rgba(17,17,16,0) 28%, rgba(17,17,16,0) 78%, rgba(17,17,16,.42)),
    var(--panel-image);
}
.av-auth__body { padding: 56px 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; }
.av-auth__col { width: 100%; max-width: 372px; }

/* Shell: single (screens 03, 04) */
.av-auth--single { display: flex; flex-direction: column; grid-template-columns: none; }
.av-auth--single .av-auth__panel { flex-direction: row; align-items: baseline; padding: 22px 28px; }
.av-auth--single .av-auth__body { padding: 40px 32px 28px; flex: 1; gap: 40px; }
.av-auth--single .av-auth__col { max-width: 400px; }

/* Type */
.av-wordmark { font-weight: 700; font-size: 27px; letter-spacing: -.045em; }
.av-auth--single .av-wordmark { font-size: 21px; }
.av-panel-tag { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--terra); }
.av-eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.av-auth__h { font-weight: 700; font-size: 46px; line-height: .98; letter-spacing: -.04em; margin: 18px 0 0; text-wrap: balance; }
.av-auth--single .av-auth__h { font-size: 40px; }
.av-auth__h em, .av-accent { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.015em; }
.av-auth__standfirst { font-size: 14px; line-height: 1.72; color: var(--f2); margin: 16px 0 0; text-wrap: pretty; }
.av-auth__standfirst .av-accent { font-size: 16px; color: var(--terra); letter-spacing: 0; }
.av-auth__footer { font-family: var(--mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--f3); }

/* Fields */
.av-field { margin-top: 24px; }
.av-field:first-of-type { margin-top: 40px; }
.av-field__label { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 6px; }
.av-field__input {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--ln2); border-radius: 0;
  padding: 10px 0; font: 15px/1.4 var(--sans); color: var(--ink); outline: none;
  transition: border-color .25s ease, color .4s ease;
}
.av-field__input::placeholder { color: var(--f4); }
.av-field__input:focus { border-bottom-color: var(--terra); }
.av-field__input:focus-visible { box-shadow: 0 1px 0 0 var(--terra); }
.av-field.is-invalid .av-field__input { border-bottom: 1.5px solid var(--terra); }
.av-field__hint { font-size: 12.5px; line-height: 1.6; color: var(--f2); margin-top: 8px; }
.av-field__error { display: flex; gap: 8px; margin-top: 8px; font-size: 12.5px; line-height: 1.55; }
.av-field__error::before { content: "!"; font-family: var(--mono); font-size: 11px; color: var(--terra); }
.av-app[aria-busy="true"] .av-field__label { color: var(--f3); }
.av-app[aria-busy="true"] .av-field__input { color: var(--f2); border-bottom-color: var(--ln); }

/* Buttons */
.av-btn {
  display: block; width: 100%; margin-top: 36px; padding: 16px 24px; border-radius: 0; cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; text-align: center;
  background: var(--ink); color: var(--p); border: 1px solid var(--ink);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.av-btn:hover { background: var(--terra); border-color: var(--terra); color: #F0EDE6; }
.av-btn:focus-visible { outline: 1px solid var(--terra); outline-offset: 3px; }
.av-auth--single .av-btn { width: auto; padding: 16px 30px; margin-top: 32px; }
.av-btn.is-busy { position: relative; overflow: hidden; cursor: default; color: color-mix(in srgb, var(--p) 66%, var(--ink)); }
.av-btn.is-busy:hover { background: var(--ink); border-color: var(--ink); }
.av-btn.is-busy::after {
  content: ""; position: absolute; left: 0; top: 0; height: 2px; width: 45%; background: var(--terra);
  animation: avBusy 1.1s cubic-bezier(.4,0,.2,1) infinite;
}
.av-btn:disabled { background: transparent; color: var(--f3); border-color: var(--ln2); cursor: not-allowed; }

/* Link */
.av-link { display: inline-block; margin-top: 20px; font-size: 13px; color: var(--f2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s ease; }
.av-link:hover { color: var(--terra); }

/* Alert (form-level) and confirmation */
.av-alert { margin-top: 26px; border: 1px solid var(--terra); border-left-width: 3px; padding: 13px 15px; display: flex; gap: 10px; font-size: 13px; line-height: 1.55; }
.av-alert::before { content: "!"; font-family: var(--mono); font-size: 11px; line-height: 1.55; color: var(--terra); }
.av-alert + .av-btn { margin-top: 26px; }
.av-confirm { margin-top: 26px; border-top: 1px solid var(--ink); padding-top: 18px; display: flex; gap: 12px; }
.av-confirm::before { content: "✓"; font-family: var(--mono); font-size: 18px; line-height: 24px; color: var(--terra); }
.av-confirm p { margin: 0; font-size: 14px; line-height: 1.72; }

/* Motion */
@keyframes avBusy { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes avRise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes avFade { from { opacity: 0; } to { opacity: 1; } }
.av-auth__col > * { animation: avRise .6s var(--ease-out) both; }
.av-auth__col > *:nth-child(2) { animation-delay: .06s; }
.av-auth__col > *:nth-child(3) { animation-delay: .12s; }
.av-auth__col > *:nth-child(4) { animation-delay: .18s; }
.av-auth__col > *:nth-child(5) { animation-delay: .24s; }
.av-auth__col > *:nth-child(n+6) { animation-delay: .30s; }
.av-auth__panel > * { animation: avFade .9s ease both; }
.av-auth__panel > *:last-child { animation-delay: .25s; }
.av-alert, .av-field__error, .av-confirm { animation: avRise .45s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  .av-app *, .av-app *::before, .av-app *::after { animation: none !important; transition: none !important; }
}

/* Phone */
@media (max-width: 720px) {
  .av-auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .av-auth__panel { flex-direction: row; align-items: baseline; padding: 18px 20px; background-image: none !important; }
  .av-wordmark { font-size: 18px; }
  .av-panel-tag { font-size: 8px; }
  .av-auth__body { padding: 26px 20px 24px; gap: 28px; }
  .av-auth__h, .av-auth--single .av-auth__h { font-size: 32px; line-height: 1; margin-top: 12px; }
  .av-auth__standfirst { font-size: 13px; line-height: 1.65; margin-top: 12px; }
  .av-field:first-of-type { margin-top: 26px; }
  .av-field { margin-top: 18px; }
  .av-btn { margin-top: 26px; padding: 15px; }
  .av-auth--single .av-btn { width: 100%; }
  .av-link { margin-top: 16px; }
  .av-auth__footer { font-size: 8px; letter-spacing: .12em; line-height: 1.7; }
}
