/* Sign up (signup.html) and Log in (login.html). Builds on styles.css: tokens, buttons, nav, logo. */

.acct { padding: clamp(40px, 7vw, 96px) 0 72px; overflow-x: hidden; overflow-x: clip; } /* the art's glow reaches past the screen edge on phones */
.acct-grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 460px); justify-content: space-between; align-items: start; gap: 64px; }
.acct-main h1 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -.035em; text-wrap: balance; }
.acct-sub { margin-top: 14px; max-width: 44ch; color: var(--ash); font-size: 18px; }

/* Fields */
.acct-form { margin-top: 36px; display: grid; gap: 18px; }
.acct-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: grid; align-content: start; gap: 8px; }
.field-label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--white); font-size: 15px; font-weight: 500; }
.field input:not([type="checkbox"]) { width: 100%; height: 52px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--graphite); color: var(--white); font: 400 16px/1 var(--body); transition: border-color .2s ease, box-shadow .2s ease; }
.field input:not([type="checkbox"]):hover { border-color: #4a4a50; }
.field input:not([type="checkbox"])[aria-invalid="true"] { border-color: var(--danger); }
.field input:not([type="checkbox"]):focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.field input:not([type="checkbox"])[aria-invalid="true"]:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 138, 122, .16); }
.field-hint { color: var(--ash); font-size: 13.5px; }
.field-error { color: var(--danger); font-size: 13.5px; }
.acct-link, .acct-switch a { color: var(--gold-hi); font-weight: 400; text-decoration: underline; text-decoration-color: rgba(240, 207, 127, .4); text-underline-offset: 3px; }
.acct-link:hover, .acct-switch a:hover { text-decoration-color: currentColor; }

.pw { position: relative; }
.field .pw input { padding-right: 80px; }
.pw-toggle { position: absolute; top: 6px; right: 6px; height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--mist); font: 500 14px/1 var(--body); cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.pw-toggle:hover { color: var(--white); background: var(--raised); }

.check { display: flex; align-items: flex-start; gap: 12px; color: var(--mist); font-size: 15px; cursor: pointer; }
.check-box { position: relative; flex: none; width: 20px; height: 20px; margin-top: 2px; }
.check input { display: block; width: 20px; height: 20px; margin: 0; -webkit-appearance: none; appearance: none; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--graphite); cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.check input:hover { border-color: #5a5a61; }
.check input:checked { border-color: var(--gold); background: linear-gradient(180deg, #e3bc66, var(--gold)); }
.check input[aria-invalid="true"] { border-color: var(--danger); }
.check-box svg { position: absolute; inset: 0; width: 20px; height: 20px; pointer-events: none; }
.check-box path { fill: none; stroke: var(--gold-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.check input:checked + svg path { opacity: 1; }

/* Remember me + Forgot password, one row */
.acct-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.acct-row .check-box { margin-top: 0; }
.acct-row .check { align-items: center; }
.acct-link { font-size: 15px; }
button.acct-link { padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
.acct-forgot { padding: 14px 16px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--ink-2); color: var(--mist); font-size: 14.5px; animation: acct-rise .45s var(--ease-out) backwards; }
.acct-forgot b { color: var(--white); font-weight: 500; }

/* Sign-up done */
.acct-done { margin-top: 32px; display: grid; gap: 18px; padding: 26px; border: 1px solid rgba(95, 211, 154, .3); border-radius: 18px;
  background: radial-gradient(420px 180px at 0% 0%, rgba(95, 211, 154, .1), transparent 70%), var(--graphite); animation: acct-rise .6s var(--ease-out) backwards; }
.acct-done:focus { outline: none; }
.acct-done-lead { color: var(--mist); font-size: 18px; }
.acct-done-lead b { color: var(--white); font-weight: 500; }

.acct-submit { width: 100%; margin-top: 6px; }
.acct-switch { color: var(--ash); font-size: 15px; text-align: center; }

/* What happens after a valid submit, until an account system is connected */
.acct-status { margin-top: 24px; display: grid; gap: 14px; padding: 20px; border: 1px solid rgba(212, 168, 75, .25); border-radius: 14px; background: rgba(212, 168, 75, .06); color: var(--mist); font-size: 15.5px; }
.acct-status b { color: var(--white); font-weight: 500; }
.acct-status .btn { justify-self: start; }
.acct-status.is-error { border-color: rgba(255, 138, 122, .35); background: rgba(255, 138, 122, .07); }
.acct-status:focus { outline: none; }
/* Sign-up honeypot: invisible to people, filled in by bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Account illustration with a soft gold glow behind it */
.acct-art { position: relative; isolation: isolate; align-self: center; }
.acct-art::before { content: ""; position: absolute; z-index: -1; inset: -18% -14%; border-radius: 50%; background: radial-gradient(closest-side, rgba(212, 168, 75, .34), rgba(212, 168, 75, .16) 45%, rgba(212, 168, 75, .05) 75%, transparent); filter: blur(24px); pointer-events: none; }
.acct-art img { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 28px rgba(212, 168, 75, .32)); }

.acct-legal { padding-bottom: 40px; color: #6b6b72; font-size: 13px; }
.acct-legal p { max-width: 90ch; padding-top: 24px; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .acct-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .acct-main { max-width: 560px; }
  .acct-art { justify-self: center; width: min(360px, 100%); }
}
@media (max-width: 640px) {
  .acct-pair { grid-template-columns: minmax(0, 1fr); }
  .acct-sub { font-size: 16px; }
}

/* =========================================================================
   Motion. Each numbered block stands on its own: delete a block (and the matching block in account.js)
   to drop that effect. The site-wide prefers-reduced-motion rule in styles.css stills all of them.
   ========================================================================= */

/* ---- Motion 1: Entrance. Heading, subtitle and each field rise in one after another; the art settles in ----
   "backwards" holds them hidden until their turn, then lets go, so hover and press effects still work after. */
.acct-in { animation: acct-rise .8s var(--ease-out) calc(var(--d, 0) * 70ms + 60ms) backwards; }
.acct-art.acct-in { animation-name: acct-art-in; animation-duration: 1.3s; }
@keyframes acct-rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes acct-art-in { from { opacity: 0; transform: translateY(14px) scale(.92); } }

/* ---- Motion 2: Living illustration. It floats, tilts toward the cursor (account.js), the glow breathes,
   and a streak of light crosses the gold every few seconds ---- */
.acct-art-tilt { transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 1.2s var(--ease-out); }
.acct-art-float { position: relative; animation: acct-float 8s ease-in-out infinite; }
@keyframes acct-float { 0%, 100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-5px) rotate(-.25deg); } }
.acct-art::before { animation: acct-breathe 6s ease-in-out infinite; }
@keyframes acct-breathe { 0%, 100% { opacity: .7; transform: scale(.95); } 50% { opacity: 1; transform: scale(1.05); } }
.acct-art-sweep { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(110deg, transparent 40%, rgba(255, 236, 196, .55) 50%, transparent 60%) no-repeat 150% 0 / 300% 100%;
  -webkit-mask: url("assets/brand/account-art.webp") center / 100% 100% no-repeat; mask: url("assets/brand/account-art.webp") center / 100% 100% no-repeat;
  animation: acct-sweep 6.5s ease-in-out 1.8s infinite; }
@keyframes acct-sweep { 0% { background-position: 150% 0; } 24%, 100% { background-position: -50% 0; } }

/* ---- Motion 3: Form feedback. A gold tick draws in when a field is right, a wrong field shakes,
   and checkboxes draw their tick ---- */
.inp { position: relative; }
.field .inp input { padding-right: 46px; }
.field-ok { position: absolute; top: 50%; right: 14px; width: 20px; height: 20px; margin-top: -10px; color: var(--gold); pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .25s ease, transform .4s var(--ease-out); }
.field-ok path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 15; stroke-dashoffset: 15; transition: stroke-dashoffset .45s var(--ease-out) .05s; }
.inp.is-valid .field-ok { opacity: 1; transform: none; }
.inp.is-valid .field-ok path { stroke-dashoffset: 0; }
.is-shaking { animation: acct-shake .45s cubic-bezier(.36, .07, .19, .97); }
@keyframes acct-shake { 15%, 85% { transform: translateX(-2px); } 30%, 70% { transform: translateX(4px); } 45% { transform: translateX(-6px); } 60% { transform: translateX(6px); } }
.check-box path { opacity: 1; stroke-dasharray: 15; stroke-dashoffset: 15; transition: stroke-dashoffset .3s var(--ease-out); }
.check input:checked + svg path { stroke-dashoffset: 0; transition-delay: .06s; }
.check input:checked { animation: acct-pop .32s var(--ease-out); }
@keyframes acct-pop { 50% { transform: scale(1.14); } }

/* ---- Motion 4: Buttons and result. Gold buttons lean toward the cursor (account.js), submit shows a spinner,
   then the result note slides in ---- */
.acct .btn-gold { translate: var(--tx, 0px) var(--ty, 0px); transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, box-shadow .3s ease, translate .45s cubic-bezier(.2, .8, .2, 1); }
.acct-submit.is-busy { color: transparent; pointer-events: none; }
.btn-spin { position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border: 2.5px solid rgba(26, 20, 5, .25); border-top-color: var(--gold-ink); border-radius: 50%; animation: acct-spin .7s linear infinite; }
@keyframes acct-spin { to { transform: rotate(360deg); } }
.acct-status.is-in { animation: acct-note-in .6s var(--ease-out) backwards; }
@keyframes acct-note-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }

/* ---- Motion 5: Page transitions (switched on in styles.css). The illustration holds its place when you
   move between log in and sign up, and skips its entrance there (head script adds .from-acct) ---- */
.acct-art { view-transition-name: acct-art; }
::view-transition-group(acct-art) { animation-duration: .5s; }
.from-acct .acct-art.acct-in { animation: none; }

/* ---- Motion 6: Headline reveal. Words lift in, then a gold underline draws under the key word,
   the same as the homepage section headings ---- */
.acct-h1 .w { position: relative; display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .16em; margin-bottom: -.16em; }
.acct-h1 .wi { display: inline-block; animation: acct-word .9s var(--ease-out) calc(var(--k, 0) * 70ms + 60ms) backwards; }
@keyframes acct-word { from { transform: translateY(110%); } }
.acct-h1 .key::after { content: ""; position: absolute; left: 0; right: 0; bottom: .07em; height: .075em; border-radius: 2px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi) 55%, var(--gold)); transform-origin: left; animation: acct-underline .8s var(--ease-out) calc(var(--k, 0) * 70ms + .6s) backwards; }
@keyframes acct-underline { from { transform: scaleX(0); } }

/* ---- Motion 7: Incoming-call ripples. Soft gold rings pulse out from behind the illustration every few
   seconds (account.js adds the three rings) ---- */
.acct-ring { position: absolute; z-index: -1; top: 50%; left: 50%; width: 62%; aspect-ratio: 1; margin: -31% 0 0 -31%; border: 1.5px solid rgba(240, 207, 127, .5); border-radius: 50%; opacity: 0; pointer-events: none; animation: acct-ring 6s cubic-bezier(.2, .7, .3, 1) 2.2s infinite; }
.acct-ring:nth-child(2) { animation-delay: 2.65s; }
.acct-ring:nth-child(3) { animation-delay: 3.1s; }
@keyframes acct-ring { 0% { transform: scale(.55); opacity: 0; } 6% { opacity: .45; } 45%, 100% { transform: scale(1.7); opacity: 0; } }

/* ---- Motion 8: Success sparks. A good submit throws gold sparks off the button (account.js) ---- */
.acct-burst { position: fixed; z-index: 60; width: 0; height: 0; pointer-events: none; }
.acct-burst i { position: absolute; top: -3px; left: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 8px rgba(240, 207, 127, .85); animation: acct-spark .85s cubic-bezier(.15, .7, .3, 1) both; }
@keyframes acct-spark { from { transform: translate(0, 0) scale(1); opacity: 1; } to { transform: translate(var(--x), var(--y)) scale(.2); opacity: 0; } }
