/* Auth — split login: cream form (≈38%) + villa hero (≈62%). */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

.auth-page {
  --cream: #f5f3ee;
  --ink: #202426;
  --muted: #858585;
  --line: #d8d8d5;
  --btn: #25292a;
  --btn-hover: #171a1b;
  --hero-ink: #f7f6f2;
  --panel-w: 46%;
  margin: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: Outfit, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-layout {
  display: grid;
  grid-template-columns: var(--panel-w) minmax(0, 1fr);
  min-height: 100dvh;
  width: 100%;
}

/* ── Left: form panel ─────────────────────────────────────────────────── */
.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: clamp(32px, 5vh, 64px) clamp(32px, 4.2vw, 72px);
  background: var(--cream);
}

.auth-panel-inner {
  width: min(100%, 460px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vh, 44px);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  width: 100%;
}
.auth-brand img {
  display: block;
  width: min(100%, 300px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .4));
}
.auth-brand-tag {
  margin: 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

.auth-main { width: 100%; }

.auth-welcome {
  margin: 0 0 8px;
  font-weight: 400;
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
  white-space: nowrap;
}
.auth-welcome em {
  display: inline;
  font-style: normal;
  font-weight: 300;
  color: #8a8174;
}
.auth-sub {
  margin: 0 0 32px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
}

.auth-alerts { margin-bottom: 16px; }
.auth-alert,
.auth-success {
  margin-bottom: 8px;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
}
.auth-alert { background: #f7ebe8; color: #8a342a; border: 1px solid #ebc9c2; }
.auth-success { background: #edf3ea; color: #3a5732; border: 1px solid #cfdec8; }

.auth-form { display: grid; gap: 16px; }
.auth-field { display: grid; gap: 8px; }
.auth-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}

.auth-control { position: relative; }
.auth-input {
  width: 100%;
  height: 52px;
  padding: 0 14px 0 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 400 14.5px/1 Outfit, ui-sans-serif, system-ui, sans-serif;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input::placeholder { color: #b0aea8; }
.auth-input:focus {
  border-color: #a8a69f;
  box-shadow: 0 0 0 3px rgba(32, 36, 38, .06);
}
.auth-input.is-invalid { border-color: #c45a4e; }
.auth-input-pad { padding-right: 46px; }

.auth-ico {
  position: absolute;
  top: 0;
  left: 0;
  width: 44px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #9a9892;
  pointer-events: none;
}
.auth-ico svg { width: 17px; height: 17px; }

.auth-eye {
  position: absolute;
  top: 0;
  right: 0;
  width: 46px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: #9a9892;
  cursor: pointer;
}
.auth-eye:hover { color: var(--ink); }
.auth-eye:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.auth-eye svg { width: 17px; height: 17px; }

.auth-error { font-size: 12px; color: #a3392d; }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}
.auth-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #4a4a48;
  cursor: pointer;
  user-select: none;
}
.auth-check input {
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}
.auth-check input:checked {
  background: var(--btn);
  border-color: var(--btn);
}
.auth-check input:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 1.6px solid #fff;
  border-bottom: 1.6px solid #fff;
  transform: translateY(-1px) rotate(-45deg);
}
.auth-check input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.auth-link {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.auth-link:hover { color: var(--ink); text-decoration: underline; }
.auth-note { font-size: 12.5px; color: var(--muted); line-height: 1.4; }

.auth-submit {
  width: 100%;
  height: 52px;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 8px;
  background: var(--btn);
  color: #fff;
  font: 500 14.5px/1 Outfit, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.auth-submit:hover { background: var(--btn-hover); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.auth-submit:disabled { opacity: .65; cursor: wait; }
.auth-submit svg { width: 16px; height: 16px; }

.auth-foot {
  margin: 18px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.auth-foot a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
}
.auth-foot a:hover { text-decoration: underline; }

.auth-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.auth-face[hidden] { display: none; }
.auth-face.is-entering { animation: auth-in .4s cubic-bezier(.2, .8, .2, 1) both; }
.auth-face.is-leaving { animation: auth-out .18s ease-in both; pointer-events: none; }
@keyframes auth-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes auth-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* ── Onload reveal ────────────────────────────────────────────────────── */
.auth-reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: auth-reveal .75s cubic-bezier(.2, .8, .2, 1) forwards;
}
.auth-brand.auth-reveal { animation-delay: .08s; }
.auth-main.auth-reveal { animation-delay: .22s; }
.auth-hero-copy.auth-reveal { animation-delay: .35s; }
@keyframes auth-reveal {
  to { opacity: 1; transform: none; }
}

/* ── Right: hero ──────────────────────────────────────────────────────── */
.auth-hero {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  background: #1a1a1a;
}
.auth-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.04);
  animation: auth-hero-zoom 1.4s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes auth-hero-zoom {
  from { transform: scale(1.08); opacity: .75; }
  to   { transform: scale(1.04); opacity: 1; }
}

.auth-hero-copy {
  position: absolute;
  inset: 0;
  pointer-events: none;
  color: var(--hero-ink);
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .25);
}
.auth-hero-kicker,
.auth-hero-foot {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}
.auth-hero-kicker::before,
.auth-hero-foot::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .85;
}
.auth-hero-kicker { top: 36px; right: 40px; }
.auth-hero-foot {
  top: 36px;
  left: 40px;
  bottom: auto;
  right: auto;
}

.auth-hero-claim {
  position: absolute;
  left: 40px;
  right: auto;
  bottom: 40px;
  top: auto;
  margin: 0;
  min-height: 2.6em;
  max-width: min(22em, 72%);
  font-size: clamp(18px, 1.85vw, 28px);
  line-height: 1.35;
  letter-spacing: .14em;
  white-space: pre-line;
  font-weight: 500;
}
.auth-hero-claim::after {
  content: "";
  display: inline-block;
  width: .55em;
  height: 1.05em;
  margin-left: .12em;
  vertical-align: -0.12em;
  background: currentColor;
  animation: auth-caret 1s steps(1) infinite;
}
.auth-hero-claim.is-waiting::after { opacity: .35; }
@keyframes auth-caret {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .auth-layout { grid-template-columns: minmax(380px, 48%) minmax(0, 1fr); }
  .auth-panel { padding: 36px 32px; }
  .auth-panel-inner { width: min(100%, 420px); }
}

@media (max-width: 860px) {
  .auth-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .auth-hero {
    order: -1;
    min-height: 32vh;
    max-height: 260px;
  }
  .auth-hero > img { animation: none; transform: none; }
  .auth-panel {
    min-height: 0;
    justify-content: flex-start;
    padding: 28px 22px 40px;
  }
  .auth-panel-inner {
    width: min(100%, 440px);
    margin: 0 auto;
    gap: 24px;
  }
  .auth-brand img { width: min(100%, 240px); }
  .auth-welcome { white-space: normal; font-size: clamp(26px, 7vw, 32px); }
  .auth-hero-claim {
    top: auto;
    bottom: 16px;
    left: 18px;
    max-width: 88%;
    font-size: clamp(14px, 4.2vw, 18px);
    letter-spacing: .1em;
  }
  .auth-hero-kicker { top: 18px; right: 18px; font-size: 9px; }
  .auth-hero-foot { top: 18px; left: 18px; right: auto; bottom: auto; font-size: 9px; }
  .auth-input,
  .auth-submit,
  .auth-ico,
  .auth-eye { font-size: 16px; }
  .auth-ico,
  .auth-eye { height: 52px; }
}

@media (max-width: 480px) {
  .auth-hero { min-height: 26vh; max-height: 200px; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-welcome { font-size: 28px; }
  .auth-sub { margin-bottom: 24px; }
  .auth-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-reveal,
  .auth-hero > img,
  .auth-face.is-entering,
  .auth-face.is-leaving,
  .auth-hero-claim::after { animation: none; }
  .auth-reveal { opacity: 1; transform: none; }
  .auth-hero > img { transform: none; opacity: 1; }
}
