/* ─────────────────────────────────────────────────────────────
   SIGN · Authentication pages — dedicated split-screen design
   Palette: warm ivory / deep forest / near-black / warm grays
   ───────────────────────────────────────────────────────────── */
:root {
  --ivory:        #F7F5EF;
  --ivory-2:      #FAF8F2;
  --forest:       #173D2A;
  --forest-deep:  #07552F;
  --ink:          #111111;
  --muted:        #666864;
  --placeholder:  #777874;
  --border:       #BFC0BA;
  --divider:      #D1CEC6;
  --soft-line:    #BDBDB7;
  --brick:        #9C4A3A;

  --serif: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --sans:  "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --marker:"Shadows Into Light", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ivory);
  font-family: var(--sans);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── 50/50 split shell ─────────────────────────────────────── */
.auth-shell {
  display: flex;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* =============================================================
   LEFT · photographic panel (56.5% ≈ 868px @ 1536)
   ============================================================= */
.auth-photo {
  position: relative;
  flex: 0 0 56.5%;
  min-width: 0;
  overflow: hidden;
  background: #18211c;
}

.auth-photo img.hero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* dark photographic grade so white copy reads: heavier low, softer up */
.auth-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      rgba(9, 12, 10, 0.66) 0%,
      rgba(9, 12, 10, 0.42) 26%,
      rgba(9, 12, 10, 0.14) 52%,
      rgba(9, 12, 10, 0) 68%),
    linear-gradient(to bottom, rgba(9, 12, 10, 0.30) 0%, rgba(9, 12, 10, 0) 26%);
  pointer-events: none;
}

/* Left-brand wordmark over the photo */
.photo-brand {
  position: absolute;
  top: 32px;
  left: 50px;
  z-index: 2;
  color: #fff;
  font-family: var(--sans);
  font-size: 54px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1;
  user-select: none;
}

/* Handwritten campaign note (thin marker strokes, imperfect baseline) */
.photo-note {
  position: absolute;
  z-index: 2;
  top: 84px;
  left: 76.4%;
  transform: rotate(-3deg) translateY(0);
  color: rgba(255, 255, 255, 0.93);
  font-family: var(--marker);
  font-size: 31px;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  text-align: left;
  user-select: none;
}
.photo-note span { display: block; }
.photo-note span:nth-child(1) { transform: rotate(0.8deg) translateX(-2px); }
.photo-note span:nth-child(2) { transform: rotate(-0.6deg) translateX(7px); }
.photo-note span:nth-child(3) { transform: rotate(1.1deg) translateX(-4px); }
.photo-note span:nth-child(4) { transform: rotate(-0.9deg) translateX(3px); }
.photo-note .underline {
  display: block;
  margin: 7px auto 0 3px;
  width: 78%;
}

/* Headline block */
.photo-copy {
  position: absolute;
  z-index: 2;
  left: 54px;
  bottom: 330px;
  width: 520px;
}
.photo-copy h1 {
  margin: 0;
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 52px;
  line-height: 0.98;
  letter-spacing: -0.015em;
  text-align: left;
}
.photo-copy .tagline {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.005em;
}

/* Value proposition row */
.photo-benefits {
  position: absolute;
  z-index: 2;
  left: 55px;
  right: 40px;
  bottom: 72px;
  display: flex;
  align-items: center;
}
.benefit {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.benefit svg {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: #fff;
}
.benefit p {
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.28;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.benefit-sep {
  flex: 0 0 1px;
  width: 1px;
  height: 42px;
  margin: 0 22px;
  background: rgba(255, 255, 255, 0.38);
}

/* =============================================================
   RIGHT · ivory authentication panel (43.5%)
   ============================================================= */
.auth-panel {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  background: linear-gradient(180deg, var(--ivory-2) 0%, var(--ivory) 100%);
  overflow-y: auto;
  overflow-x: hidden;
}

/* quiet botanical detail, upper right — decorative only */
.auth-leaf {
  position: absolute;
  top: 120px;
  right: -40px;
  width: 420px;
  opacity: 0.055;
  filter: blur(1.5px);
  pointer-events: none;
  color: #8a8f7a;
}
.auth-leaf svg { width: 100%; height: auto; display: block; }

/* Guest link */
.guest-link {
  position: absolute;
  top: 45px;
  right: 52px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  transition: color 150ms ease;
}
.guest-link:hover { color: var(--forest); }
.guest-link svg { flex: 0 0 auto; }

/* Form column: begins ~96px inside the panel, near x≈965 @1536.
   Border-box: content = max-width − (96+50) padding ≈ 528px. */
.auth-form {
  position: relative;
  z-index: 2;
  max-width: 674px;
  padding: 148px 50px 48px 96px;
}

.auth-form .sign-wordmark {
  color: var(--forest);
  font-size: 56px;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1;
}

.auth-form .welcome {
  margin: 40px 0 0;
  font-family: var(--serif);
  font-size: 58px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}
.auth-form .welcome-sub {
  margin: 8px 0 0;
  font-size: 19px;
  color: #656565;
  font-weight: 400;
}

.auth-form form { margin: 32px 0 0; }

/* server error banner (muted brick, not bright red) */
.form-error {
  display: none;
  margin: 0 0 18px;
  padding: 12px 15px;
  border: 1px solid rgba(156, 74, 58, 0.35);
  border-radius: 10px;
  background: rgba(156, 74, 58, 0.06);
  color: var(--brick);
  font-size: 14px;
  line-height: 1.45;
}
.form-error.visible { display: block; }

/* ── Fields ─────────────────────────────────────────────── */
.field { margin: 0 0 18px; }
.field + .field { margin-top: 18px; }

.field label {
  display: block;
  margin: 0 0 9px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.input-wrap { position: relative; }
.input-wrap .field-icon {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  width: 21px;
  height: 21px;
  color: var(--ink);
  pointer-events: none;
}

.input-wrap input {
  width: 100%;
  height: 56px;
  padding: 0 48px 0 62px;
  border: 1px solid var(--soft-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.input-wrap input::placeholder { color: var(--placeholder); }
.input-wrap input:hover   { border-color: #a9a9a2; }
.input-wrap input:focus   {
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(23, 61, 42, 0.10);
  background: #fff;
}
.input-wrap input.has-error,
.input-wrap.has-error input {
  border-color: rgba(156, 74, 58, 0.55);
}
.input-wrap input.has-error:focus,
.input-wrap.has-error input:focus {
  box-shadow: 0 0 0 3px rgba(156, 74, 58, 0.10);
}

/* password visibility toggle */
.eye-toggle {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink);
  border-radius: 8px;
  transition: color 150ms ease;
}
.eye-toggle:hover { color: var(--forest); }
.eye-toggle:focus-visible { outline: 2px solid rgba(23, 61, 42, 0.4); outline-offset: 2px; }
.eye-toggle svg { width: 22px; height: 22px; }

.field-error {
  margin: 7px 2px 0;
  color: var(--brick);
  font-size: 13px;
  line-height: 1.35;
  min-height: 0;
}
.field-error:empty { display: none; }

.forgot-row {
  margin: 11px 0 0;
  text-align: right;
}
.forgot-row a {
  color: var(--forest);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}
.forgot-row a:hover { color: var(--forest-deep); text-decoration: underline; }

/* ── Primary button ─────────────────────────────────────── */
.btn-login {
  position: relative;
  margin-top: 25px;
  width: 100%;
  height: 57px;
  border: 0;
  border-radius: 28px;
  background: var(--forest-deep);
  color: #fff;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 150ms ease, transform 120ms ease, opacity 150ms ease;
}
.btn-login:hover  { background: #06462a; }
.btn-login:active { transform: scale(0.99); }
.btn-login:focus-visible { outline: 3px solid rgba(23, 61, 42, 0.35); outline-offset: 2px; }
.btn-login:disabled { background: rgba(7, 85, 47, 0.55); cursor: default; opacity: 0.85; }

.btn-login .btn-arrow {
  position: absolute;
  top: 50%;
  left: calc(50% + 65px);
  transform: translate(-50%, -50%);
  display: inline-flex;
  color: #fff;
  transition: opacity 120ms ease;
}
.btn-login .btn-spinner {
  position: absolute;
  top: 50%;
  left: calc(50% + 65px);
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.btn-login.loading .btn-arrow  { display: none; }
.btn-login.loading .btn-spinner { display: inline-block; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* ── OR divider ─────────────────────────────────────────── */
.or-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 26px 0 0;
}
.or-row .or-line { flex: 1 1 auto; height: 1px; background: var(--divider); }
.or-row .or-text {
  color: #555;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ── Social buttons ─────────────────────────────────────── */
.btn-social {
  position: relative;
  margin-top: 25px;
  width: 100%;
  height: 56px;
  border: 1px solid #888A84;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 120ms ease;
}
.btn-social:hover   { background: rgba(23, 61, 42, 0.025); border-color: #6e706a; }
.btn-social:active  { transform: scale(0.995); }
.btn-social:focus-visible { outline: 3px solid rgba(23, 61, 42, 0.3); outline-offset: 2px; }
.btn-social + .btn-social { margin-top: 15px; }

.btn-social .social-inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-13px);   /* keep the icon+label group optically centered */
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}
.btn-social .social-inner .g {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}
.btn-social .social-inner .apple {
  flex: 0 0 19px;
  width: 19px;
  height: 21px;
}

/* ── Create-account row & legal ─────────────────────────── */
.account-row {
  margin: 28px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--ink);
}
.account-row a {
  margin-left: 8px;
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms ease;
}
.account-row a:hover { color: var(--forest-deep); text-decoration: underline; }

.legal {
  margin: 38px 0 0;
  text-align: center;
  color: #878787;
  font-size: 12.5px;
  line-height: 1.5;
}
.legal a {
  color: #878787;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal a:hover { color: var(--forest); }

/* =============================================================
   Responsive
   ============================================================= */
@media (max-width: 1200px) {
  .auth-photo { flex-basis: 50%; }
  .auth-form  { padding-left: 72px; }
  .photo-copy h1 { font-size: 47px; }
  .photo-copy { bottom: 300px; width: 460px; }
}

@media (max-width: 1100px) and (min-width: 769px) {
  .auth-photo { flex-basis: 45%; }
  .auth-form  { padding: 136px 44px 44px 56px; }
  .auth-form .welcome { font-size: 52px; }
  .photo-copy { bottom: 260px; width: 92%; }
  .photo-note { left: 62%; }
}

@media (max-width: 768px) {
  .auth-shell { display: block; }
  .auth-photo { display: none; }
  .auth-panel { width: 100%; min-height: 100vh; }
  .auth-form {
    max-width: none;
    padding: 120px 24px 48px;
  }
  .guest-link { top: 24px; right: 24px; }
  .auth-form .welcome { font-size: 46px; }
  .auth-form .sign-wordmark { font-size: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}