:root {
  --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --site-header-height: 6.75rem;

  /* Brand — Primary #0145F2 · Secondary #EDF1F5 */
  --color-primary: #0145f2;
  --color-secondary: #edf1f5;
  --color-secondary-ink: #012db0;
  --color-foreground: #0b1526;
  --color-muted: #5a6a7c;
}

.dark {
  --color-primary: #6b8ff7;
  --color-secondary: #1a2436;
  --color-secondary-ink: #93aaf9;
  --color-foreground: #eef2f7;
  --color-muted: #a8b4c4;
}

/*
 * Secondary (#EDF1F5) is a soft canvas color — not readable as body text.
 * Keep bg/border/gradient utilities on --secondary; map text to deep brand ink.
 */
.text-secondary {
  color: var(--color-secondary-ink) !important;
}
.dark .text-secondary {
  color: #93aaf9 !important;
}

/* Secondary CTA: soft surface button with primary emphasis */
.btn-secondary-rich {
  color: var(--color-primary) !important;
  background: linear-gradient(135deg, #ffffff 0%, #edf1f5 100%) !important;
  border: 1px solid #b8c4d4;
  box-shadow: 0 4px 14px #0145f214, inset 0 1px #ffffffcc !important;
}
.btn-secondary-rich:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0145f2 0%, #3d6ff5 50%, #0136c4 100%) !important;
  border-color: transparent;
  box-shadow: 0 8px 28px #0145f259, inset 0 1px #ffffff40 !important;
}
.dark .btn-secondary-rich {
  color: #eef2f7 !important;
  background: linear-gradient(135deg, #1a2436 0%, #0f1520 100%) !important;
  border-color: #ffffff24;
}
.dark .btn-secondary-rich:hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #3d6ff5 0%, #0145f2 100%) !important;
}

/* Rich brand gradients */
.text-gradient {
  -webkit-text-fill-color: transparent;
  background: linear-gradient(135deg, #012db0 0%, #0145f2 40%, #3d6ff5 75%, #6b8ff7 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.text-gradient-accent {
  -webkit-text-fill-color: transparent;
  background: linear-gradient(135deg, #0145f2 0%, #2a5af0 45%, #3d6ff5 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.dark .text-gradient {
  background: linear-gradient(135deg, #6b8ff7 0%, #3d6ff5 40%, #93aaf9 75%, #c5d4fb 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
.dark .text-gradient-accent {
  background: linear-gradient(135deg, #3d6ff5 0%, #6b8ff7 50%, #93aaf9 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

html {
  scroll-padding-top: var(--site-header-height);
}

/* Fixed header — push all page content below navbar */
.site-main {
  padding-top: var(--site-header-height);
}

/* Home hero */
.hero-home {
  min-height: calc(100svh - var(--site-header-height));
  min-height: calc(100dvh - var(--site-header-height));
}
.hero-home__inner {
  padding-top: 2rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .hero-home__inner {
    padding-top: 2.5rem;
    padding-bottom: 5rem;
  }
}
@media (min-width: 1024px) {
  .hero-home__inner {
    padding-top: 3rem;
    padding-bottom: 6rem;
  }
}

/* Inner page heroes */
.page-hero {
  padding-top: 2.5rem;
}
@media (min-width: 768px) {
  .page-hero {
    padding-top: 3rem;
  }
}

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

/* Logo */
.site-logo-wrap {
  display: inline-grid;
  align-items: center;
  line-height: 0;
  vertical-align: middle;
}
.site-logo-wrap > .site-logo {
  grid-area: 1 / 1;
}
.site-logo {
  display: block;
  height: 2.25rem;
  width: auto;
  max-width: 11rem;
  object-fit: contain;
  object-position: left center;
}
.site-logo-wrap > .site-logo-dark {
  display: none;
}
html.dark .site-logo-wrap > .site-logo-light {
  display: none;
}
html.dark .site-logo-wrap > .site-logo-dark {
  display: block;
}
.site-logo-sm {
  height: 1.875rem;
  max-width: 9rem;
}
.site-logo-footer {
  height: 2.5rem;
  max-width: 12rem;
}
.site-logo-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 0;
  isolation: isolate;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.06);
}
.site-logo-icon-wrap--loader {
  width: 3.5rem;
  height: 3.5rem;
  min-width: 3.5rem;
  min-height: 3.5rem;
  animation: logo-loader-pulse 2s ease-in-out infinite;
}
@keyframes logo-loader-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.site-logo-icon-wrap .site-logo-icon {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}
.site-header-brand:hover .site-logo-icon-wrap {
  transform: scale(1.04);
}
.site-header-brand-text {
  min-width: 0;
}
.site-logo-icon-wrap {
  transition: transform 0.25s ease;
}
@media (min-width: 768px) {
  .site-logo {
    height: 2.5rem;
    max-width: 12.5rem;
  }
  .site-logo-icon-wrap:not(.site-logo-icon-wrap--loader) {
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
  }
}

.section-bg-base { background: var(--section-base); }
.section-bg-white { background: var(--section-white); }
.section-bg-orange { background: var(--section-orange); }
.section-bg-navy { background: var(--section-navy); }
.section-bg-slate { background: var(--section-slate); }
.section-bg-peach { background: var(--section-peach); }
.section-bg-mist { background: var(--section-mist); }
.section-bg-coral { background: var(--section-coral); }
.section-bg-emerald { background: var(--section-emerald); }

/* Scroll reveal — visible by default; GSAP animates from hidden */
[data-reveal] {
  opacity: 1;
  transform: none;
}

html.animations-ready [data-reveal]:not(.revealed) {
  opacity: 0;
  transform: translateY(32px);
}

/* Page hero is always above the fold — never hide before animation */
html.animations-ready .page-hero [data-reveal]:not(.revealed) {
  opacity: 1;
  transform: none;
}

html.animations-ready [data-reveal="fade"].revealed,
html.animations-ready [data-reveal="scale"].revealed {
  opacity: 1;
  transform: none;
}

html.animations-ready [data-reveal="scale"]:not(.revealed) {
  transform: scale(0.92);
}

/* Navbar */
.site-header {
  transition: background 0.5s, box-shadow 0.5s, padding 0.5s, transform 0.4s;
  /* Avoid Chrome paint bugs: do not combine backdrop-filter with translateZ/backface */
  transform: none;
  backface-visibility: visible;
  will-change: auto;
  isolation: isolate;
}
.site-header .site-header-brand,
.site-header .nav-icon-btn,
.site-header .site-logo-icon-wrap {
  position: relative;
  z-index: 2;
  opacity: 1;
  visibility: visible;
}

/* Nav icon buttons (menu + theme) — always visible stroke color in Chrome */
.nav-icon-btn {
  color: var(--foreground) !important;
  -webkit-text-fill-color: currentColor;
}
.nav-icon-btn svg {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  stroke: currentColor;
  color: inherit;
  opacity: 1;
  visibility: visible;
}
.nav-icon-btn .icon-sun {
  display: none;
}
html.dark .nav-icon-btn .icon-moon {
  display: none;
}
html.dark .nav-icon-btn .icon-sun {
  display: block;
}
.nav-icon-btn .menu-icon-close.hidden,
.nav-icon-btn .menu-icon-open.hidden {
  display: none !important;
}

.site-header.is-scrolled {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.site-header.is-hidden {
  transform: translateY(-110%);
}
.mobile-nav {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.mobile-nav.is-open {
  transform: translateX(0);
  pointer-events: auto;
}
.mobile-nav-panel {
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.15);
}
.dark .mobile-nav-panel {
  background: var(--surface);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
}
.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 54;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-nav-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.mobile-services-panel.is-open {
  display: block !important;
}
.mobile-services-chevron.is-open {
  transform: rotate(180deg);
}
body.nav-open {
  overflow: hidden;
}

/* FAQ accordion */
.faq-item .faq-trigger {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-item.is-open .faq-answer {
  max-height: var(--faq-height, 800px);
}
.faq-icon {
  transition: transform 0.3s ease;
}
.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}
/* Mega menu */
.mega-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.nav-item-services:hover .mega-menu,
.nav-item-services:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .faq-trigger {
    font-size: 1rem;
    line-height: 1.5;
  }
  .faq-answer-inner {
    font-size: 0.9375rem;
    line-height: 1.65;
  }
}

/* Scroll progress */
#scroll-progress {
  transform-origin: left;
  transform: scaleX(0);
}

/* Cursor glow */
#cursor-glow {
  pointer-events: none;
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-soft) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 40;
  opacity: 0;
  transition: opacity 0.3s;
}
body.show-cursor-glow #cursor-glow {
  opacity: 1;
}

/* Hero dashboard mock */
.hero-dashboard {
  border-radius: 1.5rem;
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-muted) 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
}

/* Loader */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s, visibility 0.5s;
}
#page-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Grid overlay for hero */
.hero-grid {
  background-image:
    linear-gradient(rgba(30, 58, 138, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 138, 0.045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 70%);
}

.dark .hero-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

/* Aurora blobs */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: aurora 15s ease infinite;
}
@keyframes aurora {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .animate-marquee,
  .animate-marquee-slow,
  .animate-float,
  .aurora-blob {
    animation: none !important;
  }
  html.js-ready [data-reveal],
  html.animations-ready [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* SEO breadcrumbs + back links */
.seo-breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
.seo-breadcrumbs__item:not(:last-child)::after {
  content: "/";
  margin-left: 0.5rem;
  opacity: 0.45;
  color: var(--muted);
}
.seo-breadcrumbs a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease, opacity 0.2s ease;
}
.seo-breadcrumbs a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.seo-breadcrumbs [aria-current="page"] {
  color: var(--foreground);
  font-weight: 600;
}
.dark .seo-breadcrumbs__list {
  color: #a8b4c4;
}
.dark .seo-breadcrumbs a {
  color: #93aaf9;
}
.dark .seo-breadcrumbs a:hover {
  color: #c5d4fb;
}
.dark .seo-breadcrumbs [aria-current="page"] {
  color: #eef2f7;
}

/* Explicit back links (← Back to …) */
a.back-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
a.back-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.dark a.back-link {
  color: #93aaf9;
}
.dark a.back-link:hover {
  color: #c5d4fb;
}

/* Projects showcase */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }
  .projects-grid:not(.projects-grid--compact) .project-card--featured {
    grid-column: span 2;
  }
  .projects-grid:not(.projects-grid--compact) .project-card--featured .project-card__media {
    aspect-ratio: 21 / 9;
  }
}
@media (min-width: 1024px) {
  .projects-grid:not(.projects-grid--compact) {
    grid-template-columns: repeat(3, 1fr);
  }
  .projects-grid:not(.projects-grid--compact) .project-card--featured {
    grid-column: span 2;
  }
}

.projects-grid--compact {
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .projects-grid--compact {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
  border-radius: 1.25rem;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
  cursor: pointer;
}
.project-card:hover {
  transform: translateY(-4px);
}
.project-card.is-hidden {
  display: none;
}

.project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface-muted) 0%, var(--surface) 100%);
}
.project-card--featured .project-card__media {
  aspect-ratio: 16 / 9;
}

.project-card__image-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.25rem 0;
}
.project-card__image {
  width: auto;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 1rem 1rem 0 0;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card:hover .project-card__image {
  transform: scale(1.03) translateY(-4px);
}

.project-card__media-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 100%, var(--glow-soft, rgba(1, 69, 242, 0.15)) 0%, transparent 70%);
  pointer-events: none;
}

.project-card__platform {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--foreground);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.dark .project-card__platform {
  background: rgba(15, 15, 20, 0.85);
}

.project-card__category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.project-card__footer {
  margin-top: auto;
  padding-top: 0.5rem;
}

.project-card__view-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Project detail page */
.project-detail-hero__frame {
  border-radius: 1.25rem;
  overflow: hidden;
  background: linear-gradient(145deg, var(--surface-muted) 0%, var(--surface) 100%);
}
.project-detail-hero__image {
  display: block;
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  object-position: center;
}
.project-card--web .project-card__image-wrap {
  padding: 1.5rem;
}
.project-card--web .project-card__image {
  border-radius: 0.75rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.project-card__body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.75rem;
}

.project-card__stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.project-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: var(--surface-muted);
  color: var(--muted);
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}

.project-card__title {
  font-size: 1.125rem;
  line-height: 1.35;
}
.project-card--featured .project-card__title {
  font-size: 1.375rem;
}

.project-card__summary {
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.projects-grid--compact .project-card__summary {
  -webkit-line-clamp: 2;
}

.project-card__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 0.875rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--foreground);
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}
.project-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}
.project-link--play:hover {
  background: #34a853;
  border-color: #34a853;
}
.project-link--apple:hover {
  background: #0071e3;
  border-color: #0071e3;
}
.project-link--web:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.projects-filter-bar {
  position: sticky;
  top: calc(var(--site-header-height) + 0.5rem);
  z-index: 20;
  padding: 0.5rem;
  border-radius: 9999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg, 0 10px 40px rgba(0, 0, 0, 0.08));
  width: fit-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
.project-filter-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1.125rem;
  border-radius: 9999px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.project-filter-btn:hover {
  color: var(--foreground);
  background: var(--surface-muted);
}
.project-filter-btn.is-active {
  background: var(--primary);
  color: #fff;
}
