/* CADdy Bid Home CSS */
/* The logged out landing: hero copy beside the overview video, then alternating feature sections with framed screenshots */

/* League Spartan, loaded locally with size-adjust to scale the whole font up.
   src points at Google's woff2 CDN, so no separate <link> is needed. Keep
   size-adjust identical across all three subsets so latin / latin-ext /
   vietnamese render at the same size. */
/* latin */
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    size-adjust: 114%;
    src: url(https://fonts.gstatic.com/s/leaguespartan/v15/kJEqBuEW6A0lliaV_m88ja5TwvZwLZk.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    size-adjust: 114%;
    src: url(https://fonts.gstatic.com/s/leaguespartan/v15/kJEqBuEW6A0lliaV_m88ja5TwvZ-LZmFDA.woff2) format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* vietnamese */
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    size-adjust: 114%;
    src: url(https://fonts.gstatic.com/s/leaguespartan/v15/kJEqBuEW6A0lliaV_m88ja5TwvZ_LZmFDA.woff2) format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

/** Shared */

body {
    font-family: "League Spartan", sans-serif;
    margin: 0;
    background: var(--background-color);
    color: var(--font-color);
}

.logo-container-icon img {
    height: 40px;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: var(--secondary-accent-color);
    color: var(--font-color);
    font-weight: bold;
    transition: background 0.2s;
}

button:hover {
    background: var(--secondary-color);
}

/** Hero */

.hero {
    text-align: center;
    padding: 48px 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.hero-top {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-top h1 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--header-color);
}

.hero-logo {
    width: 100%;
    max-width: 315px;
    height: auto;
}

.hero-subtitle p {
    font-size: 1.2em;
    line-height: 1.55;
    color: var(--font-color);
    max-width: 560px;
    margin: 0 auto;
}

/* The big sign in button, brand fill on the page background in both themes */
.hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    padding: 12px 28px;
    border-radius: 10px;
    background: var(--primary-color);
    color: var(--background-color);
    font-size: 1.15em;
    font-weight: 700;
    box-shadow: 0 4px 14px var(--shadow);
    transition: background 0.2s, transform 0.2s;
}

.hero-cta:hover {
    background: var(--primary-accent-color);
    transform: translateY(-1px);
}

.hero-cta:focus-visible {
    outline: 3px solid var(--secondary-accent-color);
    outline-offset: 3px;
}

/** Sections */

/* Alternating layout: top-image is a row, ontop stacks, alt puts the screenshot left, alt--flip puts it right */
section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 48px;
    padding: 64px 10%;
    flex-direction: row-reverse;
}

section.ontop {
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

section.top-image {
    flex-direction: row;
    align-items: center;
    padding-top: 48px;
}

section.alt--flip {
    flex-direction: row;
}

section .text,
section .text-long {
    flex: 1;
    text-align: center;
}

section .main-image,
section .image,
section .live-preview {
    display: flex;
    justify-content: center;
    width: 100%;
    flex: 1;
}

.top-image > .hero {
    flex: 0.9;
}

.top-image > .main-image {
    flex: 1.6;
}

.alt > .text {
    flex: 0.9;
}

.alt > .live-preview {
    flex: 1.6;
}

section.ontop .image {
    max-width: 1100px;
}

section h2 {
    font-size: 2em;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 12px;
    color: var(--header-color);
}

section p {
    font-size: 1.1em;
    color: var(--font-color);
    line-height: 1.65;
    max-width: 680px;
    margin: 0 auto;
}

/** Screenshots and video */

/* Raised rounded panels; the markup points at the light screenshot and palette.css body.dark swaps each to its dark one */
.shot {
    width: 100%;
}

.shot-img,
.hero-video {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 12px;
    border: 1px solid var(--accent-color);
    background: var(--sub-background-color);
    box-shadow: 0 18px 48px var(--shadow), 0 2px 6px var(--shadow);
}

.shot--video {
    position: relative;
}

.hero-video {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* One Play/Pause control: a small square while playing, a larger round brand button while paused (home.js sets .is-paused) */
.hero-video-toggle {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--sub-background-color);
    color: var(--font-color);
    box-shadow: 0 2px 8px var(--shadow);
}

.hero-video-toggle:hover {
    background: var(--secondary-accent-color);
}

.hero-video-toggle:focus-visible {
    outline: 3px solid var(--secondary-accent-color);
    outline-offset: 2px;
}

.hero-video-toggle .hero-video-ico--play {
    display: none;
}

.shot--video.is-paused .hero-video-toggle .hero-video-ico--play {
    display: block;
}

.shot--video.is-paused .hero-video-toggle .hero-video-ico--pause {
    display: none;
}

.shot--video.is-paused .hero-video-toggle {
    right: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: var(--primary-color);
    color: var(--background-color);
    box-shadow: 0 18px 48px var(--shadow), 0 2px 6px var(--shadow);
}

.shot--video.is-paused .hero-video-toggle:hover {
    background: var(--primary-accent-color);
}

.shot--video.is-paused .hero-video-toggle svg {
    width: 26px;
    height: 26px;
}

/** Footer */

/* Sits on the header bar's color so the page starts and ends on the same surface */
.footer {
    padding: 24px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: var(--sub-background-color);
    border-top: 1px solid var(--accent-color);
    color: var(--font-color);
}

.footer-left strong {
    color: var(--header-color);
    font-weight: 800;
}

.footer-left p {
    margin: 4px 0 0;
    font-size: 0.9em;
}

.footer-right {
    font-size: 0.9em;
    font-weight: 600;
}

/** Scrollbar */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--scroll-color);
    border-radius: 999px;
    border: 2px solid var(--background-color);
}

/** Responsive */

/* iPad landscape (1024px and below): the hero stacks */
@media (max-width: 1024px) {
    section {
        padding: 48px 6%;
        gap: 32px;
    }

    section.top-image {
        flex-direction: column;
        align-items: center;
    }

    .top-image > .hero,
    .top-image > .main-image {
        flex: unset;
        width: 100%;
    }

    .alt > .text {
        flex: 1;
    }

    .alt > .live-preview {
        flex: 1.2;
    }

    .hero {
        padding: 32px 24px 16px;
    }

    .hero-logo {
        max-width: 250px;
    }

    section h2 {
        font-size: 1.7em;
    }
}

/* iPad portrait (768px and below): every section stacks */
@media (max-width: 768px) {
    section {
        flex-direction: column !important;
        padding: 32px 5%;
        gap: 24px;
    }

    section .text,
    section .text-long,
    section .main-image,
    section .image,
    section .live-preview {
        flex: unset;
        width: 100%;
    }

    .hero {
        padding: 24px 12px 12px;
    }

    .hero-top {
        flex-direction: column;
        align-items: center;
        gap: 4px;
    }

    .hero-logo {
        max-width: 200px;
    }

    .hero-subtitle p,
    section p {
        font-size: 1em;
    }

    section h2 {
        font-size: 1.5em;
    }
}

/* Phone: the hero's big button sits right under the bar, so the bar's own Login steps aside */
@media (max-width: 480px) {
    .login-header-login {
        display: none;
    }

    .hero-video-toggle {
        width: 32px;
        height: 32px;
        right: 8px;
        bottom: 8px;
        border-radius: 8px;
    }

    .hero-video-toggle svg {
        width: 16px;
        height: 16px;
    }

    .shot--video.is-paused .hero-video-toggle {
        width: 44px;
        height: 44px;
        right: 12px;
        bottom: 12px;
    }

    .shot--video.is-paused .hero-video-toggle svg {
        width: 20px;
        height: 20px;
    }

    .footer {
        padding: 24px 5%;
    }
}
