/* ==========================================================================
   Nuvii — accounts.

   The sign-in sheet, the payment prompt, and the client portal. Uses the
   marketing site's palette, serif and easing curves so signing in never feels
   like leaving the studio and entering a SaaS product.
   ========================================================================== */

:root {
  --a-bg: #ece5d8;
  --a-bg2: #f4efe6;
  --a-paper: #f8f4ec;
  --a-ink: #17120c;
  --a-ink2: #5f574a;
  --a-ink3: #948a79;
  --a-accent: #c2461c;
  --a-gold: #b28a4e;
  --a-good: #2f6b4f;
  --a-line: rgba(23, 18, 12, 0.14);
  --a-line2: rgba(23, 18, 12, 0.07);
  --a-sans: "Inter Tight", system-ui, sans-serif;
  --a-serif: "Fraunces", Georgia, serif;
  --a-mono: "DM Mono", ui-monospace, monospace;
  --a-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   The coin — Nuvii's account surface.

   A circular card with two faces that spins on its vertical axis. It opens on
   a question, and the answer decides which face it turns to. Every later
   change of view is another half-turn in the SAME direction, so it reads as
   one physical object rather than two panels being swapped.

   Sequence, driven by classes from account-ui.js:
     .is-clearing  the visible face empties
     .is-thinking  the ring takes over the middle
     .is-drawing   the ring draws its arc
     (transform)   the coin turns; content is already on the far face
   ========================================================================== */

.orb {
  position: fixed;
  inset: 0;
  z-index: 9500;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.8rem, 3vw, 2rem);
  visibility: hidden;
  pointer-events: none;
}
.orb.is-open { visibility: visible; pointer-events: auto; }

.orb__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, rgba(23, 18, 12, 0.4), rgba(23, 18, 12, 0.66));
  backdrop-filter: blur(8px) saturate(0.9);
  opacity: 0;
  transition: opacity 0.7s var(--a-ease);
}
.orb.is-open .orb__veil { opacity: 1; }

/* ---------------------------------------------------------------- stage */

.orb__stage {
  position: relative;
  flex: 0 0 auto;
  margin: auto;
  width: min(92vw, 86vh, 500px);
  height: min(92vw, 86vh, 500px);
  perspective: 1600px;
  perspective-origin: 50% 45%;
}

.orb__x {
  position: absolute;
  top: 2px;
  right: 10px;
  z-index: 6;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(236, 229, 216, 0.28);
  border-radius: 50%;
  background: rgba(23, 18, 12, 0.34);
  color: rgba(236, 229, 216, 0.85);
  cursor: pointer;
  padding: 0;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.5s var(--a-ease) 0.5s, transform 0.6s var(--a-ease) 0.5s,
              background 0.3s var(--a-ease), color 0.3s var(--a-ease);
}
.orb.is-open .orb__x { opacity: 1; transform: none; }
.orb__x:hover {
  background: var(--a-accent);
  color: #fff;
  border-color: var(--a-accent);
  transform: rotate(90deg);
}

/* ---------------------------------------------------------------- coin */

.orb__coin {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(0deg);
  /* the turn itself: slow to leave, decisive through the middle, soft to land */
  transition: transform 0.95s cubic-bezier(0.66, 0, 0.24, 1);
}

/* arrival — the coin drops in and settles level */
.orb__stage { opacity: 0; transform: translateY(38px) scale(0.82) rotateX(-16deg); }
.orb.is-open .orb__stage {
  opacity: 1;
  transform: none;
  transition: opacity 0.75s var(--a-ease), transform 1.05s var(--a-ease);
}

.orb__face {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;

  display: grid;
  place-items: center;
  text-align: center;

  background:
    radial-gradient(ellipse at 50% 8%, rgba(255, 255, 255, 0.75), transparent 62%),
    var(--a-paper);
  border: 1px solid var(--a-line);
  box-shadow:
    0 50px 100px rgba(23, 18, 12, 0.34),
    0 2px 0 rgba(255, 255, 255, 0.5) inset,
    0 -22px 44px rgba(23, 18, 12, 0.05) inset;
}
.orb__face--b { transform: rotateY(180deg); }

/* a gold rim, so the edge reads as a struck coin rather than a div */
.orb__face::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  border: 1px solid rgba(178, 138, 78, 0.32);
  pointer-events: none;
}
/* and the studio's travelling light across the face */
.orb__face::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 32%, rgba(255, 255, 255, 0.6) 48%, transparent 64%);
  transform: translateX(-140%);
}
.orb.is-open .orb__face::after { animation: orbSweep 1.7s var(--a-ease) 0.35s both; }
@keyframes orbSweep { to { transform: translateX(140%); } }

/* ---------------------------------------------------------------- content */

.orb__in {
  width: 68%;
  max-height: 74%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  transition: opacity 0.26s ease, transform 0.32s var(--a-ease), filter 0.3s ease;
}
/* the outgoing face empties before the ring appears */
.orb.is-clearing .orb__in {
  opacity: 0;
  transform: scale(0.94);
  filter: blur(2px);
}

.orb__eyebrow {
  font: 400 0.62rem/1 var(--a-sans);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--a-ink3);
}
.orb__ask, .orb__title {
  font: 400 clamp(1.35rem, 4.6vw, 1.95rem)/1.12 var(--a-serif);
  letter-spacing: -0.025em;
  color: var(--a-ink);
  margin: 0.15rem 0 0;
}
.orb__sub {
  font: 400 0.83rem/1.55 var(--a-sans);
  color: var(--a-ink2);
  margin: 0.25rem 0 0.5rem;
  max-width: 30ch;
}

/* ---- the two choices ---- */

.orb__choices { display: grid; gap: 0.5rem; width: 100%; margin-top: 0.2rem; }

.orb__choice {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--a-line);
  border-radius: 100px;
  background: var(--a-bg2);
  cursor: pointer;
  font-family: var(--a-sans);
  transition: border-color 0.45s var(--a-ease), background 0.45s var(--a-ease),
              transform 0.45s var(--a-ease), color 0.45s var(--a-ease);
}
.orb__choice span { font-size: 0.92rem; font-weight: 500; color: var(--a-ink); position: relative; z-index: 1; }
.orb__choice em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--a-ink3);
  position: relative;
  z-index: 1;
  transition: color 0.45s var(--a-ease);
}
.orb__choice::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 36%, rgba(255, 255, 255, 0.5) 50%, transparent 64%);
  transform: translateX(-140%);
  transition: transform 0.9s var(--a-ease);
}
.orb__choice:hover { transform: translateY(-2px); border-color: rgba(178, 138, 78, 0.7); }
.orb__choice:hover::after { transform: translateX(140%); }

.orb__choice--primary { background: var(--a-ink); border-color: var(--a-ink); }
.orb__choice--primary span { color: var(--a-bg2); }
.orb__choice--primary em { color: rgba(244, 239, 230, 0.6); }
.orb__choice--primary:hover { background: var(--a-accent); border-color: var(--a-accent); }

.orb__why {
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
  margin: 0.6rem 0 0;
  font: 400 0.71rem/1.5 var(--a-sans);
  color: var(--a-ink3);
  text-align: left;
}
.orb__why svg { flex: none; margin-top: 0.15rem; color: var(--a-gold); }

/* ---- forms ---- */

.orb__form { display: grid; gap: 0.45rem; width: 100%; margin-top: 0.35rem; }
.orb__l { display: grid; gap: 0.2rem; text-align: left; }
.orb__l > span {
  font: 400 0.62rem/1 var(--a-sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--a-ink2);
}
.orb__i {
  width: 100%;
  font: 400 0.88rem/1.3 var(--a-sans);
  color: var(--a-ink);
  background: var(--a-bg2);
  border: 1px solid var(--a-line);
  border-radius: 100px;
  padding: 0.6rem 0.9rem;
  transition: border-color 0.3s var(--a-ease), box-shadow 0.3s var(--a-ease), background 0.3s var(--a-ease);
}
.orb__i:focus {
  outline: none;
  border-color: var(--a-accent);
  background: var(--a-paper);
  box-shadow: 0 0 0 3px rgba(194, 70, 28, 0.11);
}

.orb__go {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: 0.3rem;
  font: 500 0.9rem/1 var(--a-sans);
  padding: 0.82rem 1rem;
  background: var(--a-ink);
  color: var(--a-bg2);
  border: 1px solid var(--a-ink);
  border-radius: 100px;
  cursor: pointer;
  transition: background 0.4s var(--a-ease), transform 0.4s var(--a-ease);
}
.orb__go:hover:not(:disabled) { background: var(--a-accent); border-color: var(--a-accent); transform: translateY(-1px); }
.orb__go:disabled { opacity: 0.6; cursor: default; }

.orb__google {
  width: 100%;
  margin-top: 0.45rem;
  font: 500 0.82rem/1 var(--a-sans);
  padding: 0.68rem 1rem;
  background: var(--a-paper);
  border: 1px solid var(--a-line);
  border-radius: 100px;
  cursor: pointer;
}

.orb__foot {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  margin-top: 0.7rem;
  width: 100%;
}
.orb__swap, .orb__forgot {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font: 400 0.76rem/1.4 var(--a-sans);
  color: var(--a-ink2);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s var(--a-ease);
}
.orb__forgot { color: var(--a-ink3); font-size: 0.72rem; }
.orb__swap:hover, .orb__forgot:hover { color: var(--a-accent); }

.orb__msg {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  font: 400 0.74rem/1.5 var(--a-sans);
  border: 1px solid;
  text-align: left;
  color: var(--a-accent);
  background: rgba(194, 70, 28, 0.07);
  border-color: rgba(194, 70, 28, 0.3);
}
.orb__msg--ok { color: var(--a-good); background: rgba(47, 107, 79, 0.08); border-color: rgba(47, 107, 79, 0.3); }
.orb__msg[hidden] { display: none; }
.orb__resend {
  border: 0; background: none; padding: 0;
  color: inherit; font: inherit; text-decoration: underline; cursor: pointer;
}

/* ---------------------------------------------------------------- the ring

   Sits above both faces while the coin turns. The arc draws itself once, which
   is what makes the pause feel like preparation rather than lag. */

.orb__think {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.orb.is-thinking .orb__think { opacity: 1; }

.orb__ring {
  position: absolute;
  width: 46%;
  height: 46%;
  transform: rotate(-90deg);
}
.orb__ring circle { fill: none; stroke-width: 1.6; stroke-linecap: round; }
.orb__ringTrack { stroke: rgba(23, 18, 12, 0.09); }
.orb__ringArc {
  stroke: var(--a-accent);
  stroke-dasharray: 339;
  stroke-dashoffset: 339;
  transition: stroke-dashoffset 0.7s var(--a-ease);
}
.orb.is-drawing .orb__ringArc { stroke-dashoffset: 42; }

.orb__thinkT {
  position: relative;
  font: 400 0.66rem/1 var(--a-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--a-ink3);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.4s ease 0.12s, transform 0.5s var(--a-ease) 0.12s;
}
.orb.is-thinking .orb__thinkT { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- small screens

   Below roughly 380px a circle genuinely cannot hold a three-field form at a
   legible size. Rather than shrink the type past readability, the coin relaxes
   into a very round squircle — it still turns identically, and the geometry is
   the only thing that gives. */

@media (max-width: 400px), (max-height: 560px) {
  .orb__stage {
    width: min(94vw, 420px);
    height: auto;
    aspect-ratio: auto;
    min-height: min(94vw, 420px);
  }
  .orb__face {
    position: relative;
    border-radius: 44px;
    padding: 2.4rem 1.2rem;
    min-height: min(94vw, 420px);
  }
  .orb__face--b { position: absolute; inset: 0; }
  .orb__face::before { inset: 8px; border-radius: 38px; }
  .orb__in { width: 88%; max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  .orb__coin { transition: none; }
  .orb__stage, .orb.is-open .orb__stage { transition: none; opacity: 1; transform: none; }
  .orb.is-open .orb__face::after { animation: none; }
  .orb__in { transition: none; }
  .orb__ringArc { transition: none; }
}

/* ==========================================================================
   Payment prompt

   Bottom-right on desktop, full width on mobile. Deliberately not a modal: it
   must be impossible to miss and equally possible to dismiss. Urgency is
   carried by a drawn edge and a breathing dot, never by shouting.
   ========================================================================== */

.npop {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.8rem);
  bottom: clamp(1rem, 2.5vw, 1.8rem);
  z-index: 8800;
  width: min(378px, calc(100vw - 2rem));
  background: var(--a-paper);
  border: 1px solid var(--a-line);
  border-radius: 16px;
  padding: 1.3rem 1.35rem 1.35rem;
  overflow: hidden;
  box-shadow: 0 26px 60px rgba(23, 18, 12, 0.2), 0 2px 8px rgba(23, 18, 12, 0.07);
  opacity: 0;
  transform: translateY(22px) scale(0.97);
  transition: opacity 0.65s var(--a-ease), transform 0.8s var(--a-ease);
}
.npop.is-in { opacity: 1; transform: none; }

/* The exit. A separate class rather than simply dropping .is-in, so the
   removal can key off transitionend and never guess a duration. */
.npop.is-out {
  opacity: 0;
  transform: translateY(10px) scale(0.985);
  transition: opacity 0.4s var(--a-ease), transform 0.45s var(--a-ease);
  pointer-events: none;
}

/* the drawn edge — urgency lives here */
.npop__edge {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--a-ink3);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.9s var(--a-ease) 0.15s;
}
.npop.is-in .npop__edge { transform: scaleY(1); }
.npop--l1 .npop__edge { background: var(--a-gold); }
.npop--l2 .npop__edge { background: var(--a-accent); }
.npop--l3 .npop__edge {
  background: linear-gradient(180deg, var(--a-accent), var(--a-gold), var(--a-accent));
}

/* one light pass on arrival, matching the sign-in sheet */
.npop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 33%, rgba(255, 255, 255, 0.5) 49%, transparent 65%);
  transform: translateX(-135%);
}
.npop.is-in::after { animation: npopSweep 1.4s var(--a-ease) 0.3s both; }
@keyframes npopSweep { to { transform: translateX(135%); } }

.npop__x {
  position: absolute;
  top: 0.75rem;
  right: 0.8rem;
  z-index: 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: none;
  color: var(--a-ink3);
  cursor: pointer;
  padding: 0;
  transition: color 0.35s var(--a-ease), border-color 0.35s var(--a-ease),
              background 0.35s var(--a-ease), transform 0.35s var(--a-ease);
}
.npop__x:hover {
  color: var(--a-accent);
  border-color: rgba(194, 70, 28, 0.3);
  background: rgba(194, 70, 28, 0.07);
  transform: rotate(90deg);
}

.npop__k {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: 400 0.64rem/1 var(--a-sans);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--a-ink3);
  position: relative;
  z-index: 1;
}
.npop--l2 .npop__k, .npop--l3 .npop__k { color: var(--a-accent); }

.npop__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.npop--l2 .npop__dot, .npop--l3 .npop__dot { animation: npopDot 2.4s var(--a-ease) infinite; }
@keyframes npopDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 70, 28, 0.4); }
  60%      { box-shadow: 0 0 0 7px rgba(194, 70, 28, 0); }
}
.npop--l0 .npop__dot { background: var(--a-good); }

.npop__t {
  position: relative;
  z-index: 1;
  font: 400 1.18rem/1.28 var(--a-serif);
  letter-spacing: -0.015em;
  margin: 0.65rem 0 0.45rem;
  color: var(--a-ink);
}
.npop__b {
  position: relative;
  z-index: 1;
  margin: 0;
  font: 400 0.855rem/1.62 var(--a-sans);
  color: var(--a-ink2);
}
.npop__u {
  position: relative;
  z-index: 1;
  margin: 0.75rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px solid var(--a-line2);
  font: 400 0.74rem/1.55 var(--a-mono);
  color: var(--a-accent);
  letter-spacing: 0.02em;
}

.npop__acts {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1.15rem;
  flex-wrap: wrap;
}
.npop__go {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  font: 500 0.86rem/1 var(--a-sans);
  padding: 0.8rem 1.2rem;
  background: var(--a-ink);
  color: var(--a-bg2);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.45s var(--a-ease), transform 0.45s var(--a-ease);
}
.npop__go span { position: relative; z-index: 1; }
.npop__go::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 36%, rgba(244, 239, 230, 0.26) 50%, transparent 64%);
  transform: translateX(-135%);
  transition: transform 0.9s var(--a-ease);
}
.npop__go:hover { background: var(--a-accent); transform: translateY(-1px); }
.npop__go:hover::after { transform: translateX(135%); }
.npop--l0 .npop__go { background: var(--a-good); }
.npop--l0 .npop__go:hover { background: #26583f; }

.npop__alt {
  font: 400 0.82rem/1 var(--a-sans);
  color: var(--a-ink2);
  text-decoration: none;
  border-bottom: 1px solid var(--a-line);
  padding-bottom: 2px;
  transition: color 0.35s var(--a-ease), border-color 0.35s var(--a-ease);
}
.npop__alt:hover { color: var(--a-accent); border-color: var(--a-accent); }

/* Keep clear of the WhatsApp buttons that live in the same corner. */
@media (min-width: 700px) {
  .npop { bottom: calc(clamp(1rem, 2.5vw, 1.8rem) + 74px); }
}
@media (max-width: 699px) {
  .npop { left: clamp(0.7rem, 3vw, 1rem); right: clamp(0.7rem, 3vw, 1rem); width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .npop { transition: none; }
  .npop.is-in::after, .npop__dot, .npop__go::after { animation: none; }
  .npop__edge { transform: scaleY(1) !important; transition: none; }
  .npop__x:hover { transform: none; }
}

/* ==========================================================================
   Floating account dial

   Bottom-LEFT, because WhatsApp and the consultation CTA already own the
   bottom-right. It is lifted 78px so it clears the voice widget, which lives
   in this corner too.

   Collapsed: a 50px circle. Hovered: it grows a label to the right. Small
   enough to ignore while reading, findable the moment it is wanted.
   ========================================================================== */

.dial {
  position: fixed;
  left: clamp(1rem, 2.5vw, 1.8rem);
  bottom: calc(clamp(1rem, 2.5vw, 1.8rem) + 78px);
  z-index: 8600;

  display: inline-flex;
  align-items: center;
  height: 50px;
  padding: 0;
  border: 1px solid var(--a-line);
  border-radius: 100px;
  background: rgba(248, 244, 236, 0.9);
  backdrop-filter: blur(12px);
  color: var(--a-ink);
  font-family: var(--a-sans);
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(23, 18, 12, 0.12);

  opacity: 0;
  transform: translateY(14px) scale(0.9);
  pointer-events: none;
  transition:
    opacity 0.7s var(--a-ease),
    transform 0.8s var(--a-ease),
    border-color 0.6s var(--a-ease),
    box-shadow 0.6s var(--a-ease),
    background 0.6s var(--a-ease);
}
.dial.is-shown { opacity: 1; transform: none; pointer-events: auto; }
/* Belt and braces: if the opacity transition never advances — a throttled or
   non-compositing tab — this lands it regardless. */
.dial.is-shown { animation: dialLand 0s linear 1.2s forwards; }
@keyframes dialLand { to { opacity: 1; transform: none; } }

.dial:hover {
  border-color: rgba(178, 138, 78, 0.7);
  background: var(--a-paper);
  box-shadow: 0 16px 40px rgba(23, 18, 12, 0.17);
}
.dial:active { transform: scale(0.97); }

/* the icon well — fixed 50px so the circle stays a circle when collapsed */
.dial__ico {
  position: relative;
  z-index: 2;
  width: 50px;
  height: 50px;
  flex: none;
  display: grid;
  place-items: center;
  color: var(--a-ink2);
  transition: color 0.6s var(--a-ease), transform 0.7s var(--a-ease);
}
.dial:hover .dial__ico { color: var(--a-accent); transform: scale(1.06); }

/* a ring that slowly turns — the only thing on screen implying "live" */
.dial__ring {
  position: absolute;
  left: 5px;
  top: 5px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid transparent;
  border-top-color: rgba(178, 138, 78, 0.55);
  border-right-color: rgba(194, 70, 28, 0.3);
  opacity: 0;
  transition: opacity 0.6s var(--a-ease);
  animation: dialSpin 5.5s linear infinite;
  pointer-events: none;
}
.dial:hover .dial__ring,
.dial.is-in .dial__ring { opacity: 1; }
@keyframes dialSpin { to { transform: rotate(360deg); } }

/* label grows out to the right */
.dial__label {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 0fr;
  transition: grid-template-columns 0.7s var(--a-ease), padding 0.7s var(--a-ease);
  padding-right: 0;
  font-size: 0.86rem;
  white-space: nowrap;
}
.dial__label > span { overflow: hidden; min-width: 0; }
.dial:hover .dial__label,
.dial:focus-visible .dial__label {
  grid-template-columns: 1fr;
  padding-right: 1.15rem;
}

/* status dot: gold and breathing once signed in */
.dial__dot {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 3;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--a-ink3);
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.5s var(--a-ease), transform 0.5s var(--a-ease), background 0.5s var(--a-ease);
}
.dial.is-in .dial__dot {
  opacity: 1;
  transform: none;
  background: var(--a-gold);
  animation: dialDot 3.2s var(--a-ease) infinite;
}
/* the dot sits over the icon when collapsed, so it steps aside on hover */
.dial:hover .dial__dot { top: 9px; right: auto; left: 31px; }
@keyframes dialDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(178, 138, 78, 0.45); }
  60%      { box-shadow: 0 0 0 7px rgba(178, 138, 78, 0); }
}

/* never fight the open menu or the sign-in sheet */
body.menu-open .dial,
body.auth-open .dial { opacity: 0; pointer-events: none; }

@media (max-width: 600px) {
  .dial { bottom: calc(clamp(1rem, 2.5vw, 1.8rem) + 70px); height: 46px; }
  .dial__ico { width: 46px; height: 46px; }
  .dial__ring { left: 4px; top: 4px; width: 36px; height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .dial__ring, .dial.is-in .dial__dot { animation: none; }
  .dial { transition: opacity 0.3s linear; transform: none; }
  .dial.is-shown { transform: none; }
}

/* ==========================================================================
   Account preloader

   The portal has real work to do on open — restore the session, fetch
   invoices, notifications and the profile. Rather than showing a blank card
   while that happens, the steps are named as they complete. It is the same
   idea as the payment page: describe what is genuinely happening, and the
   wait reads as competence instead of lag.
   ========================================================================== */

.pload {
  position: fixed;
  inset: 0;
  z-index: 9200;
  /* If portal.js never runs, this hides the overlay anyway at 5s. A preloader
     that can strand someone in front of their own invoices is worse than none. */
  animation: ploadFailsafe 0s linear 5s forwards;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.6rem;
  background: var(--a-bg);
  transition: opacity 0.7s var(--a-ease), transform 0.8s var(--a-ease), visibility 0s linear 0.8s;
}
@keyframes ploadFailsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.pload.is-out {
  animation: none;
  opacity: 0;
  transform: scale(1.015);
  visibility: hidden;
  pointer-events: none;
}

.pload__mark {
  font-family: var(--a-sans);
  font-weight: 600;
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  color: transparent;
  background-image: linear-gradient(
    100deg,
    #17120c 0%, #17120c 38%,
    #c2461c 47%, #b28a4e 53%,
    #17120c 62%, #17120c 100%
  );
  background-size: 280% 100%;
  background-position: 130% 0;
  -webkit-background-clip: text;
  background-clip: text;
  animation: ploadPass 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes ploadPass { to { background-position: -130% 0; } }

/* an arc that closes as the steps complete — real progress, not a spinner */
.pload__arc { width: 46px; height: 46px; transform: rotate(-90deg); }
.pload__arc circle {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.pload__arc .pload__track { stroke: rgba(23, 18, 12, 0.1); }
.pload__arc .pload__fill {
  stroke: var(--a-accent);
  stroke-dasharray: 132;
  stroke-dashoffset: 132;
  transition: stroke-dashoffset 0.8s var(--a-ease);
}

.pload__steps {
  position: relative;
  height: 1.15rem;
  min-width: min(300px, 80vw);
  text-align: center;
}
.pload__step {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--a-mono);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--a-ink3);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.45s ease, transform 0.45s var(--a-ease);
}
.pload__step.is-on { opacity: 1; transform: none; }
.pload__step.is-done { opacity: 0; transform: translateY(-5px); }

.pload__seal {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--a-sans);
  font-size: 0.74rem;
  color: var(--a-ink3);
  opacity: 0;
  animation: ploadSeal 0.8s ease 1.1s forwards;
}
@keyframes ploadSeal { to { opacity: 1; } }
.pload__seal i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--a-good);
  animation: ploadBeat 2s ease-in-out infinite;
}
@keyframes ploadBeat { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (prefers-reduced-motion: reduce) {
  .pload__mark { animation: none; color: var(--a-ink); -webkit-text-fill-color: currentColor; }
  .pload__seal i { animation: none; }
  .pload { transition: opacity 0.25s linear, visibility 0s linear 0.25s; }
}
