/* Screen 17 A "Front Door": a wine welcome with three designs fanned out and the headline rising letter by letter,
   then sign-up / log-in in a sheet that rises over it (phone), or beside it (laptop). The quiet pages (forgot, reset,
   confirm email) wear the same fields on paper. The fields and the eye come from shell.css (.ff). */

.page-door { min-height: 100svh; background: var(--paper); }
.page-door .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- the welcome ---------- */
.door { position: relative; min-height: 100svh; overflow: hidden; }
.door:not(.door--plain) { background: var(--weave), radial-gradient(90% 55% at 50% 30%, var(--cloth-3), transparent 70%), linear-gradient(175deg, var(--cloth-2), var(--cloth) 70%); color: var(--on-cloth); }
.door__wel { display: grid; justify-items: center; align-content: start; gap: 10px; min-height: 100svh; padding: calc(env(safe-area-inset-top) + 34px) 22px 210px; text-align: center; transform-origin: 50% 0; transition: transform .7s var(--spring), opacity .5s; }
.door__tassel .mark, .door__mini .mark, .door__home .mark { color: inherit; transform-origin: 50% 0; }
.door__brand { margin: 4px 0 2px; color: var(--on-cloth); }
/* the woven wordmark (cap height 44 px): the Alaari thread drops in on a spring, then each strip arrives from the way it runs,
   letter after letter, the way the approved logo animation builds the name */
.door__wv { display: block; height: 44px; width: auto; max-width: calc(100vw - 48px); overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .door__wv path { animation: wvIn .62s var(--spring-k) both; animation-delay: calc(.35s + var(--l) * 70ms + var(--i) * 8ms); transform-box: fill-box; transform-origin: 50% 50%; }
  .door__wv .dv-wv__thread { animation: wvDrop .7s var(--spring-k) .12s both; transform-origin: 50% 0; }
}
@keyframes wvIn { from { opacity: 0; transform: translateY(14px) scaleY(.6); } }
@keyframes wvDrop { from { transform: translateY(-120%) scaleY(1.4); opacity: 0; } 40% { opacity: 1; } }
/* Silk Studio: the door is Silk with Indigo ink and the D repeat, as drawn (option C) */
:root[data-look="silk"] .door:not(.door--plain) { --on-cloth: #1A2360; --on-cloth-rgb: 26 35 96; --gold-hi: #1A2360; background: var(--weave-paper), radial-gradient(90% 55% at 50% 30%, #DCCCAF, transparent 70%), #CEBB9A; color: #1A2360; }
:root[data-look="evening"] .door:not(.door--plain) { background: var(--weave), radial-gradient(90% 55% at 50% 30%, #1A2360, transparent 70%), #0C112A; }
@media (prefers-color-scheme: dark) { :root[data-look="auto"] .door:not(.door--plain) { background: var(--weave), radial-gradient(90% 55% at 50% 30%, #1A2360, transparent 70%), #0C112A; } }
.dfan { position: relative; width: 290px; height: 230px; margin: 10px 0 6px; }
.dfan > span { position: absolute; left: 50%; top: 4px; margin-left: -57px; }
.dfan .cv { font-size: 15.5px; box-shadow: 0 24px 40px -18px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(255, 255, 255, .1); }
.dfan__0 { transform: translateX(-82px) translateY(20px) rotate(-13deg); animation: dfanL 1s var(--spring-k) .35s both; }
.dfan__2 { transform: translateX(82px) translateY(20px) rotate(13deg); animation: dfanR 1s var(--spring-k) .35s both; }
.dfan__1 { z-index: 1; animation: dfanUp .85s var(--spring-k) .2s both; }
@keyframes dfanL { from { transform: translateY(30px) scale(.9); opacity: 0; } }
@keyframes dfanR { from { transform: translateY(30px) scale(.9); opacity: 0; } }
@keyframes dfanUp { from { transform: translateY(40px) scale(.9); opacity: 0; } }
.door__big { max-width: 16ch; font: 400 clamp(1.9rem, 8.4vw, 2.6rem)/1.12 var(--display); color: var(--on-cloth); }
.door__big em { color: var(--gold-hi); }
.lt { display: inline-block; animation: ltRise .7s var(--spring-k) calc(var(--a) * 1s + var(--i) * 32ms) both; }
@keyframes ltRise { from { opacity: 0; transform: translateY(.5em) rotate(4deg); } }
@keyframes doorSway { 0% { transform: rotate(0); } 25% { transform: rotate(12deg); } 50% { transform: rotate(-8deg); } 75% { transform: rotate(3deg); } 100% { transform: rotate(0); } }

.door__cta { position: absolute; left: 0; right: 0; bottom: 0; display: grid; gap: 10px; padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); }
.door__cta .btn { animation: rise .8s var(--ease) 1.6s both; }
.door__cta .btn + .btn { animation-delay: 1.72s; }
.door__ghost { color: var(--on-cloth); }
.door__fine { font-size: .78rem; text-align: center; opacity: .75; animation: rise .8s var(--ease) 1.85s both; }
.door__fine a { color: inherit; }

/* ---------- the sheet with the form ---------- */
.door__sheet { position: relative; z-index: 3; display: grid; gap: 12px; padding: 10px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; background: var(--card); color: var(--ink); box-shadow: 0 -30px 60px -28px rgba(0, 0, 0, .6); }
.door--js .door__sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: calc(100svh - 70px); overflow-y: auto; overscroll-behavior: contain; transform: translateY(105%); transition: transform .65s var(--spring); }
.door--js.is-up .door__sheet { transform: none; }
.door--js.is-up .door__wel { transform: translateY(-14px) scale(.9); opacity: .55; }
.door--js.is-up .door__cta { visibility: hidden; }
.door__sheet .grip { display: block; width: 40px; height: 5px; margin: 0 auto; border-radius: 3px; background: var(--line); }
.door__hd { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.door__hd h1 { flex: 1; font-size: 1.75rem; text-align: left; }
.door__mini .mark { width: 18px; height: 18px; }
.door__x { margin-right: -8px; }
.door__forgot { margin-top: -6px; text-align: right; }
.door__forgot a { display: inline-block; padding: 12px 2px; color: var(--wine); font-weight: 600; font-size: .9rem; text-decoration: none; }
.door__go { position: relative; }
.door__go[disabled] { opacity: 1; color: transparent; }
.door__go[disabled]::after { content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.door .notice { font-size: .88rem; }
.door .auth__swap { padding-top: 2px; }
.door .auth__swap a, .door .auth__terms a, .door__fine a, .door__card .auth__swap a { display: inline-block; min-width: 44px; min-height: 44px; padding: 0 2px; line-height: 44px; text-align: center; }
.door .auth__terms { font-size: .78rem; line-height: 1.3; }
.door__card .linkbtn { min-height: 44px; }

/* forgot password, inside the log-in page */
.door__fp .dsheet__card { gap: 12px; text-align: center; }
.door__fp .ff { width: 100%; text-align: left; }
.door__fp .notice { width: 100%; }
.door__key { display: grid; place-items: center; width: 60px; height: 60px; margin: 0 auto; border-radius: 50%; background: color-mix(in srgb, var(--gold-wash) 60%, var(--card)); color: var(--gold-lo); }
.door__key .ic { width: 26px; height: 26px; }
dialog[open] .door__key .ic, .door__key .ic { animation: keyTurn 1s var(--spring-k) .3s both; }
@keyframes keyTurn { from { transform: rotate(-70deg) scale(.6); opacity: 0; } }

/* ---------- the quiet pages: forgot, reset, confirm email ---------- */
.door--plain { display: grid; place-items: center; padding: calc(env(safe-area-inset-top) + 40px) 16px calc(40px + env(safe-area-inset-bottom)); background: radial-gradient(70% 45% at 50% 0%, var(--card), transparent 70%), var(--paper); }
.door__card { position: relative; display: grid; gap: 14px; width: min(100%, 440px); padding: 44px 20px 24px; border-radius: 28px; background: var(--card); box-shadow: var(--shadow), 0 0 0 1px var(--line); animation: rise .8s var(--ease) both; }
.door__card .auth__form { display: grid; gap: 14px; }
.door__card .auth__form[hidden] { display: none; }
.door__card h1 { font-size: 2rem; text-align: center; }
.door__card .auth__sub { margin: 0; text-align: center; color: var(--ink-2); }
.door__home { position: absolute; left: 50%; top: -28px; display: grid; place-items: center; width: 56px; height: 56px; margin-left: -28px; border-radius: 50%; background: var(--weave), var(--cloth-2); box-shadow: 0 10px 22px -12px var(--cloth); }
.door__home .mark { width: 22px; height: 22px; color: var(--on-cloth); }
.door__ok { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--ok); color: var(--on-ok); animation: okBloom .7s var(--spring-k) .1s both; }
.door__ok .ic { width: 30px !important; height: 30px !important; stroke-width: 2.4; }
@keyframes okBloom { from { transform: scale(0); } }
.mail { position: relative; width: 132px; height: 108px; margin: 0 auto 4px; }
.mail__b { position: absolute; left: 0; right: 0; bottom: 0; height: 78px; border-radius: 10px; background: linear-gradient(170deg, var(--cloth-3), var(--cloth)); }
.mail__l { position: absolute; left: 14px; right: 14px; bottom: 16px; display: grid; justify-items: center; gap: 6px; height: 84px; padding-top: 10px; border-radius: 6px; background: var(--card); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .4); animation: mailUp .9s var(--spring-k) .5s both; }
.mail__l b .mark { width: 9px; height: 15px; fill: var(--gold); stroke: var(--gold); }
.mail__l span { width: 60%; height: 4px; border-radius: 2px; background: var(--paper-2); }
.mail__f { position: absolute; left: 0; right: 0; bottom: 0; height: 52px; border-radius: 0 0 10px 10px; background: linear-gradient(160deg, var(--wine), var(--cloth-2)); clip-path: polygon(0 0, 50% 55%, 100% 0, 100% 100%, 0 100%); }
@keyframes mailUp { from { transform: translateY(48px); } }
.door__card .paid, .door__card .notice { text-align: center; }

/* ---------- tablet and laptop: the welcome on the left, the form beside it ---------- */
@media (min-width: 900px) {
  .door:not(.door--plain) { display: grid; grid-template-columns: 1.05fr 1fr; }
  .door__wel { position: sticky; top: 0; align-content: center; min-height: 100svh; padding: 40px; transform: none !important; opacity: 1 !important; }
  .dfan { width: 360px; height: 290px; }
  .dfan .cv { font-size: 19px; }
  .dfan > span { margin-left: -70px; }
  .dfan__0 { transform: translateX(-104px) translateY(24px) rotate(-13deg); }
  .dfan__2 { transform: translateX(104px) translateY(24px) rotate(13deg); }
  .door__big { font-size: 3rem; }
  .door__cta { display: none; }
  .door__sheet, .door--js .door__sheet { position: relative; align-self: center; justify-self: center; width: min(440px, calc(100% - 48px)); max-height: none; margin: 40px 0; padding: 30px 28px 26px; border-radius: 28px; transform: none; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgb(var(--gold-hi-rgb) / .2); animation: popUp .8s var(--spring-k) .3s both; }
  .door__sheet .grip, .door__x { display: none; }
  @keyframes popUp { from { opacity: 0; transform: translateY(30px) scale(.97); } }
}

@media (prefers-reduced-motion: reduce) {
  .page-door *, .page-door *::before, .page-door *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
}
