:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.78);
    --surface-muted: #f8f9fa;
    --primary: #0F172A;
    /* Deep Blue/Black - Professional */
    --primary-light: #1E293B;
    --accent: #FFD700;
    /* Wavenet Yellow - CTA */
    --accent-hover: #e6c200;
    --secondary: #0056b3;
    /* Clean Blue - Links */
    --text-main: #0F172A;
    --text-muted: #64748B;
    --divider: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 18px 45px -20px rgba(15, 23, 42, 0.38), 0 12px 24px -16px rgba(30, 41, 59, 0.22);
    --radius-lg: 8px;
    --radius-md: 6px;
    --radius-sm: 4px;
    --focus-ring: 0 0 0 3px rgba(59, 130, 246, 0.24);
    --section-tint-a: linear-gradient(180deg, #f9fbff 0%, #eef4fb 100%);
    --section-tint-b: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 180ms;
    --dur-med: 320ms;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text-main);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #003d80;
}

#app {
    min-height: 100vh;
    background: #ffffff;
}

/* Override MudBlazor Defaults via CSS where possible */
.mud-button {
    text-transform: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    letter-spacing: 0.01em;
}


.mud-button.btn-primary {
    background-color: var(--primary) !important;
    color: #ffffff !important;
}

.mud-button.btn-primary:hover {
    background-color: var(--primary-light) !important;
}

.mud-button.btn-cta {
    background-color: var(--accent) !important;
    color: #000000 !important;
    font-weight: 700;
}

.mud-button.btn-cta:hover {
    background-color: var(--accent-hover) !important;
}

/* Unified Typography */
.mud-typography,
.hero-title,
.section-title,
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Inter", sans-serif !important;
}

.appbar {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid var(--divider);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.appbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    min-width: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--text-main);
    min-width: 0;
    line-height: 0;
    flex: 0 1 auto;
    max-width: 100%;
}

.brand-logo {
    display: block;
    height: 2rem;
    width: auto;
    max-width: clamp(7.5rem, 16vw, 10.5rem);
    object-fit: contain;
}

.brand-logo-mark {
    height: 2.1rem;
    width: auto;
    max-width: none;
}

.brand-icon {
    font-size: 2.25rem;
    color: var(--primary);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-copy .mud-typography:first-child {
    font-size: 0.75rem;
    letter-spacing: 0.16rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.brand-copy .mud-typography:last-child {
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    font-weight: 600;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 0.35rem;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--text-main);
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.nav-cta {
    border-radius: var(--radius-sm) !important;
    padding-inline: 1.4rem !important;
    flex: 0 0 auto;
    white-space: nowrap;
}

.nav-link-menu .mud-button-root {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: none;
}

.nav-link-menu .mud-button-root:hover,
.nav-link-menu .mud-button-root:focus {
    color: var(--text-main);
}

.main-content {
    padding-bottom: 4rem;
}

.footer {
    background: var(--surface);
    border-top: 1px solid var(--divider);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1rem;
}

.footer-brand-block {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-brand-logo {
    display: block;
    height: 1.35rem;
    width: auto;
    max-width: min(8.5rem, 32vw);
    object-fit: contain;
}

.footer-brand-copy {
    color: var(--text-muted);
}

.footer-link {
    color: var(--primary);
    font-weight: 500;
}

/* HERO SPLIT LAYOUT */
.hero-split {
    background-color: #ffffff;
    overflow: hidden;
    position: relative;
    padding-bottom: 0;
}

.hero-grid {
    min-height: 85vh;
    /* Occupy most of the screen */
}

.hero-text-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem 2rem 4rem 6rem !important;
    /* Adjust padding for visual balance */
}

@media (max-width: 960px) {
    .hero-text-col {
        padding: 3rem 1.5rem !important;
    }
}

.hero-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 600px;
    animation: fadeUp 0.8s ease-out;
}

.hero-heading {
    color: var(--text-main);
    font-size: clamp(3rem, 5vw, 4.5rem) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    font-family: "Inter", sans-serif;
    /* Ensure clean sans-serif */
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.125rem !important;
    max-width: 480px;
    line-height: 1.6 !important;
}

.hero-cta.mud-button {
    background-color: var(--accent) !important;
    /* Wavenet Yellow */
    color: #000000 !important;
    font-weight: 700 !important;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
    border-radius: var(--radius-sm) !important;
    /* Square sharp edges or slight radius */
    width: fit-content;
    box-shadow: none !important;
    text-transform: none !important;
}

.hero-cta.mud-button:hover {
    background-color: var(--accent-hover) !important;
}

.hero-image-col {
    position: relative;
    padding: 0 !important;
    overflow: hidden;
}

.hero-image-container {
    height: 100%;
    width: 100%;
    position: relative;
    min-height: 500px;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Create the diagonal cut: adjust points as needed */
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-decoration-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* This needs to match the clip path but be a border stroke. 
       Easier to implement as a pseudo-element or SVG usually, 
       but for now we can try a simple overlaid div with a border or gradient */
    display: none;
    /* Hide for now unless we implement SVG overlay */
}

/* Add a blue line via pseudo element on the image wrapper if desired */
.hero-image-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 2px;
    background: #0056b3;
    /* Approximate the angle. This is tricky with pure CSS div. 
       Usually better to just let the clip-path be hard edge.*/
    display: none;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-card-kicker {
    color: var(--text-muted);
    letter-spacing: 0.18rem;
}

.hero-card-divider {
    margin: 0;
}

.hero-metric {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.hero-metric .mud-typography:first-child {
    font-weight: 700;
    color: var(--primary);
}

.hero-card-footer {
    color: var(--text-muted);
}

.section {
    padding: 4rem 0;
}

.section+.section {
    border-top: 1px solid rgba(16, 22, 40, 0.06);
}

.section-kicker {
    text-transform: uppercase;
    letter-spacing: 0.14rem;
    color: var(--primary);
    font-weight: 600;
}

.section-title {
    margin-top: 0.75rem;
    margin-bottom: 2rem;
    font-weight: 700;
}

.metrics {
    background: var(--surface);
}

.metric-card {
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.metric-icon {
    font-size: 2rem;
    color: var(--primary);
}

.metric-title {
    font-weight: 600;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.services-grid {
    margin-top: 1rem;
}

.service-card {
    padding: 2rem;
    border-radius: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--surface);
    border: 1px solid var(--divider);
}

.service-icon {
    font-size: 2rem;
    color: var(--primary);
}

.service-divider {
    margin: 0;
}

.companies-grid {
    margin-top: 1rem;
}

.company-card {
    border-radius: var(--radius-md);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.company-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.company-card .mud-card-actions {
    padding-inline: 1rem 1.5rem;
}

.approach-copy {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.approach-steps {
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.approach-step {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.step-index {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(11, 47, 76, 0.08);
    display: grid;
    place-items: center;
    color: var(--primary);
    font-weight: 700;
}

.testimonial-card {
    padding: 1.75rem;
    border-radius: 1.25rem;
    border: 1px solid var(--divider);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.testimonial-divider {
    margin: 0;
}

.cta {
    background: linear-gradient(135deg, rgba(11, 47, 76, 0.12), rgba(29, 95, 145, 0.12));
}

.cta-card {
    padding: 3rem;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
    background: var(--surface);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-md);
}

.cta-kicker {
    color: var(--text-muted);
    letter-spacing: 0.18rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Public polish overrides */
.appbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px -24px rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(14px);
}

.brand {
    transition: transform var(--dur-fast) var(--ease-out-soft), opacity var(--dur-fast) ease;
}

.brand:hover,
.brand:focus-visible {
    transform: translateY(-1px);
    opacity: 0.95;
}

.nav-link,
.nav-link-menu .mud-button-root {
    transition: color var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out-soft);
}

.nav-link:hover,
.nav-link:focus-visible {
    transform: translateY(-1px);
}

.nav-link:focus-visible,
.brand:focus-visible,
.footer-link:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 6px;
}

.nav-cta {
    box-shadow: 0 8px 18px -12px rgba(15, 23, 42, 0.5);
    transition: transform var(--dur-fast) var(--ease-out-soft), box-shadow var(--dur-fast) ease;
}

.nav-cta:hover,
.nav-cta:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -18px rgba(15, 23, 42, 0.58);
}

.footer {
    background: linear-gradient(180deg, #fbfcff 0%, #f4f7fb 100%);
    border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.footer-inner {
    padding-block: 1.8rem;
}

.footer-link {
    position: relative;
    transition: color var(--dur-fast) ease;
}

.footer-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 1px;
    background: currentColor;
    opacity: 0.32;
    transform: scaleX(0.75);
    transform-origin: left;
    transition: transform var(--dur-fast) ease, opacity var(--dur-fast) ease;
}

.footer-link:hover::after,
.footer-link:focus-visible::after {
    opacity: 0.7;
    transform: scaleX(1);
}

.metric-card,
.company-card,
.approach-steps,
.cta-card,
.strategy-card {
    transition:
        transform var(--dur-med) var(--ease-out-soft),
        box-shadow var(--dur-med) ease,
        border-color var(--dur-med) ease,
        background-color var(--dur-med) ease;
}

.metric-card:hover,
.company-card:hover {
    border-color: rgba(15, 76, 129, 0.18);
    box-shadow: var(--shadow-lg);
}

.cta-card {
    background:
        radial-gradient(circle at 12% 12%, rgba(59, 130, 246, 0.09), transparent 52%),
        radial-gradient(circle at 88% 18%, rgba(255, 215, 0, 0.12), transparent 55%),
        var(--surface-raised);
}

.mud-button:focus-visible,
.mud-icon-button:focus-visible,
.mud-input-control .mud-input-slot:focus-within {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Reveal animation utilities */
.reveal {
    opacity: 0;
    transform: translate3d(0, 12px, 0);
    transition:
        opacity var(--dur-med) var(--ease-out-soft),
        transform calc(var(--dur-med) + 40ms) var(--ease-out-soft);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.reveal-up {
    transform: translate3d(0, 14px, 0);
}

.reveal-left {
    transform: translate3d(-14px, 0, 0);
}

.reveal-right {
    transform: translate3d(14px, 0, 0);
}

.reveal-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.reveal-stagger-1 {
    --reveal-delay: 60ms;
}

.reveal-stagger-2 {
    --reveal-delay: 110ms;
}

.reveal-stagger-3 {
    --reveal-delay: 160ms;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .reveal,
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
        will-change: auto !important;
    }
}

@media (max-width: 960px) {
    .nav-links {
        display: none;
    }

    .appbar-inner {
        gap: 0.85rem;
    }

    .brand {
        flex: 1 1 auto;
    }

    .brand-logo {
        height: 1.75rem;
        max-width: min(8.5rem, 30vw);
    }

    .brand-logo-mark {
        height: 1.7rem;
    }

    .nav-cta {
        padding-inline: 1rem !important;
        min-width: auto !important;
    }

    .hero {
        padding-top: 5rem;
    }

    .hero-panel {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .appbar-inner {
        padding: 0.65rem 0;
        gap: 0.65rem;
    }

    .brand {
        flex: 1 1 auto;
    }

    .brand-logo {
        height: 1.35rem;
        max-width: min(6.2rem, 24vw);
    }

    .brand-logo-mark {
        height: 1.35rem;
    }

    .nav-cta {
        padding-inline: 0.75rem !important;
        font-size: 0.82rem !important;
        min-height: 2rem !important;
    }

    .hero-card {
        padding: 1.75rem;
    }

    .service-card,
    .metric-card,
    .approach-steps,
    .testimonial-card,
    .cta-card {
        padding: 1.75rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand-block {
        align-items: center;
    }

    .footer-brand-logo {
        height: 1.15rem;
        max-width: min(7rem, 48vw);
    }
}
