.beta {
    flex: 1 0 auto;
    width: 100vw;
    min-height: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: end;
    justify-content: center;
    padding: clamp(32px, 10vh, 96px) clamp(20px, 8vw, 64px);
    position: relative;
    overflow: hidden;
}

.beta::before {
    content: "";
    position: absolute;
    inset: 0;
    /* background: radial-gradient(60% 60% at 50% 42%, rgba(111, 224, 178, 0.24), transparent 75%), */
        /* radial-gradient(50% 50% at 20% 80%, rgba(68, 156, 248, 0.18), transparent 70%); */
    pointer-events: none;
}

.beta__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(24px, 6vw, 40px);
    width: 100%;
    max-width: min(720px, 92vw);
    padding: 0 clamp(16px, 5vw, 48px);
    z-index: 1;
}

.logo-stack {
    --logo-size: clamp(75px, 24vw, 120px);
    --heart-size: calc(var(--logo-size) * 0.55);
    --dot-size: clamp(8px, 2vw, 12px);
    --dot-travel: calc(var(--logo-size) * 0.5);
    position: relative;
    width: var(--logo-size);
    height: var(--logo-size);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    isolation: isolate;
    user-select: none;
}

.logo-stack__emitter {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
}

.logo-stack__recipe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--recipe-size, clamp(110px, 35vw, 260px));
    height: auto;
    opacity: 0;
    transform-origin: center;
    --tx: 0px;
    --ty: 0px;
    --scale: 0;
    transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(var(--scale));
    filter: drop-shadow(0 0 18px rgba(0, 0, 0, 0.12));
    pointer-events: none;
    will-change: transform, opacity;
}

.beta__cta-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.beta__cta {
    margin: 0;
    margin-top: 64px;
    text-align: center;
    color: var(--text-color-light);
    font-weight: 500;
    letter-spacing: -0.005em;
    line-height: 1.12;
    font-size: clamp(1.6rem, 5.2vw, 3.2rem);
    max-width: min(680px, 92vw);
    word-break: normal;
}

.beta__cta-button {
    margin-top: 32px;
    margin-bottom: 40px;
    display: inline-flex;
    align-items: center;
    white-space: normal;
    justify-content: center;
    border-radius: 999px;
    background: var(--green-200);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 0;
    user-select: none;
}

.beta__cta-button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 32px;
    border-radius: inherit;
    color: #379042;
    font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.006em;
    text-decoration: none;
    outline: none;
    gap: 10px;
}

.beta__cta-button-link:focus,
.beta__cta-button-link:focus-visible,
.beta__cta-button-link:active {
    outline: none;
}

.beta-modal[hidden] {
    display: none;
}

.beta-modal {
    position: fixed;
    inset: 0;
    padding: clamp(24px, 6vw, 64px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 100;
}

.beta-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 24, 18, 0.08);
    opacity: 0;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: opacity 320ms cubic-bezier(0.39, 0.14, 0.4, 1);
}

.beta-modal__panel {
    position: relative;
    width: min(816px, 92vw);
    height: auto;
    border-radius: 32px;
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 34px 120px rgba(13, 27, 22, 0.22);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    padding: clamp(32px, 6vw, 48px);
    opacity: 0;
    transition: opacity 520ms cubic-bezier(0.23, 1, 0.32, 1);
}

.beta-modal__close {
    position: absolute;
    top: clamp(16px, 3vw, 24px);
    right: clamp(16px, 3vw, 24px);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #ededed;
    color: rgba(0, 0, 0, 0.54);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 180ms ease;
}

.beta-modal__close::before {
    content: "✕";
    font-size: 16px;
    line-height: 1;
}

/* .beta-modal__close:hover {
    background: rgba(0, 0, 0, 0.18);
} */

.beta-modal__close:focus,
.beta-modal__close:focus-visible,
.beta-modal__close:active {
    outline: none;
}

.beta-modal__content {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 20px);
}

.beta-modal__eyebrow {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(0, 0, 0, 0.45);
}

.beta-modal__title {
    margin: 0;
    font-size: clamp(2rem, 4.6vw, 3rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: rgba(0, 0, 0, 0.9);
}

.beta-modal__text {
    margin: 0;
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.68);
}

.beta-modal__form {
    display: flex;
    flex-direction: column;
    gap: clamp(12px, 3vw, 18px);
    margin-top: clamp(12px, 3vw, 24px);
    align-items: start;
}

.beta-modal__form-field {
    width: 100%;
    max-width: clamp(280px, 65vw, 520px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 3vw, 10px);
    flex-wrap: nowrap;
}

.beta-modal__input {
    flex: 1;
    min-width: 0;
    border: 2px solid var(--green);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: clamp(10px, 2.8vw, 14px) clamp(18px, 4vw, 26px);
    font-family: inherit;
    font-size: clamp(0.95rem, 2.3vw, 1.05rem);
    line-height: 1.3;
    color: rgba(0, 0, 0, 0.85);
    outline: none;
}

.beta-modal__input::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.beta-modal__input--invalid {
    border-color: var(--err-color);
}

.beta-modal__submit {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 20px;
    width: clamp(44px, 11vw, 54px);
    height: clamp(42px, 11vw, 54px);
    padding: 0 clamp(16px, 3.4vw, 22px);
    background: var(--green);
    color: #ffffff;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.beta-modal__submit:focus,
.beta-modal__submit:focus-visible,
.beta-modal__submit:active {
    outline: none;
}

.beta-modal__submit[disabled] {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.beta-modal__submit[disabled]:hover {
    background: var(--green);
    transform: none;
    box-shadow: none;
}

.beta-modal__submit-icon {
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    line-height: 1;
}

.beta-modal__disclaimer {
    margin: 0;
    font-size: clamp(0.75rem, 2vw, 0.9rem);
    line-height: 1.4;
    color: rgba(0, 0, 0, 0.36);
    max-width: clamp(280px, 65vw, 520px);
    width: 100%;
    text-align: left;
    font-size: 12px;
    align-self: stretch;
}

.beta-modal__feedback {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 24px);
    left: 50%;
    transform: translate3d(-50%, -16px, 0);
    margin: 0;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: clamp(0.72rem, 1.6vw, 0.88rem);
    line-height: 1.2;
    font-weight: 500;
    color: var(--green);
    background: #d5f0d9;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(90vw, 520px);
    text-align: left;
    box-shadow: 0 18px 50px rgba(13, 27, 22, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms ease, transform 260ms ease;
    z-index: 999;
}

.beta-modal__feedback::before {
    content: attr(data-feedback-icon);
    font-size: 1.2em;
    line-height: 1;
}

.beta-modal__feedback--visible {
    opacity: 1;
    transform: translate3d(-50%, 0, 0);
}

.beta-modal__feedback--error {
    color: #f43d42;
    background: #ffebed;
}

.beta-modal__feedback--success {
    color: var(--green);
    background: #d5f0d9;
}

.beta-modal__disclaimer-link {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.beta-modal--visible {
    opacity: 1;
    pointer-events: auto;
}
.beta-modal--visible .beta-modal__backdrop {
    opacity: 1;
}

.beta-modal--visible .beta-modal__panel {
    opacity: 1;
    transition-delay: 250ms;
}

.logo-stack__blob-rotator {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logo-blob-spin 22s linear 0.6s infinite;
}

.logo-stack__blob {
    width: 106%;
    height: auto;
    opacity: 0;
    transform: scale(0.6);
    animation: logo-blob-intro 0.5s cubic-bezier(0.22, 1.28, 0.36, 1) forwards;
}

.logo-stack__heart {
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--heart-size);
    max-width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transform-origin: center;
    transform: translate(-50%, -50%) scale(0.65);
    animation: logo-heart-pop 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.28) 0.1s forwards;
}

.logo-stack__blob {
    display: block;
}

.logo-stack__dot-orbit {
    position: absolute;
    width: var(--dot-size);
    height: var(--dot-size);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: logo-dot-orbit 0.7s cubic-bezier(0.21, 0.88, 0.37, 1.21) 0.55s forwards;
}

.logo-stack__dot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #d5f0da;
    opacity: 0;
    transform: scale(0);
    animation: logo-dot-pop 0.7s cubic-bezier(0.21, 0.88, 0.37, 1.21) 0.55s forwards;
    /* box-shadow: 0 0 14px rgba(29, 149, 245, 0.45); */
}

@keyframes logo-blob-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes logo-blob-intro {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes logo-heart-pop {
    0% {
        transform: translate(-50%, -50%) scale(0.65);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes logo-dot-orbit {
    0% {
        transform: translate(-50%, -50%);
        opacity: 0;
    }
    35% {
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--dot-travel)), calc(-50% - var(--dot-travel)));
        opacity: 1;
    }
}

@keyframes logo-dot-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.logo-stack--reduced-motion .logo-stack__blob-rotator,
.logo-stack--reduced-motion .logo-stack__blob,
.logo-stack--reduced-motion .logo-stack__heart,
.logo-stack--reduced-motion .logo-stack__dot-orbit,
.logo-stack--reduced-motion .logo-stack__dot,
.logo-stack--reduced-motion .logo-stack__recipe {
    animation: none !important;
}

.logo-stack--reduced-motion .logo-stack__blob,
.logo-stack--reduced-motion .logo-stack__heart,
.logo-stack--reduced-motion .logo-stack__dot {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.logo-stack--reduced-motion .logo-stack__dot-orbit {
    transform: translate(-50%, -50%) !important;
}

.logo-stack--reduced-motion .logo-stack__recipe {
    display: none !important;
}

@media (max-width: 640px) {
    .beta {
        padding: clamp(32px, 16vw, 72px) clamp(16px, 6vw, 32px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .logo-stack__blob-rotator,
    .logo-stack__blob,
    .logo-stack__heart,
    .logo-stack__dot-orbit,
    .logo-stack__dot,
    .logo-stack__recipe {
        animation: none !important;
    }
    .logo-stack__blob,
    .logo-stack__heart,
    .logo-stack__dot {
        opacity: 1 !important;
        transform: scale(1) !important;
    }
    .logo-stack__dot-orbit {
        transform: translate(-50%, -50%) !important;
    }
    .logo-stack__recipe {
        display: none !important;
    }
}
