/* ==========================================================================
   Registration (AI-1912): the step on the app's backdrop with room around it, and the
   theatre next to it (SignUpLayout, SignUpTheatre), from signing up to "is this your business?".
   ========================================================================== */

.signup {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    min-height: 100dvh;
}

/* The page background is a fixed layer behind everything, as in the app shell. */
.signup::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--page-bg);
}

.signup__side {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 28px 40px;
}

.signup__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.signup__brand {
    display: inline-flex;
}

.signup__brand img {
    height: 26px;
    width: auto;
}

/* The top corner: the language of the registration, and on the start "already have an account?". */
.signup__top-end {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 12px;
}

.signup__language .ui-menu__panel {
    min-width: 180px;
}

.signup__have {
    color: var(--ui-text-2);
    font-size: 0.8125rem;
    text-decoration: none;
}

.signup__have b {
    color: var(--ui-text);
    font-weight: 600;
}

.signup__have:hover b {
    color: var(--ui-accent);
}

.signup__main {
    flex: 1;
    display: grid;
    align-content: center;
    padding: 48px 0;
}

.signup__body {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.signup__foot {
    color: var(--ui-text-3);
    font-size: 0.75rem;
}

/* The start: a small label, a headline with presence, one line under it. */
.signup__intro {
    gap: 12px;
    margin-bottom: 8px;
}

.signup__eyebrow {
    color: var(--ui-accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.signup__headline {
    font: 600 2.5rem/1.05 var(--ui-font-display);
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.signup__sso {
    height: 48px;
    font-weight: 500;
}

/* The address with its button inside the field. */
.signup__mail {
    display: grid;
    gap: 8px;
}

.signup__mail-box {
    position: relative;
}

.signup__mail-box .ui-field__control {
    min-height: 48px;
    padding-right: 140px;
}

.signup__send {
    position: absolute;
    right: 5px;
    bottom: 5px;
    height: 38px;
}

.signup__hint {
    color: var(--ui-text-3);
    font-size: 0.75rem;
}
.signup__stack {
    display: grid;
    gap: 10px;
}

.signup__actions {
    margin-top: 4px;
}

.signup__title {
    font: 650 1.375rem/1.25 var(--ui-font-display);
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.signup__lead {
    color: var(--ui-text-2);
    font-size: 0.875rem;
    line-height: 1.55;
}

.signup__waiting {
    justify-items: center;
    padding: 32px 0;
    text-align: center;
}

/* The company as aishaa read it: a well inside the card. */
.reg-site {
    display: grid;
    gap: 12px;
    padding: 14px;
    border-radius: var(--ui-radius);
    background: var(--ui-glass-thin);
}

.reg-site__top {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.reg-site__mark {
    display: grid;
    flex: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--ui-accent) 14%, transparent);
    color: var(--ui-accent);
    font-weight: 700;
}

.reg-site__names {
    min-width: 0;
}

.reg-site__name {
    font-size: 0.9375rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.reg-site__where {
    color: var(--ui-text-2);
    font-size: 0.8125rem;
}

.reg-site__says {
    color: var(--ui-text-2);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.reg-site__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* The start: Google and Microsoft with their own marks, then the address. */
.signup__sso-logo {
    flex: none;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    vertical-align: -3px;
}

.signup__or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ui-text-3);
    font-size: 0.75rem;
}

.signup__or::before,
.signup__or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ui-divider);
}

.signup__fine {
    display: grid;
    gap: 6px;
    color: var(--ui-text-3);
    font-size: 0.75rem;
    line-height: 1.5;
}

p.signup__fine {
    display: block;
}

.signup__fine a {
    color: var(--ui-text-2);
    text-underline-offset: 3px;
}

/* ==========================================================================
   The theatre: dark in both appearances, one light source, one scene at a time.
   ========================================================================== */

.signup-theatre {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: 1fr auto;
    margin: 12px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--night-bg);
    color: var(--night-text-1);
    color-scheme: dark;
}

.signup-theatre::before {
    content: "";
    position: absolute;
    z-index: -1;
    left: -260px;
    bottom: -560px;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    background: radial-gradient(closest-side,
        color-mix(in srgb, var(--night-violet) 38%, transparent),
        color-mix(in srgb, var(--night-rose) 12%, transparent) 55%,
        transparent 72%);
    animation: signup-breathe 9s ease-in-out infinite alternate;
}

.signup-theatre::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(var(--night-line-strong) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to top, black, transparent 70%);
}

@keyframes signup-breathe {
    to { transform: translate(60px, -30px) scale(1.06); opacity: 0.85; }
}

.signup-theatre__scene {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: 56px 48px 24px;
}

.signup-theatre__shot {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 520px;
}

/* All takes share one cell; only the one on stage shows. */
.signup-theatre__take {
    grid-area: 1 / 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 14px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s, visibility 0.4s;
}

.signup-theatre__take.is-on {
    opacity: 1;
    visibility: visible;
}

.signup-theatre__meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--night-text-3);
    font-size: 0.75rem;
}

.signup-theatre__meta time {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.signup-theatre__chan {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border: 1px solid var(--night-line-strong);
    border-radius: 999px;
    color: var(--night-text-2);
}

.signup-theatre__msg {
    padding: 16px 18px;
    border: 1px solid var(--night-line);
    border-radius: 16px;
    background: var(--night-surface);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.signup-theatre__from {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: var(--night-text-2);
    font-size: 0.8125rem;
}

.signup-theatre__from i {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--night-line-strong);
    font-size: 0.6875rem;
    font-style: normal;
    font-weight: 600;
}

.signup-theatre__think {
    display: grid;
    gap: 8px;
    margin-left: 12px;
    padding: 2px 4px 2px 18px;
    border-left: 1px solid var(--night-line-strong);
}

.signup-theatre__step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--night-text-3);
    font-size: 0.8125rem;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.35s, transform 0.35s, color 0.35s;
}

.signup-theatre__step.is-in {
    opacity: 1;
    transform: none;
}

.signup-theatre__step.is-done {
    color: var(--night-text-2);
}

.signup-theatre__step code {
    padding: 1px 6px;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    border-radius: 5px;
    background: var(--night-line);
    color: var(--night-text-1);
    font-size: 0.75rem;
}

.signup-theatre__tick {
    display: grid;
    place-items: center;
    flex: none;
    width: 16px;
    height: 16px;
    color: var(--night-ok);
}

.signup-theatre__tick > * {
    grid-area: 1 / 1;
}

.signup-theatre__spin {
    width: 12px;
    height: 12px;
    border: 1.5px solid var(--night-violet);
    border-right-color: transparent;
    border-radius: 50%;
    animation: signup-spin 0.7s linear infinite;
}

.signup-theatre__tick .ui-icon,
.signup-theatre__step.is-done .signup-theatre__spin {
    display: none;
}

.signup-theatre__step.is-done .signup-theatre__tick .ui-icon {
    display: inline-block;
}

@keyframes signup-spin {
    to { transform: rotate(360deg); }
}

.signup-theatre__answer {
    position: relative;
    padding: 18px;
    border: 1px solid transparent;
    border-radius: 16px;
    background:
        linear-gradient(var(--night-surface), var(--night-surface)) padding-box,
        linear-gradient(135deg,
            color-mix(in srgb, var(--night-violet) 70%, transparent),
            color-mix(in srgb, var(--night-rose) 45%, transparent) 50%,
            color-mix(in srgb, var(--night-amber) 35%, transparent)) border-box;
    box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--night-violet) 45%, transparent);
}

.signup-theatre__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--night-text-2);
    font-size: 0.8125rem;
}

.signup-theatre__mark {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--night-violet), var(--night-rose));
    color: var(--night-text-1);
}

.signup-theatre__tone {
    margin-left: auto;
    color: var(--night-text-3);
    font-size: 0.6875rem;
}

.signup-theatre__answer p {
    min-height: 4.8em;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.signup-theatre__answer p span {
    opacity: 0;
    transition: opacity 0.25s;
}

.signup-theatre__answer p span.is-in {
    opacity: 1;
}

.signup-theatre__bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--night-line);
    color: var(--night-text-3);
    font-size: 0.75rem;
}

.signup-theatre__bar [data-took] {
    opacity: 0;
    transition: opacity 0.3s;
}

.signup-theatre__bar [data-took].is-in {
    opacity: 1;
}

.signup-theatre__keys {
    display: inline-flex;
    gap: 6px;
    margin-left: auto;
}

.signup-theatre__keys b {
    padding: 6px 12px;
    border: 1px solid var(--night-line-strong);
    border-radius: 8px;
    background: var(--night-line);
    color: var(--night-text-1);
    font-weight: 600;
}

.signup-theatre__keys b.is-send {
    border-color: transparent;
    background: var(--night-text-1);
    color: var(--night-bg);
}

.signup-theatre__sent {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--night-bg) 72%, transparent);
    backdrop-filter: blur(4px);
    color: var(--night-ok);
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

.signup-theatre__sent.is-in {
    opacity: 1;
}

.signup-theatre__caption {
    display: grid;
    gap: 18px;
    padding: 0 48px 40px;
}

.signup-theatre__caption h2 {
    max-width: 24ch;
    font: 600 1.5rem/1.2 var(--ui-font-display);
    letter-spacing: -0.025em;
    text-wrap: balance;
}

.signup-theatre__caption em {
    font-style: normal;
    background: linear-gradient(90deg, var(--night-violet), var(--night-rose) 60%, var(--night-amber));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.signup-theatre__proof {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--night-line);
}

.signup-theatre__proof div {
    display: grid;
    align-content: start;
    gap: 4px;
    padding: 16px 16px 0 0;
}

.signup-theatre__proof div + div {
    padding-left: 16px;
    border-left: 1px solid var(--night-line);
}

.signup-theatre__proof b {
    font-size: 0.875rem;
    font-weight: 600;
}

.signup-theatre__proof span {
    color: var(--night-text-3);
    font-size: 0.75rem;
    line-height: 1.45;
}

/* Narrow: the step comes first; the theatre follows on the start page only. */
@media (max-width: 980px) {
    .signup {
        grid-template-columns: 1fr;
    }

    .signup__side {
        padding: 20px 16px;
    }

    .signup__main {
        padding: 40px 0 32px;
    }

    .signup-theatre {
        margin: 0 16px 16px;
    }

    .signup:not(:has(.signup__intro)) .signup-theatre {
        display: none;
    }

    .signup-theatre__scene {
        padding: 36px 20px 16px;
    }

    .signup-theatre__caption {
        padding: 0 20px 28px;
    }
}

@media (max-width: 520px) {
    .signup__headline {
        font-size: 2rem;
    }

    .signup-theatre__proof {
        grid-template-columns: 1fr;
    }

    .signup-theatre__proof div + div {
        padding: 12px 0 0;
        border-left: 0;
        border-top: 1px solid var(--night-line);
    }
}

@media (prefers-reduced-motion: reduce) {
    .signup-theatre::before,
    .signup-theatre__spin {
        animation: none;
    }

    .signup-theatre__take,
    .signup-theatre__step,
    .signup-theatre__answer p span,
    .signup-theatre__bar [data-took],
    .signup-theatre__sent {
        transition: none;
    }
}
