/* JD Align brand tokens cloned from the existing JD Align solution shell. */
:root {
    --jd-brand: #ff7043;
    --jd-brand-soft: #fff3e0;
    --jd-contrast: #ffffff;
    --nav-pill-h: 36px;
    --nav-pill-px: 12px;
    --nav-pill-radius: 8px;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f7fafc;
    color: #172033;
}

* {
    box-sizing: border-box;
}

a {
    color: inherit;
}

h1:focus {
    outline: none;
}

.mud-button-root,
.mud-button-root.mud-button {
    border-radius: 8px;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 800;
}

.mud-button-root.mud-button-filled.mud-button-filled-primary {
    background-color: var(--jd-brand);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(255, 112, 67, 0.24);
}

.mud-button-root.mud-button-filled.mud-button-filled-primary:hover,
.mud-button-root.mud-button-filled.mud-button-filled-primary:focus-visible {
    background-color: #e85f35;
}

.mud-button-root.mud-button-outlined.mud-button-outlined-primary {
    border-color: var(--jd-brand);
    color: var(--jd-brand);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-primary:hover,
.mud-button-root.mud-button-outlined.mud-button-outlined-primary:focus-visible {
    background-color: var(--jd-brand-soft);
}

.blazor-error-boundary {
    padding: 1rem;
    color: white;
    background: #b32121;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.main-container {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #f7fafc;
    color: #172033;
}

.brand-primary {
    --mud-palette-primary: var(--jd-brand);
    --mud-palette-primary-rgb: 255, 112, 67;
}

.body {
    display: flex;
    flex: 1;
    min-height: 0;
    min-width: 0;
}

.content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    min-width: 0;
    width: 100%;
    overflow-y: auto;
}

.body:has(.contact-page) {
    flex: 0 0 auto;
    width: 100%;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 0.5rem 1.5rem;
    background: var(--jd-brand);
    color: #ffffff;
}

.top-nav .mud-grid {
    align-items: center !important;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-img {
    display: block;
    width: auto;
    height: 70px;
}

.top-public-nav {
    width: 100%;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
}

.jd-nav-link,
.jd-nav-link:visited,
.jd-nav-link:active {
    display: inline-flex;
    align-items: center;
    height: var(--nav-pill-h);
    padding: 0 var(--nav-pill-px);
    border: 1px solid transparent;
    border-radius: var(--nav-pill-radius);
    box-sizing: border-box;
    color: #ffffff !important;
    font-size: 0.875rem;
    font-weight: 700 !important;
    line-height: 1;
    text-decoration: none;
    vertical-align: middle;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.jd-nav-link:hover,
.jd-nav-link:focus,
.jd-nav-link.active {
    background: #ffffff;
    color: var(--jd-brand) !important;
    border-color: var(--jd-brand);
}

.jd-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: var(--jd-brand);
    color: #ffffff;
}

.jd-footer__container {
    padding: 12px clamp(24px, 6vw, 64px);
}

.jd-footer__copy {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700 !important;
    line-height: 1.1;
}

.jd-footer a {
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
}

.jd-footer a:hover,
.jd-footer a:focus {
    background: #ffffff;
    color: var(--jd-brand) !important;
    border-radius: 6px;
}

.hero-section {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(17rem, 0.58fr);
    align-items: center;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding: clamp(1.75rem, 4vh, 2.5rem) clamp(1rem, 4vw, 4rem);
    background:
        linear-gradient(135deg, rgba(255, 112, 67, 0.10), rgba(245, 158, 11, 0.10)),
        #f7fafc;
}

.hero-copy {
    max-width: min(54rem, 56vw);
}

.eyebrow {
    margin: 0 0 0.75rem;
    color: var(--jd-brand);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-copy h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2.25rem, 3.2vw, 3.15rem);
    line-height: 1.04;
    letter-spacing: 0;
}

.hero-lead {
    max-width: 100%;
    margin: 1rem 0 0;
    color: #334155;
    font-size: clamp(1.05rem, 1.55vw, 1.22rem);
    line-height: 1.55;
}

.hero-support {
    max-width: 100%;
    margin: 0.75rem 0 0;
    color: #475569;
    font-size: 0.98rem;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.35rem;
}

.hero-visual-card {
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    justify-self: end;
    width: min(100%, 20.5rem);
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
}

.hero-visual-card img {
    display: block;
    width: 112%;
    height: 112%;
    object-fit: cover;
    object-position: center;
}

.signal-board {
    min-height: 12.5rem;
    display: grid;
    align-content: center;
    gap: 0.45rem;
    padding: clamp(0.85rem, 1.6vw, 1.1rem);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 8px;
    background:
        radial-gradient(circle at 22% 18%, rgba(14, 165, 233, 0.22), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(244, 63, 94, 0.18), transparent 30%),
        linear-gradient(145deg, #ffffff, #eef7f4);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.12);
}

.signal-board-header,
.signal-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.72rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.82);
}

.signal-board-header {
    justify-content: flex-start;
    color: var(--jd-brand);
    font-size: 0.9rem;
    font-weight: 800;
}

.signal-row span {
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 700;
}

.signal-row strong {
    color: #172033;
    font-size: 0.88rem;
    text-align: right;
}

.content-section {
    padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1rem, 4vw, 4rem);
    background: #ffffff;
}

section[id] {
    scroll-margin-top: 5.5rem;
}

.section-heading {
    max-width: 42rem;
    margin-bottom: 1.25rem;
}

.services-heading {
    max-width: none;
}

.services-heading h2 {
    white-space: nowrap;
}

.section-heading p:not(.eyebrow) {
    margin: 1rem 0 0;
    color: #475569;
    line-height: 1.65;
}

.section-heading h2,
.contact-section h2 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    line-height: 1.12;
    letter-spacing: 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.feature-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card {
    min-height: 11rem;
    padding: 1rem;
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    background: #ffffff;
}

.feature-card .mud-icon-root {
    color: var(--jd-brand);
    font-size: 2.1rem;
}

.feature-card h3,
.approach-list h3 {
    margin: 1rem 0 0.55rem;
    color: #172033;
    font-size: 1.2rem;
}

.feature-card p,
.approach-list p,
.contact-section p {
    margin: 0;
    color: #475569;
    line-height: 1.65;
}

.approach-section {
    height: 100%;
    background: #f7fafc;
}

.work-section {
    height: 100%;
    background: #ffffff;
}

.product-work-grid {
    margin-top: 0;
}

.work-card {
    height: 100%;
    min-height: 14rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.1rem;
    padding: 1.25rem;
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 112, 67, 0.08), rgba(14, 165, 233, 0.08)),
        #ffffff;
}

.product-card {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(13rem, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    overflow: hidden;
    gap: 0.75rem 1rem;
    min-height: 0;
    padding: 0.9rem;
}

.work-card-media {
    grid-row: 1 / span 2;
    aspect-ratio: 16 / 10;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.work-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.work-card-media-contain img {
    object-fit: contain;
}

.work-card .mud-icon-root {
    color: var(--jd-brand);
    font-size: 2.1rem;
}

.work-card h3 {
    margin: 0.75rem 0 0.45rem;
    font-size: 1.25rem;
}

.product-card .mud-icon-root {
    font-size: 1.65rem;
}

.product-card h3 {
    margin-top: 0.5rem;
}

.product-card .mud-button-root {
    justify-self: stretch;
}

.work-title-link {
    color: #172033 !important;
    font-weight: 800;
    text-decoration-color: transparent;
}

.work-title-link:hover,
.work-title-link:focus {
    color: var(--jd-brand) !important;
    text-decoration-color: currentColor;
}

.work-card p {
    margin: 0;
    color: #475569;
    line-height: 1.65;
}

.approach-list {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.approach-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    background: #ffffff;
}

.approach-list span {
    color: #f59e0b;
    font-weight: 900;
}

.contact-section {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1rem, 4vw, 4rem);
    background: #0f172a;
    color: #ffffff;
}

.contact-section h2,
.contact-section p {
    color: #ffffff;
}

.contact-section p {
    max-width: 42rem;
    margin-top: 0.85rem;
    color: #dbeafe;
}

.contact-page {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1rem, 2vw, 1.35rem);
    align-content: start;
    align-items: start;
    justify-items: center;
    padding: clamp(1.25rem, 3.5vh, 2.25rem) clamp(1rem, 4vw, 4rem) clamp(1.75rem, 4vh, 2.75rem);
    background:
        linear-gradient(135deg, rgba(255, 112, 67, 0.08), rgba(14, 165, 233, 0.08)),
        #f7fafc;
}

.contact-page__intro {
    width: min(100%, 72rem);
    max-width: 72rem;
}

.contact-page__intro h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2.1rem, 3.4vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.contact-page__intro p:not(.eyebrow) {
    max-width: 42rem;
    margin: 1rem 0 0;
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.65;
}

.contact-form-panel {
    width: min(100%, 72rem);
    margin-top: 0;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.10);
}

.contact-page__actions {
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem 0.85rem !important;
}

.contact-details-field textarea {
    min-height: 12.5rem;
    resize: vertical;
}

.contact-privacy-note {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.terms-page {
    padding: clamp(2rem, 5vw, 4rem) clamp(1rem, 4vw, 4rem);
    background:
        linear-gradient(135deg, rgba(255, 112, 67, 0.07), rgba(14, 165, 233, 0.07)),
        #f7fafc;
}

.terms-page__header {
    max-width: 52rem;
    margin-bottom: 1.5rem;
}

.terms-page__header h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2.1rem, 3.4vw, 3.25rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.terms-page__header p:not(.eyebrow) {
    margin: 1rem 0 0;
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.65;
}

.terms-page__content {
    max-width: 56rem;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    border: 1px solid #d9e1ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
}

.terms-page__content h2 {
    margin: 1.5rem 0 0.5rem;
    color: #172033;
    font-size: 1.25rem;
}

.terms-page__content h2:first-child {
    margin-top: 0;
}

.terms-page__content p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.terms-page__content a {
    color: var(--jd-brand);
    font-weight: 800;
}

.not-found-page {
    min-height: 65vh;
    display: grid;
    align-content: center;
    gap: 1rem;
    padding: clamp(3rem, 7vw, 6rem) clamp(1rem, 4vw, 4rem);
}

.not-found-page h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2.5rem, 7vw, 5rem);
    letter-spacing: 0;
}

.not-found-page p {
    margin: 0;
    color: #475569;
    font-size: 1.1rem;
}

.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}

#components-reconnect-modal {
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity 0.5s both;
}

#components-reconnect-modal[open] {
    animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

#components-reconnect-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.4);
    animation: components-reconnect-modal-fadeInOpacity 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button {
    padding: 0.45rem 1.5rem;
    border: 0;
    border-radius: 8px;
    background-color: var(--jd-brand);
    color: #ffffff;
    font-weight: 700;
}

#components-reconnect-modal button:hover {
    background-color: #e85f35;
}

#components-reconnect-modal button:active {
    background-color: var(--jd-brand);
}

.components-rejoining-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

.components-rejoining-animation div {
    position: absolute;
    border: 3px solid var(--jd-brand);
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2) {
    animation-delay: -0.5s;
}

@keyframes components-rejoining-animation {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0;
        left: 0;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}

@media (max-width: 920px) {
    .hero-section,
    .feature-grid,
    .feature-grid-four {
        grid-template-columns: 1fr;
    }

    .signal-board {
        min-height: 0;
    }

    .hero-visual-card {
        justify-self: stretch;
        width: 100%;
    }

    .contact-section {
        align-items: flex-start;
        flex-direction: column;
    }

    .contact-page {
        grid-template-columns: 1fr;
    }

    .services-heading h2 {
        white-space: normal;
    }
}

@media (max-width: 760px) {
    .top-nav {
        padding: 0.75rem 1rem;
    }

    .top-brand-stack {
        gap: 0.75rem !important;
    }

    .logo-img {
        height: 54px;
    }

    .top-public-nav {
        flex-wrap: wrap !important;
        justify-content: flex-start !important;
        margin-top: 0.5rem;
        width: 100%;
    }

    .product-card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .work-card-media {
        grid-row: auto;
        aspect-ratio: 12 / 5;
    }
}

@media (max-width: 720px) {
    .jd-footer__container {
        padding-inline: 1rem;
    }
}

@media (max-width: 520px) {
    .contact-details-field textarea {
        min-height: 10rem;
    }

    .contact-page__actions {
        align-items: flex-start;
    }

    .hero-copy h1 {
        font-size: 1.95rem;
        line-height: 1.08;
    }

    .hero-lead {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .signal-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .signal-row strong {
        text-align: left;
    }
}
