/* ------------------------------------------------------------------ *
 * Awakin AI — auth pages (login / join / forgot / reset / change pw)
 * All-parchment, card-based. No hero. Layers on awakin.css tokens and
 * reuses its .req-* form controls. Loaded via {$EXTRA_CSS} in head_uni.
 * Pages set NAV_SOLID so the fixed nav renders in .light mode.
 * ------------------------------------------------------------------ */

/* ---- page shell: full-height parchment that clears the fixed nav --- */
.auth-page{
  position:relative;min-height:100svh;overflow:hidden;
  display:flex;flex-direction:column;align-items:center;justify-content:flex-start;
  padding:clamp(7rem,13vh,9.5rem) clamp(1.2rem,5vw,2rem) clamp(3rem,7vh,5rem);
}
/* barely-there warmth from the top — the quiet stand-in for the old hero glow */
.auth-page::before{
  content:"";position:absolute;inset:0 0 auto 0;height:360px;pointer-events:none;
  background:radial-gradient(120% 100% at 50% -12%,rgba(177,123,46,.10),transparent 62%);
}

/* margin:auto centers vertically too — but collapses safely (no clip under
   the fixed nav) when content is taller than the viewport, e.g. the join form */
.auth-wrap{position:relative;width:100%;max-width:452px;margin:auto}
.auth-wrap.wide{max-width:664px}

/* ---- header: seal → title → sub ---- */
.auth-head{text-align:center;margin-bottom:clamp(1.9rem,4.5vw,2.5rem)}

/* signature: a hairline with a small brass lozenge — echoes .node + the .wrap rail */
.auth-mark{width:40px;height:1px;background:var(--brass);opacity:.5;margin:0 auto 1.6rem;position:relative}
.auth-mark::after{content:"";position:absolute;left:50%;top:50%;width:6px;height:6px;
  transform:translate(-50%,-50%) rotate(45deg);background:var(--brass)}

.auth-title{font-family:var(--display);font-optical-sizing:auto;font-weight:340;
  font-size:clamp(2.15rem,5.4vw,3.15rem);line-height:1.04;letter-spacing:-.02em;
  color:var(--ink);margin:0}
.auth-title em{font-style:italic;font-weight:360;color:var(--clay)}

.auth-sub{color:var(--ink-soft);font-size:1.02rem;line-height:1.62;
  max-width:39ch;margin:1.1rem auto 0}

/* ---- the card ---- */
.auth-card{
  background:#FBF7EE;border:1px solid var(--line-l);border-radius:16px;
  padding:clamp(1.55rem,4vw,2.35rem);
  box-shadow:
    0 1px 0 rgba(255,255,255,.55) inset,
    0 26px 60px -32px rgba(138,94,30,.5),
    0 8px 22px -16px rgba(42,37,33,.28);
}

/* ---- google / oauth ---- */
.auth-google{display:flex;align-items:center;justify-content:center;gap:.75rem;width:100%;
  font-family:var(--body);font-size:1rem;font-weight:400;color:var(--ink);
  background:#fff;border:1.5px solid var(--sand);border-radius:10px;padding:.92rem 1rem;
  text-decoration:none;transition:border-color .25s,box-shadow .25s,transform .25s}
.auth-google:hover{border-color:var(--brass);
  box-shadow:0 12px 26px -14px rgba(177,123,46,.55);transform:translateY(-1px)}
.auth-google svg{width:19px;height:19px;flex-shrink:0}

.auth-or{display:flex;align-items:center;gap:1rem;margin:1.4rem 0;
  font-family:var(--mono);font-size:.64rem;letter-spacing:.22em;text-transform:uppercase;color:var(--muted-l)}
.auth-or::before,.auth-or::after{content:"";flex:1;height:1px;background:var(--line-l)}

/* ---- fields (pair with .req-input / .req-label / .req-select) ---- */
.auth-field{margin-bottom:1.15rem}
.auth-field .req-label{margin-bottom:.5rem}
.auth-row{display:flex;justify-content:flex-end;align-items:center;margin:.7rem 0 1.45rem;font-size:.88rem}
.auth-row a{color:var(--brass-deep);border-bottom:1px solid transparent;transition:border-color .2s}
.auth-row a:hover{border-bottom-color:var(--brass)}

.req-btn.auth-submit{width:100%;text-align:center;padding:.98rem 1.8rem;font-size:.84rem;letter-spacing:.06em;border-radius:10px}

/* alert reuses .req-alert, tuned for card rhythm */
.auth-card .req-alert{margin:0 0 1.35rem}

/* The expired-link alert ends with a "Request a fresh link" anchor. Make it
   read clearly as the call to action inside the clay alert box. */
.auth-card .req-alert a{
  font-weight:600;color:var(--clay);
  text-decoration:underline;text-decoration-color:var(--brass);
  text-decoration-thickness:2px;text-underline-offset:3px;
  border-radius:4px;padding:.02em .14em;white-space:nowrap;
  transition:color .2s,background-color .2s,text-decoration-color .2s}
.auth-card .req-alert a:hover,
.auth-card .req-alert a:focus-visible{
  color:var(--brass-deep);background:rgba(177,123,46,.12);
  text-decoration-color:var(--brass-deep)}
.auth-card .req-alert a:focus-visible{outline:2px solid var(--brass);outline-offset:2px}

/* ---- alt / footer link ---- */
.auth-alt{text-align:center;margin-top:1.55rem;padding-top:1.35rem;border-top:1px solid var(--line-l);font-size:.95rem;color:var(--ink-soft)}
.auth-alt a{color:var(--brass-deep);border-bottom:1px solid var(--sand)}
.auth-alt a:hover{border-bottom-color:var(--brass)}
.auth-foot{text-align:center;margin-top:1.7rem;font-size:.95rem;color:var(--ink-soft)}
.auth-foot a{color:var(--brass-deep);border-bottom:1px solid var(--sand)}
.auth-foot a:hover{border-bottom-color:var(--brass)}

/* ---- terms checkbox ---- */
.auth-check{display:flex;gap:.65rem;align-items:flex-start;font-size:.92rem;color:var(--ink-soft);line-height:1.5}
.auth-check input{margin-top:.2rem;width:16px;height:16px;flex-shrink:0;accent-color:var(--brass-deep)}
.auth-check a{color:var(--brass-deep);border-bottom:1px solid var(--sand)}

/* ---- bot chip (arriving via a specific companion) ---- */
.auth-bot{display:flex;align-items:center;gap:.7rem;justify-content:center;
  margin-bottom:1.4rem;padding-bottom:1.3rem;border-bottom:1px solid var(--line-l)}
.auth-bot img{width:40px;height:40px;border-radius:50%;object-fit:cover;border:1px solid var(--sand)}
.auth-bot span{font-family:var(--mono);font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;color:var(--brass-deep)}

/* ---- password field with reveal toggle ---- */
.pw-wrap{position:relative}
.pw-wrap .req-input{padding-right:3.6rem}
.pw-toggle{position:absolute;right:.7rem;top:50%;transform:translateY(-50%);background:none;border:none;cursor:pointer;
  color:var(--muted-l);font-family:var(--mono);font-size:.62rem;letter-spacing:.1em;text-transform:uppercase;padding:.3rem}
.pw-toggle:hover{color:var(--brass-deep)}
.pw-hint{font-family:var(--mono);font-size:.64rem;color:var(--muted-l);margin-top:.5rem}
.pw-match{font-family:var(--mono);font-size:.66rem;margin-top:.5rem;min-height:1em}
.pw-match.ok{color:var(--sage-deep)}
.pw-match.no{color:var(--clay)}

/* ---- join: collapsible "why join" ---- */
.auth-benefits{margin:0 0 1.5rem;border:1px solid var(--line-l);border-radius:12px;background:rgba(255,255,255,.35);overflow:hidden}
.auth-benefits>summary{cursor:pointer;font-family:var(--mono);font-size:.76rem;letter-spacing:.02em;color:var(--brass-deep);
  list-style:none;padding:.85rem 1.1rem;display:flex;align-items:center;justify-content:space-between}
.auth-benefits>summary::-webkit-details-marker{display:none}
.auth-benefits>summary::after{content:"+";font-size:1rem;opacity:.7}
.auth-benefits[open]>summary::after{content:"–"}
.auth-bene-grid{display:grid;grid-template-columns:1fr 1fr;gap:.7rem;padding:0 1.1rem 1.1rem}
.auth-bene{background:#FBF7EE;border:1px solid var(--line-l);border-radius:8px;padding:.75rem .85rem;font-size:.82rem;color:var(--ink-soft);line-height:1.4}
.auth-bene b{display:block;color:var(--ink);font-weight:500;margin-bottom:.15rem}

/* ---- success / done panel (forgot / reset / change / join) ---- */
.auth-done{text-align:center}
.auth-seal{width:54px;height:54px;border-radius:50%;border:1.5px solid var(--brass);
  display:grid;place-items:center;margin:0 auto 1.4rem;color:var(--brass-deep);
  box-shadow:0 0 0 6px rgba(177,123,46,.08)}
.auth-seal svg{width:24px;height:24px}
.auth-done h2{font-family:var(--display);font-weight:350;font-size:clamp(1.7rem,4vw,2.25rem);
  letter-spacing:-.01em;color:var(--ink);margin:0 0 .6rem}
.auth-done h2 em{font-style:italic;color:var(--clay)}
.auth-done p{color:var(--ink-soft);max-width:40ch;margin:0 auto 1.6rem}
.auth-done .about-ctas{justify-content:center}

/* ---- quiet page-load rise (orchestrated, subtle) ---- */
@keyframes authRise{from{opacity:0;transform:translateY(11px)}to{opacity:1;transform:none}}
.auth-head{animation:authRise .7s cubic-bezier(.2,.7,.2,1) both}
.auth-card{animation:authRise .7s cubic-bezier(.2,.7,.2,1) .08s both}
.auth-foot,.auth-benefits{animation:authRise .7s cubic-bezier(.2,.7,.2,1) .16s both}

/* ---- responsive & a11y floor ---- */
@media(max-width:540px){
  .auth-page{padding-top:6.5rem}
  .req-grid{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
  .auth-head,.auth-card,.auth-foot,.auth-benefits{animation:none}
  .auth-google:hover{transform:none}
}
.pw-toggle:focus-visible,.auth-google:focus-visible{outline:2px solid var(--brass);outline-offset:2px;border-radius:4px}
