/* ==========================================================================
   Customer page
   Sign-in card over an arched photo, help bento, "keep your account safe"
   band with a drawn shield, FAQ and CTA.
   ========================================================================== */

/* Header: Customer button is the current page */
.header-actions .btn--ghost[aria-current="page"] { --btn-bg: var(--brand-50); --btn-fg: var(--brand-700); }

/* ---------- 1. Hero ---------- */
.cust-hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 1rem + 4vw, 5rem);
}
.hero-points { display: grid; gap: 12px; margin-top: var(--s-6); }
.hero-points li { display: flex; align-items: center; gap: 12px; color: var(--on-night); font-weight: 500; }
.hero-points__icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--glass); border: 1px solid var(--glass-line); color: #ecca92; }
.hero-points__icon svg { width: 18px; height: 18px; }
.hero-points a { color: #fff; text-decoration: underline; text-decoration-color: rgba(224, 181, 116, 0.6); text-underline-offset: 4px; padding: 8px 0; }
.hero-points a:hover { color: #ecca92; }

.signin-stage { position: relative; width: 100%; max-width: 560px; margin-inline: auto; padding: 56px 0 24px; }
.signin-stage__photo {
  position: absolute;
  right: 0;
  top: 0;
  width: 56%;
  height: 86%;
  margin: 0;
  overflow: hidden;
  border-radius: 999px 999px 36px 36px;
  border: 5px solid rgba(255, 255, 255, 0.14);
  background: var(--night-3);
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.75);
}
.signin-stage__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
.px { position: absolute; z-index: 1; display: block; border-radius: 4px; animation: px-bob 5s var(--ease-in-out) infinite alternate; }
.px--gold { right: 58%; top: 4%; width: 18px; height: 18px; background: #c99a57; }
.px--green { right: 53%; top: 11%; width: 11px; height: 11px; background: var(--green-bright); animation-delay: -1.6s; }
.px--teal { right: -3%; bottom: 22%; width: 14px; height: 14px; background: var(--teal-bright); animation-delay: -3s; }
@keyframes px-bob { from { translate: 0 0; rotate: 0deg; } to { translate: 0 -14px; rotate: 18deg; } }

.signin-card {
  position: relative;
  z-index: 2;
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.4);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}
.signin-card::before { content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: var(--grad-ember); }
.signin-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.signin-card__logo { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 15px; background: var(--paper); }
.signin-card__logo img { width: 28px; height: auto; }
.signin-card h2 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.02em; }
.signin-card__head p { color: var(--muted); font-size: var(--fs-sm); }
.signin { display: grid; gap: 16px; }
.field__row--label { align-items: baseline; }
.signin__forgot { margin-left: auto; padding: 6px 0; color: var(--brand); font-size: var(--fs-xs); font-weight: 600; }
.pw { position: relative; }
.pw__input { padding-right: 56px; }
.pw__toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.pw__toggle:hover { background: var(--brand-50); color: var(--brand); }
.pw__toggle svg { width: 20px; height: 20px; }
.pw__eye-off, .pw__toggle[aria-pressed="true"] .pw__eye { display: none; }
.pw__toggle[aria-pressed="true"] .pw__eye-off { display: block; }
.pw__caps { color: var(--accent-text); font-weight: 600; }
.pw__caps:empty { display: none; }
.signin__submit { width: 100%; gap: 10px; margin-top: 4px; }
.signin__arrow { width: 18px; height: 18px; transition: transform var(--t-base) var(--ease-out); }
.signin__submit:hover .signin__arrow { transform: translateX(4px); }
.signin__submit[aria-busy="true"] { cursor: progress; opacity: 0.85; }
.signin__submit[aria-busy="true"] .signin__arrow { animation: nudge 0.7s var(--ease-in-out) infinite alternate; }
.signin__submit[aria-disabled="true"]:not([aria-busy="true"]) { opacity: 0.6; cursor: not-allowed; }
@keyframes nudge { to { transform: translateX(5px); } }
.signin__note { color: var(--muted); font-size: var(--fs-xs); line-height: 1.5; text-align: center; }
.signin__note:empty { display: none; }
.signin-card__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 10px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--fs-sm); }
.signin-card__foot a { padding: 6px 0; font-weight: 600; }
.signin [hidden] { display: none !important; }
html:not(.js) .signin { display: none; }
.noscript-note { padding: 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink-2); font-size: var(--fs-sm); }

/* Sign-in status */
.signin-status { padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--paper); }
.signin-status:focus-visible { box-shadow: var(--focus-ring); }
.signin-status__head { display: flex; align-items: flex-start; gap: 12px; }
.signin-status__icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; color: #fff; }
.signin-status__icon svg { width: 20px; height: 20px; }
.signin-status h3 { font-size: var(--fs-base); font-weight: 700; }
.signin-status p { margin-top: 2px; color: var(--ink-2); font-size: var(--fs-sm); }
.signin-status a { font-weight: 600; }
.signin-status--info { border-color: rgba(165, 125, 69, 0.45); background: var(--accent-50); }
.signin-status--info .signin-status__icon { background: linear-gradient(135deg, #b8894a, #74552a); }
.signin-status--error { border-color: rgba(192, 48, 45, 0.4); background: var(--danger-50); }
.signin-status--error .signin-status__icon { background: var(--danger); }
.signin-status--ok { border-color: rgba(18, 112, 47, 0.35); background: #eef8f1; }
.signin-status--ok .signin-status__icon { background: var(--green); }

/* ---------- 2. Help ---------- */
.help__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: var(--s-6); margin-bottom: var(--s-7); }
.help__head h2 { margin-top: var(--s-3); font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.help__head > p { color: var(--muted); font-size: var(--fs-md); }
.help__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) repeat(2, minmax(0, 1fr)); gap: 18px; }
.hcard {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 26px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform var(--t-slow) var(--ease-out), box-shadow var(--t-slow), border-color var(--t-base);
}
.hcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-3); border-color: var(--brand-100); }
.hcard h3 { margin-top: 8px; font-size: var(--fs-lg); font-weight: 700; letter-spacing: -0.02em; }
.hcard p { color: var(--muted); }
.hcard .link-arrow { margin-top: auto; padding-top: 8px; }
.hcard__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: #fff; transition: transform var(--t-slow) var(--ease-out); }
.hcard:hover .hcard__icon { transform: rotate(-8deg) scale(1.06); }
.hcard__icon svg { width: 24px; height: 24px; }
.hcard__icon--blue { background: var(--grad-brand); }
.hcard__icon--gold { background: linear-gradient(135deg, #b8894a, #74552a); }
.hcard__icon--teal { background: linear-gradient(135deg, #2a93ae, #176a80); }
.hcard__icon--green { background: linear-gradient(135deg, #1d8a40, #12702f); }
.hcard--photo { grid-row: span 2; min-height: 460px; padding: 0; overflow: hidden; border: 0; background: var(--night-2); }
.hcard__img { position: absolute; inset: 0; margin: 0; }
.hcard__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform 1200ms var(--ease-out); }
.hcard--photo:hover .hcard__img img { transform: scale(1.05); }
.hcard__overlay { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: auto; padding: 28px; background: linear-gradient(to top, rgba(4, 18, 42, 0.92) 30%, rgba(4, 18, 42, 0)); color: #fff; }
.hcard__overlay h3 { margin: 0; color: #fff; font-size: var(--fs-xl); }
.hcard__tag { padding: 4px 12px; border-radius: var(--r-pill); background: rgba(4, 18, 42, 0.7); border: 1px solid rgba(224, 181, 116, 0.45); color: #ecca92; font-size: var(--fs-xs); font-weight: 600; }

/* ---------- 3. Safe ---------- */
.safe { position: relative; isolation: isolate; overflow: hidden; background: var(--grad-night); color: var(--on-night); }
.safe__bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.safe__grid { display: grid; grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: center; }
.safe__visual { position: relative; display: grid; place-items: center; aspect-ratio: 1; max-width: 400px; width: 100%; margin-inline: auto; }
.shield { position: relative; z-index: 1; width: 62%; height: auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.5)); }
.shield__line, .shield__lock, .shield__shackle { stroke-dasharray: 1; stroke-dashoffset: 0; }
.safe__orbit { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(94, 196, 222, 0.35); animation: orbit 40s linear infinite; }
.safe__orbit--2 { inset: 14%; border-color: rgba(224, 181, 116, 0.35); animation-duration: 28s; animation-direction: reverse; }
.safe__orbit::after { content: ""; position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; border-radius: 3px; background: #5ec4de; }
.safe__orbit--2::after { background: #e0b574; }
@keyframes orbit { to { rotate: 360deg; } }
.safe .sec-head { margin-bottom: var(--s-6); }
.safe .sec-head h2 { color: #fff; }
.safe .sec-head p:not(.kicker) { color: var(--on-night-muted); }
.tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tip {
  display: flex;
  gap: 14px;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid var(--glass-line);
  background: var(--glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color var(--t-base), background-color var(--t-base), transform var(--t-base) var(--ease-out);
}
.tip:hover { border-color: rgba(224, 181, 116, 0.5); background: rgba(255, 255, 255, 0.14); transform: translateY(-3px); }
.tip__num { flex: none; font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 700; line-height: 1; background: linear-gradient(135deg, #5ec4de, #e0b574); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tip h3 { color: #fff; font-size: var(--fs-base); font-weight: 700; }
.tip p { margin-top: 4px; color: var(--on-night-muted); font-size: var(--fs-sm); }

/* ---------- 5. CTA ---------- */
.ucta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  align-items: center;
  gap: var(--s-6);
  padding: clamp(2rem, 1.2rem + 3vw, 4rem);
  border-radius: 36px;
  background: var(--grad-night);
  color: #fff;
}
.ucta__dots { position: absolute; right: 26px; top: 24px; z-index: -1; display: grid; grid-template-columns: repeat(3, 14px); gap: 8px; opacity: 0.45; }
.ucta__dots i { width: 14px; height: 14px; border-radius: 5px; background: #5ec4de; animation: dot-blink 3.2s var(--ease-in-out) infinite; }
.ucta__dots i:nth-child(3n + 2) { background: #e0b574; animation-delay: -1s; }
.ucta__dots i:nth-child(3n) { background: #3fb062; animation-delay: -2s; }
@keyframes dot-blink { 50% { opacity: 0.2; transform: scale(0.7); } }
.ucta h2 { color: #fff; font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.ucta p { margin-top: var(--s-3); color: var(--on-night-muted); font-size: var(--fs-md); }
.ucta__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .cust-hero__layout { grid-template-columns: minmax(0, 1fr); }
  .signin-stage { max-width: 560px; margin-inline: 0; }
  .help__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hcard--photo { grid-row: auto; grid-column: 1 / -1; min-height: 360px; }
  .safe__grid { grid-template-columns: minmax(0, 1fr); }
  .safe__visual { max-width: 300px; }
  .ucta { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .help__head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .signin-stage { padding-top: 0; }
  .signin-stage__photo, .px { display: none; }
  .signin-card { padding: 22px 18px; }
  .signin-card::before { left: 18px; right: 18px; }
  .help__grid, .tips { grid-template-columns: minmax(0, 1fr); }
  .hcard--photo { min-height: 380px; }
  .ucta__actions .btn { flex: 1 1 100%; }
  .ucta__dots { opacity: 0.25; top: 16px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .px, .safe__orbit, .ucta__dots i { animation: none !important; }
}
