/* ==========================================================================
   Bayou City Movers — Global Styles
   Shared fonts, tokens, reset, typography, buttons, and navigation.
   Mobile first: base rules target phones, min-width queries enhance.
   ========================================================================== */

/* ---------- Fonts (self-hosted) ---------- */
@font-face {
    font-family: "Bebas Neue";
    src: url("../fonts/bebas-neue-latin-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/poppins-latin-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/poppins-latin-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Poppins";
    src: url("../fonts/poppins-latin-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Metric-matched fallback to reduce layout shift while Poppins loads */
@font-face {
    font-family: "Poppins Fallback";
    src: local("Arial");
    size-adjust: 112.16%;
    ascent-override: 93.62%;
    descent-override: 31.21%;
    line-gap-override: 8.92%;
}

/* ---------- Design tokens ---------- */
:root {
    --color-maroon: #6E0F1E;
    --color-maroon-dark: #4A0A14;
    --color-red: #C8102E;
    --color-red-bright: #E5243F;
    --color-black: #141414;
    --color-gray: #5C5C5C;
    --color-offwhite: #F5F5F5;
    --color-cream: #ECECEC;
    --color-white: #FFFFFF;

    --font-heading: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
    --font-body: "Poppins", "Poppins Fallback", Arial, sans-serif;

    --container-max: 80rem;
    --gutter: 1rem;
    --radius-pill: 999px;
    --radius-md: 0.75rem;
    --shadow-md: 0 0.75rem 2rem rgba(20, 20, 20, 0.12);
    --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    min-height: 100vh;
    overflow-x: clip; /* stops slide-in animations from causing a sideways scroll */
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

img,
picture,
video,
svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid var(--color-red);
    outline-offset: 3px;
}

/* ---------- Typography ---------- */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0.02em;
}

/* ---------- Utilities ---------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1000;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    color: var(--color-white);
    background-color: var(--color-black);
    border-radius: var(--radius-md);
    transform: translateY(-150%);
    transition: transform var(--transition);
}

.skip-link:focus {
    transform: translateY(0);
}

/* ---------- Loading screen ----------
   global.js sets --progress (0 to 1) and adds .is-done at 100%.
   The failsafe animation hides it on its own if JavaScript never runs. */
.loader {
    --progress: 0;

    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: var(--gutter);
    color: var(--color-white);
    background-color: var(--color-black);
    background-image: radial-gradient(ellipse 60% 50% at 50% 55%, rgba(200, 16, 46, 0.22), transparent 70%);
    transition: opacity 0.6s ease, visibility 0.6s;
    animation: loader-failsafe 0.6s ease 8s forwards;
}

.loader.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

@keyframes loader-failsafe {
    to {
        visibility: hidden;
        opacity: 0;
    }
}

.loader-inner {
    width: min(100%, 34rem);
    text-align: center;
}

.loader-brand {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 6vw, 3.25rem);
    line-height: 1;
    letter-spacing: 0.04em;
}

/* The truck rides left to right as --progress grows (loader-truck-right is a mirrored copy), then drives off at the end */
.loader-track {
    position: relative;
    height: 7rem;
    margin-top: 2rem;
}

.loader-truck {
    position: absolute;
    bottom: 0.6rem;
    left: 0;
    width: 9.5rem;
    transform: translateX(calc(var(--progress) * (min(100vw - 2 * var(--gutter), 34rem) - 9.5rem)));
    transition: transform 0.25s linear;
}

.loader-truck img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0.5rem 0.5rem rgba(0, 0, 0, 0.5));
    animation: loader-bob 0.5s ease-in-out infinite alternate;
}

@keyframes loader-bob {
    to {
        translate: 0 -2px;
    }
}

.loader.is-done .loader-truck {
    transform: translateX(calc(100vw + 10rem));
    transition: transform 0.9s cubic-bezier(0.55, 0, 0.8, 0.4);
}

.loader-road {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.3) 55%, transparent 55%);
    background-size: 1.75rem 3px;
    mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

.loader-progress {
    height: 4px;
    margin-top: 1.75rem;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.12);
}

.loader-progress-fill {
    display: block;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(90deg, var(--color-maroon), var(--color-red-bright));
    transform: scaleX(var(--progress));
    transform-origin: left; /* fills the same way the truck drives */
    transition: transform 0.25s linear;
}

.loader-percent {
    margin-top: 0.85rem;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.85);
}

@media (prefers-reduced-motion: reduce) {
    .loader-truck,
    .loader-truck img,
    .loader-progress-fill {
        animation: none;
        transition: none;
    }
}

/* ---------- Section headings ---------- */
.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-red);
}

.section-eyebrow::before {
    content: "";
    width: 1.75rem;
    height: 2px;
    background-color: currentColor;
}

.section-title {
    margin-top: 0.75rem;
    font-size: clamp(2.5rem, 4vw + 1.25rem, 4rem);
    color: var(--color-black);
}

.section-text {
    max-width: 34rem;
    margin-top: 1rem;
    font-size: 1.0625rem;
    color: var(--color-gray);
}

/* Heading variants for dark sections */
.section-eyebrow-light {
    color: var(--color-red-bright);
}

.section-title-light {
    color: var(--color-white);
}

.section-text-light {
    color: rgba(255, 255, 255, 0.8);
}

/* ---------- Rain streaks (decorative section background) ---------- */
/* flow-root keeps a child's negative top margin from dragging the rain upward */
.rain-zone {
    position: relative;
    display: flow-root;
}

.rain-streaks {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.rain-streaks span {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: rgba(110, 15, 30, 0.05);
}

.rain-streaks span::after {
    content: "";
    position: absolute;
    left: 0;
    top: -12rem;
    width: 1px;
    height: 12rem;
    background-image: linear-gradient(to bottom, rgba(200, 16, 46, 0), rgba(200, 16, 46, 0.55));
    animation: rain-fall 8s linear infinite;
}

/* Stagger position, speed, and start time so the rain feels random */
.rain-streaks span:nth-child(1)  { left: 6%; }
.rain-streaks span:nth-child(2)  { left: 17%; }
.rain-streaks span:nth-child(3)  { left: 29%; }
.rain-streaks span:nth-child(4)  { left: 41%; }
.rain-streaks span:nth-child(5)  { left: 54%; }
.rain-streaks span:nth-child(6)  { left: 66%; }
.rain-streaks span:nth-child(7)  { left: 78%; }
.rain-streaks span:nth-child(8)  { left: 89%; }
.rain-streaks span:nth-child(9)  { left: 11%; }
.rain-streaks span:nth-child(10) { left: 35%; }
.rain-streaks span:nth-child(11) { left: 60%; }
.rain-streaks span:nth-child(12) { left: 95%; }

.rain-streaks span:nth-child(1)::after  { animation-duration: 10.5s;   animation-delay: -1s; }
.rain-streaks span:nth-child(2)::after  { animation-duration: 13.5s;   animation-delay: -4s; }
.rain-streaks span:nth-child(3)::after  { animation-duration: 9.75s; animation-delay: -2.5s; }
.rain-streaks span:nth-child(4)::after  { animation-duration: 15s;  animation-delay: -7s; }
.rain-streaks span:nth-child(5)::after  { animation-duration: 12s;   animation-delay: -3s; }
.rain-streaks span:nth-child(6)::after  { animation-duration: 11.25s; animation-delay: -6s; }
.rain-streaks span:nth-child(7)::after  { animation-duration: 14.25s; animation-delay: -0.5s; }
.rain-streaks span:nth-child(8)::after  { animation-duration: 9s;   animation-delay: -4.5s; }
.rain-streaks span:nth-child(9)::after  { animation-duration: 16.5s;  animation-delay: -8s; }
.rain-streaks span:nth-child(10)::after { animation-duration: 12.75s; animation-delay: -5.5s; }
.rain-streaks span:nth-child(11)::after { animation-duration: 15.75s; animation-delay: -2s; }
.rain-streaks span:nth-child(12)::after { animation-duration: 10.5s;   animation-delay: -6.5s; }

/* Fewer lines on phones */
.rain-streaks span:nth-child(n + 9) {
    display: none;
}

@keyframes rain-fall {
    from {
        top: -12rem;
    }
    to {
        top: 100%;
    }
}

@media (min-width: 48rem) {
    .rain-streaks span:nth-child(n + 9) {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rain-streaks span::after {
        display: none;
    }
}

/* ---------- Pyramid divider (top edge of a dark section) ---------- */
.divider-pyramid {
    position: absolute;
    top: -1px;
    left: 0;
    z-index: 1;
    width: 100%;
    height: clamp(2.5rem, 7vw, 6.5rem);
    pointer-events: none;
}

.divider-pyramid-fill {
    fill: var(--color-white);
}

.divider-pyramid-line {
    fill: none;
    stroke: var(--color-red);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

/* ---------- Peaks divider (bottom edge of a dark section) ---------- */
.divider-peaks {
    position: absolute;
    bottom: -1px;
    left: 0;
    z-index: 1;
    width: 100%;
    height: clamp(2.5rem, 7vw, 6.5rem);
    pointer-events: none;
}

.divider-peaks-fill {
    fill: var(--color-white);
}

/* Hanging from the top of a section, painted in the section above's colour */
.divider-peaks-top {
    top: -1px;
    bottom: auto;
    transform: scaleY(-1);
}

.divider-peaks-top .divider-peaks-fill {
    fill: var(--divider-color, var(--color-black));
}

.divider-peaks-line {
    fill: none;
    stroke: var(--color-red);
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

/* ---------- Animated SVG texture behind a section ----------
   The SVG is drawn as a background image (already coloured in the file);
   a gradient mask fades it out at the top and bottom edges. */
.has-texture {
    position: relative;
    isolation: isolate;
}

.has-texture--particles {
    --texture-image: url("../images/svg-backgrounds/wobbling-particles-red.svg");
}

.has-texture::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--texture-image) center / cover no-repeat;
    opacity: var(--texture-opacity, 0.5);
    pointer-events: none;
    -webkit-mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(transparent, #000 12%, #000 88%, transparent);
}

/* ---------- Intersecting arc divider (top edge of a dark section) ----------
   Shape from images/svg-dividers/intersecting-arc.svg, inlined so it can be
   coloured with CSS. The two half-opacity layers show as lighter bands. */
.divider-arc {
    position: absolute;
    top: -1px;
    left: 0;
    z-index: 2;
    width: 100%;
    height: clamp(3rem, 8vw, 7rem);
    fill: var(--divider-color, var(--color-white));
    pointer-events: none;
}

.divider-arc-band-red {
    fill: var(--color-red);
}

.divider-arc-band-maroon {
    fill: var(--color-maroon);
}

/* ---------- Scroll reveal ----------
   global.js tags elements with data-reveal and adds .reveal-ready to <html>,
   so nothing is hidden if JavaScript does not run. */
.reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(2rem);
    transition:
        opacity 0.8s ease,
        transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--reveal-delay, 0s);
}

.reveal-ready [data-reveal="left"] {
    transform: translateX(-2.5rem);
}

.reveal-ready [data-reveal="right"] {
    transform: translateX(2.5rem);
}

.reveal-ready [data-reveal="zoom"] {
    transform: scale(0.95);
}

.reveal-ready [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

/* ---------- Carousel controls ---------- */
.carousel-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.carousel-btn {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    color: var(--color-black);
    background-color: var(--color-white);
    border: 1px solid #DDDDDD;
    border-radius: 50%;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}

.carousel-btn:hover {
    color: var(--color-white);
    background-color: var(--color-red);
    border-color: var(--color-red);
}

.carousel-btn .icon-play,
.carousel-btn.is-paused .icon-pause {
    display: none;
}

.carousel-btn.is-paused .icon-play {
    display: block;
}

/* ---------- Icons ---------- */
.icon {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-fill,
.icon-caret {
    fill: currentColor;
    stroke: none;
}

.icon-dot {
    fill: currentColor;
    stroke: none;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    border: 2px solid transparent;
    border-radius: 0;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.btn .icon {
    width: 1.1em;
    height: 1.1em;
    stroke-width: 2.5;
    transition: transform var(--transition);
}

.btn:hover .icon {
    transform: translate(2px, -2px);
}

.btn-primary {
    color: var(--color-white);
    background-color: var(--color-red);
}

.btn-primary:hover {
    background-color: var(--color-maroon);
}

.btn-secondary {
    color: var(--color-maroon);
    background-color: transparent;
    border-color: var(--color-maroon);
}

.btn-secondary:hover {
    color: var(--color-white);
    background-color: var(--color-maroon);
}

/* Light outline button for dark backgrounds */
.btn-ghost {
    color: var(--color-white);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.6);
}

.btn-ghost:hover {
    color: var(--color-black);
    background-color: var(--color-white);
    border-color: var(--color-white);
}

.btn-ghost:hover .icon-phone {
    transform: none;
}

.btn-lg {
    min-height: 3.5rem;
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.btn-block {
    width: 100%;
}

/* ---------- Forms ---------- */
.form-field {
    display: grid;
    gap: 0.4rem;
    align-content: start;
}

.form-fieldset {
    min-width: 0;
    border: 0;
}

.form-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-black);
}

.form-fieldset .form-label {
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    min-height: 3.25rem;
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.4;
    color: var(--color-black);
    background-color: var(--color-white);
    border: 1px solid #DDDDDD;
    border-radius: var(--radius-md);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control::placeholder {
    color: #9A9A9A;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-red);
    box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.15);
}

.form-control:user-invalid {
    border-color: var(--color-red-bright);
}

select.form-control {
    appearance: none;
    padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141414' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.1rem;
    cursor: pointer;
}

select.form-control:invalid {
    color: #9A9A9A;
}

textarea.form-control {
    min-height: 6.5rem;
    resize: vertical;
}

/* Checkbox and radio pills */
.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.choice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
    background-color: var(--color-white);
    border: 1px solid #DDDDDD;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: border-color var(--transition), background-color var(--transition);
}

.choice:hover {
    border-color: var(--color-maroon);
}

.choice input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--color-red);
    cursor: pointer;
}

.choice:has(input:checked) {
    border-color: var(--color-red);
    background-color: rgba(200, 16, 46, 0.06);
}

.choice:has(input:focus-visible) {
    outline: 3px solid var(--color-red);
    outline-offset: 2px;
}

.choice input:focus-visible {
    outline: none;
}

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    color: var(--color-white);
    background-color: var(--color-red);
    border: 0;
    box-shadow: 0 0.75rem 1.5rem rgba(20, 20, 20, 0.25);
    visibility: hidden;
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition), background-color var(--transition);
}

.back-to-top.is-visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-maroon);
}

.back-to-top .icon {
    width: 1.4rem;
    height: 1.4rem;
    stroke-width: 2.5;
}

@media (min-width: 64rem) {
    .back-to-top {
        right: 2rem;
        bottom: 2rem;
        width: 3.5rem;
        height: 3.5rem;
    }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* ---------- Top bar ---------- */
.topbar {
    color: var(--color-white);
    background-color: var(--color-red);
}

.topbar :focus-visible {
    outline-color: var(--color-white);
}

.topbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0 0.5rem;
    min-height: 3rem;
}

.topbar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 2.75rem;
    font-size: 1rem;
    font-weight: 500;
}

.topbar-toggle .icon-caret {
    width: 1.5em;
    height: 1.5em;
    transition: transform var(--transition);
}

.topbar-toggle[aria-expanded="true"] .icon-caret {
    transform: rotate(180deg);
}

.topbar-info {
    display: none;
    order: 3;
    flex-basis: 100%;
    padding-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.topbar.is-open .topbar-info {
    display: grid;
    gap: 0.25rem;
}

.topbar-info a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.5rem;
    transition: opacity var(--transition);
}

.topbar-info a:hover {
    opacity: 0.8;
}

.topbar-social {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar-social-label {
    display: none;
    font-size: 0.9375rem;
}

.social-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.social-list a {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    transition: background-color var(--transition);
}

.social-list a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ---------- Navbar ---------- */
.navbar {
    position: relative;
    background-color: var(--color-white);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
}

.site-header.is-scrolled .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: var(--shadow-md);
    animation: navbar-slide-in 0.35s ease;
}

@keyframes navbar-slide-in {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Brand */
.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo {
    width: 2.5rem;
    height: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: 0.03em;
    white-space: nowrap;
    color: var(--color-black);
}

.brand-accent {
    color: var(--color-red);
}

.brand-tagline {
    font-size: 0.625rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    white-space: nowrap;
    text-transform: uppercase;
    color: var(--color-gray);
}

/* Menu toggle (mobile) */
.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.75rem;
    padding-inline: 0.25rem;
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-black);
}

.menu-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.menu-toggle-icon,
.menu-toggle-icon span,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: currentColor;
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle-icon {
    position: relative;
    background-color: transparent;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
}

.menu-toggle-icon::before {
    top: -7px;
}

.menu-toggle-icon::after {
    top: 7px;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menu panel (mobile) */
.site-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100svh - 4.5rem);
    padding: 0.5rem var(--gutter) 1.5rem;
    overflow-y: auto;
    background-color: var(--color-white);
    border-top: 1px solid var(--color-cream);
    box-shadow: var(--shadow-md);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.site-menu.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.nav-list > li {
    border-bottom: 1px solid var(--color-cream);
}

/* Staggered entrance: each link fades in one after another */
.nav-list > li,
.nav-actions {
    opacity: 0;
    transform: translateX(-1rem);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.site-menu.is-open .nav-list > li,
.site-menu.is-open .nav-actions {
    opacity: 1;
    transform: translateX(0);
}

.site-menu.is-open .nav-list > li:nth-child(1) { transition-delay: 0.08s; }
.site-menu.is-open .nav-list > li:nth-child(2) { transition-delay: 0.16s; }
.site-menu.is-open .nav-list > li:nth-child(3) { transition-delay: 0.24s; }
.site-menu.is-open .nav-list > li:nth-child(4) { transition-delay: 0.32s; }
.site-menu.is-open .nav-list > li:nth-child(5) { transition-delay: 0.40s; }
.site-menu.is-open .nav-actions { transition-delay: 0.48s; }

.nav-link {
    display: block;
    padding-block: 0.9rem;
    font-size: 1.0625rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--transition);
}

.nav-link:hover,
.dropdown a:hover {
    color: var(--color-red);
}

/* Active section: tinted block, red text, and a small red square marker */
.nav-link {
    position: relative;
}

.nav-link.is-active {
    color: var(--color-red);
}

.nav-link::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0.45rem;
    margin-right: 0;
    vertical-align: 0.15em;
    background-color: var(--color-red);
    transition: width var(--transition), margin-right var(--transition);
}

.nav-link.is-active::before {
    width: 0.45rem;
    margin-right: 0.5rem;
}

/* Phone menu: a red bar down the left edge of the active row */
.nav-list > li {
    position: relative;
}

.nav-list > li:has(> .nav-link.is-active, > .nav-link-row > .nav-link.is-active)::after {
    content: "";
    position: absolute;
    top: 0.6rem;
    bottom: 0.6rem;
    left: calc(var(--gutter) * -1);
    width: 4px;
    background-color: var(--color-red);
}

.nav-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-toggle {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
}

.dropdown-toggle .icon-chevron {
    transition: transform var(--transition);
}

.nav-item.is-open .icon-chevron {
    transform: rotate(180deg);
}

.dropdown {
    max-height: 0;
    padding: 0 0 0 1rem;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.3s ease, visibility 0.4s;
}

.nav-item.is-open .dropdown {
    max-height: 30rem;
    padding-bottom: 0.75rem;
    visibility: visible;
    opacity: 1;
}

.dropdown a {
    display: block;
    padding-block: 0.5rem;
    font-size: 0.9375rem;
    color: var(--color-gray);
    transition: color var(--transition);
}

.nav-actions {
    display: grid;
    gap: 0.75rem;
    padding-top: 1.5rem;
}

.nav-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.85rem 1.75rem;
    font-weight: 600;
    color: var(--color-maroon);
    border: 2px solid var(--color-maroon);
    border-radius: 0;
    transition: background-color var(--transition), color var(--transition);
}

.nav-call:hover {
    color: var(--color-white);
    background-color: var(--color-maroon);
}

/* ==========================================================================
   Small phones and up
   ========================================================================== */
@media (min-width: 22.5rem) {
    .menu-toggle-label {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip: auto;
    }
}

@media (min-width: 30rem) {
    :root {
        --gutter: 1.25rem;
    }

    .topbar-inner {
        column-gap: 1rem;
    }

    .social-list a {
        width: 2.5rem;
        height: 2.5rem;
    }

    .brand {
        gap: 0.6rem;
    }

    .brand-logo {
        width: 3rem;
    }

    .brand-name {
        font-size: 1.75rem;
    }

    .brand-tagline {
        font-size: 0.6875rem;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding-top: 3rem;
    color: var(--color-gray);
    background-color: var(--color-white);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem 1.5rem;
}

.footer-brand,
.footer-col:last-child {
    grid-column: 1 / -1;
}

.footer-contact a {
    overflow-wrap: anywhere;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.footer-logo img {
    width: 3rem;
    height: auto;
}

.footer-logo-name {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.75rem;
    line-height: 1;
    letter-spacing: 0.03em;
    color: var(--color-black);
}

.footer-logo-tagline {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gray);
}

.footer-blurb {
    max-width: 22rem;
    margin-top: 1.25rem;
    font-size: 0.9375rem;
}

.footer-social {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.footer-social a {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--color-black);
    border: 1px solid #DDDDDD;
    transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.footer-social a:hover {
    color: var(--color-white);
    background-color: var(--color-red);
    border-color: var(--color-red);
}

.footer-social .icon {
    width: 1.1rem;
    height: 1.1rem;
}

.footer-heading {
    margin-bottom: 1rem;
    font-size: 1.375rem;
    letter-spacing: 0.04em;
    color: var(--color-black);
}

.footer-links {
    display: grid;
    gap: 0.6rem;
    font-size: 0.9375rem;
}

.footer-links a,
.footer-contact a {
    transition: color var(--transition);
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--color-red);
}

.footer-contact {
    display: grid;
    gap: 0.9rem;
    font-size: 0.9375rem;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.footer-contact .icon {
    margin-top: 0.15rem;
    color: var(--color-red);
}

.footer-cta {
    margin-top: 1.5rem;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    margin-top: 3.5rem;
    padding: 1.5rem 0 5rem; /* bottom room so the back to top button never covers text */
    font-size: 0.8125rem;
    color: var(--color-gray); /* #5C5C5C on white = 6.9:1, passes WCAG AA */
    border-top: 1px solid var(--color-cream);
}

@media (min-width: 48rem) {
    .footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 64rem) {
    .site-footer {
        padding-top: 4rem;
    }

    .footer-grid {
        grid-template-columns: 1.3fr 1.1fr 0.95fr 0.7fr 1.45fr;
        gap: 2.25rem;
    }

    .footer-contact a {
        overflow-wrap: normal;
    }

    .footer-brand,
    .footer-col:last-child {
        grid-column: auto;
    }

    .footer-bottom {
        padding-bottom: 1.75rem;
    }
}

/* ==========================================================================
   Tablet: full top bar
   ========================================================================== */
@media (min-width: 64rem) {
    .topbar-toggle {
        display: none;
    }

    .topbar-info,
    .topbar.is-open .topbar-info {
        display: flex;
        flex-basis: auto;
        order: 0;
        gap: 2rem;
        padding-bottom: 0;
    }

    .topbar-social-label {
        display: inline;
    }
}

/* ==========================================================================
   Desktop: horizontal navigation
   ========================================================================== */
@media (min-width: 80rem) {
    html {
        scroll-padding-top: 7rem;
    }

    .topbar-inner {
        min-height: 3.25rem;
    }

    /* Angled white bar floating over the hero */
    .navbar {
        background-color: transparent;
    }

    .navbar-inner {
        max-width: 90rem;
        min-height: 5.5rem;
        padding-inline: 3.5rem;
        position: relative;
        isolation: isolate;
    }

    /* Shape lives on a pseudo-element so dropdowns are not clipped */
    .navbar-inner::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background-color: var(--color-white);
        clip-path: polygon(2.25rem 0, calc(100% - 2.25rem) 0, 100% 100%, 0 100%);
    }

    .site-header.is-scrolled .navbar {
        box-shadow: none;
        filter: drop-shadow(0 0.5rem 1.25rem rgba(20, 20, 20, 0.18));
    }

    .brand-logo {
        width: 3.75rem;
    }

    .brand-name {
        font-size: 2.125rem;
    }

    .brand-tagline {
        font-size: 0.75rem;
    }

    .menu-toggle {
        display: none;
    }

    .site-menu {
        position: static;
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: space-between;
        gap: 1.5rem;
        max-height: none;
        margin-left: 2rem;
        padding: 0;
        overflow: visible;
        background-color: transparent;
        border-top: 0;
        box-shadow: none;
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .nav-list {
        display: flex;
        align-items: center;
        gap: 0.35rem;
    }

    .nav-list > li,
    .nav-actions {
        border-bottom: 0;
        opacity: 1;
        transform: none;
        transition: none;
    }

    .nav-item {
        position: relative;
    }

    .nav-link {
        padding: 0.5rem 0.7rem;
        font-size: 1rem;
        transition: color var(--transition), background-color var(--transition);
    }

    .nav-link.is-active {
        background-color: rgba(200, 16, 46, 0.08);
    }

    .nav-list > li:has(> .nav-link.is-active, > .nav-link-row > .nav-link.is-active)::after {
        display: none;
    }

    .nav-link-row {
        gap: 0.1rem;
    }

    .dropdown-toggle {
        width: 1.75rem;
        height: 1.75rem;
    }

    .dropdown-toggle .icon-chevron {
        width: 1.1rem;
        height: 1.1rem;
        stroke-width: 2.5;
    }

    .nav-item:hover .icon-chevron {
        transform: rotate(180deg);
    }

    .dropdown,
    .nav-item.is-open .dropdown {
        display: block;
        position: absolute;
        top: calc(100% + 1rem);
        left: -1.25rem;
        min-width: 18rem;
        max-height: none;
        padding: 0.5rem 0;
        overflow: visible;
        background-color: var(--color-white);
        border-top: 3px solid var(--color-red);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
        box-shadow: var(--shadow-md);
        visibility: hidden;
        opacity: 0;
        transform: translateY(0.5rem);
        transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    }

    /* Invisible bridge so hover is kept while moving into the dropdown */
    .dropdown::before {
        content: "";
        position: absolute;
        bottom: 100%;
        left: 0;
        right: 0;
        height: 1.25rem;
    }

    .nav-item:hover .dropdown,
    .nav-item.is-open .dropdown {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .dropdown a {
        padding: 0.6rem 1.25rem;
        color: var(--color-black);
        transition: color var(--transition), background-color var(--transition);
    }

    .dropdown a:hover {
        background-color: var(--color-offwhite);
    }

    .nav-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding-top: 0;
    }

    /* Call link collapses to an icon square */
    .nav-call {
        width: 3.25rem;
        min-height: 3.25rem;
        padding: 0;
        color: var(--color-black);
        background-color: var(--color-offwhite);
        border: 0;
        border-radius: 0;
    }

    .nav-call:hover {
        color: var(--color-white);
        background-color: var(--color-red);
    }

    .nav-call-text {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .nav-actions .btn {
        min-height: 3.25rem;
    }
}

@media (min-width: 90rem) {
    .nav-list {
        gap: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
}
