
html, body { max-width: 100%; overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; }
main, header, section, nav, footer, article, aside,
.site-nav > *, .site-nav__links, .contact-shell, .contact-form,
.testimonial-card, .stat-card, .products-network-panel, .products-network-card,
.portal-card, .portal-panel, .workspace-layout, .workspace-content,
.grid, [class*="grid"], [class*="flex"] { min-width: 0; }
:where(h1,h2,h3,h4,h5,h6,p,li,a,button,label,span,small,strong,em,dd,dt,td,th,pre,code) {
  overflow-wrap: break-word;
}
:where(.contact-shell,.testimonial-card,.portal-card,.portal-panel,.data-box,.contact-card) :where(a,p,li,span,strong,code,pre) {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.stat-card,
.stat-card :where(a,p,li,span,strong,small) {
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.stat-card .stat-value {
  white-space: normal;
}
#impact .impact-stat-grid {
  gap: clamp(1.25rem, 2vw, 2rem);
  padding: .25rem;
}
#impact .stat-value--duration {
  font-size: clamp(1.7rem, 2.2vw, 2rem);
  letter-spacing: -.025em;
  white-space: nowrap;
}
:where(img,svg,canvas,video,iframe,input,textarea,select,button) { max-width: 100%; }
.site-nav__links { flex-wrap: nowrap; }
.site-nav__links--glyphs { gap: clamp(.55rem, .75vw, .9rem); font-size: .78rem; }
.nav-link--glyph { display: inline-flex; align-items: center; gap: .35rem; }
.nav-glyph { width: .95rem; height: .95rem; flex: 0 0 auto; object-fit: contain; }
.nav-glyph--brand { width: 1.1rem; height: 1.1rem; }
.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 1000;
  transform: translateY(-200%);
  border-radius: .75rem;
  background: #0f172a;
  color: #fff;
  padding: .7rem 1rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(15,23,42,.25);
}
.skip-link:focus { transform: translateY(0); outline: 3px solid #38bdf8; outline-offset: 2px; }
:focus-visible { outline: 3px solid #38bdf8; outline-offset: 3px; }
.contact-consent { align-items: flex-start; display: flex; gap: .7rem; font-size: .78rem; line-height: 1.55; color: #475569; }
.contact-consent input { flex: 0 0 auto; margin-top: .2rem; }
.contact-consent a { text-decoration: underline; text-underline-offset: 2px; }

/* WCAG AA contrast hardening for small text on light surfaces. Tailwind v4's
   lighter brand utility shades fall below 4.5:1 in several public cards. */
.text-sky-600 { color: #0369a1 !important; }
.text-emerald-600,
.text-emerald-300,
.text-emerald-200 { color: #047857 !important; }
.text-amber-500 { color: #92400e !important; }
.text-orange-600 { color: #9a3412 !important; }
.text-slate-500,
.text-slate-400 { color: #475569 !important; }
.site-branding span { color: #0f172a !important; }
.bg-sky-600.text-white,
button.bg-sky-600.text-white,
a.bg-sky-600.text-white { background-color: #0369a1 !important; }

/* Dynamic/long content must shrink inside cards instead of forcing the card wider. */
.repo-list,
.repo-list a,
.repo-list a > span,
.resume-heading,
.resume-section-heading,
.github-status,
.contact-row,
.products-network-card,
.site-branding { min-width: 0; max-width: 100%; }
.repo-list a { overflow: hidden; }
.repo-list a > span:first-child { flex: 1 1 auto; }
.repo-list small {
  max-width: 100%;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.github-status { white-space: normal !important; overflow-wrap: anywhere; }
.resume-heading, .resume-section-heading { flex-wrap: wrap; }
.site-branding { flex-wrap: wrap; }

/* Sign for a Change portfolio treatment. */
.sign-change-section {
  background: linear-gradient(135deg, #fff7ed 0%, #fffdf8 44%, #f8fafc 100%);
}
.sign-change-card {
  border-color: rgba(245, 158, 11, .32) !important;
  background: linear-gradient(145deg, #fffdf8 0%, #ffffff 62%, #f0fdfa 100%);
}
.sign-change-logo-wrap {
  border-radius: 1rem;
  border: 1px solid rgba(245, 158, 11, .28);
  background: #0f172a;
}
.sign-change-brand-panel {
  border-radius: 1.75rem;
  border: 1px solid rgba(245, 158, 11, .28);
  background: #0f172a;
  overflow: hidden;
  box-shadow: 0 24px 70px -38px rgba(15, 23, 42, .45);
}
.sign-change-brand-panel img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.sign-change-brand-panel picture { display: block; width: 100%; height: 100%; }
.sign-change-logo {
  display: block;
  max-width: 17rem;
  width: 100%;
  height: auto;
}
.sign-change-primary,
.sign-change-secondary {
  text-decoration: none;
}
.sign-change-primary {
  background: #0f172a;
  color: #fff;
}
.sign-change-primary:hover {
  background: #1e293b;
}
.sign-change-secondary {
  border-color: rgba(245, 158, 11, .48) !important;
  background: #fff;
  color: #1e293b;
}
.sign-change-secondary:hover {
  background: #fff7ed;
}

/* Conversion-focused product visuals and application discovery cards. */
.product-visual,
.application-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 24px 70px -42px rgba(15, 23, 42, .45);
}
.product-visual { border-radius: 1.5rem; }
.product-visual picture,
.product-visual img,
.application-card__visual,
.application-card__visual img { display: block; width: 100%; }
.product-visual img,
.application-card__visual img { height: 100%; object-fit: cover; }
.product-visual--hero { aspect-ratio: 3 / 2; }
.hero-app-showcase {
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 24px 70px -42px rgba(15, 23, 42, .5);
}
.hero-app-showcase__slides { position: relative; aspect-ratio: 3 / 2; background: #e0f2fe; }
.hero-app-slide { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; margin: 0; overflow: hidden; }
.hero-app-slide[hidden] { display: none; }
.hero-app-slide picture,
.hero-app-slide > img,
.hero-app-slide picture img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; object-position: center; }
.hero-app-slide picture { position: relative; min-height: 0; overflow: hidden; background: linear-gradient(145deg, #f8fafc, #e0f2fe); }
.hero-app-slide picture::before {
  content: '';
  position: absolute;
  inset: -1rem;
  background-position: center;
  background-size: cover;
  filter: blur(18px) saturate(.75);
  opacity: .2;
  transform: scale(1.08);
}
.hero-app-slide picture img { position: relative; z-index: 1; }
.hero-app-slide:nth-child(1) picture::before { background-image: url('/assets/img/qiaip-platform.webp'); }
.hero-app-slide:nth-child(2) picture::before { background-image: url('/assets/img/qiaip-operations-login.webp'); }
.hero-app-slide:nth-child(3) picture::before { background-image: url('/assets/img/avelis-hcm.webp'); }
.hero-app-slide:nth-child(4) picture::before { background-image: url('/assets/img/wfguard-command.webp'); }
.hero-app-slide:nth-child(5) picture::before { background-image: url('/assets/img/coding-club-portal.webp'); }
.hero-app-slide:nth-child(6) picture::before { background-image: url('/assets/img/sign-for-a-change.webp'); }
.hero-app-slide:nth-child(7) picture::before { background-image: url('/assets/img/custom-business-web-platform.webp'); }
.hero-app-slide--icon { display: grid; place-items: center; background: linear-gradient(135deg, #ede9fe, #dbeafe); }
.hero-app-slide--icon > img { width: 34%; height: 34%; object-fit: contain; }
.hero-app-slide figcaption {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-top: 1px solid rgba(255,255,255,.18);
  background: #0f172a;
  color: #fff;
  padding: .7rem .85rem;
}
.hero-app-slide figcaption strong { font-size: .9rem; }
.hero-app-slide figcaption span { color: #e2e8f0; font-size: .7rem; text-align: right; }
.hero-app-showcase__controls { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .85rem; }
.hero-app-showcase__controls > button { display: grid; width: 2rem; height: 2rem; place-items: center; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; color: #0f172a; }
.hero-app-showcase__dots { display: flex; align-items: center; justify-content: center; gap: .45rem; }
.hero-app-showcase__dots button { width: .55rem; height: .55rem; border: 0; border-radius: 999px; background: #cbd5e1; padding: 0; }
.hero-app-showcase__dots button[aria-pressed="true"] { width: 1.45rem; background: #0284c7; }
@media (max-width: 420px) {
  .hero-app-slide figcaption { align-items: flex-start; flex-direction: column; gap: .15rem; }
  .hero-app-slide figcaption span { text-align: left; }
}
.application-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1.25rem;
}
.application-card {
  grid-column: span 4;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-radius: 1.5rem;
}
.application-card--featured { grid-column: span 8; }
@media (min-width: 901px) {
  .application-card--flagship {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(18rem, .85fr);
  }
  .application-card--flagship .application-card__visual {
    min-height: 22rem;
    aspect-ratio: auto;
  }
  .application-card--flagship .application-card__body {
    justify-content: center;
    padding: clamp(1.5rem, 3vw, 2.5rem);
  }
}
.application-card__visual { aspect-ratio: 3 / 2; overflow: hidden; background: #e0f2fe; }
.application-card__visual--icon { display: grid; place-items: center; background: linear-gradient(135deg, #ede9fe, #eff6ff); }
.application-card__visual--icon img { width: 7rem; height: 7rem; object-fit: contain; }
.application-card__body { display: flex; flex: 1; flex-direction: column; gap: .65rem; padding: 1.35rem; }
.application-card__body h3 { color: #0f172a; font-size: 1.35rem; font-weight: 700; }
.app-brand-title { display: inline-flex; align-items: center; gap: .55rem; }
.app-brand-title img { width: 1.65rem; height: 1.65rem; flex: 0 0 auto; object-fit: contain; }
.hero-app-slide figcaption .app-brand-title img { width: 1.35rem; height: 1.35rem; }
.hero-app-slide figcaption .app-brand-title { color: #fff; }
.application-card__body > p:not(.application-card__eyebrow) { color: #475569; font-size: .92rem; line-height: 1.6; }
.application-card__eyebrow { color: #0369a1; font-size: .7rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.application-card__actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: auto; padding-top: .5rem; }
.application-card__actions a { border-radius: 999px; border: 1px solid #cbd5e1; color: #0f172a; font-size: .82rem; font-weight: 700; padding: .65rem .9rem; text-decoration: none; }
.application-card__actions a:first-child { background: #0f172a; border-color: #0f172a; color: #fff; }
.application-card__actions a:hover { border-color: #0284c7; }
.product-proof { display: flex; flex-wrap: wrap; gap: .55rem; }
.product-proof span { border-radius: 999px; background: #f1f5f9; color: #334155; font-size: .72rem; font-weight: 700; padding: .45rem .7rem; }

@media (max-width: 900px) {
  .application-card,
  .application-card--featured { grid-column: span 6; }
}
@media (max-width: 620px) {
  .application-card,
  .application-card--featured { grid-column: 1 / -1; }
  .application-card__actions a { flex: 1 1 auto; text-align: center; }
}

/* Full-size impact section: give proof cards usable width and keep words intact. */
@media (min-width: 1024px) {
  .product-surface-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #impact > .max-w-6xl {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 2rem;
  }
  #impact > .max-w-6xl > :first-child {
    grid-column: span 8 / span 8;
  }
  #impact > .max-w-6xl > :last-child {
    grid-column: span 4 / span 4;
  }
  #impact > .max-w-6xl > :first-child > .mt-12 {
    gap: clamp(1.25rem, 2vw, 1.5rem);
  }
  #impact .stat-card {
    padding: 2rem 1.25rem;
  }
}
@media (min-width: 1200px) {
  #impact .stat-card .stat-value {
    white-space: nowrap;
  }
}
@media (min-width: 1280px) {
  #impact .stat-card {
    padding-inline: 1.5rem;
  }
}

@media (max-width: 1279px) {
  .site-nav__links { display: none !important; }
}
@media (max-width: 480px) {
  .assistant-widget { right: .75rem; bottom: .75rem; }
  .assistant-widget__panel { width: min(22rem, calc(100vw - 1.5rem)); }
  .back-to-top { right: .75rem; }
}
@media (max-width: 340px) {
  #products > header,
  #products > section {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  #products .max-w-6xl,
  #products [class*="lg:col-span"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  #products .site-branding { padding-left: .5rem; padding-right: .65rem; }
}
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .moving-lines, .testimonial-glow { animation: none !important; }
}
