:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-dark: #0f172a;
    --bg-card: #ffffff;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --accent-light: #dbeafe;
    --accent-dim: rgba(59, 130, 246, 0.1);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --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 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-accent: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
    --layout-max-width: 1200px;
    --layout-min-width: 320px;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-hero: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    /* Space below fixed header (logo row + padding + notch); used by hero carousel copy */
    --hero-carousel-pad-top: calc(max(1.25rem, env(safe-area-inset-top, 0px)) + 6.75rem);
    /*
     * Clearance for fragment / in-page nav with fixed header: matches header padding
     * (max(safe-area, 1.25rem) top + 1.25rem bottom + ~logo/controls row). Avoids
     * "5.75rem + safe-area" stacking safe-area twice vs the real header box.
     */
    --site-header-anchor-offset: calc(max(1.25rem, env(safe-area-inset-top, 0px)) + 6rem);
    /* Short pages: stretch main so footer sits at bottom of viewport (fixed header estimate) */
    --site-main-min-height: calc(100dvh - max(5.5rem, calc(env(safe-area-inset-top, 0px) + 4.75rem)));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    height: 100%;
    min-width: var(--layout-min-width);
    scroll-padding-top: var(--site-header-anchor-offset);
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    min-width: var(--layout-min-width);
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
    html {
        /* ~17px from typical 16px default - improves readability without affecting desktop */
        font-size: 108%;
    }
}

.container {
    width: 100%;
    max-width: var(--layout-max-width);
    min-width: var(--layout-min-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: var(--site-main-min-height);
    position: relative;
    z-index: 1;
}

/* Home: carousel hero keeps intrinsic height; band below flexes when needed */
main > .hero {
    flex-shrink: 0;
}

/* Wave particle bed: below home hero, or full main on inner pages */
.site-below-hero {
    position: relative;
    z-index: 0;
    isolation: isolate;
    background-color: var(--bg-secondary);
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.site-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.site-below-hero-content {
    position: relative;
    z-index: 1;
    background: transparent;
    flex: 1 1 auto;
}

main .site-below-hero-content > section {
    background-color: rgba(248, 250, 252, 0.78);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding-top: max(1.25rem, env(safe-area-inset-top, 0px));
    padding-bottom: 1.25rem;
    padding-left: 0;
    padding-right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 1.5rem;
}

@media (max-width: 1000px) {
    header .container {
        justify-content: flex-start;
    }

    /* BUG-015: Services dropdown underline (::before) must not show when drawer nav is closed */
    .nav-dropdown > a::before {
        display: none;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.25rem 0;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
    order: 3;
}

.hamburger-line {
    width: 24px;
    height: 2.5px;
    background: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

nav a:hover {
    color: var(--accent);
}

nav a:hover::after {
    width: 100%;
}

nav a.active {
    color: var(--accent);
    font-weight: 600;
}

nav a.active::after {
    width: 100%;
}

/* Services dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown>a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
    position: relative;
}

/* Suppress the default underline pseudo-element on the dropdown trigger */
.nav-dropdown>a::after {
    display: none;
}

/* Bootstrap Icons chevron */
.nav-chevron {
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0.7;
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, color 0.2s ease;
}

/* Add underline using ::before instead */
.nav-dropdown>a::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-dropdown:hover>a {
    color: var(--accent);
}

.nav-dropdown:hover>a::before {
    width: calc(100% - 1.2rem);
}

.nav-dropdown>a.active {
    color: var(--accent);
}

.nav-dropdown>a.active::before {
    width: calc(100% - 1.2rem);
}

.nav-dropdown:hover>a .nav-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    min-width: 260px;
    padding: 0.5rem;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    list-style: none;
    overflow: hidden;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-menu li {
    margin: 0;
    padding: 0;
    display: block;
    width: 100%;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    width: 100%;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    margin: 0;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: var(--accent-light);
    color: var(--accent);
    transform: translateX(4px);
}

.dropdown-menu a.active {
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
}

.nav-cta-header {
    background: var(--gradient-accent);
    color: #fff !important;
    padding: 0.65rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    order: 2;
    box-shadow: var(--shadow-md);
    font-size: 0.95rem;
}

.nav-cta-header:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
    color: #fff !important;
}

.nav-cta-header::after {
    display: none;
}

@media (max-width: 1000px) {
    .nav-cta-header {
        margin-left: auto;
        padding: 0.55rem 1.25rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
}

/* Hero - min-height uses 100svh/100dvh and live --vh from js/animations.js on resize. */
.hero {
    min-height: 100svh;
    min-height: 100dvh;
    min-height: calc(var(--vh) * 100);
    display: flex;
    align-items: center;
    padding-top: 6rem;
    position: relative;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.hero-carousel {
    padding: 0;
}

/* Full-bleed carousel: clip slides/orbs on inner wrap so bottom shadow on section is visible */
.hero.hero-carousel {
    overflow: visible;
    position: relative;
    z-index: 1;
    box-shadow: 0 18px 40px -8px rgba(15, 23, 42, 0.2);
}

.hero-carousel::before {
    display: none;
}

.hero-carousel .carousel-wrap {
    position: relative;
    width: 100%;
    margin: 0;
    max-width: none;
    min-height: 100svh;
    min-height: 100dvh;
    min-height: calc(var(--vh) * 100);
    overflow: hidden;
}

.hero-carousel .carousel-track-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

.hero-carousel .carousel-dots-wrap {
    position: absolute;
    bottom: 3rem;
    left: 0;
    right: 0;
    z-index: 3;
}

.hero-content h1,
.carousel-slide-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.carousel-slide-title {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
}

.hero-content h1 span,
.carousel-slide-title span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p,
.hero-carousel .carousel-slide-content p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--gradient-accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    font-size: 1rem;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--accent-dim);
    box-shadow: var(--shadow-md);
}

/* Hero carousel */
.carousel-wrap {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.carousel-track-wrap {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
}

.hero-carousel .carousel-track-wrap {
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.carousel-track {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.hero-carousel .carousel-track {
    height: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0) scale(1);
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.carousel-slide.prev {
    opacity: 0;
    transform: translateX(-30px) scale(0.95);
}

.carousel-slide.next {
    opacity: 0;
    transform: translateX(30px) scale(0.95);
}

.hero-carousel .carousel-slide {
    position: relative;
    width: 100%;
    min-height: 100svh;
    min-height: 100dvh;
    min-height: calc(var(--vh) * 100);
    opacity: 1;
    /* Same base as .hero so image slides match the firmware slide backdrop */
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
}

.hero-carousel .carousel-slide.active {
    opacity: 1;
}

.hero-carousel .carousel-slide:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.carousel-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #f1f5f9;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease-in-out;
    transform: scale(1.1);
}

.carousel-slide.active .carousel-slide-bg {
    transform: scale(1);
    opacity: 1;
}

.carousel-slide:not(.active) .carousel-slide-bg {
    opacity: 0.7;
}

/* Hero carousel: vivid banners; light left scrim; copy aligned left (same on every slide) */
.hero-carousel .carousel-slide .carousel-slide-overlay {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.35) 0%, rgba(15, 23, 42, 0.06) 42%, transparent 65%);
}

.hero-carousel .carousel-slide .carousel-slide-inner.container {
    margin-left: 8%;
    margin-right: auto;
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
}

.hero-carousel .carousel-slide .carousel-slide-bg {
    opacity: 1;
}

/* IoT slide: wide art in landscape, tall art when the viewport is portrait */
.hero-carousel .carousel-slide-bg-stack {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-color: #f1f5f9;
}

.hero-carousel .carousel-slide-bg-stack .carousel-slide-bg {
    z-index: 0;
}

.hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-iot-portrait,
.hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-firmware-portrait,
.hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-ai-portrait,
.hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-thingsboard-portrait,
.hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-mobile-portrait {
    opacity: 0 !important;
    visibility: hidden;
}

@media (orientation: portrait) {
    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-iot-landscape,
    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-firmware-landscape,
    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-ai-landscape,
    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-thingsboard-landscape,
    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-mobile-landscape {
        opacity: 0 !important;
        visibility: hidden;
    }

    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-iot-portrait,
    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-firmware-portrait,
    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-ai-portrait,
    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-thingsboard-portrait,
    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg-mobile-portrait {
        visibility: visible;
    }

    .hero-carousel .carousel-slide.active .carousel-slide-bg-stack .carousel-slide-bg-iot-portrait,
    .hero-carousel .carousel-slide.active .carousel-slide-bg-stack .carousel-slide-bg-firmware-portrait,
    .hero-carousel .carousel-slide.active .carousel-slide-bg-stack .carousel-slide-bg-ai-portrait,
    .hero-carousel .carousel-slide.active .carousel-slide-bg-stack .carousel-slide-bg-thingsboard-portrait,
    .hero-carousel .carousel-slide.active .carousel-slide-bg-stack .carousel-slide-bg-mobile-portrait {
        opacity: 1 !important;
    }

    .hero-carousel .carousel-slide:not(.active) .carousel-slide-bg-stack .carousel-slide-bg-iot-portrait,
    .hero-carousel .carousel-slide:not(.active) .carousel-slide-bg-stack .carousel-slide-bg-firmware-portrait,
    .hero-carousel .carousel-slide:not(.active) .carousel-slide-bg-stack .carousel-slide-bg-ai-portrait,
    .hero-carousel .carousel-slide:not(.active) .carousel-slide-bg-stack .carousel-slide-bg-thingsboard-portrait,
    .hero-carousel .carousel-slide:not(.active) .carousel-slide-bg-stack .carousel-slide-bg-mobile-portrait {
        opacity: 0.7 !important;
    }
}

/* Firmware (3) and AI (4): dark navy background matches the banner image background */
.hero-carousel .carousel-slide[data-index="3"],
.hero-carousel .carousel-slide[data-index="4"] {
    background: #0a1628;
}

.hero-carousel .carousel-slide[data-index="3"] .carousel-slide-bg-stack,
.hero-carousel .carousel-slide[data-index="4"] .carousel-slide-bg-stack {
    background-color: #0a1628;
}

.carousel-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.6) 50%, rgba(15, 23, 42, 0.3) 100%);
    pointer-events: none;
}

.carousel-slide-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    min-height: 320px;
}

.hero-carousel .carousel-slide-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 100svh;
    min-height: 100dvh;
    min-height: calc(var(--vh) * 100);
    padding-top: var(--hero-carousel-pad-top);
    padding-bottom: max(6rem, env(safe-area-inset-bottom, 0px));
}

.hero-carousel .carousel-slide-content {
    max-width: 600px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out 0.3s, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
    flex: 1;
}

.hero-carousel .carousel-slide-graphic {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out 0.4s, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
    flex: 1.3;
    display: flex;
    justify-content: center;
}

.hero-carousel .carousel-slide-graphic img {
    width: 100%;
    max-width: 800px;
    /* Allow it to be quite large */
    height: auto;
    object-fit: contain;
    transform: scale(1.7);
    /* Scale up to counteract transparent padding in graphic */
    transform-origin: center;
}

.carousel-slide.active .carousel-slide-content {
    opacity: 1;
    transform: translateY(0);
}

.carousel-slide.active .carousel-slide-graphic {
    opacity: 1;
    transform: translateX(0);
}

.carousel-slide:not(.active) .carousel-slide-content {
    opacity: 0;
    transform: translateY(30px);
}

.carousel-slide:not(.active) .carousel-slide-graphic {
    opacity: 0;
    transform: translateX(30px);
}

.carousel-slide-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.hero-carousel .carousel-slide-content .carousel-slide-title {
    max-width: none;
    color: #fff;
    -webkit-text-fill-color: #fff;
    position: relative;
    display: inline-block;
}

/* Typing effect cursor */
.carousel-slide-title.typing::after {
    content: '|';
    display: inline-block;
    margin-left: 4px;
    animation: blink 1s infinite;
    color: #fff;
    font-weight: 300;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.hero-carousel .carousel-slide-content p {
    color: rgba(255, 255, 255, 0.9);
}

.carousel-slide-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.carousel-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-accent);
}

.carousel-btn-prev {
    left: 1.5rem;
}

.carousel-btn-next {
    right: 1.5rem;
}

.hero-carousel .carousel-btn-prev {
    left: 2rem;
}

.hero-carousel .carousel-btn-next {
    right: 2rem;
}

@media (max-width: 1000px) {
    .carousel-btn-prev {
        left: 0.5rem;
    }

    .carousel-btn-next {
        right: 0.5rem;
    }

    .hero-carousel .carousel-btn-prev {
        left: 1rem;
    }

    .hero-carousel .carousel-btn-next {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .carousel-slide-inner {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        min-height: auto;
    }

    .hero-carousel .carousel-slide-inner {
        min-height: auto;
        align-items: flex-start;
        /* Extra top room on narrow screens (tall header + CTA) */
        padding-top: calc(max(1.25rem, env(safe-area-inset-top, 0px)) + 7.25rem);
        /* Reserve space for dots + side nav (arrows sit just above dots) */
        padding-bottom: max(8.5rem, calc(env(safe-area-inset-bottom, 0px) + 6.5rem));
        padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
        padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
    }

    .hero-carousel .carousel-slide .carousel-slide-inner.container {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
        padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
    }

    /* Full-width copy column; avoid flex overflow clipping titles */
    .hero-carousel .carousel-slide-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        flex: 0 1 auto;
    }

    .hero-carousel .carousel-slide-content .carousel-slide-title {
        display: block;
        width: 100%;
        font-size: clamp(1.5rem, 5vw, 1.95rem);
        line-height: 1.15;
        margin-bottom: 0.85rem;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .hero-carousel .carousel-slide-content p {
        font-size: 1rem;
        line-height: 1.58;
        margin-bottom: 1rem;
        max-width: 100%;
    }

    .hero-carousel .carousel-slide-content .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.9375rem;
    }

    /* Darken upper band so text reads over busy portrait banners */
    .hero.hero-carousel .carousel-slide .carousel-slide-overlay {
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.55) 42%, rgba(15, 23, 42, 0.2) 72%, transparent 100%);
    }

    /* Keep arrows off the vertical center (was overlapping headline + body) */
    .hero.hero-carousel .carousel-btn {
        top: auto;
        bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
        transform: none;
        width: 42px;
        height: 42px;
    }

    .hero.hero-carousel .carousel-btn:hover {
        transform: scale(1.06);
    }

    .hero.hero-carousel .carousel-btn-prev {
        left: max(0.5rem, env(safe-area-inset-left, 0px));
    }

    .hero.hero-carousel .carousel-btn-next {
        right: max(0.5rem, env(safe-area-inset-right, 0px));
    }

    .hero.hero-carousel .carousel-dots-wrap {
        bottom: max(1rem, env(safe-area-inset-bottom, 0px));
    }

    /* Fit full banner art on narrow viewports (cover crops wide ThingsBoard / IoT art) */
    .hero-carousel .carousel-slide-bg-stack .carousel-slide-bg {
        background-size: contain;
        background-repeat: no-repeat;
    }
}

/* Tablet (iPad / small laptops): balance hero layout and comfortable reading - avoids huge top gap from vertical centering */
@media (min-width: 769px) and (max-width: 1024px) {
    section {
        padding: clamp(2.75rem, 5vw, 4rem) 0;
    }

    .services-content {
        padding-top: 5rem;
    }

    .container {
        padding-left: max(2rem, env(safe-area-inset-left, 0px));
        padding-right: max(2rem, env(safe-area-inset-right, 0px));
    }

    .hero-carousel .carousel-slide-content .carousel-slide-title {
        font-size: clamp(2rem, 4.2vw, 2.75rem);
        line-height: 1.12;
    }

    .hero-carousel .carousel-slide-content p {
        font-size: 1.08rem;
        line-height: 1.62;
        margin-bottom: 1.35rem;
    }

    .hero-carousel .carousel-slide-content .btn {
        padding: 0.85rem 1.65rem;
        font-size: 1rem;
    }

    .hero-carousel .carousel-btn {
        width: 46px;
        height: 46px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    .hero-carousel .carousel-slide-inner {
        align-items: flex-start;
        justify-content: flex-start;
        padding-top: calc(max(1rem, env(safe-area-inset-top, 0px)) + 5.35rem);
        padding-bottom: max(5.25rem, env(safe-area-inset-bottom, 0px));
    }

    .hero-carousel .carousel-slide-content {
        flex: 0 1 auto;
        max-width: 38rem;
    }
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: var(--accent);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--accent);
    transform: scale(1.3);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

section[id] {
    scroll-margin-top: var(--site-header-anchor-offset);
}

/* #home spans the viewport top - extra margin misaligns "Home" and shows the prior scroll context */
section#home {
    scroll-margin-top: 0;
}

/* Section common */
section {
    padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.services-content {
    padding-top: 6rem;
}

/* Service detail pages: clear fixed header over the first icon/title (BUG-009) */
.services-content:has(.main-service) {
    padding-top: max(7.25rem, var(--site-header-anchor-offset));
}

/* Career / Use Cases: clear fixed header, normal bottom padding */
section.services-content {
    padding-top: var(--site-header-anchor-offset);
    padding-bottom: clamp(3rem, 6vw, 4.5rem);
}

section.services-content .services-content {
    padding-top: 6rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-top: 5px;
    margin-bottom: 1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    text-align: center;
}

/* Services */
.services {
    background: none;
    position: relative;
    z-index: 2;
    /* Visible under-hero depth (hero box-shadow is covered by this section’s stack) */
    box-shadow: 0 -24px 48px -10px rgba(15, 23, 42, 0.22);
}

.services-overview {
    max-width: 900px;
    margin: 0 auto 2.5rem;
    text-align: center;
}

.services-overview p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.75;
    font-size: 1.1rem;
}

.services-overview p:last-child {
    margin-bottom: 0;
}

.services-overview a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.services-overview a:hover,
.services-overview a:focus-visible {
    text-decoration: underline;
}

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

.service-card-link {
    text-decoration: none;
    display: block;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-light);
    border: 2px solid var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card-icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
}

.service-card-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover .service-card-icon {
    border-color: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.service-card:hover .service-card-icon::before {
    opacity: 0.1;
}

/* ThingsBoard mark: source asset is blue - render as white on card / header */
img[src*="thingsboard-icon"] {
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* ThingsBoard icon specific styling - make it larger */
.services-grid>a:first-child .service-card-icon img {
    width: 64px;
    height: 64px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-card-link-text {
    color: var(--accent);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.service-card:hover .service-card-link-text {
    gap: 0.75rem;
}

.service-card-highlight {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--accent-dim) 100%);
}

/* Engagement Models */
.engagement-models {
    padding: clamp(3rem, 6vw, 4.5rem) 0;
    position: relative;
    z-index: 2;
    background: none;
}

.engagement-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.75;
    max-width: 900px;
    margin: 0 auto 2rem;
    text-align: center;
}

.engagement-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.engagement-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.engagement-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.engagement-card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.engagement-best-for {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.engagement-best-for strong {
    color: var(--text-primary);
}

.engagement-list {
    list-style: none;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.engagement-list li {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.engagement-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

.engagement-includes {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: auto;
    margin-bottom: 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.engagement-includes strong {
    color: var(--text-primary);
}

/* Main Service Pages */
.main-service {
    margin-bottom: 0;
}

.main-service-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.main-service-header .icon {
    width: 64px;
    height: 64px;
    background: var(--accent-light);
    border: 2px solid var(--accent);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.main-service-header .icon img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
}

.main-service-header .icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-service-header:hover .icon {
    border-color: var(--accent-hover);
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.main-service-header:hover .icon::before {
    opacity: 0.1;
}

.main-service-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 0;
}

.firmware-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.firmware-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.firmware-section:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

/* Service Banner Layout - Similar to iottive.com */
.service-banner {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 0;
    margin-bottom: 2rem;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.service-banner:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.service-banner-reverse {
    grid-template-columns: 55% 45%;
}

.service-banner-reverse .service-banner-visual {
    order: 2;
}

.service-banner-reverse .service-banner-content {
    order: 1;
}

.service-banner-visual {
    position: relative;
    overflow: hidden;
    background: var(--bg-secondary);
}

.service-banner-image {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: cover;
    background-position: center;
}

.service-banner-image[style*="background-image"] {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* BUG-012: avoid cropping illustration art on tablets/narrow desktops */
@media (max-width: 900px) {
    .service-banner-image,
    .service-banner-image[style*="background-image"] {
        background-size: contain;
        background-color: var(--bg-secondary);
    }
}

.service-banner-image[style*="background-image"]::before {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.service-banner-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    z-index: 1;
}

.service-banner-placeholder {
    font-size: 3rem;
    color: var(--text-muted);
    z-index: 2;
    position: relative;
    text-align: center;
    padding: 2rem;
    font-weight: 300;
}

.service-banner-content {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg-card);
}

.service-banner-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.service-banner-description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.service-banner-note {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 1rem;
    margin-bottom: 0;
    line-height: 1.6;
}

.service-banner-content .usecase-examples {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.service-banner-content .usecase-examples li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.service-banner-content .usecase-examples li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 600;
}

@media (max-width: 968px) {
    .service-banner {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .service-banner-reverse {
        grid-template-columns: 1fr;
    }

    .service-banner-reverse .service-banner-visual,
    .service-banner-reverse .service-banner-content {
        order: unset;
    }

    .service-banner-image {
        min-height: 250px;
    }

    .service-banner-content {
        padding: 2rem 1.5rem;
    }

    .service-banner-title {
        font-size: 1.5rem;
    }
}

.firmware-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.firmware-section h4::before {
    content: '';
    width: 4px;
    height: 1.5em;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.chipset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.chipset-card {
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

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

.chipset-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.chipset-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chipset-card li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding: 0.35rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.chipset-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.protocol-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.protocol-badge {
    background: var(--accent-light);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.protocol-badge:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.firmware-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.firmware-feature {
    color: var(--text-secondary);
    font-size: 0.95rem;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.6;
}

.firmware-feature::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

.integration-card {
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

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

.integration-card h5 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.integration-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}

/* About */
.about {
    background: none;
}

.about-content {
    max-width: 900px;
    margin: 1.5rem auto 2rem;
    text-align: center;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

.core-team {
    margin-top: 2rem;
}

.core-team-heading {
    font-size: 1.75rem;
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.25rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    align-items: stretch;
}

.team-member {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    box-shadow: var(--shadow-sm);
}

.team-member:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: var(--shadow-xl);
}

.team-photo {
    width: 160px;
    height: 160px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-light);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    align-items: center;
}

.team-name {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.team-designation {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent);
    margin-bottom: 1rem;
}

.team-expertise {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: 1.7;
    width: 100%;
}

.team-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    margin-top: auto;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.team-linkedin:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
}

.team-linkedin svg {
    width: 20px;
    height: 20px;
}

/* Use Cases */
.usecase-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.usecase-item {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    align-items: start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.usecase-item:nth-child(even) {
    grid-template-columns: 1fr 320px;
}

.usecase-item:nth-child(even) .usecase-image {
    order: 2;
}

.usecase-item:nth-child(even) .usecase-content {
    order: 1;
}

.usecase-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.usecase-image {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.usecase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.usecase-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--bg-secondary);
    border: 2px dashed var(--border);
}

.usecase-content h5 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
}

.usecase-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.usecase-examples {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.usecase-examples li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.7;
}

.usecase-examples li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .usecase-item {
        grid-template-columns: 1fr;
    }

    .usecase-image {
        height: 200px;
    }
}

/* Contact */
.contact {
    background: none;
}

.contact-header {
    margin-bottom: 1.5rem;
}

.contact-header .section-title {
    text-align: center;
}

.contact-intro {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem 3rem;
    align-items: stretch;
}

.contact-aside {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
    height: 100%;
    min-height: 0;
}

.contact-detail-card {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-detail-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.contact-detail-row {
    padding: 1rem 0;
}

.contact-detail-row:first-child {
    padding-top: 0;
}

.contact-detail-row:last-child {
    padding-bottom: 0;
}

.contact-detail-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.contact-detail-card h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-detail-card p,
.contact-detail-card a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
}

.contact-detail-card a:hover {
    color: var(--accent);
}

.contact-map-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
    min-height: 280px;
    box-shadow: var(--shadow-md);
}

.contact-map-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Map grows so aside column matches form column height */
.contact-aside .contact-map-wrap {
    flex: 1 1 auto;
    min-height: 200px;
    min-width: 0;
    aspect-ratio: unset;
}

/* ============================================ */
/* Reusable form components                     */
/* ============================================ */
.contact-form-wrap {
    margin-top: 0;
    max-width: none;
    width: 100%;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contact .contact-form-wrap form.nt-form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.contact .contact-form-wrap .nt-form-footer {
    margin-top: auto;
    padding-top: 0.5rem;
}

.contact .nt-form-header {
    text-align: left;
}

.nt-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nt-form-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nt-form-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.nt-form-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.nt-form-footer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.nt-form-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ----- intl-tel-input integration ----- */
.iti {
    width: 100%;
    display: block;
}

.iti--separate-dial-code .iti__selected-flag {
    background: var(--bg-primary);
    border-radius: 10px 0 0 10px;
    border-right: 1px solid var(--border);
    padding: 0 0.6rem 0 0.75rem;
}

.iti__selected-dial-code {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-left: 0.4rem;
}

.iti__arrow {
    border-top-color: var(--text-muted);
    margin-left: 0.4rem;
}

.iti.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag {
    background: var(--accent-light);
}

.iti__country-list {
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card);
    max-height: 240px;
    margin-top: 4px;
    padding: 0.25rem;
}

.iti__country {
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.iti__country.iti__highlight {
    background: var(--accent-light);
}

.iti__divider {
    border-bottom-color: var(--border);
}

/* keep the phone input visually aligned with the rest of the form-inputs */
.iti__tel-input {
    width: 100% !important;
}

@media (max-width: 480px) {
    .iti__country-list {
        max-height: 200px;
        font-size: 0.9rem;
    }

    .iti--separate-dial-code .iti__selected-flag {
        padding: 0 0.5rem 0 0.6rem;
    }

    .iti__selected-dial-code {
        font-size: 0.9rem;
    }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* One error line under the email + phone row (avoids uneven column heights). */
.form-row.form-row--email-phone > .form-field-error[data-for="email-phone"] {
    grid-column: 1 / -1;
    margin-top: -0.15rem;
}

.form-contact-email-phone > .form-field-error[data-for="email-phone"] {
    flex: 1 1 100%;
    width: 100%;
    align-self: stretch;
}

/* Contact form: email | OR | phone */
.form-contact-email-phone {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.75rem 1rem;
}

.form-contact-email-phone > .form-field {
    flex: 1 1 160px;
    min-width: 0;
}

.form-contact-or {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0.75rem;
}

.form-contact-or-label {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding: 0.2rem 0.45rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.nt-form-hint-missing-contact {
    margin: -0.25rem 0 0;
}

.nt-form-hint-missing-contact.nt-form-hint--error {
    color: #ef4444;
    font-weight: 500;
}

.nt-form-hint-missing-contact.nt-form-hint--error strong {
    color: inherit;
}

@media (max-width: 640px) {
    .form-contact-email-phone {
        flex-direction: column;
        align-items: stretch;
    }

    .form-contact-email-phone > .form-field {
        flex: 0 0 auto;
    }

    .form-contact-email-phone > .form-field:nth-child(1) {
        order: 1;
    }

    .form-contact-or {
        order: 2;
        padding: 0.15rem 0;
        align-self: center;
    }

    .form-contact-email-phone > .form-field:nth-child(3) {
        order: 3;
    }

    .form-contact-email-phone > .form-field-error[data-for="email-phone"] {
        order: 4;
    }

    .form-contact-email-phone > .form-field-error[data-for="email-phone"]:empty {
        display: none;
    }

    .nt-form {
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .form-submit-btn {
        align-self: stretch;
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 400px) {
    .nt-form {
        padding: 1.125rem;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.form-label .req {
    color: var(--accent);
    margin-left: 0.15rem;
}

.form-label .label-optional {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.92em;
}

.form-input,
.form-textarea {
    width: 100%;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

.form-input:hover,
.form-textarea:hover {
    border-color: var(--text-light);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
    background: var(--bg-card);
}

.form-input.has-error,
.form-textarea.has-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.iti__tel-input.has-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-contact-email-phone .iti:has(.iti__tel-input.has-error) .iti__selected-flag {
    border-color: #ef4444;
    border-right-color: #ef4444;
}

.form-field-error {
    color: #ef4444;
    font-size: 0.85rem;
    min-height: 1.1em;
    line-height: 1.3;
}

.form-field-error:empty {
    display: none;
}

.form-submit-btn {
    align-self: center;
    position: relative;
    min-width: 220px;
    justify-content: center;
}

.form-submit-btn .btn-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    animation: nt-spin 0.7s linear infinite;
}

.form-submit-btn.is-loading {
    cursor: progress;
    opacity: 0.85;
}

.form-submit-btn.is-loading .btn-spinner {
    display: inline-block;
}

.form-submit-btn:disabled {
    cursor: not-allowed;
    transform: none !important;
}

@keyframes nt-spin {
    to {
        transform: rotate(360deg);
    }
}

.form-status {
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
    min-height: 1.2em;
}

.form-status:empty {
    display: none;
}

.form-status-success {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
}

.form-status-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 0.75rem 1rem;
    border-radius: 10px;
}

@media (max-width: 600px) {
    .nt-form {
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .nt-form-title {
        font-size: 1.25rem;
    }

    .form-submit-btn {
        width: 100%;
        min-width: 0;
    }

    .form-input,
    .form-textarea {
        font-size: 1rem;
        padding: 0.7rem 0.9rem;
    }
}

.contact-cta {
    margin-top: 2rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.contact-cta p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

/* Homepage #contact: space above scheduling CTA - extra scroll room on shorter viewports */
.contact > .container > .contact-inner + .contact-cta {
    margin-top: clamp(1.5rem, 5vmin, 3rem);
    padding-top: clamp(1.125rem, 3vmin, 2rem);
}

.reachout {
    background: var(--bg-secondary);
    padding: clamp(3rem, 6vw, 4rem) 0;
}

.reachout .contact-cta {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

/* Career */
.career {
    background: var(--bg-primary);
}

/* Reduce container side padding and increase max-width ONLY on career page */
section.services-content:has(.career-content) .container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    max-width: 1600px;
}

@media (max-width: 768px) {
    section.services-content:has(.career-content) .container {
        padding-left: 0rem;
        padding-right: 0rem;
        max-width: 100%;
    }
}

.career-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

@media (max-width: 768px) {
    .career-content {
        padding: 0;
    }
}

.career-openings {
    margin-top: 3rem;
}

.career-openings-heading {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-align: center;
    color: var(--text-primary);
}

.career-openings-intro {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.career-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.career-list-item {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.career-list-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

/* Career accordion (collapsed row: title, count, expand; Apply separate) */
.career-panel-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
}

.career-accordion-trigger {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.4rem 0.6rem 0.4rem 0.35rem;
    margin: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.career-accordion-trigger:hover {
    background: var(--accent-light);
}

.career-accordion-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.career-chevron {
    flex-shrink: 0;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(45deg);
    transition: transform 0.28s ease, margin 0.28s ease;
    margin-top: -0.2rem;
}

.career-accordion-trigger[aria-expanded="true"] .career-chevron {
    transform: rotate(-135deg);
    margin-top: 0.22rem;
}

.career-trigger-text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.career-accordion-item .career-list-title {
    font-size: 1.08rem;
}

.career-accordion-item .career-list-count {
    min-width: 0;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
}

.career-apply-header {
    flex: 0 0 auto;
    align-self: center;
    white-space: nowrap;
}

.career-accordion-panel {
    border-top: 1px solid var(--border);
}

.career-list-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.career-list-row:hover {
    background: var(--accent-light);
}

.career-list-title {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.15rem;
}

.career-list-type {
    flex: 0 0 auto;
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.career-list-count {
    flex: 0 0 auto;
    min-width: 7rem;
    text-align: right;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.career-list-toggle {
    flex: 0 0 auto;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
}

.career-list-preview {
    padding: 1.5rem 1.5rem 1.75rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    overflow: hidden;
    display: block;
}

.career-list-preview[style*="display: none"] {
    display: none !important;
}

.career-list-preview.expanding {
    animation: slideDown 0.4s ease-out forwards;
}

.career-list-preview.collapsing {
    animation: slideUp 0.3s ease-in forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    to {
        opacity: 1;
        max-height: 500px;
        padding-top: 1.5rem;
        padding-bottom: 1.75rem;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 500px;
        padding-top: 1.5rem;
        padding-bottom: 1.75rem;
    }

    to {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

.job-preview-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 1rem;
}

.read-more-btn,
.read-less-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more-btn:hover,
.read-less-btn:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.read-less-btn {
    margin-left: 0;
    margin-top: 0;
}

.career-list-detail {
    margin: 0;
    border: none;
    border-radius: 0;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
    overflow: hidden;
}

.career-list-detail[hidden] {
    display: none !important;
}

/* Only requirements + apply animate; job description stays static */
.job-detail-expandable {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
}

.job-detail-expandable.is-closed {
    max-height: 0;
    opacity: 0;
}

.job-detail-expandable:not(.is-closed) {
    max-height: 1200px;
    opacity: 1;
}

.career-list-detail.job-card {
    padding: 2rem 1.5rem 2.5rem;
    background: var(--bg-secondary);
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.career-list-detail.job-card:hover {
    border-color: transparent;
    box-shadow: none;
}


/* Standalone job-card (for other pages if needed) */
.job-card:not(.career-list-detail) {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.job-card:not(.career-list-detail):hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.job-header h4 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.job-type {
    background: var(--accent-light);
    color: var(--accent);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
}

.job-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.job-requirements {
    margin-bottom: 2rem;
}

.job-requirements h5 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.job-requirements h5 + h5 {
    margin-top: 1.5rem;
}

.job-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.job-requirements li {
    color: var(--text-secondary);
    padding: 0.6rem 0;
    padding-left: 1.75rem;
    position: relative;
    line-height: 1.7;
    font-size: 1rem;
}

.job-requirements li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

.job-apply {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 600px) {
    .career-list-row {
        flex-wrap: wrap;
    }

    .career-list-title {
        width: 100%;
    }

    .career-list-type {
        order: 1;
    }

    .career-list-count {
        min-width: auto;
        text-align: left;
        order: 2;
    }

    .career-list-toggle {
        order: 3;
    }

    .career-panel-bar {
        flex-wrap: wrap;
        align-items: stretch;
        gap: 0.75rem;
    }

    .career-accordion-trigger {
        flex: 1 1 100%;
        padding: 0.35rem 0.35rem 0.35rem 0.25rem;
    }

    .career-apply-header {
        flex: 1 1 100%;
        width: 100%;
        white-space: normal;
        text-align: center;
    }
}

/* Footer */
footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    background: var(--bg-secondary);
}

/* Footer lives inside .site-below-hero so the particle canvas spans full scroll height */
.site-below-hero > footer {
    position: relative;
    z-index: 1;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1000px) {
    .mobile-menu-toggle {
        display: flex;
        order: 3;
    }

    .nav-cta-header {
        order: 2;
        margin-right: 0.75rem;
        margin-left: auto;
        font-size: 0.9rem;
        padding: 0.55rem 1.25rem;
    }

    .mobile-menu-toggle {
        order: 3;
        margin-left: 0;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: var(--bg-card);
        box-shadow: var(--shadow-xl);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        padding-top: 5rem;
        border-left: 1px solid var(--border);
    }

    .main-nav.nav-open {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0 1.5rem;
    }

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid var(--border-light);
    }

    .main-nav a {
        display: block;
        padding: 1rem 0;
        width: 100%;
    }

    .main-nav a::after {
        display: none;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--accent-light);
        margin-top: 0;
        margin-left: 1rem;
        border-radius: 12px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }

    .nav-dropdown.active .dropdown-menu {
        max-height: 300px;
        margin-bottom: 0.5rem;
        padding: 0.5rem;
    }

    .nav-dropdown>a {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-dropdown .dropdown-menu li {
        border-bottom: none;
    }

    .nav-dropdown>a .nav-chevron {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        font-size: 1rem;
        opacity: 0.85;
        flex-shrink: 0;
    }

    .nav-dropdown.active>a .nav-chevron {
        transform: rotate(180deg);
        opacity: 1;
    }

    body.nav-open {
        overflow: hidden;
    }

    body.nav-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
}

@media (max-width: 900px) {
    .contact-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .contact-map-wrap {
        min-height: 260px;
        aspect-ratio: 16 / 9;
    }

    .contact-aside .contact-map-wrap {
        flex: 0 1 auto;
        aspect-ratio: 16 / 9;
        min-height: 260px;
    }

    section {
        padding: clamp(2.5rem, 5vw, 3.5rem) 0;
    }

    .services-content {
        padding-top: 6rem;
    }

    .services-grid,
    .engagement-grid {
        grid-template-columns: 1fr;
    }

    .hero-content .btn-outline {
        margin-left: 0;
        margin-top: 0.75rem;
    }
}

@media (max-width: 600px) {
    .nav-cta-header {
        font-size: 0.82rem;
        padding: 0.45rem 0.85rem;
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    header .container {
        gap: 0.5rem;
    }

    .main-nav {
        width: 100%;
    }

    .nav-cta-header {
        font-size: 0.72rem;
        padding: 0.38rem 0.65rem;
        letter-spacing: -0.01em;
    }
}

/* Expandable Panel Component - Reusable */
.expand-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
    position: relative;
}

.expand-section.expand-section-light {
    background: var(--bg-primary);
}

.expand-section.expand-section-dark {
    background: var(--bg-dark);
    color: white;
}

.expand-section .container {
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.expand-section .section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.expand-section-dark .section-title {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.panel-wrapper {
    display: flex;
    gap: 1.25rem;
    height: 420px;
    max-width: 100%;
}

.panel-wrapper.panel-wrapper-compact {
    height: 360px;
}

.panel-wrapper.panel-wrapper-large {
    height: 480px;
}

.panel {
    flex: 1;
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.panel:hover::before {
    opacity: 1;
}

.panel.active {
    flex: 5;
    box-shadow: var(--shadow-xl);
}

/* Default gradient colors - can be overridden */
.panel-gradient-1 {
    background: var(--gradient-accent);
}

.panel-gradient-2 {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.panel-gradient-3 {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.panel-gradient-4 {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

.panel-gradient-5 {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.panel-gradient-6 {
    background: linear-gradient(135deg, #06b6d4 0%, #22d3ee 100%);
}

.panel-gradient-7 {
    background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
}

/* Fallback for panels without gradient class - uses nth-child */
.panel-wrapper:not([data-custom-gradients]) .panel:nth-child(1) {
    background: var(--gradient-accent);
}

.panel-wrapper:not([data-custom-gradients]) .panel:nth-child(2) {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
}

.panel-wrapper:not([data-custom-gradients]) .panel:nth-child(3) {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.panel-wrapper:not([data-custom-gradients]) .panel:nth-child(4) {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

.panel-wrapper:not([data-custom-gradients]) .panel:nth-child(5) {
    background: linear-gradient(135deg, #ef4444 0%, #f87171 100%);
}

.panel h3,
.panel .panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
    position: relative;
    z-index: 1;
    line-height: 1.2;
    margin-top: auto;
    width: 100%;
}

.panel p,
.panel .panel-content {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.2s ease;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 1;
    margin: 0;
    width: 100%;
}

.panel:not(.active) p,
.panel:not(.active) .panel-content {
    opacity: 0 !important;
    max-height: 0 !important;
    transform: translateY(10px) !important;
    transition: opacity 0.15s ease, transform 0.15s ease, max-height 0.15s ease;
}

.panel.active p,
.panel.active .panel-content {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
    transition: opacity 0.35s ease 0.1s, transform 0.35s ease 0.1s, max-height 0.35s ease 0.1s;
}

.panel:hover {
    transform: translateY(-6px);
}

.panel.active:hover {
    transform: translateY(-8px);
}

/* Responsive Design */
@media (max-width: 968px) {
    .expand-section {
        padding: 4rem 0;
    }

    .expand-section .container {
        padding: 0 1rem;
    }

    .panel-wrapper {
        gap: 1rem;
        height: 380px;
    }

    .panel-wrapper.panel-wrapper-compact {
        height: 320px;
    }

    .panel-wrapper.panel-wrapper-large {
        height: 420px;
    }

    .panel {
        padding: 1.75rem;
    }

    .panel h3,
    .panel .panel-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 900px) {
    .panel-wrapper {
        flex-direction: column;
        height: auto;
        gap: 1rem;
    }

    .panel-wrapper.panel-wrapper-compact,
    .panel-wrapper.panel-wrapper-large {
        height: auto;
    }

    .panel {
        flex: none;
        height: 100px;
        padding: 1.5rem;
    }

    .panel.active {
        height: 200px;
    }

    .expand-section {
        padding: 3rem 0;
    }

    .expand-section .section-title {
        font-size: clamp(1.75rem, 5vw, 2.25rem);
        margin-bottom: 2rem;
    }
}

@media (max-width: 640px) {
    .panel {
        height: 90px;
        padding: 1.25rem;
    }

    .panel.active {
        height: 180px;
    }

    .panel h3,
    .panel .panel-title {
        font-size: 1.1rem;
    }

    .panel p,
    .panel .panel-content {
        font-size: 0.95rem;
    }
}

/* Use Cases Page Styles */
.usecase-hero {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 4rem;
}

.usecase-hero-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-top: 1.5rem;
}

.usecase-category {
    margin-bottom: 4rem;
}

.usecase-category-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.usecase-category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

/* Simple Use Case Blocks */
.usecase-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.usecase-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.usecase-block:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.usecase-block h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.usecase-block p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

@media (max-width: 968px) {
    .usecase-blocks {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 640px) {
    .usecase-blocks {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .usecase-block {
        padding: 1.5rem;
    }
}

/* Use Case Highlight Section - Rotating Strip */
.usecase-highlight {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: 5rem 0;
    margin-top: 4rem;
    overflow: visible;
}

.usecase-highlight-content {
    max-width: 1400px;
    margin: 0 auto;
}

.usecase-highlight-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 3rem;
}

.usecase-highlight-strip {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 8px 0;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.usecase-highlight-track {
    display: flex;
    gap: 2rem;
    width: fit-content;
    will-change: transform;
    padding: 4px 0;
}

.usecase-highlight-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    min-width: 280px;
    flex-shrink: 0;
}

.usecase-highlight-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.usecase-highlight-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.usecase-highlight-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 968px) {
    .usecase-category-title {
        font-size: 1.75rem;
    }

    .usecase-hero-description {
        font-size: 1.05rem;
    }

    .usecase-highlight {
        padding: 4rem 0;
    }

    .usecase-highlight-title {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .usecase-highlight-item {
        min-width: 240px;
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    .usecase-category-title {
        font-size: 1.5rem;
    }

    .usecase-hero {
        margin-bottom: 3rem;
    }

    .usecase-highlight {
        padding: 3rem 0;
    }

    .usecase-highlight-title {
        font-size: 1.5rem;
    }

    .usecase-highlight-item {
        min-width: 200px;
        padding: 1.25rem;
    }

    .usecase-highlight-icon {
        font-size: 2rem;
    }

    .usecase-highlight-item h4 {
        font-size: 1rem;
    }
}

/* ============================================================
   IoT Open Sessions popup (career.html)
   ============================================================ */
.iot-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
    overflow-y: auto;
}

.iot-popup-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

/* The native [hidden] attribute would normally hide this, but our display:flex
   above wins on specificity. Force display:none when hidden so a closed popup
   isn't sitting on top of the page swallowing clicks. */
.iot-popup-overlay[hidden] {
    display: none !important;
}

body.iot-popup-open {
    overflow: hidden;
}

.iot-popup-card {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow-y: auto;
    background: var(--bg-card);
    color: var(--text-primary);
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow:
        0 30px 60px -12px rgba(15, 23, 42, 0.25),
        0 18px 36px -18px rgba(15, 23, 42, 0.3);
    padding: 2rem 1.75rem 1.5rem;
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.iot-popup-overlay.is-open .iot-popup-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.iot-popup-close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.iot-popup-close:hover,
.iot-popup-close:focus-visible {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    outline: none;
    transform: rotate(90deg);
}

.iot-popup-header {
    padding-right: 2rem;
    margin-bottom: 1.25rem;
}

.iot-popup-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

.iot-popup-title {
    font-size: clamp(1.45rem, 2.4vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.6rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.iot-popup-subtitle {
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}

.iot-popup-body {
    margin-bottom: 1.4rem;
    padding: 1rem 1.1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 14px;
}

.iot-popup-description {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0 0 0.75rem;
    font-weight: 500;
}

.iot-popup-list {
    margin: 0 0 0.85rem;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.iot-popup-list li {
    position: relative;
    padding-left: 1.4rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.iot-popup-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-dim);
}

.iot-popup-note {
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
    font-style: italic;
}

.iot-popup-form {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: grid;
    gap: 0.9rem;
}

/* BUG-006: nested nt-form inside popup card - avoid double frame/padding */
.iot-popup-card form.nt-form.iot-popup-form {
    padding: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.iot-popup-form .form-field {
    margin: 0;
}

.iot-popup-form .form-row {
    gap: 0.9rem;
}

.iot-popup-footer {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.4rem;
}

.iot-popup-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.iot-popup-secondary,
.iot-popup-primary {
    appearance: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.85rem 1.4rem;
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 46px;
}

.iot-popup-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}

.iot-popup-secondary:hover,
.iot-popup-secondary:focus-visible {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--text-light);
    outline: none;
}

.iot-popup-primary {
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: 0 8px 18px -8px rgba(59, 130, 246, 0.6);
}

.iot-popup-primary:hover:not(:disabled),
.iot-popup-primary:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px -10px rgba(59, 130, 246, 0.6);
    outline: none;
}

.iot-popup-primary:disabled {
    cursor: progress;
    opacity: 0.85;
}

.iot-popup-fineprint {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
    text-align: center;
}

.iot-popup-schedule {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.85rem 1.4rem;
    border-radius: 12px;
    border: 1.5px solid var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    min-height: 46px;
    margin-bottom: 0.35rem;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.iot-popup-schedule:hover,
.iot-popup-schedule:focus-visible {
    background: var(--accent);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -8px rgba(59, 130, 246, 0.55);
    outline: none;
}

.iot-popup-schedule svg {
    flex: 0 0 auto;
}

.iot-popup-or {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: -0.15rem 0 0.1rem;
}

.iot-popup-or::before,
.iot-popup-or::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* File-upload field (used by the apply-popup) */
.form-file {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border: 1.5px dashed var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.92rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.form-file:hover,
.form-file:focus-within {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--text-primary);
}

.form-file input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.form-file .form-file-icon {
    flex: 0 0 auto;
    color: var(--accent);
}

.form-file .form-file-text {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-file.has-file {
    border-style: solid;
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--text-primary);
}

.form-file.has-file .form-file-text {
    font-weight: 600;
}

/* Success state inside the apply-popup card */
.iot-popup-success {
    text-align: center;
    padding: 0.5rem 0.25rem;
}

.iot-popup-success-icon {
    width: 64px;
    height: 64px;
    margin: 0.25rem auto 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
    animation: ntPopupSuccessPop 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ntPopupSuccessPop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.iot-popup-success-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.6rem;
}

.iot-popup-success-message {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 1.4rem;
    font-size: 0.95rem;
}

.iot-popup-success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: stretch;
}

.iot-popup-success-actions .iot-popup-secondary {
    width: 100%;
}

@media (max-width: 560px) {
    .iot-popup-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .iot-popup-card {
        width: 100%;
        max-height: 92vh;
        border-radius: 22px 22px 0 0;
        padding: 1.75rem 1.25rem 1.25rem;
        transform: translateY(40px);
    }

    .iot-popup-overlay.is-open .iot-popup-card {
        transform: translateY(0);
    }

    .iot-popup-actions {
        flex-direction: column-reverse;
    }

    .iot-popup-secondary,
    .iot-popup-primary {
        width: 100%;
    }

    .iot-popup-title {
        font-size: 1.35rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .iot-popup-overlay,
    .iot-popup-card,
    .iot-popup-close,
    .iot-popup-primary,
    .iot-popup-secondary {
        transition: none;
    }
}

/* Dark mode support - only the popup respects OS theme so it
   stays comfortable when the rest of the page is light. */
@media (prefers-color-scheme: dark) {
    .iot-popup-overlay {
        background: rgba(2, 6, 23, 0.7);
    }

    .iot-popup-card {
        background: #0f172a;
        color: #e2e8f0;
        border-color: rgba(148, 163, 184, 0.18);
        box-shadow:
            0 30px 60px -12px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    }

    .iot-popup-close {
        color: #94a3b8;
    }

    .iot-popup-close:hover,
    .iot-popup-close:focus-visible {
        background: rgba(148, 163, 184, 0.12);
        color: #f1f5f9;
    }

    .iot-popup-eyebrow {
        background: rgba(59, 130, 246, 0.18);
        color: #93c5fd;
    }

    .iot-popup-subtitle {
        color: #cbd5e1;
    }

    .iot-popup-body {
        background: rgba(148, 163, 184, 0.06);
        border-color: rgba(148, 163, 184, 0.14);
    }

    .iot-popup-description {
        color: #f1f5f9;
    }

    .iot-popup-list li {
        color: #cbd5e1;
    }

    .iot-popup-note {
        color: #94a3b8;
    }

    .iot-popup-fineprint {
        color: #94a3b8;
    }

    .iot-popup-schedule {
        background: rgba(59, 130, 246, 0.15);
        color: #93c5fd;
        border-color: rgba(59, 130, 246, 0.5);
    }

    .iot-popup-schedule:hover,
    .iot-popup-schedule:focus-visible {
        background: var(--accent);
        color: #fff;
    }

    .iot-popup-or {
        color: #94a3b8;
    }

    .iot-popup-or::before,
    .iot-popup-or::after {
        background: rgba(148, 163, 184, 0.2);
    }

    .iot-popup-form .form-file {
        background: rgba(148, 163, 184, 0.06);
        border-color: rgba(148, 163, 184, 0.3);
        color: #cbd5e1;
    }

    .iot-popup-form .form-file:hover,
    .iot-popup-form .form-file:focus-within,
    .iot-popup-form .form-file.has-file {
        background: rgba(59, 130, 246, 0.18);
        border-color: var(--accent);
        color: #f1f5f9;
    }

    .iot-popup-form .form-file .form-file-icon {
        color: #93c5fd;
    }

    .iot-popup-success-title {
        color: #f1f5f9;
    }

    .iot-popup-success-message {
        color: #cbd5e1;
    }

    .iot-popup-success-icon {
        background: rgba(16, 185, 129, 0.2);
        color: #34d399;
    }

    .iot-popup-form .form-label {
        color: #e2e8f0;
    }

    .iot-popup-form .form-input,
    .iot-popup-form .form-textarea {
        background: #1e293b;
        color: #f1f5f9;
        border-color: rgba(148, 163, 184, 0.2);
    }

    .iot-popup-form .form-input::placeholder,
    .iot-popup-form .form-textarea::placeholder {
        color: #64748b;
    }

    .iot-popup-form .form-input:focus,
    .iot-popup-form .form-textarea:focus {
        border-color: var(--accent);
    }

    .iot-popup-form .iti__selected-flag {
        background: #1e293b;
    }

    /* intlTelInput inherits --text-primary (designed for light chrome). In the
       dark popup the flag strip sits on slate-800; force light text here or
       the dial code disappears into the bar. */
    .iot-popup-form .iti__selected-dial-code {
        color: #f1f5f9 !important;
    }

    .iot-popup-form .iti__arrow {
        border-top-color: #cbd5e1;
    }

    .iot-popup-form .iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag,
    .iot-popup-form .iti--allow-dropdown .iti__flag-container:focus-within .iti__selected-flag {
        background: #334155;
    }

    .iot-popup-form .iti__country-name {
        color: #f1f5f9;
    }

    .iot-popup-form .iti__country-list .iti__dial-code {
        color: #94a3b8;
    }

    .iot-popup-form .iti__country-list {
        background: #1e293b;
        color: #e2e8f0;
        border-color: rgba(148, 163, 184, 0.2);
    }

    .iot-popup-form .iti__country:hover,
    .iot-popup-form .iti__country.iti__highlight {
        background: rgba(59, 130, 246, 0.18);
    }

    .iot-popup-secondary {
        color: #cbd5e1;
        border-color: rgba(148, 163, 184, 0.25);
    }

    .iot-popup-secondary:hover,
    .iot-popup-secondary:focus-visible {
        background: rgba(148, 163, 184, 0.1);
        color: #f1f5f9;
    }
}