/* ============ SERVICES SECTION SPACING ============ */
.services-work-wrap {
  position: relative;
  isolation: isolate;
}
.services,
.work { position: relative; }
.services .container,
.work .container {
  position: relative;
  z-index: 2;
}
.services .container { max-width: 1500px; }
.services .section-head { margin-bottom: var(--space-lg); }

/* ============ FLOATING ICONS BG ============ */
.floating-icons {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.floating-icon {
  position: absolute;
  transform: translate(var(--dx, 0px), var(--dy, 0px));
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  opacity: 0;
  animation: floating-icon-in 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.floating-icon:nth-child(1) { animation-delay: 0.1s; }
.floating-icon:nth-child(2) { animation-delay: 0.18s; }
.floating-icon:nth-child(3) { animation-delay: 0.26s; }
.floating-icon:nth-child(4) { animation-delay: 0.34s; }
.floating-icon:nth-child(5) { animation-delay: 0.42s; }
.floating-icon:nth-child(6) { animation-delay: 0.5s; }
.floating-icon:nth-child(7) { animation-delay: 0.58s; }
.floating-icon:nth-child(8) { animation-delay: 0.66s; }
.floating-icon:nth-child(9) { animation-delay: 0.74s; }
.floating-icon:nth-child(10) { animation-delay: 0.82s; }
.floating-icon:nth-child(11) { animation-delay: 0.9s; }
.floating-icon:nth-child(12) { animation-delay: 0.98s; }
.floating-icon:nth-child(13) { animation-delay: 1.06s; }
.floating-icon:nth-child(14) { animation-delay: 1.14s; }

@keyframes floating-icon-in {
  from { opacity: 0; transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(0.5); }
  to   { opacity: 1; transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(1); }
}

.floating-icon-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background: transparent;
  border: none;
  box-shadow: none;
  opacity: 1;
  animation: float-a 6s ease-in-out infinite;
}
.floating-icon--highlight .floating-icon-inner {
  width: 4.5rem;
  height: 4.5rem;
  opacity: 1;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.15));
}

.hero-floating-icons .floating-icon-inner {
  width: 7rem;
  height: 7rem;
  opacity: 1;
}
@media (min-width: 768px) {
  .hero-floating-icons .floating-icon-inner { width: 8rem; height: 8rem; }
}
.floating-icon .floating-icon-inner--lg {
  width: 4.2rem;
  height: 4.2rem;
}
@media (min-width: 768px) {
  .floating-icon .floating-icon-inner--lg { width: 6rem; height: 6rem; }
}
.floating-icon-inner svg {
  width: 100%;
  height: 100%;
  display: block;
}

@media (min-width: 768px) {
  .floating-icon-inner { width: 5rem; height: 5rem; padding: 0.875rem; }
}

.floating-icon:nth-child(4n+1) .floating-icon-inner { animation: float-a 7s ease-in-out infinite; }
.floating-icon:nth-child(4n+2) .floating-icon-inner { animation: float-b 8s ease-in-out infinite; }
.floating-icon:nth-child(4n+3) .floating-icon-inner { animation: float-c 6s ease-in-out infinite; }
.floating-icon:nth-child(4n)   .floating-icon-inner { animation: float-d 9s ease-in-out infinite; }

@keyframes float-a {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(6px, -8px) rotate(3deg); }
  50%      { transform: translate(0, 0) rotate(0deg); }
  75%      { transform: translate(-6px, 8px) rotate(-3deg); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-8px, 6px) rotate(-4deg); }
  50%      { transform: translate(0, 0) rotate(0deg); }
  75%      { transform: translate(8px, -6px) rotate(4deg); }
}
@keyframes float-c {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(5px, 7px) rotate(2deg); }
  50%      { transform: translate(0, 0) rotate(0deg); }
  75%      { transform: translate(-5px, -7px) rotate(-2deg); }
}
@keyframes float-d {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25%      { transform: translate(-7px, -5px) rotate(-5deg); }
  50%      { transform: translate(0, 0) rotate(0deg); }
  75%      { transform: translate(7px, 5px) rotate(5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .floating-icon,
  .floating-icon-inner { animation: none; }
}

/* Hide floating icons on small screens */
@media (max-width: 720px) {
  .floating-icons { display: none; }
}

/* ============ PHOTO GALLERY ============ */
.photo-gallery {
  position: relative;
  height: 320px;
  margin: 1rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  --card-size: 200px;
  --card-spacing: 125px;
}
.photo-gallery-stack {
  position: relative;
  width: var(--card-size);
  height: var(--card-size);
}
.photo-card {
  position: absolute;
  inset: 0;
  width: var(--card-size);
  height: var(--card-size);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
  background: #18181b;
  transform: translate(0, 0) rotate(0deg) scale(0.92);
  opacity: 0;
  transition:
    transform 0.9s cubic-bezier(0.34, 1.2, 0.64, 1),
    opacity 0.5s ease-out;
  transition-delay: calc(var(--order) * 120ms);
  cursor: grab;
  will-change: transform;
}
.photo-card img,
.photo-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.35) 55%, rgba(0, 0, 0, 0.75) 100%);
}
.photo-card span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  text-align: center;
  padding: 0 1rem;
}
.photo-gallery.is-visible .photo-card {
  opacity: 1;
  transform: translate(calc(var(--offset) * var(--card-spacing)), var(--ty)) rotate(var(--rot));
}
.photo-gallery.is-visible .photo-card:hover {
  transform: translate(calc(var(--offset) * var(--card-spacing)), var(--ty)) rotate(0deg) scale(1.08);
  z-index: 999;
  transition-delay: 0s;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

@media (max-width: 1280px) {
  .photo-gallery { --card-size: 170px; --card-spacing: 105px; }
}
@media (max-width: 1024px) {
  .photo-gallery { --card-size: 140px; --card-spacing: 86px; }
  .photo-card span { font-size: 1.25rem; }
}
@media (max-width: 820px) {
  .photo-gallery { height: 280px; margin: 2rem 0 3rem; --card-size: 110px; --card-spacing: 66px; }
  .photo-card { border-radius: 1.25rem; }
  .photo-card span { font-size: 0.9375rem; }
}
@media (max-width: 560px) {
  .photo-gallery { height: 220px; --card-size: 82px; --card-spacing: 48px; }
  .photo-card { border-radius: 1rem; }
  .photo-card span { font-size: 0.6875rem; }
}

/* ============ SERVICES ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: var(--space-xl);
}
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services-grid { grid-template-columns: 1fr; }
}
.service-card {
  position: relative;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid hsl(195 85% 60%);
  border-radius: var(--radius-xl);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  transition:
    transform var(--t-base),
    box-shadow 0.55s ease,
    border-color 0.55s ease;
}
.service-card:nth-child(2) { border-color: hsl(200 85% 55%); }
.service-card:nth-child(3) { border-color: hsl(205 85% 50%); }

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 40px -6px hsl(195 90% 50% / 0.45);
}

.service-icon {
  position: relative;
  width: 44px;
  height: 44px;
  margin-bottom: 1.75rem;
  flex-shrink: 0;
  background: linear-gradient(
    90deg,
    #0f172a 0%,
    #1e3a5f 25%,
    #0e7490 50%,
    #0891b2 75%,
    #0f172a 100%
  );
  background-size: 300% 100%;
  animation: hero-subtitle-gradient 10s linear infinite;
  -webkit-mask-size: contain;
          mask-size: contain;
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
}
.service-icon svg { display: none; }

.service-card:nth-child(1) .service-icon {
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z'/></svg>");
}
.service-card:nth-child(2) .service-icon {
  animation-delay: -3s;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'/></svg>");
}
.service-card:nth-child(3) .service-icon {
  animation-delay: -6s;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M13 10V3L4 14h7v7l9-11h-7z'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><path d='M13 10V3L4 14h7v7l9-11h-7z'/></svg>");
}
.service-card:nth-child(4) .service-icon {
  animation-delay: -9s;
  -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='5' width='20' height='14' rx='2'/><line x1='2' y1='10' x2='22' y2='10'/><line x1='6' y1='15' x2='10' y2='15'/></svg>");
          mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='5' width='20' height='14' rx='2'/><line x1='2' y1='10' x2='22' y2='10'/><line x1='6' y1='15' x2='10' y2='15'/></svg>");
}

.service-card h3 {
  font-size: clamp(1.625rem, 2.3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.service-card p {
  color: var(--muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.65;
  font-weight: 400;
  max-width: 22rem;
  margin-top: auto;
}
.services-cta {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}


@media (max-width: 900px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ============ WORK (bento) ============ */
.bento {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1.25rem;
  min-height: 680px;
}
.bento-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #111;
  cursor: pointer;
  transition: transform var(--t-base);
  display: block;
  min-height: 320px;
}
.bento-card:hover { transform: translateY(-4px); }
.bento-card:hover video { transform: scale(1.05); }
.bento-card--lg {
  grid-row: span 2;
}
.bento-card video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.bento-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.85) 100%);
}
.bento-body {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: #ffffff;
}
.bento-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  align-self: flex-start;
  margin-bottom: 1rem;
}
.bento-body h3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.625rem;
  letter-spacing: -0.02em;
}
.bento-body p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  line-height: 1.55;
  max-width: 32rem;
  margin-bottom: 1.25rem;
}
.bento-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #ffffff;
  transition: gap var(--t-fast);
}
.bento-card:hover .bento-link { gap: 0.875rem; }

@media (max-width: 900px) {
  .bento {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: auto;
  }
  .bento-card--lg { grid-row: auto; min-height: 420px; }
  .bento-card { min-height: 280px; }
}

/* ============ ABOUT ============ */
.about {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #000;
}
.about-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 100%);
}
.about-inner {
  position: relative;
  z-index: 2;
}
.about-text {
  max-width: 44rem;
}
.about-lead {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  color: rgba(255, 255, 255, 0.95);
  margin-top: 1.5rem;
  margin-bottom: 1.25rem;
}
.about-text p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}
.about-text .btn { margin-top: 1rem; }

/* ============ TESTIMONIALS + CONTACT WRAP ============ */
.testimonials-contact-wrap {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.testimonials,
.contact {
  position: relative;
}
.testimonials > .container,
.contact > .container {
  position: relative;
  z-index: 2;
}


/* ============ TESTIMONIALS (Team cards grid) ============ */
.testimonials .container {
  max-width: 1500px;
}
.team-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(5, 1fr);
  margin: 0 auto;
}
@media (max-width: 1080px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 720px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
}

.team-card {
  background: #ffffff;
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.15);
}

.team-card-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  isolation: isolate;
}
.team-card-media .team-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  height: auto;
  background-size: cover;
  background-position: center 20%;
  background-repeat: no-repeat;
  transition: transform 0.5s var(--ease);
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}
.team-card:hover .team-photo { transform: scale(1.05); }
.team-card-media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  background: linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0.55) 45%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.team-card-body {
  padding: 0 1.25rem 1.5rem;
  margin-top: -2rem;
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.team-quote {
  font-size: 0.9375rem;
  line-height: 1.55;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 1.25rem;
}
.team-meta {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  min-height: 5.25rem;
}
.team-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
}
.team-role {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: linear-gradient(90deg, #0891b2, #22d3ee, #0e7490);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.team-subrole {
  margin-top: 0.1rem;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--muted-foreground);
  line-height: 1.4;
}

/* ============ CONTACT ============ */
.contact {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.contact > .container {
  position: relative;
  z-index: 2;
}
.contact-showcase {
  position: absolute;
  top: 3rem;
  bottom: 3rem;
  left: 55%;
  right: -4rem;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
}
.contact-showcase::before {
  content: "";
  position: absolute;
  left: -1rem;
  right: -1rem;
  top: 0;
  bottom: 1.75rem;
  transform: skewX(6deg);
  border: 1px solid rgba(10, 10, 10, 0.06);
  background: rgba(10, 10, 10, 0.03);
  border-radius: calc(var(--radius-xl) + 1rem);
}
.contact-showcase-inner {
  position: relative;
  height: 100%;
  transform: translateY(-1.5rem) skewX(6deg);
  border: 1px solid rgba(10, 10, 10, 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow:
    0 30px 60px -20px rgba(10, 10, 10, 0.2),
    0 10px 20px -10px rgba(10, 10, 10, 0.1);
  background: #ffffff;
}
.contact-showcase-inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}
@media (max-width: 900px) {
  .contact-showcase { display: none; }
}
.contact-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 3rem;
  align-items: center;
}
.contact-copy .eyebrow { margin-bottom: 1rem; }
.contact-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--muted-foreground);
  font-size: 0.9375rem;
}
.contact-list a { color: var(--foreground); transition: color var(--t-fast); }
.contact-list a:hover { color: #0891b2; }
.contact-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  border-radius: var(--radius);
  flex-shrink: 0;
}
.contact-icon svg { width: 18px; height: 18px; }
.contact-cta {
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.contact-cta h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.contact-cta p {
  color: var(--muted-foreground);
  margin-bottom: 1.75rem;
}
.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
