/* CarTraceAI public shell — compact automotive service system, 2026-08-30. */

:root {
    --handoff-navy: #17212b;
    --handoff-blue: #1674d4;
    --handoff-blue-deep: #1269c4;
    --handoff-cyan: #00bfea;
    --handoff-ice: #f7f9fb;
    --handoff-green: #15965e;
    --handoff-amber: #b66c00;
    --handoff-muted: #626a73;
    --handoff-border: #dfe4ea;
    --public-shell-max: 71rem;
    --wordmark-lockup-width: clamp(7.5rem, 9vw, 8.75rem);
    --wordmark-mark-size: 1.9rem;
    --public-content-max: var(--public-shell-max);
    /* The public product now uses one compact humanist family throughout.
       Hierarchy comes from weight, spacing and alignment instead of oversized
       display type. The self-hosted face covers all six supported scripts. */
    --public-display-font: "CarTrace Sans", "Noto Sans", system-ui, sans-serif;
    --public-display-home: 2.1875rem;
    --public-display-page: 2.1875rem;
    --public-display-section: 1.5rem;
    --public-text-body: 1rem;
    --public-text-support: 0.875rem;
    --public-text-caption: 0.8125rem;
    --public-leading-body: 1.6;
    --public-leading-support: 1.5;
    --public-copy-measure: 65ch;
    --public-label-weight: 600;
    --public-section-space: clamp(2.25rem, 3vw, 3rem);
    --public-heading-space: clamp(1.1rem, 1.8vw, 1.5rem);
    --public-layout-gap: clamp(1.25rem, 2.5vw, 2.25rem);
    --public-card-space: clamp(1rem, 1.8vw, 1.25rem);
    --public-radius-control: 0.5rem;
    --public-radius-card: 0.75rem;
    --public-radius-panel: 0.75rem;
    --public-border-strong: #cbd3dc;
    /* One optical scale for every future public-page icon. Complex symbols do
       not drop below inline size; section containers retain a 44px target. */
    --public-icon-inline: 1.25rem;
    --public-icon-standard: 1.5rem;
    --public-icon-prominent: 1.75rem;
    --public-icon-container: 2.75rem;
}

:lang(ka) {
    --public-display-home: 2.1875rem;
    --public-display-page: 2.1875rem;
}

/* The same self-hosted family and measured scale serve every supported script. */
:lang(hy) {
    --public-display-home: 2.1875rem;
    --public-display-page: 2.1875rem;
}

body {
    --color-page: var(--handoff-ice);
    --color-surface: #ffffff;
    --color-ink: #3f464e;
    --color-ink-strong: var(--handoff-navy);
    --color-text: #3f464e;
    --color-muted: var(--handoff-muted);
    --color-border: var(--handoff-border);
    --color-primary: var(--handoff-blue);
    --color-primary-hover: var(--handoff-blue-deep);

    display: flex;
    background: #ffffff;
    color: #3f464e;
    flex-direction: column;
    font-family: var(--public-display-font);
    font-size: var(--public-text-body);
    font-weight: 400;
    line-height: var(--public-leading-body);
}

body.page-public main p {
    text-wrap: pretty;
}

:where(body.page-public) main :is(h1, h2, h3) {
    color: var(--handoff-navy);
    font-family: var(--public-display-font);
    font-weight: 600;
}

:where(body.page-public) main h1 {
    font-size: var(--public-display-page);
    font-weight: 500;
    line-height: 1.2;
}

:where(body.page-public) main h2 {
    font-size: var(--public-display-section);
    line-height: 2rem;
}

:where(body.page-public) main h3 {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

body > main {
    flex: 1 0 auto;
}

.shell {
    width: min(100% - 2rem, var(--public-shell-max));
}

/* --- Sticky header ------------------------------------------------------
 *
 * The header follows the page down and collapses its logo to the bare mark
 * once it does. Both cuts of the logo are already in the markup; this only
 * decides which one is visible, so the swap costs no request and cannot flash
 * an empty box.
 *
 * The stuck class is set by an IntersectionObserver watching the sentinel
 * above the header. Everything below is the same with or without that class,
 * so a visitor with no JavaScript gets a sticky header carrying the full
 * lockup rather than a broken one.
 */

.site-header {
    position: sticky;
    top: 0;
    border-bottom-color: var(--handoff-border);
    background: #ffffff;
    box-shadow: none;
    backdrop-filter: none;
    transition: border-color 160ms ease, background-color 160ms ease;
}

/* One pixel, pulled back out of the flow, so watching it costs no layout. */
.site-header__sentinel {
    height: 1px;
    margin-bottom: -1px;
}

/* An anchor must not land underneath the header it just scrolled past. */
html {
    scroll-padding-top: 4.5rem;
}

.site-header--stuck {
    border-bottom-color: #ccd3db;
    background: #ffffff;
    box-shadow: none;
}

.site-header__inner {
    min-height: 4rem;
    transition: min-height 220ms ease;
}

.site-header--stuck .site-header__inner {
    min-height: 3.75rem;
}

.wordmark {
    min-width: 0;
}

/*
 * Both logo cuts share one grid cell and the box animates between their two
 * widths, clipping the wordmark away to the right while the mark stays on the
 * same left origin — so the logo appears to collapse into itself rather than
 * being replaced by a different object.
 */
/* Declared before the two cuts below, so their own widths are what survives. */
.wordmark__asset {
    display: block;
    width: var(--wordmark-lockup-width);
    height: auto;
}

.wordmark__stack {
    display: grid;
    overflow: hidden;
    width: var(--wordmark-lockup-width);
    height: var(--wordmark-mark-size);
    flex: 0 0 auto;
    align-items: center;
    transition: width 260ms ease;
}

.site-header--stuck .wordmark__stack {
    width: var(--wordmark-mark-size);
}

.wordmark__stack .wordmark__asset {
    grid-area: 1 / 1;
    justify-self: start;
    transition: opacity 180ms ease;
}

.wordmark__stack .wordmark__asset--lockup {
    width: var(--wordmark-lockup-width);
    height: auto;
}

.wordmark__stack .wordmark__asset--mark {
    width: var(--wordmark-mark-size);
    height: var(--wordmark-mark-size);
    opacity: 0;
}

.site-header--stuck .wordmark__stack .wordmark__asset--lockup {
    opacity: 0;
}

.site-header--stuck .wordmark__stack .wordmark__asset--mark {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .site-header,
    .site-header__inner,
    .wordmark__stack,
    .wordmark__stack .wordmark__asset {
        transition: none;
    }
}


.primary-nav {
    gap: clamp(1.25rem, 2.2vw, 2rem);
}

.primary-nav a {
    position: relative;
    color: var(--handoff-navy);
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    white-space: nowrap;
}

.primary-nav a::after {
    position: absolute;
    inset-inline: 0;
    inset-block-end: -0.65rem;
    height: 2px;
    border-radius: 999px;
    background: var(--handoff-blue);
    content: "";
    opacity: 0;
    transform: scaleX(0.45);
}

.primary-nav a:hover::after,
.primary-nav a:is([aria-current="page"], [aria-current="location"])::after {
    opacity: 1;
    transform: scaleX(1);
}

.primary-nav a:is([aria-current="page"], [aria-current="location"]) {
    color: var(--handoff-blue-deep);
    font-weight: 600;
}

.site-header .language-menu summary {
    min-height: 2.75rem;
    gap: 0.5rem;
    color: var(--handoff-navy);
    font-size: 0.875rem;
    font-weight: 500;
}

.site-header .language-menu .icon {
    width: var(--public-icon-inline);
    height: var(--public-icon-inline);
}

.site-header .language-menu__panel {
    scrollbar-gutter: stable;
}

.language-menu__flag {
    flex-shrink: 0;
    width: var(--icon-size-inline);
    height: 0.9375rem;
    border-radius: 0.15rem;
    outline: 1px solid rgb(6 24 45 / 12%);
    outline-offset: -1px;
}

.site-header__cta {
    min-height: 2.75rem;
    padding-inline: 1rem;
    border-color: var(--handoff-blue);
    border-radius: 999px;
    background: var(--handoff-blue);
    color: #ffffff;
    box-shadow: none;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.site-header__cta:hover {
    border-color: var(--handoff-blue-deep);
    background: var(--handoff-blue-deep);
    color: #ffffff;
}

.site-header__cta[aria-current="page"] {
    border-color: var(--handoff-blue-deep);
    background: var(--handoff-blue-deep);
}

.site-header__cta-icon {
    display: none;
    width: var(--public-icon-inline);
    height: var(--public-icon-inline);
    flex: 0 0 auto;
}

.button--primary {
    background: var(--handoff-blue);
    box-shadow: none;
}

.button--primary:hover {
    background: var(--handoff-blue-deep);
}

/* One announced-offer vocabulary across entry, result, pricing and sample. */
.page-public main .commercial-offer__label {
    margin: 0;
    color: var(--handoff-muted);
    font-size: 0.8125rem;
    font-weight: 500;
}

.page-public main .commercial-offer__price {
    margin: 0;
    color: var(--handoff-navy);
    font-size: clamp(1.75rem, 2.4vw, 2rem);
    font-weight: 650;
    letter-spacing: -0.025em;
    line-height: 1.25;
    font-variant-numeric: tabular-nums;
}

.page-public main .commercial-offer__note {
    margin: 0.25rem 0 0.75rem;
    color: var(--handoff-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.commercial-offer__development {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.page-public .commercial-offer__disabled,
.page-public .commercial-offer__development > button:disabled {
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
    min-height: 2.5rem;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--handoff-border);
    border-radius: var(--public-radius-control);
    background: var(--handoff-ice);
    color: #58626d;
    box-shadow: none;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.45;
    text-align: start;
    white-space: normal;
    opacity: 1;
    cursor: not-allowed;
}

.page-public :is(.button, .primary-nav a, .site-footer a, .language-menu > summary, .mobile-nav > summary):focus-visible,
.page-public main :is(a, summary):focus-visible {
    outline: 3px solid var(--color-focus, #2f6fed);
    outline-offset: 3px;
    box-shadow: none;
}

.site-footer {
    flex: 0 0 auto;
    margin-block-start: auto;
    padding-block: 2.25rem 1.25rem;
    background: var(--handoff-navy);
}

.site-footer::before {
    display: none;
}

.wordmark--footer {
    width: fit-content;
}

.wordmark--footer .wordmark__asset {
    width: 8.75rem;
}

.site-footer__product {
    display: grid;
    align-content: start;
    gap: 0.6rem;
}

.site-footer__product a,
.site-footer__legal a {
    color: #d7dee6;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.site-footer__product a:hover,
.site-footer__legal a:hover {
    color: white;
}

.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-block-start: 0.8rem;
}

.site-footer__grid {
    gap: 1.5rem;
}

.page-public .site-footer {
    container: public-footer / inline-size;
}

.page-public .site-footer__grid > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.site-footer__grid p {
    color: #b9c3ce;
    line-height: 1.5;
}

.site-footer__status {
    gap: 0.625rem;
    padding: 0.25rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.site-footer__status > span {
    margin-top: 0.45rem;
}

.site-footer__product a:is([aria-current="page"], [aria-current="location"]) {
    color: #ffffff;
    font-weight: 600;
}

.mobile-nav__panel a:is([aria-current="page"], [aria-current="location"]) {
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    font-weight: 600;
}

.site-footer__bottom {
    margin-block-start: 1.5rem;
    border-top-color: #35404c;
}

@media (min-width: 23rem) {
    .shell {
        width: min(100% - 4rem, var(--public-shell-max));
    }
}

@media (min-width: 48rem) {
    .shell {
        width: min(100% - 4rem, var(--public-shell-max));
    }

    .site-footer__grid {
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.8fr);
        align-items: start;
    }

    .site-footer__status {
        grid-column: 1 / -1;
    }

    .site-footer__bottom {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1.5rem;
    }

    .site-footer__legal {
        justify-content: flex-end;
        margin-block-start: 0;
    }
}

@media (min-width: 64rem) {
    .site-footer__grid {
        grid-template-columns: minmax(14rem, 1fr) minmax(9rem, 0.45fr) minmax(18rem, 0.8fr);
    }

    .site-footer__status {
        grid-column: auto;
    }
}

@media (max-width: 47.99rem) {
    :root {
        --public-display-home: 1.5rem;
        --public-display-page: 1.5rem;
        --public-display-section: 1.25rem;
        --public-section-space: 2rem;
        --public-heading-space: 1.1rem;
    }

    :lang(ka),
    :lang(hy) {
        --public-display-home: 1.5rem;
        --public-display-page: 1.5rem;
    }

    :where(body.page-public) main h1 {
        line-height: 2rem;
    }

    :where(body.page-public) main h2 {
        line-height: 1.75rem;
    }

    .site-footer {
        padding-block-start: 2.25rem;
    }
}

@media (min-width: 72rem) {
    .site-header__inner {
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr) max-content;
        column-gap: clamp(1rem, 2vw, 1.5rem);
    }

    .primary-nav {
        margin: 0;
        justify-self: center;
        transform: none;
    }

    .site-header__actions {
        margin: 0;
        justify-self: end;
        transform: none;
    }
}

@media (min-width: 72rem) {
    :is(:lang(ru), :lang(ka), :lang(kk), :lang(hy), :lang(az)) .primary-nav {
        gap: clamp(0.75rem, 1.35vw, 1.15rem);
    }

    :is(:lang(ru), :lang(ka), :lang(kk), :lang(hy), :lang(az)) .primary-nav a {
        font-size: 0.875rem;
    }

    :is(:lang(ru), :lang(ka), :lang(kk), :lang(hy), :lang(az)) .site-header__cta {
        padding-inline: 0.8rem;
        font-size: 0.8125rem;
    }
}

@media (min-width: 72rem) and (max-width: 82rem) {
    :is(:lang(ru), :lang(ka), :lang(kk), :lang(hy), :lang(az)) .primary-nav {
        display: none;
    }

    :is(:lang(ru), :lang(ka), :lang(kk), :lang(hy), :lang(az)) .mobile-nav {
        display: block;
    }
}

@media (max-width: 30rem) {
    :root {
        --wordmark-lockup-width: 7.8rem;
        --wordmark-mark-size: 1.9rem;
    }

    .site-header__actions {
        gap: 0.35rem;
    }

    .site-header__inner {
        min-height: 4rem;
    }

    .site-footer__legal {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem 0.75rem;
    }

    .site-footer__legal a {
        min-width: 0;
        overflow-wrap: normal;
        word-break: normal;
    }
}

@media (max-width: 30rem) {
    :is(:lang(ka), :lang(hy)) .site-footer__legal {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (min-width: 23rem) and (max-width: 35rem) {
    .site-header__actions .site-header__cta {
        display: inline-flex;
        width: 2.75rem;
        min-width: 2.75rem;
        height: 2.75rem;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    .site-header__cta-icon {
        display: block;
    }

    .site-header__cta-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        border: 0;
        margin: -1px;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        overflow: hidden;
        white-space: nowrap;
    }
}

@media (max-width: 35rem) {
    .mobile-nav__label {
        display: none;
    }
}

@media (max-width: 22.99rem) {
    .site-header__actions .site-header__cta {
        display: none;
    }
}

@media (max-width: 71.99rem) {
    .site-header__actions {
        transform: none;
    }
}

/* Respond to enlarged text as well as viewport size. Unlike viewport media
   queries, these rem thresholds use the footer's current font size. */
@container public-footer (max-width: 63.99rem) {
    .page-public .site-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .page-public .site-footer__status {
        grid-column: 1 / -1;
    }
}

@container public-footer (max-width: 47.99rem) {
    .page-public .site-footer__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (forced-colors: active) {
    .page-public :is(a, button, summary):focus-visible {
        outline-color: Highlight;
    }

    .wordmark--footer {
        border: 1px solid CanvasText;
    }
}
