/* Dedicated layout for the first registration step */

body.landing {
    height: auto;
    min-height: 100vh;
}

    body.landing main {
        height: auto;
    }

/* The background sits on a fixed layer so it is sized to the viewport rather than the scrolling document */
body.landing::before {
    --clock-small: clamp(13rem, 21.9vw, 30rem);
    --clock-large: clamp(22rem, 46.9vw, 64rem);
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: #ffffff;
    background-image: url(/assets/bg-clock-small.svg), url(/assets/bg-clock-large.svg), linear-gradient(#ffffff 45%, #F3F8FD);
    background-repeat: no-repeat;
    background-size: var(--clock-small) auto, var(--clock-large) auto, auto;
    /* Place each clock from its own corner, in fractions of its size */
    background-position:
        left calc(var(--clock-small) * .29) top calc(var(--clock-small) * .1 + 2.5rem),
        right calc(var(--clock-large) * -.19) bottom calc(var(--clock-large) * -.52),
        0 0;
}

/* Stacked layout: tuck the clocks further behind the screen edges */
@media (max-width: 991.98px) {
    body.landing::before {
        background-position:
            left calc(var(--clock-small) * -.25) top 9.5rem,
            right calc(var(--clock-large) * -.55) bottom calc(var(--clock-large) * -.4),
            0 0;
        --clock-small: clamp(16rem, 21.9vw, 30rem);
        --clock-large: clamp(35rem, 46.9vw, 64rem);
    }
}

/* Pitch column */
.landing-pitch {
    padding-top: 1rem;
}

.landing-pill {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .85rem;
    /* Bootstrap 5.1 alert-success colours */
    border: 1px solid #badbcc;
    border-radius: 1rem;
    background: #d1e7dd;
    color: #0f5132;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.4;
}

    .landing-pill .fa {
        color: #0f5132;
    }

.landing-pill-text {
    display: flex;
    column-gap: 1.25em;
}

    .landing-pill-text > span + span {
        position: relative;
    }

        /* Separator dot between the two halves */
        .landing-pill-text > span + span::before {
            content: "\00B7";
            position: absolute;
            left: -.78em;
        }

/* Stack the two halves when the pill no longer fits on one line */
@media (max-width: 471.98px) {
    .landing-pill-text {
        flex-direction: column;
    }

        .landing-pill-text > span + span::before {
            content: none;
        }
}

.landing-headline {
    margin: 1rem 0;
    font-size: clamp(2.25rem, 4.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.landing-lead {
    max-width: 38rem;
    margin-bottom: 1.75rem;
    font-size: 1.125rem;
}

/* Jump link to the sign-up card */
.landing-cta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1.75rem;
    padding: .65rem 1.4rem;
    border-radius: .6rem;
    box-shadow: 0 0 .75rem rgba(var(--bs-primary-rgb), .25);
}

.landing-features {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin: 1.75rem 0 0;
}

    .landing-features li {
        display: flex;
        align-items: flex-start;
        gap: .75rem;
        font-size: .9rem;
    }

    .landing-features strong {
        color: #1c1433;
    }

.landing-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.75rem;
    height: 1.75rem;
    border-radius: .5rem;
    background: #EAF2FB;
    color: var(--eyh-brand-blue);
}

/* Sign-up card */
.landing-card {
    width: 100%;
    border: 0;
    border-top: 4px solid var(--eyh-brand-blue);
    scroll-margin-top: 1rem;
}

    .landing-card .card-header {
        background: #F7F9FC;
    }

        .landing-card .card-header h2 {
            font-size: 1.5rem;
        }

/* Notice tile: sits under the header and sticks to the top of the page on scroll */
.landing-notice {
    position: sticky;
    top: .75rem;
    z-index: 1020;
    width: max-content;
    max-width: min(calc(100% - 1.5rem), 30rem);
    margin: 0 auto .5rem;
    padding: .5rem 1rem;
    border: 1px solid rgba(28, 20, 51, .08);
    border-radius: 1rem;
    background: #fff;
    font-size: .8rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 .75rem 2rem rgba(28, 20, 51, .18);
}

/* Wide layout: the tile floats in the empty middle of the header */
@media (min-width: 992px) {
    .landing-notice {
        position: fixed;
        top: 1.25rem;
        left: 50%;
        margin: 0;
        transform: translateX(-50%);
    }
}

    .landing-notice .fa {
        margin-right: .4rem;
    }

.landing-notice.is-applied {
    color: #0f5132;
}

.landing-notice.is-refused {
    color: #842029;
}

/* Sign-up options: tinted panel holding the external login buttons and the email row */
.signup-options {
    margin: 0 -.25rem .75rem;
    padding: .875rem;
    border: 1px solid rgba(var(--eyh-brand-orange-rgb), .55);
    border-radius: 1rem;
    background: linear-gradient(180deg, #FFF3E2 0%, #FFFFFF 70%);
    box-shadow: 0 .5rem 1.25rem rgba(var(--eyh-brand-orange-rgb), .14);
}

    /* Each option glows in turn, top to bottom, by its --cta-step */
    .signup-options .btn-external-login {
        min-height: 48px;
        font-size: .9rem;
        animation: cta-cascade-btn 5s ease-in-out calc(var(--cta-step, 0) * .45s) infinite;
    }

    /* Email row: the top corners follow the email input and the bottom corners follow the 48px email button */
    .signup-options .email-cta {
        min-height: 0;
        border-radius: .25rem .25rem 24px 24px;
        animation: cta-cascade 5s ease-in-out calc(var(--cta-step, 0) * .45s) infinite;
    }

    /* Hold still once the panel has focus or the email is valid */
    .signup-options:focus-within .btn-external-login,
    .signup-options:focus-within .email-cta,
    .signup-options.is-ready .btn-external-login,
    .signup-options.is-ready .email-cta {
        animation: none;
    }

@keyframes cta-cascade-btn {
    0%, 24%, 100% {
        box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 0 rgba(var(--eyh-brand-orange-rgb), 0);
    }

    9% {
        box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 .3rem rgba(var(--eyh-brand-orange-rgb), .45);
    }
}

@keyframes cta-cascade {
    0%, 24%, 100% {
        box-shadow: 0 0 0 0 rgba(var(--eyh-brand-orange-rgb), 0);
    }

    9% {
        box-shadow: 0 0 0 .3rem rgba(var(--eyh-brand-orange-rgb), .45);
    }
}

/* Email field */
.landing-card .landing-email-field > .form-control.no-validation-icon {
    padding-right: .75rem;
}

/* Email button: the same pill as the external login buttons */
.landing-card .btn.landing-email-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    width: 100%;
    min-height: 48px;
    margin-top: .5rem;
    padding: .375rem 1rem;
    border: 1px solid #DADCE0;
    border-radius: 999px;
    background-color: #FFFFFF;
    color: var(--bs-body-color);
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
    transition: background-color .15s ease-in-out, box-shadow .15s ease-in-out, border-color .15s ease-in-out;
}

    .landing-card .btn.landing-email-submit:hover {
        border-color: #C6C9CC;
        background-color: #F8F9FA;
        box-shadow: 0 2px 4px rgba(0, 0, 0, .10);
    }

    .landing-card .btn.landing-email-submit:focus,
    .landing-card .btn.landing-email-submit:focus-visible {
        border-color: #C6C9CC;
        background-color: #F1F3F4;
        box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 0 0 .25rem rgba(66, 133, 244, .35);
    }

    .landing-card .btn.landing-email-submit:active {
        border-color: #C6C9CC;
        background-color: #E8EAED;
        box-shadow: 0 1px 1px rgba(0, 0, 0, .06);
    }

    .landing-card .btn.landing-email-submit .fa {
        color: var(--eyh-brand-blue);
        font-size: 1.2rem;
    }

/* Terms row shakes when a sign-up option is used before the terms are accepted */
.cta-shake {
    animation: cta-shake .4s ease;
}

@keyframes cta-shake {
    20% {
        transform: translateX(-5px);
    }

    40% {
        transform: translateX(5px);
    }

    60% {
        transform: translateX(-3px);
    }

    80% {
        transform: translateX(3px);
    }
}

.landing-proof {
    margin-top: .25rem;
    padding-top: .75rem;
    border-top: 1px dashed #dfe5ec;
}

.landing-avatars {
    display: inline-flex;
    flex: 0 0 auto;
}

    /* Customer logos */
    .landing-avatars img {
        width: 1.75rem;
        height: 1.75rem;
        margin-left: -.5rem;
        border: 2px solid #fff;
        border-radius: 50%;
        background: #fff;
        object-fit: cover;
        box-shadow: 0 1px 2px rgba(28, 20, 51, .15);
    }

        .landing-avatars img:first-child {
            margin-left: 0;
        }

.landing-ticks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .25rem .75rem;
    margin: .75rem 0 0;
    font-size: .75rem;
}

    .landing-ticks .fa {
        margin-right: .25rem;
        color: #2e9e5b;
    }
    .landing-ticks .break {
        flex-basis: 100%;
        height: 0;
    }

/* Testimonial carousel: the slides share one grid cell, so the card keeps the height of the tallest */
.landing-testimonials {
    touch-action: pan-y;
}

/* Clip the slides at the track's edges, with a margin inside for the photo shadow */
.landing-testimonial-slides {
    display: grid;
    overflow: hidden;
    margin: -.5rem;
    padding: .5rem;
}

/* Each slide sits a whole number of track widths from the view, set by --slide-position */
.landing-testimonial {
    grid-area: 1 / 1;
    display: flex;
    gap: 1rem;
    min-width: 0;
    visibility: hidden;
    transform: translateX(calc((100% + 1rem) * var(--slide-position, 0)));
    transition: none;
}

    /* Show the current slide and any slide moving in or out */
    .landing-testimonial.active,
    .landing-testimonial.shown {
        visibility: visible;
    }

.landing-testimonials.animating .landing-testimonial {
    transition: transform .45s cubic-bezier(.22, .8, .3, 1);
}

/* Draggable carousel: trade text selection for dragging */
.landing-testimonials.draggable .landing-testimonial-slides {
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

.landing-testimonials.dragging .landing-testimonial-slides {
    cursor: grabbing;
}

.landing-testimonial-avatar {
    flex: 0 0 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    overflow: hidden;
    border: 3px solid #fff;
    border-radius: .7rem;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(28, 20, 51, .08), 0 2px 6px rgba(28, 20, 51, .18);
}

    /* Crop the testimonial photo */
    .landing-testimonial-avatar img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transform: scale(var(--photo-zoom, 1));
        transform-origin: var(--photo-focus, 50% 50%);
    }

/* Initials, shown when a testimonial has no photo */
.landing-testimonial-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #EAF2FB;
    color: var(--eyh-brand-blue);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.landing-testimonial-dots {
    display: flex;
    justify-content: center;
    margin: .5rem 0 -.5rem;
}

/* Slide picker dot, padded out to a comfortable tap target */
.landing-testimonial-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    background: none;
}

    .landing-testimonial-dot::before {
        content: "";
        width: .4rem;
        height: .4rem;
        border-radius: 1rem;
        background: #c9d3df;
        transition: width .3s ease, background-color .3s ease;
    }

    .landing-testimonial-dot.active::before {
        width: 1.1rem;
        background: var(--eyh-brand-blue);
    }

@media (prefers-reduced-motion: reduce) {
    .landing-testimonials.animating .landing-testimonial,
    .landing-testimonial-dot::before {
        transition: none;
    }
}

/* Keep the stars together, dropping them under the name when the row is too narrow */
.landing-testimonial-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    column-gap: .75rem;
}

.landing-testimonial-stars {
    white-space: nowrap;
}

.landing-footnote {
    font-size: .8rem;
}

/* Metrics tile: the revenue counter with two static metrics */
.landing-counter-wrap {
    /* Use to show a blurred image behind the counter */
    --landing-counter-bg: none;
    --landing-counter-divider: rgba(28, 20, 51, .1);
    container: landing-metrics / inline-size;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 .75rem 2rem rgba(28, 20, 51, .12);
}

    .landing-counter-wrap::before {
        content: "";
        position: absolute;
        inset: -1.25rem -.75rem;
        z-index: -1;
        border-radius: 2rem;
        background-image: var(--landing-counter-bg),
            radial-gradient(45% 80% at 10% 15%, rgba(122, 143, 165, .22), transparent 70%),
            radial-gradient(50% 90% at 88% 85%, rgba(122, 143, 165, .28), transparent 70%);
        background-size: cover;
        background-position: center;
        filter: blur(10px);
    }

    /* Cursor spotlight */
    .landing-counter-wrap::after {
        content: "";
        position: absolute;
        top: -25rem;
        left: -25rem;
        width: 50rem;
        height: 50rem;
        z-index: -1;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(247, 148, 44, .15) 0%, rgba(247, 148, 44, .05) 40%, transparent 70%);
        transform: translate(var(--spotlight-x, 0px), var(--spotlight-y, 0px));
        opacity: var(--spotlight-on, 0);
        transition: opacity .4s ease;
        pointer-events: none;
        will-change: transform;
    }

    /* Hide customer spotlight for non-mouse users */
    @media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
        .landing-counter-wrap::after {
            display: none;
        }
    }

.landing-counter {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    border: 2px solid rgba(255, 255, 255, .95);
    border-radius: 1rem;
    color: #1c1433;
    background: rgba(255, 255, 255, .2);
    -webkit-backdrop-filter: blur(1.5px) saturate(150%);
    backdrop-filter: blur(1.5px) saturate(150%);
    box-shadow: inset 0 1px 0 #ffffff, inset 0 0 0 1px rgba(255, 255, 255, .55), 0 0 0 1px rgba(28, 20, 51, .08);
}

/* Handle browsers without backdrop blur */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .landing-counter {
        background: rgba(255, 255, 255, .9);
    }
}

/* Revenue counter cell, on a row of its own above the static metrics */
.landing-counter-main {
    grid-column: 1 / -1;
    padding: 1.25rem 1.5rem;
}

/* Static metric cells, sharing the second row */
.landing-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: .8rem 1.5rem;
    border-top: 1px solid var(--landing-counter-divider);
}

    .landing-stat + .landing-stat {
        border-left: 1px solid var(--landing-counter-divider);
    }

.landing-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
    color: #1c1433;
}

.landing-stat-plus {
    color: var(--eyh-brand-orange);
}

/* Wide tile: stack the static metrics in a column beside the revenue counter */
@container landing-metrics (min-width: 600px) {
    .landing-counter {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-rows: 1fr 1fr;
    }

    .landing-counter-main {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .landing-stat {
        padding: .65rem 1.75rem .65rem 1.5rem;
        border-left: 1px solid var(--landing-counter-divider);
    }

    .landing-counter-main + .landing-stat {
        border-top: 0;
    }
}

/* Widest tile: place all three metrics side by side */
@container landing-metrics (min-width: 680px) {
    .landing-counter {
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-rows: none;
    }

    .landing-counter-main {
        grid-row: auto;
        padding-right: .75rem;
    }

    .landing-stat {
        justify-content: flex-start;
        padding: 1.25rem .75rem;
    }

        .landing-stat + .landing-stat {
            border-top: 0;
        }

    /* Place each label above its figure, in line with the revenue label */
    .landing-stat-label {
        order: -1;
    }

    /* Match the revenue figure */
    .landing-stat-value {
        margin-top: .5rem;
        font-size: 2.75rem;
        line-height: 1;
        white-space: nowrap;
        background-image: linear-gradient(180deg, #1c1433 0%, #2f4f78 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .landing-stat-plus {
        -webkit-text-fill-color: var(--eyh-brand-orange);
    }
}

.landing-counter-label,
.landing-stat-label {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #565d63;
}

.landing-counter-label {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.landing-counter-live {
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: #2ecc71;
    animation: landing-pulse 2s infinite;
}

@keyframes landing-pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, .6); }
    70% { box-shadow: 0 0 0 .5rem rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.landing-counter-value {
    display: flex;
    align-items: baseline;
    min-height: 1em;
    opacity: 0;
    transition: opacity .5s ease;
    margin-top: .5rem;
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.01em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: #1c1433;
}

    .landing-counter-value.rc-ready {
        opacity: 1;
    }

    .landing-counter-value .rc-strip > span,
    .landing-counter-value .rc-sep {
        color: transparent;
        background-image: linear-gradient(180deg, #1c1433 0%, #2f4f78 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .landing-counter-value .rc-currency {
        margin-right: .08em;
        background-image: linear-gradient(var(--eyh-brand-orange), var(--eyh-brand-orange));
    }

.landing-counter-fraction {
    display: inline-flex;
    align-items: baseline;
    margin-left: .1em;
    font-size: .5em;
    font-weight: 600;
}

    .landing-counter-fraction .rc-strip > span,
    .landing-counter-fraction .rc-sep {
        background-image: linear-gradient(var(--eyh-brand-blue), var(--eyh-brand-blue));
    }

.landing-counter-note {
    margin-top: .5rem;
    font-size: .8rem;
    color: #565d63;
}

.rc-digit {
    display: inline-flex;
    height: 1em;
    line-height: 1;
    overflow: hidden;
}

.rc-strip {
    display: block;
    will-change: transform;
    transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}

    .rc-strip > span {
        display: block;
        height: 1em;
        line-height: 1;
    }

    .rc-strip.rc-snap {
        transition: none;
    }

@media (prefers-reduced-motion: reduce) {
    .rc-strip,
    .landing-counter-value {
        transition: none;
    }

    .landing-counter-live,
    .signup-options .btn-external-login,
    .signup-options .email-cta,
    .cta-shake {
        animation: none;
    }
}

/* Stacked layout: size the headline from the viewport and tighten the lead */
@media (max-width: 991.98px) {
    .landing-headline {
        font-size: clamp(2.25rem, 8vw, 3.5rem);
    }

    .landing-lead {
        margin-bottom: 1.25rem;
    }
}

/* Stacked layout: center the pill, headline, lead and jump link */
@media (max-width: 991.98px) {
    .landing-pitch {
        text-align: center;
    }

    .landing-pill,
    .landing-counter-wrap,
    .landing-features {
        text-align: left;
    }

    .landing-lead {
        margin-right: auto;
        margin-left: auto;
        text-wrap: balance;
    }
}

/* Phone layout */
@media (max-width: 575.98px) {
    .landing-lead {
        font-size: 1rem;
    }

    .landing-counter-main {
        container-type: inline-size;
        padding: 1.1rem 1.25rem;
    }

    /* Shrink the revenue figure only when its cell is too narrow to hold it */
    .landing-counter-value {
        font-size: clamp(1.75rem, 12.5cqi, 2.75rem);
    }

    .landing-stat {
        padding: .7rem 1.25rem;
    }
}
