/* Sign-in / welcome page: quiet, centred, Apple-style.
   One column, generous space, large confident type, a single frosted card, filled primary action. */
.welcome-page {
  --w-ink: #1d1a12; --w-muted: #6f6650; --w-line: rgba(60, 45, 15, .14);
  --w-honey: #f5c542; --w-honey-press: #e6b52f; --w-card: rgba(255, 255, 255, .72);
  position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center;
  padding: clamp(20px, 5vw, 56px); background: var(--hv-page-bg); color: var(--w-ink);
  -webkit-font-smoothing: antialiased;
}
.welcome-card { display: grid; justify-items: center; gap: 28px; width: min(100%, 400px); }

.welcome-intro { display: grid; justify-items: center; gap: 6px; text-align: center; animation: w-rise .6s cubic-bezier(.2, .8, .2, 1) both; }
.welcome-intro img { width: 84px; height: 84px; object-fit: contain; margin-bottom: 10px; }
.welcome-intro h1 { margin: 0; font-size: clamp(30px, 8vw, 38px); line-height: 1.1; letter-spacing: -.035em; font-weight: 800; }
.welcome-intro p { margin: 0; color: var(--w-muted); font-size: 17px; }

.welcome-sign-in {
  width: 100%; padding: 28px; border-radius: 28px; border: 1px solid rgba(255, 255, 255, .8);
  background: var(--w-card); -webkit-backdrop-filter: blur(24px) saturate(1.4); backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 24px 60px -20px rgba(80, 58, 18, .28), 0 2px 6px rgba(80, 58, 18, .06);
  animation: w-rise .6s .08s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes w-rise { from { opacity: 0; transform: translateY(14px); } }
.welcome-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.welcome-button {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; margin: 0; padding: 0 18px;
  border: 0; border-radius: 14px; font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s, background-color .15s, box-shadow .15s;
}
.welcome-button:active { transform: scale(.985); }
.welcome-button:focus-visible, .welcome-email input:focus-visible { outline: 3px solid color-mix(in srgb, var(--w-honey) 60%, transparent); outline-offset: 2px; }
.welcome-google { background: #fff; color: var(--w-ink); box-shadow: 0 0 0 1px var(--w-line), 0 1px 2px rgba(60, 45, 15, .06); }
.welcome-google:hover { background: #fffdf8; }
.welcome-google svg { flex: none; }
.welcome-primary { background: var(--w-honey); color: #2a2112; box-shadow: 0 1px 2px rgba(120, 88, 20, .25); }
.welcome-primary:hover { background: var(--w-honey-press); }

.welcome-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; color: var(--w-muted); font-size: 13px; font-weight: 600; }
.welcome-divider::before, .welcome-divider::after { content: ""; flex: 1; height: 1px; background: var(--w-line); }
.welcome-sign-in [hidden] { display: none; }
.welcome-email { display: grid; gap: 8px; }
.welcome-email .welcome-divider { grid-column: 1; }
.welcome-email label { font-size: 13px; font-weight: 700; color: var(--w-muted); padding-left: 2px; }
.welcome-email input {
  width: 100%; min-height: 50px; padding: 0 16px; border: 0; border-radius: 14px; font: inherit; font-size: 16px;
  background: rgba(255, 255, 255, .9); color: var(--w-ink); box-shadow: 0 0 0 1px var(--w-line);
}
.welcome-email input::placeholder { color: #9a9078; }
.welcome-email button { margin-top: 6px; }
#email-sign-in-confirm, #email-sign-out { margin-top: 12px; }
.welcome-sign-in #account-email { overflow-wrap: anywhere; min-width: 0; max-width: 100%; margin: 0 0 12px; text-align: center; color: var(--w-muted); }
.welcome-sign-in #email-login-status:not(:empty) { margin: 14px 0 0; text-align: center; color: #70401e; font-weight: 600; font-size: 14px; }
#backend-notice { border-radius: 14px !important; font-size: 14px; }

.welcome-foot { display: grid; justify-items: center; gap: 12px; animation: w-rise .6s .16s cubic-bezier(.2, .8, .2, 1) both; }
.welcome-guest { color: var(--w-ink); font-weight: 700; text-decoration: none; padding: 8px 14px; border-radius: 999px; }
.welcome-guest:hover { background: rgba(60, 45, 15, .07); }
.welcome-guest:focus-visible { outline: 3px solid color-mix(in srgb, var(--w-honey) 60%, transparent); }

@media (prefers-reduced-motion: reduce) { .welcome-intro, .welcome-sign-in, .welcome-foot { animation: none; } .welcome-button { transition: none; } }

/* Session check: keep the sign-in card hidden until we know the customer is signed out, so a signed-in
   customer never sees it flash. If the script never runs, the card appears after 2.5 s. */
.welcome-page:not(.auth-ready) .welcome-sign-in > * { visibility: hidden; animation: welcome-reveal 0s 2.5s forwards; }
@keyframes welcome-reveal { to { visibility: visible; } }
.welcome-expired { margin: 0 0 14px; padding: 10px 14px; border-radius: 14px; background: #fff0c4; color: #6e4a05; font-weight: 700; font-size: 14px; }
.welcome-expired[hidden] { display: none; }

/* ---- Clay finish: same calm layout, soft raised shapes ---- */
.welcome-page { --c-out: 12px 16px 30px rgba(110, 80, 28, .18), -8px -8px 18px rgba(255, 252, 244, .7); --c-in: inset -6px -8px 14px rgba(120, 88, 30, .09), inset 6px 8px 14px rgba(255, 252, 244, .8); }
.welcome-intro img { width: 104px; height: 104px; padding: 14px; border-radius: 50%; margin-bottom: 14px;
  background: linear-gradient(150deg, #fffaf0, #f1e2b4);
  box-shadow: 8px 10px 18px rgba(110, 80, 28, .2), -5px -5px 12px rgba(255, 252, 244, .7), inset -5px -6px 10px rgba(120, 88, 30, .1), inset 5px 6px 10px rgba(255, 252, 244, .8); }
.welcome-sign-in { border: 0; border-radius: 40px; padding: 32px 28px;
  background: linear-gradient(150deg, #fffaf0, #f4ead3); -webkit-backdrop-filter: none; backdrop-filter: none;
  box-shadow: var(--c-out), var(--c-in); }
.welcome-button { border-radius: 999px; min-height: 54px; transition: transform .3s cubic-bezier(.34, 1.45, .64, 1), box-shadow .2s; }
.welcome-button:hover { transform: translateY(-2px); }
.welcome-button:active { transform: translateY(1px) scale(.98); }
.welcome-google { background: linear-gradient(150deg, #fffaf0, #f1e6cc);
  box-shadow: 6px 8px 16px rgba(110, 80, 28, .2), -4px -4px 11px rgba(255, 252, 244, .75), inset -3px -4px 8px rgba(120, 88, 30, .08), inset 3px 4px 8px rgba(255, 252, 244, .85); }
.welcome-google:hover { background: linear-gradient(150deg, #fffaf0, #f1e6cc); }
.welcome-google:active { box-shadow: inset 5px 6px 12px rgba(110, 80, 28, .2), inset -3px -3px 8px rgba(255, 252, 244, .7); }
.welcome-primary { background: linear-gradient(150deg, #f9dc84, #ecc058);
  box-shadow: 6px 8px 16px rgba(130, 92, 20, .28), -4px -4px 11px rgba(255, 244, 205, .7), inset -3px -4px 8px rgba(130, 92, 20, .16), inset 3px 4px 8px rgba(255, 250, 225, .7); }
.welcome-primary:hover { background: linear-gradient(150deg, #f9dc84, #ecc058); }
.welcome-primary:active { box-shadow: inset 5px 6px 12px rgba(130, 92, 20, .3), inset -3px -3px 8px rgba(255, 244, 205, .6); }
.welcome-email input { border-radius: 999px; padding: 0 22px; background: #efe5cd; box-shadow: inset 5px 6px 11px rgba(110, 80, 28, .16), inset -4px -4px 9px rgba(255, 252, 244, .8); }
.welcome-email input:focus-visible { outline: 3px solid color-mix(in srgb, var(--w-honey) 70%, transparent); }
.welcome-divider::before, .welcome-divider::after { height: 3px; border-radius: 3px; background: #e6dcc0; box-shadow: inset 1px 1px 2px rgba(110, 80, 28, .18); }
.welcome-guest { min-height: 48px; display: inline-flex; align-items: center; padding: 0 24px; border-radius: 999px;
  background: linear-gradient(150deg, #fffaf0, #f1e6cc);
  box-shadow: 5px 7px 14px rgba(110, 80, 28, .18), -4px -4px 10px rgba(255, 252, 244, .75), inset -3px -3px 7px rgba(120, 88, 30, .07), inset 3px 3px 7px rgba(255, 252, 244, .8); }
.welcome-guest:hover { background: linear-gradient(150deg, #fffaf0, #f1e6cc); transform: translateY(-2px); }
.welcome-expired, #backend-notice { box-shadow: inset 3px 3px 8px rgba(255, 255, 255, .8), inset -3px -3px 8px rgba(163, 112, 18, .15); }
