/* ============================================================
   Cealune auth pages (sign-in / sign-up) — editorial split layout
   Loaded only on sign-in.html / sign-up.html, after the bundle.
   Ivory palette + Cormorant Garamond / Jost to match the modal.
   ============================================================ */
.cea-auth {
  --paper: #f6f2ec;
  --panel: #fbf9f5;
  --ink: #1c1a17;
  --muted: #6f675c;
  --line: #d9d1c4;
  --accent: #a8843f;
  --field-line: #c5bcab;
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  font-family: "Jost", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--panel);
  overflow: auto;
}

/* ---- media / brand panel (left) ---- */
.cea-auth__media {
  position: relative;
  overflow: hidden;
  background-color: #cfc8bf;          /* fallback while the photo loads */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
/* Soft dark wash so the white wordmark + tagline stay legible on any photo. */
.cea-auth__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(28,24,20,.34) 0%, rgba(28,24,20,.10) 42%, rgba(28,24,20,.46) 100%);
  pointer-events: none;
  z-index: 0;
}
.cea-auth__brand,
.cea-auth__tagline { z-index: 1; }
.cea-auth__brand {
  position: absolute;
  top: 34px;
  left: 44px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 27px;
  letter-spacing: 0.34em;
  color: #fff;
  padding-left: 0.34em;
}
.cea-auth__tagline {
  position: absolute;
  left: 44px;
  bottom: 48px;
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 34px;
  line-height: 1.12;
  color: #fff;
  max-width: 9ch;
  text-shadow: 0 1px 22px rgba(0, 0, 0, 0.12);
}

/* ---- form panel (right) ---- */
.cea-auth__panel {
  position: relative;
  background: var(--panel);
  display: flex;
  overflow-y: auto;
  padding: 56px clamp(32px, 7vw, 130px);
}
.cea-auth__corner {
  position: absolute;
  top: 36px;
  right: clamp(32px, 5vw, 64px);
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
}
.cea-auth__corner a {
  display: inline-block;
  border: 1px solid var(--ink);
  color: var(--ink);
  padding: 14px 22px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  line-height: 1.3;
  transition: background 0.2s, color 0.2s;
}
.cea-auth__corner a:hover { background: var(--ink); color: var(--panel); }

.cea-auth__inner { width: 100%; max-width: 470px; margin-top: auto; margin-bottom: auto; }
.cea-auth__eyebrow {
  margin: 0 0 22px;
  font-size: 12px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.cea-auth__headline {
  margin: 0 0 16px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 500;
  font-size: clamp(38px, 5vw, 54px);
  line-height: 1.03;
  color: var(--ink);
}
.cea-auth__headline em { font-style: italic; font-weight: 500; color: var(--accent); }
.cea-auth__sub {
  margin: 0 0 42px;
  font-size: 15px;
  color: var(--muted);
  font-weight: 300;
}

/* ---- fields ---- */
.cea-field { margin-bottom: 30px; }
.cea-field > label {
  display: block;
  margin-bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #9b9285;
  font-weight: 500;
}
/* nowrap keeps input + SHOW on one line; the input gets a zero flex-basis and
   forced width so the bundle's global `input{width:448px}` rules can't inflate it
   and push SHOW onto its own line. The underline lives on the ROW (one continuous,
   fixed-width line) so it never breaks at SHOW or resizes when the toggle text
   changes between Show/Hide. */
.cea-auth .cea-field__row {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  column-gap: 14px;
  justify-content: flex-start;
  border-bottom: 1px solid var(--field-line);
  transition: border-color 0.25s;
}
.cea-auth .cea-field__row:focus-within { border-color: var(--accent); }
.cea-auth .cea-field__row > input,
.cea-auth input.cea-input {
  flex: 1 1 0%;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  /* kill the theme's global input height (input{height:50/60px}) which was
     vertically centering the text and floating it high above the underline */
  height: auto !important;
  min-height: 0 !important;
  line-height: 1.4;
  padding: 2px 4px 9px 2px;
  font-family: "Jost", sans-serif;
  font-size: 17px;
  font-weight: 300;
  color: var(--ink);
  outline: none;
  border-radius: 0;
}
.cea-auth .cea-field__row > input::placeholder { color: var(--muted); opacity: 0.55; }
.cea-auth .cea-field__row > input:focus { box-shadow: none; }
.cea-auth .cea-field__toggle {
  flex: 0 0 auto;
  width: auto;
  min-width: 3.6em;
  text-align: right;
  border: none !important;
  background: transparent;
  cursor: pointer;
  font-family: "Jost", sans-serif;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.4;
  padding: 0 2px 0 0;
  white-space: nowrap;
}
.cea-auth .cea-field__toggle:hover { color: var(--ink); }

/* neutralize the browser autofill background (was showing pale blue/yellow) by
   painting the field with the page colour and keeping our ink text colour */
.cea-auth .cea-field__row > input:-webkit-autofill,
.cea-auth .cea-field__row > input:-webkit-autofill:hover,
.cea-auth .cea-field__row > input:-webkit-autofill:focus,
.cea-auth .cea-field__row > input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--panel) inset !important;
  box-shadow: 0 0 0 1000px var(--panel) inset !important;
  -webkit-text-fill-color: var(--ink) !important;
  caret-color: var(--ink);
  transition: background-color 9999s ease-in-out 0s;
}
.cea-auth .cea-field__row > input:autofill {
  background: transparent !important;
  -webkit-text-fill-color: var(--ink) !important;
}

/* ---- password requirements box ----
   auth.js injects .pw-strength right after the password input (inside the row);
   an inline script relocates it to be a direct child of .cea-field--pw (full-width,
   below the line). Hidden while still inside the row so there's no flash. */
.cea-auth .cea-field__row .pw-strength { display: none !important; }
.cea-auth .cea-field--pw > .pw-strength {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100%;
  border: 1px solid var(--line);
  padding: 18px 26px;
  margin: 20px 0 0;
}
.cea-auth .pw-strength ul { list-style: none; margin: 0; padding: 0; }
.cea-auth .pw-strength li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
}
.cea-auth .pw-strength li i {
  font-size: 10px;
  width: 14px;
  text-align: center;
  color: #c2b9a9;
}
.cea-auth .pw-strength li.ok { color: var(--ink); }
.cea-auth .pw-strength li.ok i { color: var(--accent); }

/* email availability hint (auth.js injects .avail-msg) */
.cea-auth .avail-msg { display: block; margin-top: 8px; font-size: 12px; font-weight: 300; }

/* ---- remember / forgot (sign in) ---- */
.cea-auth__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 34px;
}
.cea-remember {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 300;
  cursor: pointer;
  margin: 0;
}
.cea-remember input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
  cursor: pointer;
  opacity: 1 !important;
  position: static !important;
}
.cea-forgot { font-size: 14px; color: var(--accent); text-decoration: none; font-weight: 400; }
.cea-forgot:hover { text-decoration: underline; }

/* ---- submit ---- */
.cea-auth__btn {
  display: block;
  width: 100%;
  border: none;
  background: var(--ink);
  color: var(--panel);
  padding: 21px;
  font-family: "Jost", sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: center;
  transition: background 0.25s, transform 0.15s;
}
.cea-auth__btn:hover { background: var(--accent); }
.cea-auth__btn:active { transform: translateY(1px); }
.cea-auth__btn[disabled] { opacity: 0.6; cursor: default; }

.cea-auth__error { color: #b4513f; font-size: 13px; margin: 0 0 18px; }
.cea-auth__error:empty { display: none; margin: 0; }

/* ---- footer link (mobile) ---- */
.cea-auth__foot {
  display: none;
  text-align: center;
  margin: 30px 0 0;
  font-size: 15px;
  color: var(--muted);
  font-weight: 300;
}
.cea-auth__foot a { color: var(--accent); text-decoration: none; font-weight: 500; }
.cea-auth__foot a:hover { text-decoration: underline; }

/* ============ responsive: stack on mobile ============ */
@media (max-width: 860px) {
  .cea-auth {
    position: static;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
  }
  .cea-auth__media { flex: 0 0 auto; min-height: 210px; }
  .cea-auth__brand { top: 38px; left: 30px; font-size: 30px; }
  .cea-auth__tagline { display: none; }
  .cea-auth__corner { display: none; }   /* corner link → footer on mobile */
  .cea-auth__panel { padding: 48px 30px 64px; align-items: flex-start; }
  .cea-auth__inner { max-width: 520px; margin: 0 auto; }
  .cea-auth__foot { display: block; }
}
@media (max-width: 380px) {
  .cea-auth__panel { padding: 40px 22px 54px; }
  .cea-auth__brand { left: 22px; }
}

/* ---- forgot / reset extras ---- */
.cea-auth__back {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 30px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  font-weight: 400;
}
.cea-auth__back:hover { color: var(--ink); }
.cea-field__hint { margin: 13px 0 0; font-size: 13px; color: var(--muted); font-weight: 300; }
.cea-auth .form-ok, .cea-auth__ok { color: #5f7a4f; font-size: 13.5px; font-weight: 400; margin: 0 0 18px; }
.cea-auth .form-ok:empty, .cea-auth__ok:empty { display: none; margin: 0; }

/* (1) Bolder masking dots while typing a password; reverts to normal weight
   when revealed (type becomes text via the SHOW toggle). The placeholder text
   ("Your password" / "Choose a password") stays at the normal light weight. */
.cea-auth .cea-field__row > input[type="password"] {
  font-weight: 600;
  letter-spacing: 0.18em;
}
.cea-auth .cea-field__row > input[type="password"]::placeholder {
  font-weight: 300;
  letter-spacing: normal;
}
/* (2) Brand wordmark is a link back to the homepage. */
a.cea-auth__brand { text-decoration: none; cursor: pointer; }
a.cea-auth__brand:hover { color: #fff; opacity: 0.85; }

/* (5) Sign-in / auth pages have no topbar and start with the grayscale media
   panel. Safari can't sample the gradient for its UI tint and falls back to
   white, and the <html> behind the body showed a white sliver in the bottom
   safe area. Paint <html> the panel ivory so the bottom is seamless; the
   status-bar tint is set per-page via a matching <meta name="theme-color">. */
html { background: #f6f2ec; }
