@import "https://unpkg.com/open-props";
@import "https://unpkg.com/open-props/normalize.min.css";
@import "https://unpkg.com/open-props/buttons.min.css";
@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;600;700;800&display=swap");

:root {
    /* Force light-mode rendering for native form controls (input/select/etc) -
       without this, browsers render them with dark backgrounds on systems set
       to prefers-color-scheme: dark, which clashes with this light palette. */
    color-scheme: light;

    /* Bark & Border brand palette - bright & playful */
    --bb-cream: #FFF9EF;
    --bb-cream-deep: #FFEEDA;
    --bb-brown: #4A3222;
    --bb-brown-light: #6B4A33;
    --bb-brown-muted: #8A6B54;
    --bb-orange: #FF8A3D;
    --bb-orange-light: #FFC79A;
    --bb-teal: #2FB6A8;
    --bb-teal-light: #C7EFE9;
    --bb-yellow: #FFC93C;
    --bb-yellow-light: #FFEBAD;

    --bb-font-display: 'Fredoka', ui-rounded, system-ui, sans-serif;
    --bb-font-body: 'Nunito', ui-sans-serif, system-ui, sans-serif;
}

body {
    background-color: var(--bb-cream);
    color: var(--bb-brown);
    font-family: var(--bb-font-body);
}

h1, h2, h3, h4 {
    font-family: var(--bb-font-display);
    font-weight: 600;
    letter-spacing: -0.01em;
}

input, select, textarea {
    background-color: white;
    color: var(--bb-brown);
    border: 1px solid color-mix(in srgb, var(--bb-brown) 20%, transparent);
    border-radius: 0.75rem;
}

input::placeholder { color: var(--bb-brown-muted); }

button {
    background-color: var(--bb-orange);
    color: white;
    border-color: var(--bb-orange);
    font-family: var(--bb-font-display);
    transition: transform var(--duration-quick-1), background-color var(--duration-quick-1);
}

button:hover {
    background-color: #FF9E5C;
    transform: translateY(-1px) scale(1.02);
}

button:active {
    transform: translateY(0) scale(0.98);
}

/* The login and signup form container */ 
.form-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: var(--size-4);
    box-sizing: border-box;

    main {
        width: clamp(350px, 50%, 500px);
        padding-bottom: var(--size-6);

        /* Login Page Header */ 
        header {
            margin-top: var(--size-1);
            width: 100%;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            /* App Icon */
            svg {
                width: var(--size-10);
            }
            /* App Name */
            h2 {
                font-family: var(--font-humanist);
            }
        }

        /* Login Page Form */
        form {
            width: 100%;
            box-sizing: border-box;
            padding-left: var(--size-0);
            padding-right: var(--size-0);

            .input {
                width: 100%;
                box-sizing: border-box;
                display: flex;
                flex-direction: column;
                align-items: start;
                margin-bottom: var(--size-0);

                label {
                    margin-bottom: 5px;
                }

                input {
                    width: 100%;
                    box-sizing: border-box;
                    height: var(--size-8);
                    padding-top: 4px;
                    padding-bottom: 4px;
                    outline: none;
                    margin-bottom: var(--size-1);
                }

                select {
                    width: 100%;
                }
            }

            button {
                width: 100%;
                margin-top: var(--size-3);
                height: var(--size-8);
            }
        }
    }
}

/* Small Mobile breakpoint */
@media (width <= 640px) {
    .form-container {
        padding: var(--size-3);
        main {
            width: 100%;
        }
    }
}


/* App Layout */
.app-layout {
    width: 100%;
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: var(--bb-brown);
        color: var(--bb-cream);
        border-bottom-width: 1px;
        border-bottom-color: var(--bb-brown-light);
        border-bottom-style: solid;
        box-shadow:  var(--shadow-1);
        .menu-icon {
            width: 46px;
            padding: 11px;
            color: var(--bb-cream);

            &:hover {
                background-color: var(--bb-brown-light);
                color: var(--bb-orange-light);
                transition: all var(--duration-quick-1);
            }
        }
        .brand {
            display: flex;
            flex-direction: column;
            align-items: center;
            line-height: 1.2;

            h4 {
                margin: 0;
                color: var(--bb-cream);
            }

            .tagline {
                font-size: var(--font-size-0);
                color: var(--bb-orange-light);
            }
        }
    }
}


/* =========================================================================
   Marketing site (public pages)
   ========================================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--size-4);
    padding: var(--size-3) var(--size-5);
    background-color: var(--bb-cream);
    border-bottom: 1px solid color-mix(in srgb, var(--bb-brown) 12%, transparent);

    .site-brand {
        display: flex;
        align-items: center;
        gap: var(--size-2);
        color: var(--bb-brown);
        text-decoration: none;

        svg { width: var(--size-6); color: var(--bb-orange); }

        span {
            font-family: var(--bb-font-display);
            font-weight: 700;
            font-size: var(--font-size-3);
        }
    }

    .site-nav {
        display: flex;
        align-items: center;
        gap: var(--size-5);

        a:not(.button-cta) {
            color: var(--bb-brown-muted);
            text-decoration: none;
            font-weight: 500;

            &:hover { color: var(--bb-brown); }
        }
    }

    select.lang-switcher {
        background-color: transparent;
        color: var(--bb-brown-muted);
        border: 1px solid color-mix(in srgb, var(--bb-brown) 20%, transparent);
        border-radius: var(--radius-round);
        padding: var(--size-1) var(--size-2);
        font-size: var(--font-size-1);
        font-weight: 500;
        cursor: pointer;

        &:hover { color: var(--bb-brown); border-color: var(--bb-orange); }
    }

}

/* .button-cta is used both inside .site-header and standalone in page content
   (hero, final-cta sections) so it must be a top-level rule, not scoped. */
.button-cta {
    display: inline-block;
    background-color: var(--bb-orange);
    color: var(--bb-brown);
    font-weight: 600;
    padding: var(--size-2) var(--size-4);
    border-radius: var(--radius-round);
    text-decoration: none;
    white-space: nowrap;
}

.button-cta:hover { background-color: var(--bb-orange-light); }

@media (width <= 720px) {
    .site-header .site-nav a:not(.button-cta) { display: none; }
}

/* Hero */
.hero {
    padding: var(--size-8) var(--size-5) var(--size-7);
    max-width: 72rem;
    margin-inline: auto;

    .hero-top {
        display: flex;
        flex-direction: column-reverse;
        align-items: center;
        gap: var(--size-6);
    }

    .hero-content {
        flex: 1;
        width: 100%;
        text-align: center;
        min-width: 0;
    }

    .hero-image {
        flex: 1;
        width: 100%;

        img {
            display: block;
            width: 100%;
            aspect-ratio: 4 / 3;
            object-fit: cover;
            border-radius: 1.5rem;
            box-shadow: var(--shadow-3);
        }
    }

    .eyebrow {
        display: flex;
        justify-content: center;
        gap: var(--size-2);
        color: var(--bb-orange);
        margin-bottom: var(--size-4);

        svg { width: var(--size-4); }
    }

    h1 {
        font-size: clamp(2.25rem, 5vw, 3.25rem);
        line-height: 1.05;
        margin: 0 0 var(--size-4);
    }

    p.lede {
        font-size: var(--font-size-3);
        color: var(--bb-brown-muted);
        max-width: 34rem;
        margin-inline: auto;
        margin-bottom: var(--size-6);
    }

    .route-line { margin-top: var(--size-7); }
}

@media (width >= 880px) {
    .hero .hero-top {
        flex-direction: row;
        align-items: center;
        gap: var(--size-8);
    }

    .hero .hero-content {
        text-align: left;
    }

    .hero .hero-content .eyebrow {
        justify-content: flex-start;
    }

    .hero .hero-content p.lede {
        margin-inline: 0;
    }
}

/* Route-line: the recurring "SD <-> TJ crossing" motif */
.route-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--size-3);
    margin-top: var(--size-6);

    .route-point {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--size-1);
        font-weight: 600;
        font-size: var(--font-size-1);

        svg { width: var(--size-5); color: var(--bb-brown); }
    }

    .route-track {
        flex: 1;
        max-width: 12rem;
        height: 0;
        border-top: 2px dashed var(--bb-orange);
        position: relative;

        svg {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: var(--size-5);
            color: var(--bb-orange);
            background-color: var(--bb-cream);
        }
    }
}

.section {
    padding: var(--size-8) var(--size-5);
    max-width: 64rem;
    margin-inline: auto;

    h2 {
        font-size: clamp(1.6rem, 3.5vw, 2.25rem);
        text-align: center;
        max-width: 34rem;
        margin-inline: auto;
        margin-bottom: var(--size-2);
    }

    p.section-lede {
        text-align: center;
        color: var(--bb-brown-muted);
        max-width: 34rem;
        margin-inline: auto;
        margin-bottom: var(--size-7);
    }
}

.section--alt { background-color: var(--bb-cream-deep); }

/* How it works: 4-step journey along the route-line */
.journey {
    display: flex;
    justify-content: space-between;
    gap: var(--size-4);
    position: relative;

    &::before {
        content: "";
        position: absolute;
        top: 1.5rem;
        left: 5%;
        right: 5%;
        border-top: 2px dashed var(--bb-orange);
        z-index: 0;
    }

    .journey-step {
        position: relative;
        z-index: 1;
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--size-2);

        .journey-icon {
            width: 3rem;
            height: 3rem;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: var(--bb-orange);
            color: white;
            border-radius: var(--radius-round);

            svg { width: var(--size-5); }
        }

        &:nth-child(2) .journey-icon { background-color: var(--bb-teal); }
        &:nth-child(3) .journey-icon { background-color: var(--bb-yellow); color: var(--bb-brown); }
        &:nth-child(4) .journey-icon { background-color: var(--bb-orange); }

        h3 { font-size: var(--font-size-2); margin: 0; }
        p { color: var(--bb-brown-muted); font-size: var(--font-size-1); margin: 0; }
    }
}

@media (width <= 720px) {
    .journey {
        flex-direction: column;
        &::before { display: none; }
    }
}

/* Services grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--size-4);
}

@media (width <= 960px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (width <= 560px) {
    .services-grid { grid-template-columns: 1fr; }
}

.service-card {
    background-color: var(--bb-cream);
    border: 2px solid color-mix(in srgb, var(--bb-brown) 8%, transparent);
    border-radius: 1.25rem;
    padding: var(--size-5);
    text-align: left;
    transition: transform var(--duration-quick-2), box-shadow var(--duration-quick-2);

    &:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-2);
    }

    .service-icon {
        width: 2.75rem;
        height: 2.75rem;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: var(--bb-orange-light);
        color: var(--bb-orange);
        border-radius: var(--radius-round);
        margin-bottom: var(--size-3);

        svg { width: var(--size-5); }
    }

    &:nth-child(4n+2) .service-icon { background-color: var(--bb-teal-light); color: var(--bb-teal); }
    &:nth-child(4n+3) .service-icon { background-color: var(--bb-yellow-light); color: var(--bb-brown); }
    &:nth-child(4n+4) .service-icon { background-color: #FFD9E8; color: #E0568C; }

    h3 { margin: 0 0 var(--size-2); font-size: var(--font-size-2); }
    p { color: var(--bb-brown-muted); margin: 0; }
}

/* Services page: alternating image/text feature rows */
.service-features {
    display: flex;
    flex-direction: column;
    gap: var(--size-8);
}

.service-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--size-6);

    .service-feature-image {
        flex: 1;
        width: 100%;

        img {
            display: block;
            width: 100%;
            aspect-ratio: 4 / 3;
            object-fit: cover;
            border-radius: 1.5rem;
            box-shadow: var(--shadow-2);
        }
    }

    .service-feature-content {
        flex: 1;
        width: 100%;
        text-align: left;

        .service-icon {
            width: 2.75rem;
            height: 2.75rem;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: var(--bb-orange-light);
            color: var(--bb-orange);
            border-radius: var(--radius-round);
            margin-bottom: var(--size-3);

            svg { width: var(--size-5); }
        }

        h3 { margin: 0 0 var(--size-2); font-size: var(--font-size-4); }
        p { color: var(--bb-brown-muted); margin: 0; }

        .service-price {
            color: var(--bb-orange);
            font-weight: 700;
            margin-top: var(--size-3);
        }
    }

    &:nth-child(4n+2) .service-icon { background-color: var(--bb-teal-light); color: var(--bb-teal); }
    &:nth-child(4n+3) .service-icon { background-color: var(--bb-yellow-light); color: var(--bb-brown); }
    &:nth-child(4n+4) .service-icon { background-color: #FFD9E8; color: #E0568C; }
}

@media (width >= 800px) {
    .service-feature {
        flex-direction: row;
        gap: var(--size-8);
    }

    .service-feature--reverse {
        flex-direction: row-reverse;
    }
}

/* Trust strip */
.trust-band {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--size-3);
    padding: var(--size-4) var(--size-5);
    background-color: var(--bb-brown);
    color: var(--bb-cream);
    text-align: center;
    font-size: var(--font-size-1);

    svg { width: var(--size-5); color: var(--bb-orange); flex-shrink: 0; }
}

/* Final CTA band */
.final-cta {
    text-align: center;
    padding: var(--size-8) var(--size-5);
    background-color: var(--bb-orange-light);
    max-width: 64rem;
    margin-inline: auto;

    /* .button-cta's default :hover shade is the same as this section's
       background, so the button visually disappears on hover here - use a
       darker shade instead, just for this context. */
    .button-cta:hover { background-color: #E8752C; }

    h2 {
        margin-bottom: var(--size-3);
        max-width: 64rem;
        margin-inline: auto;
    }
    p {
        color: var(--bb-brown-muted);
        margin-bottom: var(--size-5);
        max-width: 64rem;
        margin-inline: auto;
    }
}

.site-footer {
    background-color: var(--bb-brown);
    color: var(--bb-cream);
    padding: var(--size-7) var(--size-5) var(--size-9);
    text-align: center;

    .footer-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--size-2);
        font-family: var(--bb-font-display);
        font-size: var(--font-size-3);
        font-weight: 700;
        margin-bottom: var(--size-2);

        svg { width: var(--size-5); color: var(--bb-orange); }
    }

    .tagline {
        color: var(--bb-orange-light);
        margin-bottom: var(--size-4);
        min-width: 100%;
    }

    .footer-contact {
        display: flex;
        justify-content: center;
        gap: var(--size-5);
        flex-wrap: wrap;
        color: var(--bb-cream);

        a {
            display: inline-flex;
            align-items: center;
            gap: var(--size-1);
            color: var(--bb-cream);
            text-decoration: none;

            svg { width: var(--size-4); color: var(--bb-orange); }
        }
    }
}

/* Sticky mobile "Get a Quote" bar - most traffic arrives from phone ad clicks */
.mobile-sticky-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    padding: var(--size-3) var(--size-4);
    background-color: var(--bb-cream);
    border-top: 1px solid color-mix(in srgb, var(--bb-brown) 15%, transparent);
    box-shadow: var(--shadow-3);

    a {
        display: block;
        text-align: center;
        background-color: var(--bb-orange);
        color: var(--bb-brown);
        font-weight: 600;
        padding: var(--size-3);
        border-radius: var(--radius-round);
        text-decoration: none;
    }
}

@media (width <= 720px) {
    .mobile-sticky-cta { display: block; }
    body { padding-bottom: 4.5rem; }
}


/* =========================================================================
   Quote wizard
   ========================================================================= */

.quote-wizard-page {
    padding: var(--size-7) var(--size-4);
    max-width: 32rem;
    margin-inline: auto;
    min-height: 70vh;
}

#quote-wizard {
    background-color: var(--bb-cream);
    border: 2px solid color-mix(in srgb, var(--bb-brown) 8%, transparent);
    border-radius: 1.5rem;
    padding: var(--size-6);
}

.wizard-progress {
    display: flex;
    gap: var(--size-2);
    margin-bottom: var(--size-6);

    span {
        flex: 1;
        height: 4px;
        border-radius: var(--radius-round);
        background-color: color-mix(in srgb, var(--bb-brown) 12%, transparent);
    }

    span.active { background-color: var(--bb-orange); }
}

.wizard-step {
    display: flex;
    flex-direction: column;
    gap: var(--size-3);

    label {
        font-weight: 600;
        font-size: var(--font-size-1);
    }

    input, select {
        width: 100%;
        box-sizing: border-box;
        height: var(--size-8);
        padding: 0 var(--size-2);
    }
}

.wizard-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--size-2);

    label {
        display: flex;
        align-items: center;
        gap: var(--size-2);
        font-weight: 500;
        border: 1px solid color-mix(in srgb, var(--bb-brown) 15%, transparent);
        border-radius: var(--radius-2);
        padding: var(--size-3);

        input { width: auto; height: auto; }
    }
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    gap: var(--size-3);
    margin-top: var(--size-3);

    button { flex: 1; }
    .wizard-back { background-color: transparent; border: 1px solid var(--bb-brown); color: var(--bb-brown); }
}

.wizard-errors {
    color: #B3261E;
    font-size: var(--font-size-1);
}

.wizard-thanks {
    text-align: center;
    padding: var(--size-6) 0;

    svg { width: 3rem; color: var(--bb-orange); margin-bottom: var(--size-3); }
    h3 { margin-bottom: var(--size-2); }
    p { color: var(--bb-brown-muted); }
}


/* =========================================================================
   Admin quotes dashboard
   ========================================================================= */

.admin-quotes-page {
    padding: var(--size-5);
}

.quotes-table {
    display: grid;
    grid-template-columns: 8rem 8rem 4.5rem 8rem 9rem 10rem 7rem 6rem 14rem 7rem;
    gap: 0;
    border: 1px solid color-mix(in srgb, var(--bb-brown) 12%, transparent);
    border-radius: 1rem;
    overflow-x: auto;
    font-size: var(--font-size-1);
}

.quotes-header {
    display: contents;

    span {
        font-weight: 600;
        background-color: var(--bb-brown);
        color: var(--bb-cream);
        padding: var(--size-2);
        position: sticky;
        top: 0;
    }
}

/* Each row is a div (a grid item group) wrapping a <form style="display:contents">
   so the row's "Send Quote" button can submit just that row's fields, while both
   the div and the form disappear from layout (display: contents) leaving their
   span/input/select children as direct grid items of .quotes-table. */
.quotes-row {
    display: contents;

    form { display: contents; }

    form > input[type="hidden"] { display: none; }

    form > *:not([type="hidden"]) {
        padding: var(--size-2);
        border-top: 1px solid color-mix(in srgb, var(--bb-brown) 10%, transparent);
        display: flex;
        align-items: center;
    }

    input, select {
        width: 100%;
        box-sizing: border-box;
        height: var(--size-7);
    }
}

.status-badge {
    display: inline-block;
    padding: 2px var(--size-2);
    border-radius: var(--radius-round);
    font-size: var(--font-size-0);
    font-weight: 600;
}

.status-new { background-color: var(--bb-orange-light); color: var(--bb-brown); }
.status-quoted { background-color: color-mix(in srgb, var(--bb-brown) 15%, var(--bb-cream)); color: var(--bb-brown); }
.status-sent { background-color: var(--bb-brown); color: var(--bb-cream); }

.row-error { color: #B3261E; font-size: var(--font-size-0); }




