/* Refuge brand animation: arch monogram rises in with a gold shimmer, the wordmark wipes in, then the tagline. About 1.6 seconds. */
.brand-hero { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.brand-mono { position: relative; width: 104px; opacity: 0; animation: brand-rise 1s cubic-bezier(.2,.8,.2,1) .05s both; }
.brand-mono img { display: block; width: 100%; height: auto; }
/* the shimmer only shows on the strokes of the monogram (the logo itself is the mask) */
.brand-mono::after { content: ""; position: absolute; inset: 0; -webkit-mask: url(/img/brand/monogram-gold.png) center / contain no-repeat; mask: url(/img/brand/monogram-gold.png) center / contain no-repeat;
  background: linear-gradient(105deg, transparent 32%, rgba(255,244,214,.95) 50%, transparent 68%); background-size: 260% 100%; background-position: 150% 0; animation: brand-shine 1.3s ease-in-out .7s 1 both; pointer-events: none; }
.brand-word { display: block; width: 210px; height: auto; clip-path: inset(0 100% 0 0); animation: brand-wipe .9s cubic-bezier(.4,0,.2,1) .75s both; }
.brand-tag { display: block; width: 190px; height: auto; opacity: 0; animation: brand-fade .8s ease-out 1.5s both; }
.brand-card { animation: brand-card .8s cubic-bezier(.2,.8,.2,1) 1.2s both; }
@keyframes brand-rise { from { opacity: 0; transform: translateY(22px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes brand-shine { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes brand-wipe { to { clip-path: inset(0 0 0 0); } }
@keyframes brand-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes brand-card { from { opacity: 0; transform: translateY(34px) scale(.98); } to { opacity: 1; transform: none; } }


@media (prefers-reduced-motion: reduce) {
  .brand-mono, .brand-word, .brand-tag, .brand-card { animation: none !important; opacity: 1; clip-path: none; transform: none; }
  .brand-mono::after { display: none; }
}

/* ===== Sign-in: a calm, corporate split screen. Brand panel on the left (a phone: a header band), a clean white form on the right (a phone: a sheet). ===== */
.ap { min-height: 100vh; display: flex; background: #ffffff; }
.ap-brand { position: relative; flex: 0 0 46%; max-width: 680px; display: flex; flex-direction: column; justify-content: space-between; padding: 56px 56px 52px; color: #fff; overflow: hidden; background: linear-gradient(160deg, #032a2b 0%, #054746 58%, #0a5f59 100%); }
/* the logo's arch, drawn as two fine lines; the only decoration */
.ap-brand::before, .ap-brand::after { content: ""; position: absolute; border: 1px solid rgba(232,169,80,.24); border-radius: 280px 280px 32px 32px; pointer-events: none; }
.ap-brand::before { right: -130px; bottom: -170px; width: 540px; height: 720px; }
.ap-brand::after { right: -76px; bottom: -118px; width: 440px; height: 610px; border-color: rgba(232,169,80,.12); }
.ap-brand > * { position: relative; z-index: 1; }
.ap-brand .brand-hero { align-items: flex-start; gap: 14px; }
.ap-lede h2 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 30px; line-height: 1.25; letter-spacing: -0.01em; max-width: 17ch; margin: 0; color: #fff; }
.ap-lede p { margin: 14px 0 0; max-width: 38ch; font-size: 15px; line-height: 1.65; color: rgba(255,255,255,.72); }
.ap-lede i { display: block; width: 44px; height: 2px; background: #e6a950; margin-bottom: 20px; }
.ap-form { flex: 1; display: flex; flex-direction: column; padding: 48px 28px 28px; background: #ffffff; min-width: 0; }
.ap-inner { width: 100%; max-width: 400px; margin: auto; animation: brand-card .8s cubic-bezier(.2,.8,.2,1) .35s both; }
.ap-inner h1 { font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 28px; letter-spacing: -0.01em; color: #062f30; margin: 0; }
.ap-inner .ap-sub { margin: 6px 0 28px; font-size: 14.5px; color: #566866; }
.ap-foot { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 28px; text-align: center; }
.ap-foot img { width: 128px; height: auto; display: block; opacity: .95; }
.ap-foot p { margin: 0; font-size: 12px; color: #6b7c7a; }
.ap-foot a { color: #566866; text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 1023px) {
  .ap { flex-direction: column; background: #032a2b; }
  .ap-brand { flex: none; max-width: none; align-items: center; justify-content: center; text-align: center; padding: calc(36px + env(safe-area-inset-top)) 24px 70px; }
  .ap-brand .brand-hero { align-items: center; }
  .ap-lede { display: none; }
  .ap-brand::before { right: -90px; bottom: -190px; width: 360px; height: 420px; }
  .ap-brand::after { display: none; }
  .ap-form { margin-top: -30px; border-radius: 28px 28px 0 0; position: relative; z-index: 2; padding: 34px 22px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -16px 40px rgba(0,20,20,.22); }
}

/* Set-password keeps the centred card, on a plain deep teal ground */
body.auth-bg { background: radial-gradient(55% 42% at 50% 40%, rgba(32,168,155,.22), transparent 72%), linear-gradient(172deg, #031b1c 0%, #05403f 52%, #0a5a55 100%); }
.auth-decor { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-arch { position: absolute; left: 50%; top: 50%; width: min(540px, 94vw); height: min(790px, 94vh); transform: translate(-50%, -50%); border: 1px solid rgba(232,169,80,.22); border-radius: 270px 270px 34px 34px; }
body.auth-bg .brand-card { box-shadow: 0 24px 60px rgba(0,18,18,.45); }
@media (max-width: 640px) { .auth-arch { width: 112vw; border-radius: 56vw 56vw 30px 30px; } }
