/*! Place your custom styles here */

/* ==========================================================================
   Responsive / mobile-first: prevent horizontal overflow and base layout
   ========================================================================== */
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  overflow-x: hidden;
}
.main-container {
  overflow-x: hidden;
}

/* Giants Digital logo: 20% larger in nav */
.nav-container .bar .logo {
  transform: scale(1.2);
  transform-origin: left center;
}

/* Header nav: fixed at top; scroll down = hide, scroll up = slide back into view */
.nav-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transform: translateY(0);
  transition: transform 0.3s ease-out;
}
.nav-container.nav-container--hidden {
  transform: translateY(-100%);
}

/* Nav: in-page scroll links only (hide template dropdowns) */
#menu1 .menu-horizontal > li.dropdown {
  display: none !important;
}

/* Mobile: single logo (avoid duplicate stack) */
.nav-container .bar.visible-xs .logo-light {
  display: none !important;
}
.nav-container .bar.visible-xs .logo-dark {
  display: block !important;
}

/* Full-bleed landing animation without causing horizontal scroll (avoid 100vw) */
.landing-animation-full-bleed {
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  position: relative;
  left: 50%;
  right: auto;
  margin-left: -50vw;
  margin-right: 0;
  box-sizing: border-box;
}
.landing-animation-full-bleed .landing-animation-media {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Content images and media: prevent overflow on small screens */
.main-container img,
.main-container object,
.main-container video {
  max-width: 100%;
}
.main-container img,
.landing-animation-section object {
  height: auto;
}
object.landing-animation-media {
  display: block;
}

/* Hero splash: fill viewport so stats counter stays below fold until scroll */
.hero-splash-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-bottom: 90px;
}

/* Hero title and subtitle: same size as "Your Custom Company AI" section; smooth up + fade-in */
.hero-title-section {
  padding-top: 30vh;
}
.hero-title-section .hero-title {
  font-size: 3.14285714em;
  line-height: 1.31818182em;
  font-weight: 300;
  letter-spacing: -0.01em;
}
.hero-title-section .hero-subtitle {
  font-size: 1.35714286em;
  line-height: 1.68421053em;
  font-weight: 400;
}
.hero-title-section .hero-title,
.hero-title-section .hero-subtitle {
  opacity: 0;
  transform: translateY(28px);
  animation: hero-blend-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero-title-section .hero-subtitle {
  animation-delay: 0.15s;
}
@keyframes hero-blend-in {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* SVG landing animation: same blend-in, 0.1s later + 0.1s slower; pinned to bottom of hero, moved up 10% */
.landing-animation-section {
  margin-top: auto;
  margin-bottom: 10vh;
  opacity: 0;
  transform: translateY(28px);
  animation: hero-blend-in 1s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
}
.landing-animation-section object,
.landing-animation-section img {
  width: 100%;
  height: auto;
  display: block;
}
/* Desktop: show full animation; hide mobile version */
.landing-animation-mobile {
  display: none !important;
}
/* Mobile: show mobile animation; hide desktop version */
@media (max-width: 767px) {
  .landing-animation-desktop {
    display: none !important;
  }
  .landing-animation-mobile {
    display: block !important;
  }
}

/* cristOS app section: iPhone left, copy right; same fade-in-up as hero */
.cristos-app-section {
  padding: 4rem 0;
}
.cristos-app-phone-wrap {
  opacity: 0;
  transform: translateY(28px);
  animation: hero-blend-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}
.cristos-app-phone-wrap object,
.cristos-app-phone-wrap .cristos-app-phone {
  width: 100%;
  max-width: 280px;
  height: auto;
  display: block;
}
/* Video in background; iPhone frame (bezel only, transparent screen) overlaid on top */
.cristos-app-phone-video-wrap {
  position: relative;
  max-width: 280px;
  width: 100%;
  isolation: isolate;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.15)) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.1));
}
.cristos-app-phone-video-wrap .cristos-app-screen {
  position: absolute;
  left: 4.91%;
  top: 2.18%;
  width: 90%;
  height: 95.6%;
  overflow: hidden;
  background: #000;
  z-index: 0;
  pointer-events: none;
  border-radius: 4%;
}
.cristos-app-phone-video-wrap .cristos-app-screencast {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.cristos-app-phone-video-wrap .cristos-app-phone-frame {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
  pointer-events: none;
}
.cristos-app-copy {
  padding-left: 0;
}
@media (min-width: 992px) {
  .cristos-app-copy {
    padding-left: 2rem;
  }
}
.cristos-app-title {
  margin-bottom: 0.75rem;
}
.cristos-app-subtitle {
  margin-bottom: 1rem;
}
.cristos-app-content {
  margin-bottom: 0;
  color: #555;
}

/* Menu dropdowns: smooth ease-in-out animation on hover */
@media all and (min-width: 991px) {
  .dropdown .dropdown__container {
    transition: opacity 0.28s ease-in-out, transform 0.28s ease-in-out;
    transform: translateY(-8px);
  }
  /* Visible state: hover and click (dropdown--active) */
  .dropdown:hover > .dropdown__container,
  .dropdown.dropdown--active > .dropdown__container,
  body.dropdowns--hover .dropdown:not(.dropdown--click):hover > .dropdown__container,
  body:not(.dropdowns--hover) .dropdown.dropdown--hover:hover > .dropdown__container {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }
  .dropdown:hover > .dropdown__container .dropdown__content,
  .dropdown.dropdown--active > .dropdown__container .dropdown__content,
  body.dropdowns--hover .dropdown:not(.dropdown--click):hover > .dropdown__container .dropdown__content,
  body:not(.dropdowns--hover) .dropdown.dropdown--hover:hover > .dropdown__container .dropdown__content {
    pointer-events: all;
  }
  .dropdown:hover > .dropdown__container:before,
  .dropdown.dropdown--active > .dropdown__container:before,
  body.dropdowns--hover .dropdown:not(.dropdown--click):hover > .dropdown__container:before,
  body:not(.dropdowns--hover) .dropdown.dropdown--hover:hover > .dropdown__container:before {
    pointer-events: all;
  }
}

/* Global Performance Optimizations for Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    /* Enable hardware acceleration */
    transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize scrolling containers */
.main-container {
    contain: layout style paint;
    will-change: scroll-position;
    /* Ensure sticky positioning works within main-container */
    position: relative;
}

/* Container Scroll Animation Styles */
.container-scroll-section {
    padding: 100px 0;
    min-height: 60rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
}

.container-scroll-wrapper {
    width: 100%;
    position: relative;
    perspective: 1000px;
}

.container-scroll-inner {
    position: relative;
    width: 100%;
}

.container-scroll-header {
    max-width: 1200px;
    margin: 0 auto 60px;
    text-align: center;
    transition: transform 0.1s ease-out;
    /* GPU acceleration */
    transform: translateZ(0);
    will-change: transform;
}

.container-scroll-header .icon {
    margin-bottom: 1.5rem;
    display: block;
}

.container-scroll-header .lead {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

/* Match hero title/subtitle exactly: same font, size, weight, line-height, letter-spacing (theme h1 + .lead) */
.container-scroll-header .container-scroll-title,
.container-scroll-header .container-scroll-title-large,
.container-scroll-header .lead {
    font-family: 'Open Sans', 'Helvetica', 'Arial', sans-serif;
}
.container-scroll-header .container-scroll-title,
.container-scroll-header .container-scroll-title-large {
    font-weight: 300;
}
.container-scroll-header .lead {
    font-weight: 400;
    font-size: 1.35714286em;
    line-height: 1.68421053em;
    color: #808080;
}
.container-scroll-header .lead:not(:last-child) {
    margin-bottom: 1.36842105263158em;
}

.container-scroll-title {
    font-size: 3.14285714em;
    line-height: 1.31818182em;
    font-weight: 300;
    letter-spacing: -0.01em;
    margin-bottom: 0.59090909090909em;
    color: inherit;
}

.container-scroll-title-large {
    display: block;
    font-size: 1em;
    font-weight: 300;
    line-height: 1.31818182em;
    margin-top: 0;
}

.container-scroll-card {
    max-width: 1200px;
    margin: -48px auto 0;
    height: 30rem;
    width: 100%;
    border: 1px solid #E5E5E5;
    padding: 12px;
    background-color: #fff;
    border-radius: 24px;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.08), 0 12px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}

.container-scroll-card-inner {
    height: 100%;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    background-color: #fafafa;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.container-scroll-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
    border-radius: 12px;
}

.container-scroll-header .container-scroll-sub {
    margin-top: 0.5em;
    font-size: 1em;
    color: #666;
    max-width: 36em;
    margin-left: auto;
    margin-right: auto;
}

.container-scroll-chat-wrap {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 480px;
}

.container-scroll-chat-iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 480px;
    border: none;
    border-radius: 12px;
    background: #fff;
}

/* Inline company AI chat (same design as chat-demo: nav + sidebar + main) */
/* Chat inside 3D-scrolled card: bring interactive layer forward so inputs receive pointer events */
.container-scroll-chat-wrap {
    pointer-events: auto;
    transform: translateZ(1px);
    isolation: isolate;
}
.company-ai-chat {
    pointer-events: auto;
    --gd-blue: #729ce7;
    --nav-h: 56px;
    --sidebar-w: 64px;
    width: 100%;
    height: 100%;
    min-height: 480px;
    position: relative;
    background: #fff;
    border-radius: 12px;
    font-family: 'Open Sans', 'Helvetica', Arial, sans-serif;
    overflow: hidden;
}
.company-ai-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    z-index: 10;
}
.company-ai-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1rem;
}
.company-ai-nav-left {
    display: flex;
    align-items: center;
    gap: 0;
}
.company-ai-nav-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 0.5rem;
    cursor: default;
}
.company-ai-nav-menu-btn:hover { background: #f3f4f6; }
.company-ai-nav-icon { width: 24px; height: 24px; }
.company-ai-nav-logo {
    height: 33.6px;
    width: auto;
    max-height: calc(var(--nav-h) - 16px);
    margin-left: 0.75rem;
    display: block;
    object-fit: contain;
    object-position: center;
    vertical-align: middle;
}
.company-ai-nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.company-ai-nav-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    background: #f3f4f6;
    cursor: default;
}
.company-ai-nav-pill-icon {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    flex-shrink: 0;
}
.company-ai-nav-pill--primary {
    background: var(--gd-blue);
    color: #fff;
}
.company-ai-nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    color: #6b7280;
    cursor: default;
}
.company-ai-nav-icon-btn svg { width: 20px; height: 20px; }
.company-ai-nav-flag { font-size: 1.125rem; cursor: default; }
.company-ai-nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    cursor: default;
}
.company-ai-nav-avatar svg { width: 20px; height: 20px; }

@media (max-width: 520px) {
    .company-ai-nav-pill { padding: 0.25rem 0.5rem; font-size: 0.75rem; }
    .company-ai-nav-pill-icon { width: 14px; height: 14px; margin-right: 0.25rem; }
    .company-ai-nav-right { gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
}
.company-ai-sidebar {
    position: absolute;
    left: 0;
    top: var(--nav-h);
    bottom: 0;
    width: var(--sidebar-w);
    background: #fff;
    border-right: 1px solid #e5e7eb;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0;
    gap: 0.25rem;
}
.company-ai-sidebar-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: #4b5563;
    border-radius: 0.5rem;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
}
.company-ai-sidebar-btn:hover { background: #f3f4f6; }
.company-ai-sidebar-btn svg { width: 20px; height: 20px; }
.company-ai-main {
    position: absolute;
    top: var(--nav-h);
    left: var(--sidebar-w);
    right: 0;
    bottom: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.company-ai-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    min-height: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.company-ai-welcome.company-ai-welcome--leaving {
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
}
.company-ai-welcome-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #111827;
    margin: 0 0 0.75rem;
}
.company-ai-welcome-text {
    color: #4b5563;
    font-size: 1.0625rem;
    text-align: center;
    max-width: 32rem;
    margin: 0 0 1.5rem;
}
.company-ai-file-hint {
    font-size: 0.8rem;
    color: #b45309;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin: 0 0 1rem;
    text-align: center;
    max-width: 32rem;
}
.company-ai-file-hint.hidden { display: none; }
.company-ai-file-hint code { font-size: 0.85em; }
.company-ai-input-wrap {
    width: 100%;
    max-width: 42rem;
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.625rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.company-ai-input-wrap--bottom { margin-top: 0.5rem; flex-shrink: 0; max-width: none; width: 100%; }
.company-ai-textarea {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 0.5rem 0.75rem;
    font-size: 1.0625rem;
    color: #111827;
    resize: none;
    min-height: 44px;
    max-height: 100px;
    outline: none;
}
.company-ai-textarea::placeholder { color: #6b7280; }
.company-ai-textarea:focus { outline: none; }
.company-ai-textarea,
.company-ai-send-btn,
.company-ai-input-wrap {
    pointer-events: auto;
}
.company-ai-send-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    background: var(--gd-blue);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
}
.company-ai-send-btn:hover { opacity: 0.9; }
.company-ai-send-icon { width: 1rem; height: 1rem; }
.company-ai-messages-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 1rem;
    overflow: hidden;
}
.company-ai-messages-wrap.hidden { display: none; }
.company-ai-messages-wrap:not(.hidden) { display: flex; }
.company-ai-messages-wrap.company-ai-messages-wrap--visible {
    opacity: 1;
}
.company-ai-messages-wrap:not(.hidden) {
    opacity: 0;
    transition: opacity 0.3s ease;
}
.company-ai-messages-wrap:not(.hidden).company-ai-messages-wrap--visible {
    opacity: 1;
}
.company-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 0.5rem;
}
.company-ai-msg {
    animation: company-ai-fadeIn 0.3s ease-in;
    margin-bottom: 1rem;
}
@keyframes company-ai-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.company-ai-msg--user { text-align: right; }
.company-ai-msg--user .company-ai-msg-bubble {
    display: inline-block;
    max-width: 85%;
    background: #f3f4f6;
    color: #111827;
    border-radius: 1rem;
    padding: 0.625rem 1.125rem;
    font-size: 1.0625rem;
    text-align: left;
}
.company-ai-msg--assistant { display: flex; gap: 0.5rem; align-items: flex-start; }
.company-ai-msg--assistant .company-ai-msg-avatar {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--gd-blue);
}
.company-ai-msg--assistant .company-ai-msg-avatar svg { width: 100%; height: 100%; }
.company-ai-msg--assistant .company-ai-msg-bubble {
    flex: 1;
    min-width: 0;
    font-size: 1.0625rem;
    color: #111827;
    line-height: 1.55;
}
.company-ai-msg-bubble strong { font-weight: 600; }
.company-ai-msg-bubble p { margin: 0 0 0.5em; }
.company-ai-msg-bubble p:last-child { margin-bottom: 0; }
.company-ai-typing {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding: 0.25rem 0;
}
.company-ai-typing-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    margin-right: 4px;
    animation: company-ai-bounce 0.6s ease-in-out infinite;
}
.company-ai-typing-dots span:nth-child(2) { animation-delay: 0.1s; }
.company-ai-typing-dots span:nth-child(3) { animation-delay: 0.2s; }
@keyframes company-ai-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@media (min-width: 768px) {
    .container-scroll-section {
        min-height: 80rem;
        padding: 160px 0;
    }
    
    .container-scroll-card {
        height: 40rem;
        padding: 16px;
    }
}

@media (max-width: 767px) {
    .container-scroll-title {
        font-size: 2.35714286em;
        line-height: 1.36363636em;
    }
    .container-scroll-header .lead {
        font-size: 1.35714286em;
        line-height: 1.36842105263158em;
    }
}

/* Spline Container Styles */
.spline-container {
    position: relative;
    width: 100%;
    height: 500px;
    min-height: 400px;
    overflow: hidden;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.spline-scene {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
    outline: none;
    position: relative;
    z-index: 1;
}

.spline-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.spline-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.spline-loading p {
    color: #ffffff;
    font-size: 14px;
    margin: 0;
}

@media (max-width: 768px) {
    .spline-container {
        height: 400px;
        min-height: 300px;
    }
}

@media (min-width: 992px) {
    .spline-container {
        height: 600px;
        min-height: 500px;
    }
}

/* Match section height to spline container */
section.switchable.feature-large.bg--primary {
    padding-top: 0;
    padding-bottom: 0;
    display: flex;
    align-items: center;
    min-height: 500px;
}

section.switchable.feature-large.bg--primary .container {
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    display: flex;
    align-items: center;
    min-height: 500px;
}

section.switchable.feature-large.bg--primary .row {
    align-items: center;
    min-height: 500px;
}

/* Align robot (spline) column to bottom of section - bot has no legs so anchor to bottom */
section.switchable.feature-large.bg--primary .row > div:first-child {
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    section.switchable.feature-large.bg--primary {
        min-height: 400px;
    }
    
    section.switchable.feature-large.bg--primary .container {
        min-height: 400px;
    }
    
    section.switchable.feature-large.bg--primary .row {
        min-height: 400px;
    }
}

@media (min-width: 992px) {
    section.switchable.feature-large.bg--primary {
        min-height: 600px;
    }
    
    section.switchable.feature-large.bg--primary .container {
        min-height: 600px;
    }
    
    section.switchable.feature-large.bg--primary .row {
        min-height: 600px;
    }
}

/* Glowing Cards Styles */
.glowing-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    list-style: none;
    padding: 2rem 0;
    margin: 0;
    max-width: 100%;
}

@media (min-width: 768px) {
    .glowing-cards-grid {
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: repeat(3, auto);
        gap: 1rem;
    }
}

@media (min-width: 1200px) {
    .glowing-cards-grid {
        grid-template-rows: repeat(2, auto);
        max-height: 34rem;
        gap: 1rem;
    }
}

.glowing-card-item {
    min-height: 14rem;
    list-style: none;
    display: flex;
}

.glowing-card-item .glowing-card-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .glowing-card-item[data-area="1"] {
        grid-area: 1 / 1 / 2 / 7;
    }
    .glowing-card-item[data-area="2"] {
        grid-area: 1 / 7 / 2 / 13;
    }
    .glowing-card-item[data-area="3"] {
        grid-area: 2 / 1 / 3 / 7;
    }
    .glowing-card-item[data-area="4"] {
        grid-area: 2 / 7 / 3 / 13;
    }
    .glowing-card-item[data-area="5"] {
        grid-area: 3 / 1 / 4 / 13;
    }
}

@media (min-width: 1200px) {
    .glowing-card-item[data-area="1"] {
        grid-area: 1 / 1 / 2 / 5;
    }
    .glowing-card-item[data-area="2"] {
        grid-area: 2 / 1 / 3 / 5;
    }
    .glowing-card-item[data-area="3"] {
        grid-area: 1 / 5 / 3 / 8;
    }
    .glowing-card-item[data-area="4"] {
        grid-area: 1 / 8 / 2 / 13;
    }
    .glowing-card-item[data-area="5"] {
        grid-area: 2 / 8 / 3 / 13;
    }
}

.glowing-card-wrapper {
    position: relative;
    height: 100%;
    padding: 0.5rem;
}

@media (min-width: 768px) {
    .glowing-card-wrapper {
        padding: 0.75rem;
    }
}

.glowing-effect-container {
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    overflow: visible;
}

.glowing-effect-container.active {
    opacity: 1;
}

.glowing-effect-glow {
    position: absolute;
    inset: 0;
    border-radius: 6px;
    opacity: 1;
}

.glowing-effect-glow::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 6px;
    border: 3px solid transparent;
    background: radial-gradient(circle, #dd7bbb 10%, rgba(221, 123, 187, 0) 20%),
                radial-gradient(circle at 40% 40%, #d79f1e 5%, rgba(215, 159, 30, 0) 15%),
                radial-gradient(circle at 60% 60%, #5a922c 10%, rgba(90, 146, 44, 0) 20%),
                radial-gradient(circle at 40% 60%, #64aef2 10%, rgba(100, 174, 242, 0) 20%),
                repeating-conic-gradient(
                    from 236.84deg at 50% 50%,
                    #dd7bbb 0%,
                    #d79f1e calc(25% / 5),
                    #5a922c calc(50% / 5),
                    #64aef2 calc(75% / 5),
                    #dd7bbb calc(100% / 5)
                );
    background-attachment: fixed;
    opacity: var(--glow-active, 0);
    transition: opacity 0.3s ease;
    -webkit-mask-clip: padding-box, border-box;
    mask-clip: padding-box, border-box;
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
    -webkit-mask-image: linear-gradient(transparent, transparent),
                        conic-gradient(
                            from calc((var(--glow-start, 0) - 40) * 1deg),
                            transparent 0deg,
                            #fff,
                            transparent calc(80deg)
                        );
    mask-image: linear-gradient(transparent, transparent),
                conic-gradient(
                    from calc((var(--glow-start, 0) - 40) * 1deg),
                    transparent 0deg,
                    #fff,
                    transparent calc(80deg)
                );
    z-index: -1;
}

/* Ensure glow is visible when container is active */
.glowing-effect-container.active .glowing-effect-glow::after {
    opacity: 1;
}

/* Integrate glowing effect with template's feature classes */
.glowing-card-wrapper .feature.glowing-card-content {
    position: relative;
    height: 100%;
    z-index: 2;
    margin: 0;
    min-height: 14rem;
    display: flex;
    flex-direction: column;
}

.glowing-card-wrapper .feature.glowing-card-content i {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.glowing-card-wrapper .feature.glowing-card-content .feature__body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Override feature-2 float layout in grid context */
.glowing-cards-grid .feature-2 {
    overflow: visible;
}

.glowing-cards-grid .feature-2 i {
    width: auto;
    float: none;
    margin-bottom: 1rem;
}

.glowing-cards-grid .feature-2 .feature__body {
    width: 100%;
    float: none;
}

@media all and (max-width: 990px) {
    .glowing-cards-grid .feature-2 i {
        margin-bottom: 0.92857143em;
    }
}

/* Portfolio slider: modern tools section – 4 visible cards, smooth slide */
.portfolio-slider-section {
    padding: 4rem 0 4.5rem;
}
.portfolio-slider-section .lead {
    max-width: 36em;
    margin-left: auto;
    margin-right: auto;
}
.portfolio-slider-wrap {
    position: relative;
    margin-top: 2.5rem;
    padding: 0 3rem;
}
.portfolio-slider-viewport {
    overflow: hidden;
    margin: 0 -0.5rem;
    border-radius: 12px;
}
/* Spring-like horizontal scroll (approximates Framer Motion type: "spring", stiffness: 300, damping: 30) */
.portfolio-slider-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 1.25rem;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    will-change: transform;
    contain: layout style;
}
/* Card carousel: ~3.5 cards visible, partial 4th */
.portfolio-slider-track .tools-carousel-card {
    flex: 0 0 auto;
    width: 85%;
    min-width: 280px;
    max-width: 360px;
}
@media (min-width: 576px) {
    .portfolio-slider-track .tools-carousel-card {
        width: 55%;
        min-width: 260px;
        max-width: 340px;
    }
}
@media (min-width: 768px) {
    .portfolio-slider-track .tools-carousel-card {
        width: 32%;
        min-width: 280px;
        max-width: 340px;
    }
}
@media (min-width: 992px) {
    .portfolio-slider-track .tools-carousel-card {
        width: calc((100% - 3 * 1.25rem) / 3.35);
        min-width: 280px;
        max-width: 360px;
    }
}

/* Nav arrows: CI blue icon only, no button background */
.portfolio-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: auto;
    height: auto;
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: #64aef2;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
    font-family: 'stack-interface', sans-serif;
}
.portfolio-slider-arrow .icon {
    font-size: 1.75rem;
    line-height: 1;
}
.portfolio-slider-arrow:not(:hover) {
    opacity: 0.85;
}
.portfolio-slider-arrow:hover {
    opacity: 1;
    color: #4a9ae8;
    transform: translateY(-50%) scale(1.08);
}
.portfolio-slider-arrow:active {
    transform: translateY(-50%) scale(0.98);
}
.portfolio-slider-section.bg--secondary .portfolio-slider-arrow {
    background: transparent;
    color: #64aef2;
}
.portfolio-slider-section.bg--secondary .portfolio-slider-arrow:hover {
    color: #4a9ae8;
    background: transparent;
}
.portfolio-slider-prev {
    left: 0;
}
.portfolio-slider-next {
    right: 0;
}

/* Card carousel: wrapper for glow effect (filled by glowing-cards.js) */
.tools-carousel-card .glowing-card-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
}
.tools-carousel-card .glowing-effect-container {
    border-radius: 12px;
}
.tools-carousel-card .glowing-effect-glow,
.tools-carousel-card .glowing-effect-glow::after {
    border-radius: 12px;
}

/* Card carousel: card layout (image + body with title, number, label) */
.tools-carousel-card-inner {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.tools-carousel-card:hover .tools-carousel-card-inner {
    transform: translateY(-5px);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.tools-carousel-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.tools-carousel-card-link:hover {
    color: inherit;
}
.tools-carousel-card-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    flex-shrink: 0;
}
.tools-carousel-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Website preview cards: image fills card, title below only */
.tools-carousel-card-website .tools-carousel-card-inner {
    display: flex;
    flex-direction: column;
    padding: 0;
}
.tools-carousel-card-website .tools-carousel-card-image-wrap {
    flex: 1;
    min-height: 0;
    aspect-ratio: 3 / 2;
}
.tools-carousel-card-website .tools-carousel-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tools-carousel-card-title-wrap {
    overflow: hidden;
    flex-shrink: 0;
    max-height: 0;
    transition: max-height 0.35s ease-out;
}
.tools-carousel-card-website:hover .tools-carousel-card-title-wrap {
    max-height: 4rem;
}
.tools-carousel-card-title-only {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #252525;
    margin: 0;
    padding: 0.75rem 1rem;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.35s ease-out;
}
.tools-carousel-card-website:hover .tools-carousel-card-title-only {
    transform: translateY(0);
}
/* Website preview: scroll full-page on hover via transform (smooth, no jump) */
.website-preview-wrap {
    position: relative;
    overflow: hidden;
    container-type: size;
    container-name: preview;
}
.website-preview-inner {
    transition: transform 3.2s ease-in-out;
    will-change: transform;
}
/* Stop at bottom of image: translate by (image height - viewport height) */
.tools-carousel-card-website:hover .website-preview-inner {
    transform: translateY(calc(-100% + 100cqh));
}
.website-preview-inner .website-preview-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: top center;
}
.tools-carousel-card-body {
    padding: 1.25rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.tools-carousel-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #252525;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tools-carousel-card-number {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #252525;
    letter-spacing: -0.02em;
}
.tools-carousel-card-label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #999;
}

/* Scroll Reveal Animation Styles - Optimized for Performance */
.scroll-reveal {
    opacity: 0;
    transform: translate3d(0, 20px, 0); /* Use translate3d for GPU acceleration */
    transition: opacity 0.5s ease-out 0.3s, transform 0.5s ease-out 0.3s;
    /* Enable hardware acceleration */
    backface-visibility: hidden;
    perspective: 1000px;
}

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

/* Use GPU acceleration for images - but remove after animation */
.scroll-reveal img {
    will-change: opacity, transform;
    transform: translateZ(0); /* Force GPU layer */
}

/* Remove will-change after animation completes to prevent layer bloat */
.scroll-reveal.revealed img {
    will-change: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Stats counter under hero: fade-in-up on scroll + count animation */
.stats-counter-section {
    padding: 3rem 0;
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    background: #fafafa;
}
.stats-counter-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.stats-counter-section .stat-item {
    text-align: center;
    padding: 0.75rem 0;
}
.stats-counter-section .stat-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #444;
}
.stats-counter-section .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: #64aef2;
}
@media (min-width: 768px) {
    .stats-counter-section .stat-icon {
        font-size: 2.25rem;
    }
    .stats-counter-section .stat-number {
        font-size: 2.5rem;
    }
}
.stats-counter-section .stat-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #444;
    margin-top: 0.25rem;
}
@media (prefers-reduced-motion: reduce) {
    .stats-counter-section {
        opacity: 1;
        transform: none;
    }
}

/* iPhone Sticky Scroll Section - Complete Rebuild */
.iphone-sticky-section {
    position: relative;
    background-color: #ebebeb;
    padding: 100px 0;
    overflow: visible;
    /* Ensure section has enough height for sticky to work */
    min-height: 200vh;
}

.iphone-sticky-container {
    position: relative;
    width: 100%;
}

/* Sticky behavior - container becomes sticky during scroll animation */
.iphone-sticky-section.is-sticky .iphone-sticky-container {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 10;
    will-change: position;
}

/* iPhone Mockup Wrapper - Left Column */
.iphone-mockup-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    perspective: 1000px;
}

/* iPhone Frame - Angled 10-15 degrees to the right */
.iphone-mockup-frame {
    position: relative;
    width: 320px;
    max-width: 100%;
    height: 650px;
    max-height: 80vh;
    padding: 10px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 2px solid #000;
    border-radius: 45px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset,
                0 4px 16px rgba(0, 0, 0, 0.3);
    transform: rotateY(12deg) rotateX(2deg);
    transform-style: preserve-3d;
    transition: transform 0.3s ease-out;
}

/* iPhone 15 Dynamic Island */
.iphone-dynamic-island {
    position: absolute;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: 140px;
    height: 40px;
    background: #000;
    border-radius: 20px;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* iPhone Screen Container */
.iphone-screen-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 35px;
    overflow: hidden;
}

/* Screen Mask - clips the scrolling image */
.iphone-screen-mask {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
}

/* App Image - scrolls vertically inside iPhone */
.iphone-app-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

/* Content Wrapper - Right Column */
.iphone-content-wrapper {
    padding: 2rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.iphone-sticky-section.scroll-complete .iphone-content-wrapper {
    opacity: 1;
    transform: translateY(0);
}

.iphone-content-inner {
    padding-left: 2rem;
}

.iphone-content-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: #1a1a1a;
}

.iphone-content-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.iphone-content-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
}

.iphone-content-description p {
    margin-bottom: 1.5rem;
}

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

/* Responsive Styles */
@media (min-width: 768px) {
    .iphone-sticky-section {
        padding: 120px 0;
    }
    
    .iphone-mockup-frame {
        width: 360px;
        height: 720px;
    }
    
    .iphone-content-title {
        font-size: 3rem;
    }
    
    .iphone-content-subtitle {
        font-size: 1.5rem;
    }
}

@media (min-width: 992px) {
    .iphone-sticky-section {
        padding: 140px 0;
    }
    
    .iphone-mockup-frame {
        width: 400px;
        height: 800px;
        max-height: 85vh;
    }
    
    .iphone-content-inner {
        padding-left: 3rem;
    }
    
    .iphone-content-title {
        font-size: 3.5rem;
    }
}

@media (max-width: 767px) {
    .iphone-sticky-section {
        padding: 60px 0;
    }
    
    .iphone-mockup-wrapper {
        margin-bottom: 3rem;
    }
    
    .iphone-mockup-frame {
        transform: rotateY(8deg) rotateX(1deg);
        width: 280px;
        height: 580px;
    }
    
    .iphone-content-wrapper {
        opacity: 1;
        transform: translateY(0);
    }
    
    .iphone-content-inner {
        padding-left: 0;
    }
    
    .iphone-content-title {
        font-size: 2rem;
    }
    
    .iphone-content-subtitle {
        font-size: 1.125rem;
    }
}

/* Contact form block - card on primary background */
.contact-form-block {
    margin-top: 50px;
    margin-bottom: 50px;
    background: #fff;
    border-radius: 16px;
    padding: 2.25rem 2.25rem 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    max-width: 100%;
}

/* Override .bg--primary white text so title and lead are visible on white card */
.bg--primary .contact-form-block .contact-form-title {
    color: #1a1a1a;
}
.bg--primary .contact-form-block .contact-form-lead {
    color: #555;
}
.bg--primary .contact-form-block .contact-form-label {
    color: #444;
}

.contact-form-title {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.25;
    color: #1a1a1a;
}

.contact-form-lead {
    margin: 0 0 1.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
}

.contact-form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.contact-form-row--half {
    width: 100%;
}

.contact-form-row--submit {
    margin-top: 0.25rem;
}

.contact-form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #444;
    letter-spacing: 0.01em;
}

.contact-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    line-height: 1.4;
    color: #1a1a1a;
    background: #fcfcfc;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-input::placeholder,
.contact-form-textarea::placeholder {
    color: #9ca3af;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
    outline: none;
    border-color: #64aef2;
    box-shadow: 0 0 0 3px rgba(100, 174, 242, 0.2);
}

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

/* Select with custom dropdown arrow */
.contact-form-select-wrap {
    position: relative;
}

.contact-form-select-wrap::after {
    content: "";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #6b7280;
    pointer-events: none;
}

.contact-form-select {
    appearance: none;
    padding-right: 2.5rem;
    cursor: pointer;
}

.contact-form-submit {
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 10px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.contact-form-submit:hover {
    transform: translateY(-1px);
}

/* Two-column row for name + email on larger screens */
@media (min-width: 576px) {
    .contact-form-fields {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
        gap: 1.25rem;
    }

    .contact-form-row {
        grid-column: span 1;
    }

    .contact-form-row--half {
        grid-column: span 1;
    }

    .contact-form-row:not(.contact-form-row--half):not(.contact-form-row--submit) {
        grid-column: 1 / -1;
    }

    .contact-form-row--submit {
        grid-column: 1 / -1;
        margin-top: 0;
    }
}

@media (min-width: 768px) {
    .contact-form-block {
        padding: 2.75rem 2.75rem 3rem;
    }

    .contact-form-title {
        font-size: 2rem;
    }
}

/* ==========================================================================
   Mobile & tablet: header, hero, stats, sections, slider, footer
   ========================================================================== */

/* ---------- Header (nav bar) - mobile ---------- */
@media (max-width: 767px) {
    .nav-container {
        position: fixed;
        top: 0;
        z-index: 1000;
    }
    .nav-container .bar.visible-xs {
        padding: 0.5rem 0;
        min-height: 52px;
        display: flex;
        align-items: center;
        background: #fff;
        box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    }
    .nav-container .bar.visible-xs .container {
        width: 100%;
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .nav-container .bar.visible-xs .row {
        align-items: center;
        margin-left: 0;
        margin-right: 0;
    }
    .nav-container .bar.visible-xs .col-3,
    .nav-container .bar.visible-xs .col-9 {
        padding-left: 0;
        padding-right: 0;
    }
    .nav-container .bar.visible-xs .logo {
        max-height: 38px;
        width: auto;
        max-width: 168px;
        height: auto;
        display: block;
        top: 0;
    }
    .nav-container .bar.visible-xs .hamburger-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
        margin: -0.25rem -0.5rem -0.25rem 0;
        color: #252525;
        text-decoration: none;
    }
    .nav-container .bar.visible-xs .hamburger-toggle .icon {
        font-size: 1.5rem;
    }
}

/* ---------- Hero (title + animation) - mobile ---------- */
@media (max-width: 767px) {
    .hero-splash-wrapper {
        min-height: 100vh;
        min-height: 100dvh;
        padding-bottom: 10vh;
    }
    .hero-title-section {
        padding-top: 40vh;
        padding-bottom: 1.5rem;
    }
    .hero-title-section .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
    .hero-title-section .hero-title {
        word-wrap: break-word;
        hyphens: auto;
        font-size: 2.35714286em;
        line-height: 1.36363636em;
        margin-bottom: 0.75rem;
    }
    .hero-title-section .hero-subtitle {
        font-size: 1.35714286em;
        line-height: 1.36842105263158em;
    }
    .hero-buttons-wrap {
        gap: 0.5rem;
        padding: 0.25rem 0;
        justify-content: center;
    }
    .hero-buttons-wrap .btn {
        min-height: 44px;
        padding: 0.625rem 1rem;
        font-size: 0.9375rem;
    }
    .landing-animation-section {
        padding-top: 1rem;
        padding-bottom: 0;
    }
    .landing-animation-full-bleed .landing-animation-media {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title-section .hero-title {
        font-size: 2.35714286em;
        line-height: 1.36363636em;
    }
    .hero-title-section .hero-subtitle {
        font-size: 1.35714286em;
        line-height: 1.36842105263158em;
    }
}

/* Stats: 4 in a row, smaller on mobile; extra bottom padding so title below has space */
@media (max-width: 767px) {
    .stats-counter-section {
        padding: 2rem 0 3.5rem;
    }
    .stats-counter-section .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .stats-counter-section .row {
        display: flex;
        flex-wrap: nowrap;
        margin-left: -0.25rem;
        margin-right: -0.25rem;
    }
    .stats-counter-section .row > [class*="col-"] {
        flex: 0 0 25%;
        max-width: 25%;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    .stats-counter-section .stat-item {
        padding: 0.35rem 0.15rem;
    }
    .stats-counter-section .stat-icon {
        font-size: 1.25rem;
        margin-bottom: 0.25rem;
    }
    .stats-counter-section .stat-number {
        font-size: 1.25rem;
    }
    .stats-counter-section .stat-label {
        font-size: 0.6rem;
        margin-top: 0.15rem;
    }
}

/* Container-scroll section: mobile = chat-only (no iPad frame), desktop = card */
@media (max-width: 767px) {
    .container-scroll-section {
        min-height: 50rem;
        padding: 4rem 0 60px;
    }
    .container-scroll-header {
        margin-bottom: 2rem;
        padding-top: 0.5rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .container-scroll-card {
        margin-top: -24px;
        height: auto;
        min-height: 320px;
        padding: 0;
        border: none;
        border-radius: 12px;
        box-shadow: none;
        transform: none;
        max-width: 100%;
    }
    .container-scroll-card-inner {
        border-radius: 12px;
        border: 1px solid #e5e7eb;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
        min-height: 320px;
    }
    .container-scroll-chat-wrap,
    .container-scroll-chat-iframe {
        min-height: 320px;
    }
    /* Mobile: hide nav and sidebar, show only chat (welcome + input / messages) */
    .company-ai-chat .company-ai-nav,
    .company-ai-chat .company-ai-sidebar {
        display: none;
    }
    .company-ai-chat .company-ai-main {
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    .company-ai-chat {
        --nav-h: 0;
        --sidebar-w: 0;
        min-height: 320px;
    }
}

/* Portfolio slider: 2 cards visible per row on mobile */
@media (max-width: 767px) {
    .portfolio-slider-section {
        padding: 3rem 0 3.5rem;
    }
    .portfolio-slider-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .portfolio-slider-wrap {
        padding: 0 0.5rem;
        margin-top: 1.5rem;
    }
    .portfolio-slider-arrow {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
    }
    .portfolio-slider-viewport {
        margin: 0 -0.25rem;
    }
    .portfolio-slider-track .tools-carousel-card {
        width: calc(50% - 0.625rem);
        min-width: 140px;
        max-width: none;
    }
}

/* CristOS app section: stack and smaller iPhone on mobile */
@media (max-width: 767px) {
    .cristos-app-section {
        padding: 2.5rem 0;
    }
    .cristos-app-section .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .cristos-app-phone-wrap .cristos-app-phone-video-wrap {
        max-width: 200px;
        margin-left: auto;
        margin-right: auto;
    }
    .cristos-app-copy {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Spline + contact section: single column and padding */
@media (max-width: 767px) {
    section.switchable.feature-large.bg--primary .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    section.switchable.feature-large.bg--primary .row {
        gap: 2rem;
    }
    .contact-form-block {
        padding: 1.5rem 1.25rem;
    }
}

/* Footer: wrap links and comfortable spacing */
@media (max-width: 767px) {
    .footer-5 .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .footer-5 .list-inline {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }
    .footer-5 .heading-block + div,
    .footer-5 .social-list {
        margin-top: 1rem;
    }
    .footer-5 .type--fine-print {
        display: block;
        margin-bottom: 0.25rem;
    }
}

/* Back-to-top: touch-friendly size */
@media (max-width: 767px) {
    .back-to-top {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Nav: desktop bar logo (when both bars present); mobile expanded menu */
@media (max-width: 767px) {
    .nav-container .bar.hidden-xs .logo {
        max-height: 36px;
        width: auto;
        max-width: 100%;
    }
    /* When hamburger opens the full nav (#menu1), contain and scroll */
    .nav-container nav#menu1.bar:not(.hidden-xs) {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Global container padding on mobile for consistent side spacing */
@media (max-width: 767px) {
    .main-container .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ==========================================================================
   Language selector (top right next to Schedule Demo)
   ========================================================================== */
/* Nav bar: one row — logo, nav links (centered), buttons, EN (no stacking) */
#menu1.bar-1 .row > div[class*='col-']:last-child {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
#menu1.bar-1 .row > div[class*='col-']:last-child .bar__module {
    margin-bottom: 0 !important;
}
/* Nav links module: take remaining space and center the menu */
#menu1.bar-1 .row > div[class*='col-']:last-child .bar__module:not(.bar__module--nav-buttons) {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}
/* Buttons + lang: stay at the end */
#menu1.bar-1 .row > div[class*='col-']:last-child .bar__module.bar__module--nav-buttons {
    flex: 0 0 auto;
}
#menu1.bar-1 .row > div[class*='col-']:last-child .bar__module + .bar__module {
    margin-top: 0 !important;
    margin-left: 1.85714286em;
}
/* More spacing between nav links so they’re not bunched */
#menu1 .menu-horizontal > li:not(:first-child) {
    margin-left: 2em;
}
.bar__module--nav-buttons {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap !important;
    gap: 0.5rem;
    margin-left: auto;
    min-width: 0;
}
/* Keep buttons and EN in one row (override theme .bar__module .btn { display: block }) */
.bar__module--nav-buttons .btn,
.bar__module--nav-buttons > a.btn {
    display: inline-flex !important;
    margin-bottom: 0 !important;
}
.lang-selector-wrap {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.lang-selector {
    position: relative;
}
.lang-selector__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: none;
    color: inherit;
    padding: 0.4rem 0.6rem;
    min-height: auto;
    cursor: pointer;
    border-radius: 4px;
}
.lang-selector__trigger:hover {
    background: rgba(255, 255, 255, 0.08);
}
.bar--sm .lang-selector__trigger {
    color: inherit;
}
.lang-selector__flag {
    font-size: 1.1rem;
    line-height: 1;
}
.lang-selector__code {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.lang-selector__trigger .icon {
    font-size: 0.65rem;
    opacity: 0.8;
    transition: transform 0.2s ease;
}
.lang-selector.open .lang-selector__trigger .icon {
    transform: rotate(180deg);
}
/* CI design: white background dropdown */
.lang-selector__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    min-width: 10rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0.25rem;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.lang-selector.open .lang-selector__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang-selector__option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: none;
    background: transparent;
    color: #1a1a1a;
    font-size: 0.85rem;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    gap: 0.5rem;
}
.lang-selector__option:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* Footer language flags: inline, link-style */
.footer-lang-flags {
    margin-bottom: 0.75rem;
}
.footer-lang-flags .footer-lang-btn {
    display: inline;
    width: auto;
    padding: 0 0.35rem;
    margin: 0 0.15rem;
    font-size: inherit;
    text-align: center;
    border-radius: 2px;
    vertical-align: baseline;
}
.footer-lang-flags .footer-lang-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    text-decoration: underline;
}
footer.bg--secondary .footer-lang-flags .footer-lang-btn {
    color: inherit;
}
footer.bg--secondary .footer-lang-flags .footer-lang-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Language toast (top right, smooth animation) */
.lang-toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    max-width: 320px;
    padding: 0.9rem 1rem;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateX(120%);
    transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s;
}
.lang-toast.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}
.lang-toast__message {
    margin: 0 0 0.6rem 0;
    font-size: 0.9rem;
    color: #e5e5e5;
    line-height: 1.4;
}
.lang-toast__action {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: #3b82f6;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.lang-toast__action:hover {
    background: #2563eb;
}
@media (max-width: 480px) {
    .lang-toast {
        right: 0.75rem;
        left: 0.75rem;
        max-width: none;
    }
}