/* ── Import shared styles ────────────────────────────────────────────────── */
@import url('common.css');
/* ── Main Page Specific Styles ────────────────────────────────────────────── */
.form-section {
    position: fixed;
    bottom: 0;
    opacity: .5;
    width: 100%;
    height: 100dvh;
    overflow: auto;
    /* Hide scrollbar for Chrome, Safari, and Opera */

    &::-webkit-scrollbar {
        display: none;
    }

    /* Hide scrollbar for IE, Edge, and Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.sticky-wrapper {
    /*height: 280vh;*/
}

.visual-canvas {
    position: sticky;
    top: 0;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    /* no flex — mask-container is absolutely positioned */
}

/* The Masked Container — inset-based (Rivian haptic-wheel technique).
   top/left/right/bottom and border-radius are all set by JS.
   overflow:hidden clips the full-viewport images to the mask shape. */
.mask-container {
    position: absolute;
    /* JS sets: top, left, right, bottom, border-radius */
    overflow: hidden;
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
}

/* Image Sequence — counter-offset so images always fill the full viewport.
   JS sets top/left/right/bottom to the NEGATIVE of the mask insets,
   so the image edges always sit at the viewport edges regardless of mask size. */
.image-sequence {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    /* JS sets: top, left, right, bottom (negative of mask insets) */
}

/* Individual frames — centred in the full-viewport imgSeqContainer.
   Each nth-child carries the pre-calculated mask dimensions for its scroll step
   so the image exactly matches the mask window when it becomes active. */
.image-sequence img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0;
}

/* ── Per-image sizes (adjusted for 15 images) ───────────────────────────────
   step k for nth-child(n) = n-1   (0-indexed), p = k/15
   k=0..11: t = p/1.1
     width  = calc((1−t)100vw + t300px)
     height = calc((1−0.4t)100dvh)
   k=12..14: transition to final 300px circle
   ────────────────────────────────────────────────────────── */
/* k=0  p=0.000  t=0.000 */
.image-sequence img:nth-child(1) {
    width: calc(100.00vw + 0px);
    height: 100.0dvh;
}

/* k=1  p=0.067  t=0.061 */
.image-sequence img:nth-child(2) {
    width: calc(93.94vw + 18px);
    height: 97.6dvh;
}

/* k=2  p=0.133  t=0.121 */
.image-sequence img:nth-child(3) {
    width: calc(87.88vw + 36px);
    height: 95.2dvh;
}

/* k=3  p=0.200  t=0.182 */
.image-sequence img:nth-child(4) {
    width: calc(81.82vw + 55px);
    height: 92.7dvh;
}

/* k=4  p=0.267  t=0.242 */
.image-sequence img:nth-child(5) {
    width: calc(75.76vw + 73px);
    height: 90.3dvh;
}

/* k=5  p=0.333  t=0.303 */
.image-sequence img:nth-child(6) {
    width: calc(69.70vw + 91px);
    height: 87.9dvh;
}

/* k=6  p=0.400  t=0.364 */
.image-sequence img:nth-child(7) {
    width: calc(63.64vw + 109px);
    height: 85.5dvh;
}

/* k=7  p=0.467  t=0.424 */
.image-sequence img:nth-child(8) {
    width: calc(57.58vw + 127px);
    height: 83.0dvh;
}

/* k=8  p=0.533  t=0.485 */
.image-sequence img:nth-child(9) {
    width: calc(51.52vw + 145px);
    height: 80.6dvh;
}

/* k=9  p=0.600  t=0.545 */
.image-sequence img:nth-child(10) {
    width: calc(45.45vw + 164px);
    height: 78.2dvh;
}

/* k=10  p=0.667  t=0.606 */
.image-sequence img:nth-child(11) {
    width: calc(39.39vw + 182px);
    height: 75.8dvh;
}

/* k=11  p=0.733  t=0.667 */
.image-sequence img:nth-child(12) {
    width: calc(33.33vw + 200px);
    height: 73.3dvh;
}

/* k=12  p=0.800  t=0.727 */
.image-sequence img:nth-child(13) {
    width: calc(27.27vw + 218px);
    height: 70dvh;
}

/* k=13  p=0.867 */
.image-sequence img:nth-child(14) {
     width: 750px;
    height: 750px;
}

.image-sequence img.active {
    opacity: 1;
}

.form-section {
    opacity: 0;
    pointer-events: none;
}

.form-visible .form-section, .submitted-visible .form-section {
    transition: opacity 0.2s ease-out;
    opacity: 1;
    pointer-events: auto;
}

.form-page {
    background-color: #F5EEEE;
    display: flex;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 100px;
    min-height: calc(100dvh - 50px);
}


.form-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 40px auto 0;
    border-radius: 60px;
    padding: 8px 12px;
    background: #120C0C14;
    max-width: max-content;
    justify-self: center;
}

.form-nav span {
    background: #F5EEEE;
    border-radius: 1rem;
    padding: 0.3rem 1rem;
    color: #120C0C;
    border: 1px solid #e5e2e1;
    font-weight: 900;
    font-size: 10px;
    line-height: 100%;
    letter-spacing: 30%;
    text-transform: uppercase;
    position: relative;
}

.form-nav span:not(:last-child):after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: #F5EEEE;
    right: -25px;
    top: 10px;
}

.form-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

.seal {
    width: 285px;
    height: 285px;
    max-height: 44dvh;

}

._submitted {
    display: none;
}

.submitted-image-wrapper {
    display: none;
    align-items: center;
    justify-content: center;
    margin-top: 50px;
}

.submitted-visible .submitted-image-wrapper {
    display: flex;
}

.submitted-visible ._submitted {
    display: block;
}

._form-submitted .hide-on-submit {
    display: none;
}

.images-parent {
    position: relative;
    width: 385px;
    height: 500px;
    margin-left: 65px;
}

.main-title {
    font-family: 'Recoleta', serif;
    font-weight: 500;
    font-size: 70px;
    line-height: 70px;
    letter-spacing: 0;
    text-align: center;
    text-transform: capitalize;
    margin-bottom: 8px;
    margin-top: 40px;
}

.info-text {
    font-family: 'Recoleta', serif;
    font-weight: 500;
    font-size: 24px;
    line-height: 26px;
    letter-spacing: 0;
    text-align: center;
    margin-bottom: 0;
    margin-top: 40px;
}

.sub-heading {
    text-align: center;
    font-weight: 700;
    font-size: 16px;
    line-height: 26px;
    letter-spacing: 90%;
    color: #120C0C;
}

.sub-heading.top {
    margin-top: 50px;
    font-size: 18px;
}

.career {
    text-align: center;
    margin-top: 80px;
}

.career a {
    font-weight: 900;
    font-size: 12px;
    line-height: 26px;
    letter-spacing: 30%;
    text-align: center;
    text-decoration: underline;
    text-decoration-style: solid;
    text-decoration-thickness: 0%;
    text-decoration-skip-ink: auto;
    color: #EB0005;
}

.career a:hover {
    text-decoration: underline;
}

.waitlist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 40px;
    row-gap: 18px;
    width: min(560px, calc(100vw - 48px));
    margin-left: auto;
    margin-right: auto;
    margin-top: 2.5rem;
}

.waitlist label {
    width: 100%;
}

.waitlist .email-field,
.waitlist button {
    grid-column: 1 / -1;
}

.waitlist input[type="text"],
.waitlist input[type="email"] {
    font-weight: 600;
    font-size: 12px;
    line-height: 26px;
    letter-spacing: 30%;
    padding: 8px 20px;
    border: none;
    border-bottom: 1px solid #120C0C;
    background: transparent;
    outline: none;
    width: 100%;
    text-transform: uppercase;
}

.waitlist input[type="text"]:not(:placeholder-shown),
.waitlist input[type="email"]:not(:placeholder-shown) {
    border-color: #EB0005;
}

.waitlist input[type="text"]:-webkit-autofill,
.waitlist input[type="email"]:-webkit-autofill {
    border-color: #EB0005;
}

/*.waitlist input:focus {*/
/*    border-color: #EB0005;*/
/*}*/

input:focus, input:active {
    outline: none !important;
    border-bottom: 1px solid #EB0005 !important;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    /* This "delays" the background color change indefinitely */
    transition: background-color 600000s ease-in-out 0s;

    /* Optional: Ensure the text color stays what you want */
    -webkit-text-fill-color: inherit !important;
}

.waitlist button {
    border: 1px solid #120C0C;
    color: #120C0C;
    padding: 0.5rem 1.2rem;
    font-weight: 900;
    font-size: 14px;
    line-height: 26px;
    letter-spacing: 30%;
    text-align: center;
    background: #F5EEEE;
    justify-self: center;
    min-width: 180px;
    margin-top: 22px;
    text-transform: uppercase;
}

.arrow-button {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 200ms;
}

.arrow-button .icon-wrapper {
    margin-left: 0;
    width: 0;
    transition: all 200ms;
}

.animate-in {
    opacity: 0;
    transform: rotateX(60deg);
    transition: opacity 800ms cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-in.fade-in {
    opacity: 1;
    transform: rotateX(0deg);
}

/* Loading blur effect for submit button */
button.loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s;
}

@media screen and (min-width: 768px) {
    .arrow-button:hover .icon-wrapper, .arrow-button:active .icon-wrapper, .arrow-button:focus .icon-wrapper {
        width: 18px;
        margin-left: 10px;
    }

    .arrow-button:hover, .arrow-button:active, .arrow-button:focus {
        border-color: #EB0005;
        color: #EB0005;
    }

}

@media screen and (max-width: 768px) {
    .image-sequence img:nth-child(4) {
        object-position: 10%;
    }

    .form-page {
        padding-bottom: 100px;
        min-height: calc(100dvh - 60px);
    }

    .form-nav {
        gap: 4px;
        margin-top: 20px;
    }

    .form-nav span {
        font-size: 8px;
        padding: 4px 8px;
    }

    /*.career a {*/
    /*    font-size: 12px;*/
    /*}*/
    .form-nav span:not(:last-child):after {
        width: 20px;
        top: 7px;
        right: -15px;
    }


    .main-title {
        font-size: 52px;
        line-height: 50px;
        max-width: 290px;
        margin-left: auto;
        margin-right: auto;
        margin-top: 24px;
    }

    .info-text {
        margin-top: 30px;
    }

    .submitted-image-wrapper {
        margin-top: 36px;
    }

    ._submitted .main-title {
        margin-top: 35px;
        max-width: unset;
    }

    .sub-heading.top {
        margin-top: 24px;
        font-size: 14px;
    }

    .sub-heading {
        font-size: 12px;
        line-height: 24px;
        letter-spacing: 55%;
    }

    .form-image-wrapper {
        margin-top: 20px;
    }

    .seal {
        width: 210px;
        height: 210px;
    }

    .images-parent {
        width: 250px;
        height: auto;
        margin-left: 55px;
    }

    .waitlist button {
        width: 100%;
        justify-self: stretch;
    }

    .waitlist {
        grid-template-columns: 1fr;
        row-gap: 8px;
        width: min(420px, calc(100vw - 32px));
        margin-top: 20px;
    }

    .waitlist .email-field,
    .waitlist button {
        grid-column: auto;
    }

    .waitlist button {
        margin-top: 24px;
    }

    .career {
        margin-top: 40px;
    }

    .arrow-button .icon-wrapper {
        width: 18px;
        margin-left: 12px;
    }

    button.arrow-button .icon-wrapper svg path {
        fill: #120C0C;
    }

    .waitlist input[type="text"],
    .waitlist input[type="email"] {
        height: 42px;
        padding: 0 12px;
    }

}

/* for old small devices */
@media screen and (max-width: 350px) {
    .form-nav span {
        padding: 4px 6px;
        letter-spacing: 15%;
    }

    .career a {
        letter-spacing: 10%;
    }
}
